Fix Report Site Issue button l10n issues

RESOLVED FIXED

Status

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: miketaylr, Assigned: miketaylr)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

flod gave me the following feedback (thanks!):

As it is, strings won't be visible to localizers, and they would appear 
in English for everyone.

To expose these strings for localization you would need several more 
changes, like:
* Rename the folder from locale to locales (also, nit, missing license 
header in .properties)
* Include the folder in l10n.ini and filter.py[1]
* I assume modify jar.mn to actually build these locales (build is the 
foggy part for me)

Having said that, since it's just two strings, is there a strong opinion 
against just exposing them in the existing .properties file? As l10n I 
don't think it would be a problem, especially if we don't plan to grow 
the number of strings.
https://hg.mozilla.org/releases/mozilla-aurora/file/default/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties

[1] The opposite of this 
https://hg.mozilla.org/mozilla-central/rev/8c51fc68856e
See Also: → 1324062
I think it makes sense to have the l10n file next to its code, even if it's just two strings.

Happy to review the patch.

In case you're wondering, moving the .properties into locales instead of locale just touches the jar.mn, the chrome urls stay the same.
Sadly, pushing to try won't help for a change like this yet, this is one of those changes you could only test locally by doing a package and doing a repack of that. https://developer.mozilla.org/en-US/docs/Mozilla/Creating_a_language_pack#L10n_binary_repack is supposed to be the doc, but hasn't been edited in a while (like most l10n-related doc)
Cool, thanks Axel. I'll file a quick follow up patch as soon as Bug 1324062 lands.
Depends on: 1324062
See Also: 1324062
Assignee: nobody → miket
Using https://bugzilla.mozilla.org/show_bug.cgi?id=1236014#c6 I was able to get this working (...I think!). My Italian is rusty, but I tested my translation here: https://cloudup.com/c4Gt-eEWcKN
Comment on attachment 8830070 [details]
Bug 1329226. Part 2 - Make it possible for Report Site Issue button to be localized.

https://reviewboard.mozilla.org/r/106986/#review108134

::: browser/extensions/webcompat-reporter/locales/en-US/webcompat.properties:5
(Diff revision 1)
> +# This Source Code Form is subject to the terms of the Mozilla Public
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
>  wc-reporter.label=Report Site Issue

I would add a note explaining that this string is going to be used in Firefox menu (not sure what it's called these days).

Reason is simple: there are special constraints in terms of lenght, and weird workarounds involving soft-hyphens (bug 989133).
Comment on attachment 8830070 [details]
Bug 1329226. Part 2 - Make it possible for Report Site Issue button to be localized.

https://reviewboard.mozilla.org/r/106986/#review108226

r=me with flod's comment addressed.
Attachment #8830070 - Flags: review?(l10n) → review+
Comment on attachment 8830050 [details]
Bug 1329226. Part 1 - Move webcompat-reporter l10n files to locales dir.

https://reviewboard.mozilla.org/r/106968/#review108228
Attachment #8830050 - Flags: review?(l10n) → review+
(In reply to Francesco Lodolo [:flod] from comment #7)
> Comment on attachment 8830070 [details]
> Bug 1329226. Part 2 - Make it possible for Report Site Issue button to be
> localized.
> 
> https://reviewboard.mozilla.org/r/106986/#review108134
> 
> :::
> browser/extensions/webcompat-reporter/locales/en-US/webcompat.properties:5
> (Diff revision 1)
> > +# This Source Code Form is subject to the terms of the Mozilla Public
> > +# License, v. 2.0. If a copy of the MPL was not distributed with this
> > +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> > +
> >  wc-reporter.label=Report Site Issue
> 
> I would add a note explaining that this string is going to be used in
> Firefox menu (not sure what it's called these days).
> 
> Reason is simple: there are special constraints in terms of lenght, and
> weird workarounds involving soft-hyphens (bug 989133).

That's great feedback, thank you.
> Reason is simple: there are special constraints in terms of lenght, and weird workarounds involving soft-hyphens (bug 989133).

(Also, looks like what I need to do for linux @ Bug 1333517)
try is green (no tests, just to prove this changeset compiles): https://treeherder.mozilla.org/#/jobs?repo=try&revision=e136bc4adea334ce289d0e3fa2e43a8966afea42
Pushed by mitaylor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fd8428b0831b
Part 1 - Move webcompat-reporter l10n files to locales dir. r=Pike
https://hg.mozilla.org/integration/autoland/rev/8d9a2e5cbc2c
Part 2 - Make it possible for Report Site Issue button to be localized. r=Pike
https://hg.mozilla.org/mozilla-central/rev/fd8428b0831b
https://hg.mozilla.org/mozilla-central/rev/8d9a2e5cbc2c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.