aboutPrivateBrowsing.note.before has a trailing non-breaking whitespace, causing redundant ending whitespace in about:privatebrowsing

RESOLVED FIXED in Firefox 52

Status

Mozilla Localizations
cs / Czech
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: MikkCZ, Assigned: MikkCZ)

Tracking

unspecified
mozilla52

Firefox Tracking Flags

(firefox50 affected, firefox51 affected, firefox52 fixed)

Details

Attachments

(1 attachment)

When you open new anonymous window, the text describing what it can and cannot do contains two spaces between aboutPrivateBrowsing.note.before and aboutPrivateBrowsing.note.emphasize. The space at the end of aboutPrivateBrowsing.note.before is either redundant, or there is a space being added in the code itself. Not sure, what's the right solution, as some localizers might notice and fix by removing the space from their translation.

Comment 1

a year ago
Moving over to fx/private browsing, as this is about the code in question much more than about l10n.
Component: Localization → Private Browsing
Product: Core → Firefox
I'm not sure I understand the problem.

This is how my DTD looks like

<!ENTITY aboutPrivateBrowsing.note.before "La navigazione anonima ">
<!ENTITY aboutPrivateBrowsing.note.emphasize "non nasconde ogni traccia della navigazione">
<!ENTITY aboutPrivateBrowsing.note.after " su Internet. Il datore di lavoro o il fornitore di servizi internet saranno comunque in grado di mantenere un registro delle pagine visitate.">

And this the resulting HTML in Firefox
<p>
La navigazione anonima 
<strong>non nasconde ogni traccia della navigazione</strong>
su Internet. Il datore di lavoro o il fornitore di servizi internet saranno comunque in grado di mantenere un registro delle pagine visitate.
</p>
        
I can only see one space displayed, as expected in a HTML page.
This is the code of the page
https://dxr.mozilla.org/mozilla-central/source/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml#57

We could argue that the trailing space is not actually needed, since the new line in the code introduces a whitespace, but I don't see two spaces and I think it makes sense to have it in the string in case the structure changes.
Created attachment 8810523 [details]
screenshot (Nightly 53.0a1)

Well, at least in Czech is does not work. In the source I see this: 

        <p>
          &aboutPrivateBrowsing.note.before;
          <strong>&aboutPrivateBrowsing.note.emphasize;</strong>
          &aboutPrivateBrowsing.note.after;
        </p>

And if I try to highlight the text with my mouse, I see two spaces there. It's even visible on the screenshot (Anonymní prohlížení  vás na internetu neudělá...). As for the localization, we follow spaced as there are in the original.
Interesting the double space is not after the <strong> text, as aboutPrivateBrowsing.note.after starts with a space for change.
Can you inspect the page with Developer Tools and see how the paragraph looks like?

Italian on OS X, and English in Linux look normal, with the same spacing.
Ah, figured it out. You have a non breaking space in .before, not a standard space, that's why it happens.
Let's move it back to Czech component, since it can be fixed in the localization.
Component: Private Browsing → cs / Czech
Product: Firefox → Mozilla Localizations

Comment 9

a year ago
Or is this a pontoon bug? Matjaz?
Flags: needinfo?(m)
Looks like there are a few locales with a non breaking whitespace (gray square)
https://transvision.mozfr.org/string/?entity=browser/chrome/browser/aboutPrivateBrowsing.dtd:aboutPrivateBrowsing.note.before&repo=aurora

It seems unlikely that all locales added it on purpose.
Per IRC discussion with Pike, we should still fix the XHTML file and avoid introducing unnecessary whitespaces.

I'm going to file a follow-up for that.
Summary: aboutPrivateBrowsing.note.before contains redundant ending whitespace → aboutPrivateBrowsing.note.before has a trailing non-breaking whitespace, causing redundant ending whitespace in about:privatebrowsing
Seems you are right. I have replaced it with a regular space in Pontoon now. Before I have clicked the placeholder in Pontoon, so probably that's a Pontoon issue.

Should I close this bug in Czech component once the change is committed and I can verify in Nightly, or should I wait until the code is fixed too?
Confirming there's a bug in Pontoon.

PR waiting for a review.

Thanks for reporting!
Flags: needinfo?(m)
(In reply to Michal Stanke (Mozilla.cz) [:MikkCZ] from comment #12)
> Should I close this bug in Czech component once the change is committed and
> I can verify in Nightly, or should I wait until the code is fixed too?
Once you verify it in a build, it's OK. Fixing bug 1317438 will not change the result.
Assignee: nobody → mstanke
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox50: --- → affected
status-firefox51: --- → affected
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.