Closed Bug 1363100 Opened 7 years ago Closed 7 years ago

Don't hard-code parenthesis for "(learn more)"

Categories

(DevTools :: about:debugging, enhancement, P3)

enhancement

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: flod, Assigned: jdescottes)

References

Details

Attachments

(1 file)

While reusing an existing string might look like a smart approach, that's actually a bad one for localization.

To get "(learn more)" you reused an existing string and hard-coded parenthesis. Please let's never do that for content that is localized.

If you need "(learn more)", let's add a string that says explicitly "(learn more)". Some languages might not like the parenthesis, or the capitalization might be wrong.

One other thing to remember: localizers don't have context, they see the string. 

What's 'web-ext'? That's information useful for a localization comment, together with (I guess) a note that it should not be localized.
Assignee: nobody → francesco.lodolo
Priority: P5 → --
And I realize that's not Andy's fault, that's what the code was already doing :-\
Unassigning myself because it's a broader problem, besides the localization note for web-ext.

There are 3 cases where Strings.GetStringFromName("moreInfo") is used with hard-coded parenthesis, and all to avoid including them in the link. Is that really needed? Do we need the parenthesis at all? That doesn't sound like the direction other parts of Firefox are taking, I always see "Learn more" (see prefs)
Assignee: francesco.lodolo → nobody
Summary: Follow-up to bug 1353933: don't hard-code content for "(learn more)" → Don't hard-code parenthesis for "(learn more)"
(In reply to Francesco Lodolo [:flod] from comment #2)
> Unassigning myself because it's a broader problem, besides the localization
> note for web-ext.
> 
> There are 3 cases where Strings.GetStringFromName("moreInfo") is used with
> hard-coded parenthesis, and all to avoid including them in the link. Is that
> really needed? Do we need the parenthesis at all? That doesn't sound like
> the direction other parts of Firefox are taking, I always see "Learn more"
> (see prefs)

Julian, you were the reviewer in all 3 cases. Thoughts?
Flags: needinfo?(jdescottes)
It was originally introduced in Bug 1227137 and then we simply kept reusing the same approach.

I don't mind switching the "some words (<a>more info</a>)" to "some words. <a>Learn more</a>" 

> While reusing an existing string might look like a smart approach, 
> that's actually a bad one for localization.
> 
> To get "(learn more)" you reused an existing string and hard-coded parenthesis. 
> Please let's never do that for content that is localized.

I am not sure if the problem is with reusing a string or with the parentheses. Do we need a different "Learn more" string for each link in about debugging?
Flags: needinfo?(jdescottes)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Component: WebExtensions: Developer Tools → Developer Tools: about:debugging
Priority: -- → P3
Product: Toolkit → Firefox
Comment on attachment 8865622 [details]
Bug 1363100 - change aboutdebugging links text to "Learn more";

https://reviewboard.mozilla.org/r/137246/#review140418

In general reusing a string is bad, if it's used consistently (like it seems to be the case here), it's less of a problem. The real issue is adding content to the text (parenthesis).

This approach is definitely good, thanks.

::: devtools/client/aboutdebugging/components/workers/panel.js:32
(Diff revision 1)
>  
>  const Strings = Services.strings.createBundle(
>    "chrome://devtools/locale/aboutdebugging.properties");
>  
>  const WorkerIcon = "chrome://devtools/skin/images/debugging-workers.svg";
> -const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging";
> +const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging" +

You should drop en-US from MDN links.
https://developer.mozilla.org/docs/Tools/about%3Adebugging/#Service_workers_not_compatible
Attachment #8865622 - Flags: review?(francesco.lodolo) → review+
Thanks for the review! 

(In reply to Francesco Lodolo [:flod] from comment #7)
> 
> ::: devtools/client/aboutdebugging/components/workers/panel.js:32
> (Diff revision 1)
> >  
> >  const Strings = Services.strings.createBundle(
> >    "chrome://devtools/locale/aboutdebugging.properties");
> >  
> >  const WorkerIcon = "chrome://devtools/skin/images/debugging-workers.svg";
> > -const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging";
> > +const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging" +
> 
> You should drop en-US from MDN links.
> https://developer.mozilla.org/docs/Tools/about%3Adebugging/
> #Service_workers_not_compatible

I actually thought about changing it, but then I checked the French version of MDN, and the relevant section is not present on this page. I'm not sure what's the best solution here, on one hand I have a link which is in english but is almost guaranteed to have the content or a localized link with no content :/
Comment on attachment 8865622 [details]
Bug 1363100 - change aboutdebugging links text to "Learn more";

https://reviewboard.mozilla.org/r/137246/#review140472
Attachment #8865622 - Flags: review?(poirot.alex) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6589eee7c841
change aboutdebugging links text to "Learn more";r=flod,ochameau
(In reply to Julian Descottes [:jdescottes] from comment #8)
> I actually thought about changing it, but then I checked the French version
> of MDN, and the relevant section is not present on this page. I'm not sure
> what's the best solution here, on one hand I have a link which is in english
> but is almost guaranteed to have the content or a localized link with no
> content :/

Ugh, good point. I don't manage MDN or SUMO content localization, I assumed the missing bits would be present, but that's obviously not the case (and it makes sense, now that I think of it, since it's basically a wiki).
https://hg.mozilla.org/mozilla-central/rev/6589eee7c841
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
-addonDebugging.label = Enable add-on debugging
+addonDebugging.label2 = Enable add-on debugging.

Sorry to mention, but I have serious doubts about adding the trailing period here. After all, periods should not be used for tooltips (as mentioned before in various devtools bugs) and neither in any option/preference text, unless they are their descriptions (i.e. sentences, such as in webExtTip).

Again, adding a period generally changes infinitive to imperative (instructive) mood both in English and for many localizations, causing possible misunderstanding in English and bad localizations for the same reason (even though it's obvious this is an option text in this case).
(In reply to Ton from comment #13)
> -addonDebugging.label = Enable add-on debugging
> +addonDebugging.label2 = Enable add-on debugging.
> 
> Sorry to mention, but I have serious doubts about adding the trailing period
> here. After all, periods should not be used for tooltips (as mentioned
> before in various devtools bugs) and neither in any option/preference text,
> unless they are their descriptions (i.e. sentences, such as in webExtTip).
> 
> Again, adding a period generally changes infinitive to imperative
> (instructive) mood both in English and for many localizations, causing
> possible misunderstanding in English and bad localizations for the same
> reason (even though it's obvious this is an option text in this case).

I wanted a separator between the text "Enable add-on debugging" and the link "Learn more" since we got rid of the parentheses used with the previous link. Looking at other similar links in Firefox, indeed options are not followed by a period even if they have a "Learn more" link right after.

Francesco, can I push a follow-up to revert this back to "addonDebugging.label" or will this be an issue for some reason?
Flags: needinfo?(francesco.lodolo)
(In reply to Julian Descottes [:jdescottes] from comment #14)
> Francesco, can I push a follow-up to revert this back to
> "addonDebugging.label" or will this be an issue for some reason?

Yes, it would be OK in this case. We haven't exposed this changeset to all locales yet, the only people affected are me and Ton (thanks for noticing it).

BTW, I've just discovered that the whole "(learn more)" thing was utterly broken in localized builds :-\
Flags: needinfo?(francesco.lodolo)
Depends on: 1363685
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: