Closed Bug 1260390 Opened 4 years ago Closed 4 years ago

Add localization note to 'content_notification_title_plural' string

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: sebastian, Assigned: sebastian)

References

()

Details

Attachments

(1 file)

This is how our content notification look like currently:
https://bugzilla.mozilla.org/attachment.cgi?id=8723718

Flod raised some L10N issues in bug 1241810 comment 139. We should try to find a string without plurals if possible.

Some more context from IRC:
> <flod> starting from rule #3, without the number the string is basically broken https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#Plural_rule_.233_.283_forms.29
> <flod> the only way around it is to do something like "Updated websites: #1", but that's far from natural
Hey flod. I was looking how we solves this for other notifications like tab queues (It's basically the same kind of notification) and we just defined one plural string there:
https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/locales/en-US/android_strings.dtd#255

Is this theoretically broken too or am I missing something here?
Flags: needinfo?(francesco.lodolo)
It's not broken, it's just bad for localization. 

Some languages need to work around our technical limitation (lack of support for proper plural forms) by writing "Tab waiting: #1" or "Some tab waiting (#1)".

Check for example cs, pl, or sl.
https://transvision.mozfr.org/string/?entity=mobile/android/base/android_strings.dtd:tab_queue_notification_text_plural2&repo=aurora

If we really need to show the number, I guess we can and they'll need to adopt the same solution on their side.
Flags: needinfo?(francesco.lodolo)
Thanks, flod!

@antlam: Your call: Do we want to go with "x websites updated" and have potentially different/bad versions in other languages or do we want to use a more generic version that doesn't use the number as part of the sentence?
Flags: needinfo?(alam)
I'm definitely open to suggestions but I don't have a better solution at this point. Especially not one that will help solve this isolated case without negatively affecting the rest of the UX. 

As far as I can tell, this is the more commonly seen practice so I'm fine staying with it. At least until we figure out a better solution for all our notifications that follow a similar format.
Flags: needinfo?(alam)
Okay. But what I would like to do here is to add a localization note to explain the string a bit:
https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/locales/en-US/android_strings.dtd#265
https://reviewboard.mozilla.org/r/43497/#review40019

::: mobile/android/base/locales/en-US/android_strings.dtd:267
(Diff revision 1)
>  <!ENTITY tab_queue_notification_settings "To \&quot;Open multiple links\&quot;, please enable the \'Draw over other apps\' permission for &brandShortName;">
>  
>  <!ENTITY content_notification_summary "&brandShortName;">
> +<!-- Localization note (content_notification_title_plural): &formatD; will be replaced with the number of websites that
> +     have been updated (new content is available). The number of websites is always more than one (>= 2). For a single
> +     update the website title is used. -->

I would add a note that it's technically not possible to use a proper plural form in this file (like the other string), to avoid other people filing bugs.
(In reply to Francesco Lodolo [:flod] from comment #7)
> I would add a note that it's technically not possible to use a proper plural
> form in this file (like the other string), to avoid other people filing bugs.

Okay, I'll update!
Comment on attachment 8736648 [details]
MozReview Request: Bug 1260390 - Add localization note to 'content_notification_title_plural' string. r=grisha

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/43497/diff/1-2/
(In reply to Francesco Lodolo [:flod] from comment #2)
> It's not broken, it's just bad for localization. 
> 
> Some languages need to work around our technical limitation (lack of support
> for proper plural forms) by writing "Tab waiting: #1" or "Some tab waiting
> (#1)".
> 
> Check for example cs, pl, or sl.
> https://transvision.mozfr.org/string/?entity=mobile/android/base/
> android_strings.dtd:tab_queue_notification_text_plural2&repo=aurora
> 
> If we really need to show the number, I guess we can and they'll need to
> adopt the same solution on their side.

how do we file bugs against wrong localizations? Russian one isn't right in this case (although you have to get to at least 21 tabs for it to be wrong, then 31, 41, etc.).
Attachment #8736648 - Flags: review?(gkruglov) → review+
Comment on attachment 8736648 [details]
MozReview Request: Bug 1260390 - Add localization note to 'content_notification_title_plural' string. r=grisha

https://reviewboard.mozilla.org/r/43497/#review40111
(In reply to :Grisha Kruglov from comment #10)
> how do we file bugs against wrong localizations? Russian one isn't right in
> this case (although you have to get to at least 21 tabs for it to be wrong,
> then 31, 41, etc.).

You can file bugs into individual Mozilla Localizations components.

If you search on Transvision, you'll get a link to report the string ("Report a bug" under the translation)
https://transvision.mozfr.org/?recherche=tab_queue_notification_text_plural2&repo=aurora&sourcelocale=en-US&locale=ru&search_type=entities
https://hg.mozilla.org/integration/fx-team/rev/62620131e03767e04753f5c26053af0759492e12
Bug 1260390 - Add localization note to 'content_notification_title_plural' string. r=grisha
https://hg.mozilla.org/mozilla-central/rev/62620131e037
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Summary: Remove plural from content notification string → Add localization note to 'content_notification_title_plural' string
You need to log in before you can comment on or make changes to this bug.