Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wrong formatted strings in Fennec

6 views
Skip to first unread message

Michal Stanke

unread,
Apr 30, 2016, 5:13:47 PM4/30/16
to dev-l10n, Tomáš Zelina, Michal Vašíček
Hi.

During the hackathon we were trying to reach 100% for all products. In some
files in Fennec we noticed strings with wrong formatting:
- netError.dtd: newlines, multiple spaces and HTML tags (<ul> and <li>)
- android_strings.dtd: multiple spaces

Are those intended, or rather bugs?

Cheers,
--
Michal Stanke

Francesco Lodolo [:flod]

unread,
May 1, 2016, 2:43:23 AM5/1/16
to dev-...@lists.mozilla.org
Il 30/04/16 23.13, Michal Stanke ha scritto:
> Hi.
>
> During the hackathon we were trying to reach 100% for all products. In some
> files in Fennec we noticed strings with wrong formatting:
> - netError.dtd: newlines, multiple spaces and HTML tags (<ul> and <li>)
They're HTML fragment, so newlines and multiple spaces are not relevant
(not a bug). A new line in the middle of the text would be turned into a
single whitespace, multiple spaces collapsed.

> - android_strings.dtd: multiple spaces
Do you have any example? I can't recall any.

Francesco

>
> Are those intended, or rather bugs?
>
> Cheers,
> --
> Michal Stanke
> _______________________________________________
> dev-l10n mailing list
> dev-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-l10n

Michal Stanke

unread,
May 1, 2016, 3:25:53 AM5/1/16
to Francesco Lodolo [:flod], dev-l10n
Hi.

The HTML containing strings makes me wonder how easy/hard is to
accidentally, by mistake, break something by not closing the some properly
etc. Also they are including leading newlines.

>From android_string.dtd: bookmarkhistory_import_both,
bookmarkhistory_import_bookmarks
and
bookmarkhistory_import_history. We also noticed tab_queue_notification_title
and content_notification_summary there, which are "&brandShortName;" only.

--
Michal Stanke

Axel Hecht

unread,
May 1, 2016, 12:44:20 PM5/1/16
to
Unclosed tags in DTDs are caught by the dashboard, and are reported as
errors.

Re the android strings, stackoverflow comments indicate that the
whitespace handling in android string resources used to be documented,
but isn't anymore. Doh.

Having entities for special use-cases that just resolve to, say,
brandShortName is the right thing to do, I think. That way, locales that
need to adjust because just a noun doesn't make sense for them or so, can.

Axel

Francesco Lodolo

unread,
May 1, 2016, 12:57:09 PM5/1/16
to Michal Stanke, dev-l10n
Thanks, that explains why I couldn't find any (I was searching for double
spaces, not newlines in the middle of the string).

Looking at the bug that landed those strings I found
https://bugzilla.mozilla.org/show_bug.cgi?id=710330#c36

It's (apparently) a property of SGML, of which XML is a subset, that this
> kind of (repeated) whitespace is entirely ignored. And emacs, which
> formatted it like that automagically, knows about that :P
>

Not sure how true this remains these days.

Francesco
0 new messages