This directory contains the source data files for all internationalization on code.org and hourofcode.com. These files should not be directly modified; they will be regularly updated by the i18n sync scripts, which will also distribute changes out to the various locations in the repository where they will be handled.
When adding a string, please make the key as descriptive as possible because this is used as context for translators.
- Update the string in the i18n Gsheet
ssh staging.code.organd check that your changes were synced tostaging/pegasus/cache/i18n/en-US.yml- Commit and push
en-US.yml
-
Add a unique key and your string value to the i18n Gsheet.
- NOTE: Make sure your string value only has plain HTML. Organization is by category/page; try to prepend each string of a common category with the same key. For example, all teacher dashboard strings begin with 'dashboard' so they're easier to find.
-
ssh into staging and check that your changes were synced to
staging/pegasus/cache/i18n/en-US.yml -
Run the following script to sync your change to all locales.
bin/i18n/sync-pegasus -
Add, commit, and push all the files in
i18n/localesandpegasus/cache/i18n.git add i18n/locales pegasus/cache/i18n git commit -m "sync pegasus strings mm/dd -yourname" git push
- Make changes in
code-dot-org/apps/i18n/<app>/en_us.json - If you are creating a new app:
- Add the strings in a new file in
code-dot-org/apps/i18n/<new app>/en_us.json
- Add the strings in a new file in
- Make changes in
dashboard/config/locales. Choose from the following files depending on where it best fits categorically.en.yml- general strings used throughout Code Studio or if it doesn't fit in any of the other filesdata.en.yml- mostly strings related to accelerated course and video titlesdevise.en.yml- sign in, sign up, account relatedscripts.en.yml- course descriptions and stage names. Should be generated by editing the course on levelbuilder, but can be updated directly.slides.en.yml- the screenshots and transcripts that accompany each tutorial videounplugged.en.yml- titles and descriptions for unplugged levels.
Several Dashboard i18n files are updated automatically from levelbuilder content and should not be edited directly. These include:
authored_hints.en.ymlcallouts.en.ymlcourses.en.ymldsls.en.ymlfailure_message_overrides.en.ymlinstructions.en.ymlmarkdown_instructions.en.yml
Many UI tests compare against strings on the page to validate expected results. Follow the instructions in the Dashboard UI Tests README to verify that the UI tests still pass after changing a string, or update them if necessary.