Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 2.63 KB

L10n.md

File metadata and controls

26 lines (19 loc) · 2.63 KB

Localisation (L10n)

The Trello Power-Up client exposes a few methods to help with L10n, and takes care of loading resource files in the background, and using them to retrieve localised strings by key.

The official documentation is here.

What do I need to provide?

Please open a PR including:

  • A translation of the sentence: "Everything you need to conduct a Lean Coffee session!" (for the official Power-Up listing)
  • i18n/<languagetag>.yml: a file containing translated strings (variable interpolations is supported; see existing translations). The filename must be a BCP 47 language tag; since we only support localisation for languages Trello already supports, just switch to that language using Trello's own language selector, and then check the value of window.locale in the browser console: that will be your language tag;
  • i18n/listings/DESCRIPTION.<languagetag>.md: a Markdown file containing the translated version of the Power-Up description, which will be displayed in the official Power-Up listing - don't forget to update the links to the images, by replacing the language tag in the URL with your own (e.g. change assets/listings/en to assets/listings/fr);
  • tools/L10nImages/utils/SupportedLanguages.js: modify this file to add a mapping between the language tag you used and the name of the language, as it appears in Trello's own language selector (it will be used by us to generate localised screenshots for the Power-Up listing)

Testing your translation by creating screenshots locally

Refer to the README for instructions on how to execute npm run screenshots. The equivalent npm script to use a local browser is npm run screenshotsLocal.

No matter whether you use a local or remote browser, you need to be running the extension on your machine (i.e. executing npm run start).

In order to use a locally installed version of Firefox, a few more steps are required:

  • download geckodriver (Firefox will have to be installed already). On a Mac, just execute brew install geckodriver;
  • execute it (if you need configuration parameters you'll know);
  • set the FIREFOX_BINARY environment variable to the path of your Firefox executable;
  • run the screenshot generation script adding the --local parameter

If everything was setup correctly, you should be seeing an instance of Firefox starting up and being driven by the Selenium script.