[go: nahoru, domu]

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: enable local debug locale, en-XL #9192

Merged
merged 6 commits into from
Jun 26, 2019
Merged

i18n: enable local debug locale, en-XL #9192

merged 6 commits into from
Jun 26, 2019

Conversation

exterkamp
Copy link
Member

Summary
Revive locally generating en-XA! Since the tc/ en-XA doesn't work* and we want an immediate feedback loop for i18n PRs we should bring back local en-XA generation!

Looks pretty dope too:
image

You can see why not having placeholders is dangerous:
image

Definite hack to get the nested braces to work for plurals, but hey it works:
image

*tc/ en-XA will work again once #9114 is landed and fully in tc/ 馃槃

Related Issues/PRs
part of: #7238

Future work

  • ar-XB locally too 馃槷
  • Add this to the zeit deploys? @paulirish

@connorjclark
Copy link
Collaborator
connorjclark commented Jun 13, 2019

can you explain this like i'm an idiot ... (just dig deep and pretend)

EDIT: oh, en-XA is some sort of test locale? that explains most of my confusion. is the point to show which parts of the UI are not actually being translated? If so, it kinda fails on numbers.

@exterkamp
Copy link
Member Author
exterkamp commented Jun 13, 2019

Yeah, basically. en-XA is a test locale that adds weird looking characters on every translatable character registered at that time. So when we have a PR like #9092 we could collect-strings, then look at a report in en-XA-local locale and it would be super obvious that something wasn't translated because it wouldn't have the messed up characters. Similarly we can see that the Learn More urls and all markup control characters are also messed up by this locale, indicating that they could be translated and messed up (e.g. #9000). So this is a simple and easy way to confirm that strings of new PRs are ready to translate.

It also has some cool stuff, notice, the metrics section the 1.0 s虃 indicating that the "s" for seconds is translated, but the Opportunities section has 0.63 s indicating that those seconds units haven't been translated! (that is part of #7238 to fix that very minor inconsistency)

It was mentioned here as well: #7010

@exterkamp exterkamp added the i18n internationalization thangs label Jun 13, 2019
Copy link
Collaborator
@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay it's back! :D

lighthouse-core/lib/i18n/locales.js Outdated Show resolved Hide resolved
@exterkamp exterkamp changed the title i18n: en-XA-local i18n: enable local debug locale, en-XL Jun 25, 2019
Copy link
Member
@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

lighthouse-core/lib/i18n/i18n.js Outdated Show resolved Hide resolved
Copy link
Member
@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes i18n internationalization thangs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants