mozilla / blurts-server

Mozilla Monitor arms you with tools to keep your personal information safe. Find out what hackers already know about you and learn how to stay a step ahead of them.
https://monitor.mozilla.org
Mozilla Public License 2.0
708 stars 203 forks source link

es-MX has some layout issues #581

Closed groovecoder closed 5 years ago

groovecoder commented 5 years ago

STR:

  1. Set language preference to es-MX
  2. Visit https://fx-breach-alerts.herokuapp.com/

Expected results: Text should wrap fine with the max-width

Actual results:

screen shot 2018-11-07 at 7 02 23 am
lesleyjanenorton commented 5 years ago

Looks like the span surrounding Firefox Monitor (string id is -product-name-nowrap) is not closed in the es-MX .ftl file. @flodolo can I edit the app.ftl for es-MX to close the <span> tag, or will this create headache/additional issues?

flodolo commented 5 years ago

if it's an error like broken markup, you can edit the .ftl directly, and it will sync back into Pontoon

flodolo commented 5 years ago

(I looked at the string and assumed it was a layout issue, didn't even think it could be the term with a broken span…)

pdehaan commented 5 years ago

For my own future reference:

https://github.com/mozilla/blurts-server/blob/bdafb46426834708702970fd4043b45720d6278d/locales/es-MX/app.ftl#L7

Not sure how I could build a linter that could check .ftl files for invalid HTML [yet]. But it looks like only a handful of strings have HTML markup in them.


Also, on the topic of es-MX, it looks like we may have translated "Have I Been Pwned", and not sure we should have:

# String IDs beginning with "-product" and "-brand" should remain in English.
# They should not be:
# - Declined to adapt to grammatical case.
# - Transliterated.
# - Translated.
...
-brand-HIBP = He sido Pwned

And a bit of grep magic, tells me that it may be in a couple other locales as well (if it's a problem, which I suspect it is since it's not a string but a brand name):

$ git grep '^\-brand-HIBP' locales | grep -v "= Have I Been Pwned"

locales/es-MX/app.ftl:-brand-HIBP = He sido Pwned
locales/id/app.ftl:-brand-HIBP = Apakah Akun Saya Sudah Diterobos
locales/ru/app.ftl:-brand-HIBP =
locales/sq/app.ftl:-brand-HIBP = Ma Kanë Kallur?
locales/ur/app.ftl:-brand-HIBP = کیا مجھے دھوکھا دیا گیاہے
flodolo commented 5 years ago

Let me fix these directly in Pontoon, so they see where the change is coming from.

lesleyjanenorton commented 5 years ago

@flodolo I just pushed up a branch with the updates but I can delete it if it would be better to update the strings through Pontoon.

flodolo commented 5 years ago

I just fixed all the brand names, commits are happening right now from Pontoon.

Note that Russian is correct though https://pontoon.mozilla.org/ru/firefox-monitor-website/app.ftl/?search=brand-HIBP&string=191845

They're adding variants to adapt the associated noun to the grammar case. That's one way to work around the brand name not being modifiable.

flodolo commented 5 years ago

@flodolo I just pushed up a branch with the updates but I can delete it if it would be better to update the strings through Pontoon.

For es-MX is fine (it's a technical bit), for the brand I prefer to see ownership of the change in Pontoon, Also, as explained Russian shouldn't be changed, it's correct as is, and reverting it would break quite badly.

lesleyjanenorton commented 5 years ago

@flodolo gotcha, thanks!

pdehaan commented 5 years ago

Looks like es-MX was the only missing/invalid HTML:

$ npx pdehaan/ftl-htmllint './locales/*/app.ftl'

./locales/es-MX/app.ftl
  - [E042] tag-close: "-product-name-nowrap = <span class="nowrap">{?}"

That is, if "The World's Worst FTL htmllint Tooling!(tm)" is accurate (which it probably isn't, but it is arguably incrementally better than what we had 4 minutes ago).