As of 2020-03-23 translators are no longer actively maintaining translations to about, admin, messages, javascript and ng_orcid files via Transifex. Translations for the Registry UI are being migrated to orcid-angular as each page/component is migrated (docs). When the migration is complete, properties that are not used in ORCID-Source will be removed from this directory.
Please avoid adding or editing strings in the files listed above. If you must add/edit these strings, please edit the EN version only and be aware that they will not be translated and will appear in EN regardless of the user's language setting.
For cases where translation of strings in these files are needed urgently, please message Slack #translations to coordinate.
This directory contains java properties files needed for i18n support.
For each resource, a separate properties file for each language, named with the corresponding locale code, contains translations. Additionally, we use codes xx, lr and rl for testing.
In most cases, only en, xx, lr, and rl files should be edited directly. We use Transifex to manage files for other languages. Translations are synced using the Transifex Github integration.
- Developers ORCID Development team
- Transifex Project Maintainer ORICD staff member responsible for managing translation workflow
- Translators Vendors/community members who provide translations
- Reviewers Trusted community members who review translations provided by others
- Add new strings
- Update existing string(s) - English only OR English + other languages
- Update existing string(s) - non-English only
- Add new language
- Add a resource
- Remove a resource
New properties are added to English, _xx, _lr, and _rl files only - files for other languages are updated via Transifex. Do not edit properties files for other languages!
Use the Jython script in add_keys.jy to add a new property to *_en.properties, *_xx.properties, *_lr.properties, and *_rl.properties. For _xx, _lr, and _rl files, the script sets the value for new properties to X, LR, or RL.
-
Add the “Translation” label to the related project card on Trello
-
Change to the directory containing the script
cd ~/git/ORCID-Source/orcid-core/src/main/resources/i18n -
Run the script with correct options
-p file prefix (api, messages or javascript) -k new property key -v new property value
jython add_keys.jy -k "new.property.key" -v "new property value" -p "messages" -
Commit and push the changes to remote
git commit -m "message text" git push origin [branch name]
The script listed above does not work on the email_*.properties file due to the extensive commenting throughout those files. Edit email_*.properties manually.
-
Add the “Translation” label to the related project card on Trello
-
Add new keys/values to email_en.properties
-
Add new keys to email_xx.properties, email_lr.properties an email_rl.properties and set the value for each key to X, LR or RL.
-
Commit and push the changes to remote
git commit -m "message text" git push origin [branch name]
When changes to any properties files are merged into master, new strings will be pulled into Transifex automatically. If the sync is not successful, translated property files can be pushed from Github to Transifex manually. See Push/Pull to/from Transifex manually
Transifex can notify you when developers add/update strings. To configure nofications, see http://docs.transifex.com/faq/#6-what-kind-of-notifications-can-i-get-for-the-projects-i-translate
When you are notified (via Transifex) that strings have been added/updated:
- Visit https://www.transifex.com/orcid-inc-1/registry
- Select a language with untranslated strings
- Select a resource with untranslated strings, then click Translate
- Select Untranslated from the top menu
- Check the English version of the untranslated strings (left side of the screen) to ensure they appear correctly
- Repeat for each resource/language
When a critical mass of untranslated strings accummulates or translation is needed in order to release a feature:
- Add any new translators to Transifex - see Invite people to a team
- Contact translators and request that they log into Transifex and translate strings marked as 'Untranslated'. See Using the Transifex Web Editor
After translation is complete, strings must be marked as reviewed in Transifex. When both translation and review status for a resource reaches 100% in a given language, the resource file for that language is pushed to the master branch of ORCID-Source/orcid-core/src/main/resources/i18n automatically.
- If translation was completed by a community translator, review must be completed by another trusted community member.
- If translation was completed by a vendor, review can be completed by ORCID staff.
- Add any new reviewers to Transifex - see Invite people to a team
- When translations are complete, contact reviewers and request that they log into Transifex and review strings marked as 'Unreviewed'. See Using the Transifex Web Editor
After review is complete, check to make sure that automatic deployment to Github was successful:
- Navigate to https://github.com/ORCID/ORCID-Source/commits/master/orcid-core/src/main/resources/i18n and verify that commits were made by the user orcid-machine at approximately the same time that review was completed.
- Optional: To check file contents, navigate to ORCID-Source/orcid-core/src/main/resources/i18n and choose the appropriate file.
- On the Trello card for the translation set a QA check list to review the translation with one item for each language.
If Github deployment was not successful, translated property files can be pushed from Transifex to Github manually. See Push/Pull to/from Transifex manually
Translated properties files are pushed directly to ORCID-Source master, so translations become live on QA, Sandbox or Prod during the normal ORCID release process.
-
Edit *_en.properties file(s) manually
-
Commit and push the changes to remote
git commit -m "message text" git push origin [branch name] -
When changes are merged into master, edited strings will be pulled into Transifex automatically and marked as 'Untranslated'.
-
Add the Transifex Project Maintainer to the Trello card for the fix (create a card if there is not one already) so they are aware of this update. Include the both the key and value for each changed string on the card.
- When the corrected English string is pushed to master (eg: card moves to Current Development > Submitted), navigate to https://www.transifex.com/orcid-inc-1/registry
- Select the first lanugage in the list
- Select the update properties file, it will display as less than 100% translated, then click "Translate"
- Select "Untranslated" from the top menu to go to the updated strings
- In the left column select the string that has been updated
- The right column will display a list of suggested translations, find the translation before the typo was corrected in this list then click the icon of two files (the "Use This" button) next to that translation
- The translation will now be listed in the middle column, click "Save" then click "Review"
- Repeated steps 6-8 for any other typos that were corrected
- Repeat steps 3-9 for each language
- Create a card in Trello on the Translation issue list on the Bugs board describing the problem
- Add the Transifex Project Maintainer to that card
- Contact the community translators via Transifex or another method to get or verify the corrected translation
- Navigate to https://www.transifex.com/orcid-inc-1/registry/languages
- Select the language which needs to be fixed
- Select the update properties file which needs to be fixed then click "Translate"
- In the search box at the top of the left column search for the English version of the text to be corrected
- Select the string to be corrected from the left column
- In the left column select the comments tab, then click "Comment" to add a new comment
- Enter the older translation then the text "corrected to" then the new translation then add any other relevant notes about this change. Click Add
- In the middle column delete the incorrect translation and add the new correct version. Click "Save" and then "Review"
- Move the Trello card to the QA Testing list
- Navigate to https://www.transifex.com/orcid-inc-1/registry
- Click Edit Langauges
- Enter a new language and click Apply
- Navigate to the translation teams at https://www.transifex.com/orcid-inc-1/teams/
- To add translators to the new language, visit https://www.transifex.com/orcid-inc-1/[project-slug]/language/[language-code] and click Add Collaborators
- Configure the new language in the Github integration settings by adding a new filter block in Edit settings > Select files - filter_type: file file_format: UNICODEPROPERTIES source_language: en source_file: orcid-core/src/main/resources/i18n/test_messages_en.properties translation_files_expression: orcid-core/src/main/resources/i18n/test_messages_.properties
When translation and reviewed status for each resource in the new language reaches 100%, the resource file is pushed to the master branch of ORCID-Source/orcid-core/src/main/resources/i18n automatically.
- Add a Trello card to Current Development requesting that the new language be added to the language picker (this must be done on both the Registry and Drupal sites)
- When the language picker changes have been release to QA, contact community translators for this language and ask them to review the translation
- After translators have reviewed the language, move the card to Launchpad and notify the appropriate developer, who will unhide the new language in the language picker so that it becomes visible in Prod.
-
Add an entry for the resource to .tx/config
-
Add a properties files for the resource (language codes en, xx, lr and rl) to orcid-core/src/main/resources/i18n
touch [resource name]_en.properties touch [resource name]_xx.properties touch [resource name]_lr.properties touch [resource name]_rl.properties -
Add the file name prefix for the new resource to update_test_languages.jy (this script should be run and the results commited after adding properties to the file)
-
Add the resource to Transifex (requires installing Transifex CLI; if you don't want to install the CLI you can upload via Transifex UI)
tx push -s -r registry.[resource name] -
For this file properties to be available on FTL templates, add
classpath:i18n/[resource name]into themessageSourceandmessageSourceNoFallbackbasename value lists on orcid-core-context.xml
-
Remove the entry for the resource from .tx/config
-
Remove properties files for the resource from orcid-core/src/main/resources/i18n
rm [resource name]_[lang code].properties
- If the resource is still in use, but no longer being translated: delete all properties files for the resource EXCEPT [resource name]_en.properties
- If the resource is no longer used at all: delete all [resource name]_[lang code].properties files, including xx, lr, and rl
-
Delete the resource from Transifex
tx delete -r registry.[resource name]
If automatic push/pull between Transifex and Github fails, files can be transferred manually, via the Transifex client or the Transifex API.
- Install the Transifex client
- Configure the Transifex client to use your Transifex credentials. Complete the .transifexrc step only - do not edit .tx/config or language mappings.
-
Change to the directory containing the properties files
cd ~/git/ORCID-Source/orcid-core/src/main/resources/i18n -
Push the project files to Transifex
tx push -s
-spushes only source (en) files- add
-tto push translation files as well - add
-l [lang code]to push a specific language only (defaults to all) - add
-r [resource name]to push a specific resource only (defaults to all)
For additional options/usage http://docs.transifex.com/client/push
-
Change to the directory containing the properties files
cd ~/git/ORCID-Source/orcid-core/src/main/resources/i18n -
Pull only strings that have been marked as reviewed in Transifex
tx pull -a --mode reviewed -
Commit and push changes to remote
git commit -m "message text" git push origin [branch name]
For additional options/usage, see http://docs.transifex.com/client/pull