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

[WIP EXPERIMENT] Add a fake i18n transform. #498

Closed
wants to merge 5 commits into from

Conversation

toolness
Copy link
Collaborator

@toolness toolness commented Mar 4, 2019

This is a combination experiment/professional development exercise in which I learn how Babel transforms work and attempt to implement one that can do our localization.

Right now, all this does is convert some text that needs to be localized into UPPERCASE. It's disabled by default; to enable it, set FAKE_I18N_TRANSFORM in your .justfix-env to one of the following:

  • uppercase will just uppercase all "internationalized" text.
  • func will run the text through a new i18n() function, which currently returns a React component that wraps the text in a span that's styled with a border and a pink background. My idea is that we could use this kind of thing to provide a UI that allows translators to quickly translate the most visible parts of an app in-context by e.g. shift-clicking on text to translate it.

@toolness
Copy link
Collaborator Author

So this is cool and all but we've now got i18n in the platform! And we're using Crowdin for translations, so as cool as a "click to translate" thing would be, it's a heavy lift at this point. Also it doesn't necessarily work for things that are attribute values rather than React components.

Anyways, see #1384 for more details on our i18n solution. I'm gonna close this PR.

@toolness toolness closed this May 18, 2020
@toolness toolness deleted the fake-i18n-experiment branch May 18, 2020 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant