Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Auto I18N (Internationalization) Process

andre
April 26, 2016

Auto I18N (Internationalization) Process

[ENG Talk]
Use Git's pros to customized migme's I18N process. And no more developers need to involve in the I18n process any more.

andre

April 26, 2016
Tweet

More Decks by andre

Other Decks in Technology

Transcript

  1. New Flow - Premises 1. It’s a customized flow for

    mig33JSClient 2. We don’t have a “build” till we are ready to release it to STG. 3. Jenkins will be triggered to deploy the new code to QALab when developers merged a PR into the major branch.
  2. New Flow Add {{ translate “Share” }} into a template

    Scanning all templates files New Copies Found No New Copy Found Update to Google Spreadsheet Download as JSON files from Google Spreadsheet Save it into the mig33JSClient repo git add app/language/. git commit git push New Copy Translated Trigger Jenkins hook (or not)
  3. New Flow - Something you should know 1. RegEx to

    cover all the cases for {{ translate “” var1 var2 }} (your i18n function) 2. Make en_US (Your default language) as the key 3. Save all copies into a hash (Prevent duplicate keys) 4. Sorted the hash by keys 5. Force ignore exit(1) when `git commit` with nothing added
  4. Q&A