Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pilcrow in message #2293

Closed
bugzilla-to-github opened this issue May 18, 2021 · 9 comments · Fixed by #2334
Closed

Pilcrow in message #2293

bugzilla-to-github opened this issue May 18, 2021 · 9 comments · Fixed by #2334
Assignees
Labels
bug P2 We want to ship it soon, possibly in the current quarter

Comments

@bugzilla-to-github
Copy link
Collaborator

This issue was created automatically by a script.

Bug 1711736

Bug Reporter: @clouserw
CC: @Pike, @flodolo, @mathjazz, @peiying2

This was reported at mozilla/fxa#8483 but it seems like a bug in Pontoon that this is getting passed through so I'm filing here. We've run into it a couple of times.

On the Firefox Accounts Profile page, the Secondary Email note contains a pilcrow where it should just be a space:

Note: a secondary email won’t restore your information — you’ll¶need a recovery key for that.

This message comes from the FTL for se-content-note, which looks like a correctly formatted line continuation according to the Fluent spec, so it's quite likely this is a bug in whatever Fluent implementation this page is using.
Steps to reproduce

URL: https://accounts.firefox.com/settings#secondary-email

Add a secondary email to your account. Then open your account profile and look at the grey note in the Secondary email section.
Expected result

The message should end with "you'll need a recovery key for that."
Actual result

The message ends with "you’ll¶need a recovery key for that."
Environment

Using Firefox 88, production Firefox Accounts.

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @Pike

I tried to reproduce this, and this seems to be an issue with en-CA. Or one contributor there. https://pontoon.mozilla.org/en-CA/firefox-accounts/settings.ftl/?author=d.nisbetjones%40protonmail.com&string=220482 for Pei.

The only way I could reproduce this was to copy-n-paste the original string with the newline markup into the text area. When clicking the copy button, that doesn't happen.

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @mathjazz

Yeah, this looks like something we could prevent in Pontoon. There are also other places (outside Pontoon) users could copy translations from, which are harder to prevent, hence the P4.

Peiying, it'd be great if you could warn the user Axel found out and tell them they should use the Copy button instead of copying and pasting the source string into translation area manually to avoid copying the newline markup.

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @peiying2

I am adding this note to the monthly report to the community so I gave the solution a try.

I used the Copy button, though visually it removes the pilcrow in the localized field, once you save it, the pilcrow remains in the Saved version. Pilcrow is a hard/manual line-break. Additionally, this break location varies from language to language. I think it is best/safe to suggest to remove pilcrow manually.

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @mathjazz

(In reply to Peiying Mo [:CocoMo] from comment #3)

I used the Copy button, though visually it removes the pilcrow in the localized field, once you save it, the pilcrow remains in the Saved version.

Peiying, are you saying the pilcrow ends up in the translation in VCS? I'd be surprised if that's the case.

We do render pilcrow in original strings and translations, but that's just a visual indication of a new line.

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @peiying2

(In reply to Matjaz Horvat [:mathjazz] from comment #4)

(In reply to Peiying Mo [:CocoMo] from comment #3)

I used the Copy button, though visually it removes the pilcrow in the localized field, once you save it, the pilcrow remains in the Saved version.

Peiying, are you saying the pilcrow ends up in the translation in VCS? I'd be surprised if that's the case.

I tried to use the method Axel recommended to change en-CA. It looked good in the box, but once I saved the string, pilcrow is still there. You can give en-GB a try.

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @flodolo

I've fixed multiple errors in Firefox, and it works without issues. Last example
https://hg.mozilla.org/l10n-central/id/rev/0454a293b9be862d8cf59f46b6bc6ab94b9440ee

@bugzilla-to-github
Copy link
Collaborator Author

Comment Author: @mathjazz

Note to self: check how many translations include the ¶ character and prioritize the bug accordingly.

We should also "mass remove ¶" from translations.

@bugzilla-to-github
Copy link
Collaborator Author

bugzilla-to-github commented Aug 19, 2021

Comment Author: @mathjazz

620 translations across 82 locales from 146 authors are affected.

Seems like this bug is affecting a lot of people, let's bump the priority.

We should also remove ¶ from all existing translations using something like:

for t in Translation.objects.filter(string__contains="¶"):
    t.string = t.string.replace("¶", "")
    t.save(update_stats=False)

@mathjazz
Copy link
Collaborator

The patch is deployed to prod. I ran the script from above and removed all occurrences of Pilcrow in translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P2 We want to ship it soon, possibly in the current quarter
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants