Comments (8)
@pdehaan
Going to close, let me know if you have any question ;-)
P.S. I've changed the linter to also ignore the <br>
tag, since it might make sense to add or remove line breaks in localization.
from fxa-content-server-l10n.
I raise to 114 issues…
I'm working on a WIP of a linter of my own. Looks like at least one string (main.ftl:payment-confirm
) was migrated completely broken (see fix for Italian), and might actually be obsolete. It would be great for that team to check how many obsolete strings we have in that file :-|
Locale: ar (2)
placeable missing in Fluent string (auth.ftl:fxa-privacy-url)
placeable mismatch in Fluent string (auth.ftl:fxa-service-url)
Locale: ast (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: az (2)
placeable mismatch in Fluent string (auth.ftl:fxa-service-url)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: bn (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: cs (1)
Mismatched HTML elements in string (main.ftl:account-activated)
Locale: cy (8)
Mismatched HTML elements in string (main.ftl:payment-legal-link-stripe-paypal)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-day)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-month)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-year)
Mismatched HTML elements in string (main.ftl:payment-confirm)
placeable missing in Fluent string (settings.ftl:auth-error-114)
placeable missing in Fluent string (auth.ftl:unblockCode-prompt-plaintext)
Locale: de (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: dsb (1)
placeable mismatch in Fluent string (auth.ftl:postAddLinkedAccount-title)
Locale: el (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: en_CA (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: es (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: es_AR (5)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Mismatched HTML elements in string (main.ftl:sub-route-idx-cancel-msg)
Mismatched HTML elements in string (settings.ftl:verify-secondary-email-please-enter-code)
placeable mismatch in Fluent string (main.ftl:reactivate-confirm-without-payment-method-copy)
placeable missing in Fluent string (settings.ftl:verify-secondary-email-please-enter-code)
Locale: es_CL (3)
Mismatched HTML elements in string (settings.ftl:connect-another-find-fx-mobile)
Mismatched HTML elements in string (settings.ftl:tfa-scan-this-code)
Mismatched HTML elements in string (auth.ftl:subplat-manage-account)
Locale: es_ES (1)
Mismatched HTML elements in string (settings.ftl:tfa-scan-this-code)
Locale: es_MX (1)
Mismatched HTML elements in string (settings.ftl:tfa-scan-this-code)
Locale: et (2)
placeable mismatch in Fluent string (auth.ftl:subscriptionDowngrade-content-charge-info)
placeable mismatch in Fluent string (auth.ftl:subscriptionUpgrade-content-charge-info)
Locale: ff (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: fi (2)
Mismatched HTML elements in string (main.ftl:payment-confirm)
placeable missing in Fluent string (auth.ftl:subscriptionRenewalReminder-subject)
Locale: fy (6)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-day)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-month)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-year)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Mismatched HTML elements in string (settings.ftl:mvs-enter-verification-code-desc)
Locale: fy_NL (6)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-day)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-month)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-year)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Mismatched HTML elements in string (settings.ftl:mvs-enter-verification-code-desc)
Locale: gd (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: gn (3)
Mismatched HTML elements in string (main.ftl:payment-confirm)
placeable mismatch in Fluent string (auth.ftl:subscriptionDowngrade-content-charge-info)
placeable mismatch in Fluent string (auth.ftl:subscriptionUpgrade-content-charge-info)
Locale: he (1)
placeable mismatch in Fluent string (auth.ftl:subscriptionDowngrade-content-charge-info)
Locale: hi (2)
placeable mismatch in Fluent string (auth.ftl:fxa-service-url)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: hi_IN (2)
placeable mismatch in Fluent string (auth.ftl:fxa-service-url)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: hsb (1)
placeable mismatch in Fluent string (auth.ftl:postAddLinkedAccount-title)
Locale: hu (2)
Mismatched HTML elements in string (auth.ftl:automated-email)
data-l10n-name missing in Fluent string (auth.ftl:automated-email)
Locale: ia (6)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Mismatched HTML elements in string (settings.ftl:mvs-enter-verification-code-desc)
placeable mismatch in Fluent string (main.ftl:payment-confirm-with-legal-links-day)
placeable mismatch in Fluent string (main.ftl:payment-confirm-with-legal-links-week)
placeable mismatch in Fluent string (main.ftl:payment-confirm-with-legal-links-month)
placeable mismatch in Fluent string (main.ftl:payment-confirm-with-legal-links-year)
Locale: id (5)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-day)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-month)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-year)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: ka (3)
placeable mismatch in Fluent string (main.ftl:payment-confirm-with-legal-links-year)
placeable missing in Fluent string (auth.ftl:subscriptionRenewalReminder-content-greeting)
placeable missing in Fluent string (auth.ftl:subscriptionRenewalReminder-content-signature)
Locale: kab (5)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-day)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-month)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-year)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: kn (1)
placeable missing in Fluent string (auth.ftl:fxa-privacy-url)
Locale: ko (1)
placeable mismatch in Fluent string (main.ftl:payment-confirm)
Locale: lt (2)
placeable missing in Fluent string (auth.ftl:fxa-privacy-url)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: ml (1)
placeable missing in Fluent string (auth.ftl:fxa-privacy-url)
Locale: nb_NO (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: nn_NO (2)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: pl (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: pt (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: pt_PT (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: rm (2)
placeable mismatch in Fluent string (main.ftl:payment-confirmation-cc-card-ending-in)
placeable mismatch in Fluent string (auth.ftl:fxa-service-url)
Locale: ro (3)
Mismatched HTML elements in string (main.ftl:payment-confirm-with-legal-links-week)
placeable mismatch in Fluent string (auth.ftl:passwordChangeRequired-sign-in)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: sl (4)
placeable missing in Fluent string (settings.ftl:dc-subheader)
placeable missing in Fluent string (settings.ftl:dc-opt-in-success)
placeable missing in Fluent string (auth.ftl:fxa-privacy-url)
placeable missing in Fluent string (auth.ftl:subplat-privacy-policy)
Locale: sq (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: sr (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: sr_Latn (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: su (2)
placeable mismatch in Fluent string (auth.ftl:passwordChangeRequired-sign-in)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: sv (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: sv_SE (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: ta (1)
placeable missing in Fluent string (auth.ftl:fxa-privacy-url)
Locale: th (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: tr (1)
data-l10n-name mismatch in Fluent string (auth.ftl:body-ios-badge)
Locale: uk (2)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Mismatched HTML elements in string (settings.ftl:mvs-enter-verification-code-desc)
Locale: ur (1)
placeable mismatch in Fluent string (auth.ftl:verificationReminderFirst-description)
Locale: vi (1)
placeable mismatch in Fluent string (auth.ftl:subscriptionDowngrade-content-charge-info)
Locale: zh_CN (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Locale: zh_TW (1)
Mismatched HTML elements in string (main.ftl:payment-confirm)
Total errors: 114
from fxa-content-server-l10n.
Rad!
Yeah, I had it on my todo list to talk you about ftl linting, so this is exactly what I was looking for. ❤️
I ended up re-rewriting an old .ftl linting tool I had from the Monitor days that was trying to compare placeables and variables and all that jazz, but then I always get lost on edge cases in some European languages w/ variants. Or else getting too many false positives where strings just aren't translated yet.
But now I'll have to try checking your results vs my results and seeing where we're different.
I only found 106 issues.
You found 114 issues.
So on the surface it looks like you're 8 strings better than me.
But I think my cheap HTML linter solution caught 45 issues w/ weird <a>
pair mismatches due to #561. But if your script didn't catch that edge edge case of bonus )s
, then that means you're about 53 strings better than me. 🎉
Looking at your results, my script above or my FTL linter wouldn't have caught https://pontoon.mozilla.org/ur/firefox-accounts/auth.ftl/?search=verificationReminderFirst-description&string=235641. Although I think I caught a bunch of these when I was manually reporting everything that Pontoon marked as a "WARNING", although I oddly didn't leave a comment on this one. I think I tried changing it myself, but then got scared off when my hyphens were appearing backwards due to RTL-ness and I panicked.
from fxa-content-server-l10n.
But I think my cheap HTML linter solution caught 45 issues w/ weird
<a>
pair mismatches due to #561. But if your script didn't catch that edge edge case of bonus)s
, then that means you're about 53 strings better than me. 🎉
Yeah, it wouldn't catch it. It looks for:
- Mismatched or missing placeable (message/term references, variables)
- Mismatched data-l10n-name
- Mismatched HTML tags (not what's inside, or attributes, since in Fluent you shouldn't have those)
- A few other things, like the pilcrow character in translations, or the ID repeated (these were caused by a couple of bugs in Pontoon)
from fxa-content-server-l10n.
I think I tried changing it myself, but then got scared off when my hyphens were appearing backwards due to RTL-ness and I panicked.
I almost never touch RTL strings. If I do, I copy them in a text editor first, which seems a bit more intuitive. Note that there might be an "account" hidden there, hence the "brand-firefox (+ account)" instead of brand-firefox-account
from fxa-content-server-l10n.
Yeah, your script is really great!
Locale: gn (3)
placeable mismatch in Fluent string (auth.ftl:subscriptionDowngrade-content-charge-info)
I had to tweak the URL for /gn/, then search for that id in auth.ftl. But then I can copy out the reference/EN string and the GN string and compare placeables and it turns out the translation was missing { $productPaymentCycleNew }
. But that string has a lot of variables, so I had to copy them into VS Code and sort the placeables since I wasn't able to see which one we were missing in the translation.
from fxa-content-server-l10n.
Side note: this type of linter will need exceptions, because some changes are potentially acceptable (e.g. dropping a term when it's repeated multiple times).
from fxa-content-server-l10n.
I'd suggest to close this, as mismatched tags are now visible as part of the checks here
https://github.com/mozilla-l10n/mozl10n-linter
P.S. I don't have rights on the repository to manage issues directly
from fxa-content-server-l10n.
Related Issues (20)
- Partial translation not displayed in Support page HOT 2
- Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms HOT 1
- Firefox Accounts incorrectly used for Firefox Account in context HOT 1
- Paypal should be PayPal; a brand name should be a placeable HOT 1
- The string for *None* needs to be duplicated for different setting scenarios HOT 4
- Inconsistent ending periods for the "There was a problem" strings HOT 1
- Spelling error, brand tagging, ellipsis HOT 4
- Update straight quotes to curly quotes in localizable content in .ftl files HOT 3
- FxA Settings en-CA locale contains paragraph characters HOT 2
- [email templates l10n]: fix errors in German translations
- Odd markers in .ftl files (re: cancellationSurvey) HOT 3
- Add CODEOWNERS file?
- Unexpected ellipsis'es HOT 12
- Change repository base branch name from 'master' to 'main' HOT 3
- Drop sr-Latn? HOT 6
- Use `es-ES` as `es` HOT 1
- how to convert po to json HOT 1
- Add open source software license HOT 1
- Translation websites written in chinese are not able to translate automatically HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fxa-content-server-l10n.