Switch branches/tags
sudoWorkAccord release-webpackPaths3 release-webpackPaths2 release-webpackPaths release-1.245.0 release-1.244.3 release-1.244.2 release-1.244.1 release-1.244.0 release-1.243.5 release-1.243.4 release-1.243.3 release-1.243.2 release-1.243.1 release-1.243.0 release-1.242.0 release-1.241.2 release-1.241.2_patch_1 release-1.241.1 release-1.241.0 release-1.240.2 release-1.240.1 release-1.240.0 release-1.239.6 release-1.239.6_patch_1 release-1.239.5 release-1.239.4 release-1.239.3 release-1.239.2 release-1.239.1 release-1.239.0 release-1.238.3 release-1.238.3_patch_1 release-1.238.2 release-1.238.1 release-1.238.0 release-1.237.9 release-1.237.8 release-1.237.7 release-1.237.6 release-1.237.5 release-1.237.4 release-1.237.3 release-1.237.2 release-1.237.1 release-1.237.0 release-1.236.0 release-1.235.6 release-1.235.6_patch_1 release-1.235.5 release-1.235.4 release-1.235.3 release-1.235.2 release-1.235.1 release-1.235.0 release-1.234.17 release-1.234.16 release-1.234.15 release-1.234.14 release-1.234.13 release-1.234.12 release-1.234.11 release-1.234.10 release-1.234.9 release-1.234.8 release-1.234.7 release-1.234.6 release-1.234.5 release-1.234.4 release-1.234.3 release-1.234.3_patch_2 release-1.234.3_patch_1 release-1.234.2 release-1.234.1 release-1.234.0 release-1.233.5 release-1.233.4 release-1.233.3 release-1.233.2 release-1.233.1 release-1.233.0 release-1.232.2 release-1.232.1 release-1.232.0 release-1.231.4 release-1.231.3 release-1.231.2 release-1.231.1 release-1.230.4 release-1.230.3 release-1.230.2 release-1.230.1 release-1.230.0 release-1.229.1 release-1.229.1_patch_1 release-1.229.0 release-1.228.1 release-1.228.0 release-1.227.1 release-1.227.0
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
about_ar.properties
about_ca.properties
about_cs.properties
about_en.properties
about_es.properties
about_fr.properties
about_it.properties
about_ja.properties
about_ko.properties
about_lr.properties
about_pt.properties
about_rl.properties
about_ru.properties
about_uk.properties
about_xx.properties
about_zh_CN.properties
about_zh_TW.properties
add_keys.jy
admin_cs.properties
admin_en.properties
admin_es.properties
admin_fr.properties
admin_it.properties
admin_ja.properties
admin_ko.properties
admin_pt.properties
admin_ru.properties
admin_zh_CN.properties
admin_zh_TW.properties
api_en.properties
check_i18n.jy
convert_unicode_utf.jy
email_ar.properties
email_ca.properties
email_cs.properties
email_en.properties
email_es.properties
email_fr.properties
email_it.properties
email_ja.properties
email_ko.properties
email_lr.properties
email_pt.properties
email_rl.properties
email_ru.properties
email_uk.properties
email_xx.properties
email_zh_CN.properties
email_zh_TW.properties
identifiers_ar.properties
identifiers_ca.properties
identifiers_cs.properties
identifiers_en.properties
identifiers_es.properties
identifiers_fr.properties
identifiers_it.properties
identifiers_ja.properties
identifiers_ko.properties
identifiers_lr.properties
identifiers_pt.properties
identifiers_rl.properties
identifiers_ru.properties
identifiers_uk.properties
identifiers_xx.properties
identifiers_zh_CN.properties
identifiers_zh_TW.properties
javascript_ar.properties
javascript_cs.properties
javascript_en.properties
javascript_es.properties
javascript_fr.properties
javascript_it.properties
javascript_ja.properties
javascript_ko.properties
javascript_lr.properties
javascript_pt.properties
javascript_rl.properties
javascript_ru.properties
javascript_uk.properties
javascript_xx.properties
javascript_zh_CN.properties
javascript_zh_TW.properties
messages_ar.properties
messages_cs.properties
messages_en.properties
messages_es.properties
messages_fr.properties
messages_it.properties
messages_ja.properties
messages_ko.properties
messages_lr.properties
messages_pt.properties
messages_rl.properties
messages_ru.properties
messages_xx.properties
messages_zh_CN.properties
messages_zh_TW.properties
notranslate_en.properties
test_messages_ar.properties
test_messages_ca.properties
test_messages_cs.properties
test_messages_de.properties
test_messages_en.properties
test_messages_es.properties
test_messages_fr.properties
test_messages_it.properties
test_messages_ja.properties
test_messages_ko.properties
test_messages_pt.properties
test_messages_ru.properties
test_messages_uk.properties
test_messages_zh_CN.properties
test_messages_zh_TW.properties
update_test_languages.jy

README.md

#i18n Translation Process

This directory contains java properties files needed for i18n support.

For each resource (api, email, messages, javascript, identifiers), 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 the following tools to manage files for other lanuages:

  • Transifex translation managment tool provides a visual interface and management tool for translators, reviewers, and translation project managers
  • TXGH application synchronizes Github and Transifex using the APIs for those services. TXGH runs on an internal ORCID server and is deployed via Puppet. It can also be run on Vagrant for local development - see ORCID/registry_vagrant

##Roles

  • 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

##Workflows

##Add new strings ###Developers 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!

####api_*, javascript_*, or messages_*.properties 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.

  1. Add the “Translation” label to the related project card on Trello

  2. Change to the directory containing the script

     cd ~/git/ORCID-Source/orcid-core/src/main/resources/i18n
    
  3. 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"
    
  4. Commit and push the changes to remote

     git commit -m "message text"
     git push origin [branch name]
    

####email_*.properties The script listed above does not work on the email_*.properties file due to the extensive commenting throughout those files. Edit email_*.properties manually.

  1. Add the “Translation” label to the related project card on Trello

  2. Add new keys/values to email_en.properties

  3. 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.

  4. 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 Github deployment was not successful, translated property files can be pushed from Github to Transifex manually. See Push/Pull to/from Transifex manually

###Transifex Project Maintainer ####Configure Transifex notifications (first time only) 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

####Verify strings to be translated When you are notified (via Transifex) that strings have been added/updated:

  1. Visit https://www.transifex.com/orcid-inc-1/registry
  2. Select a language with untranslated strings
  3. Select a resource with untranslated strings, then click Translate
  4. Select Untranslated from the top menu
  5. Check the English version of the untranslated strings (left side of the screen) to ensure they appear correctly
  6. Repeat for each resource/language

####Translate strings When a critical mass of untranslated strings accummulates or translation is needed in order to release a feature:

  1. Add any new translators to Transifex - see Invite people to a team
  2. Contact translators and request that they log into Transifex and translate strings marked as 'Untranslated'. See Using the Transifex Web Editor

####Review translated strings After translation is complete, strings must be marked as reviewed in Transifex before deployment. 'Reviewed' status in Transifex triggers automatic deployment of translation code to Github.

  • 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.
  1. Add any new reviewers to Transifex - see Invite people to a team
  2. 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

When review status for a resource reaches 100% in a given language, the resource properties file for that language is pushed to the master branch of ORCID-Source/orcid-core/src/main/resources/i18n automatically via TXGH

####Verify Github deployment After review is complete, check to make sure that automatic deployment to Github was successful:

  1. 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.
  2. Optional: To check file contents, navigate to ORCID-Source/orcid-core/src/main/resources/i18n and choose the appropriate file.
  3. 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

####Release translations Translated properties files are pushed directly to ORCID-Source master by TXGH, so translations become live on QA, Sandbox or Prod during the normal ORCID release process.

##Update existing string(s) - English only OR English + other languages

###Developers

  1. Edit *_en.properties file(s) manually

  2. Commit and push the changes to remote

     git commit -m "message text"
     git push origin [branch name]
    
  3. When changes are merged into master, edited strings will be pulled into Transifex automatically and marked as 'Untranslated'.

  4. 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.

###Transifex Project Maintainer

  1. 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
  2. Select the first lanugage in the list
  3. Select the update properties file, it will display as less than 100% translated, then click "Translate"
  4. Select "Untranslated" from the top menu to go to the updated strings
  5. In the left column select the string that has been updated
  6. 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
  7. The translation will now be listed in the middle column, click "Save" then click "Review"
  8. Repeated steps 6-8 for any other typos that were corrected
  9. Repeat steps 3-9 for each language

##Update existing string(s) - non-English only

###Developers/Other ORCID team members

  1. Create a card in Trello on the Translation issue list on the Bugs board describing the problem
  2. Add the Transifex Project Maintainer to that card

###Transifex Project Maintainer

  1. Contact the community translators via Transifex or another method to get or verify the corrected translation
  2. Navigate to https://www.transifex.com/orcid-inc-1/registry/languages
  3. Select the language which needs to be fixed
  4. Select the update properties file which needs to be fixed then click "Translate"
  5. In the search box at the top of the left column search for the English version of the text to be corrected
  6. Select the string to be corrected from the left column
  7. In the left column select the comments tab, then click "Comment" to add a new comment
  8. Enter the older translation then the text "corrected to" then the new translation then add any other relevant notes about this change. Click Add
  9. In the middle column delete the incorrect translation and add the new correct version. Click "Save" and then "Review"
  10. Move the Trello card to the QA Testing list

##Add new language ###Transifex Project Maintainer #####Transifex API

  1. Add a language and assign Transifex users as translators using a POST request per http://docs.transifex.com/api/languages/#post

     curl -X POST -i -H "Content-Type: application/json" -L
     --data '{"language_code": "es", "translators": ["username1", "username2"]}'
     --user username:password http://www.transifex.com/api/2/orcid-inc-1/[project-slug]/languages
    
  • language code: ISO code for the new lanaguage (see list of Transifex supported languages)
  • translators: list of Transifex users to assign as translators for the new language
  • username: project owner or maintainer's Transifex username
  • password: project owner or maintaner's Transifex password

#####Transifex UI

  1. Navigate to https://www.transifex.com/orcid-inc-1/registry
  2. Click Edit Langauges
  3. Enter a new language and click Apply
  4. Navigate to the translation teams at https://www.transifex.com/orcid-inc-1/teams/
  5. To add translators to the new language, visit https://www.transifex.com/orcid-inc-1/[project-slug]/language/[language-code] and click Add Collaborators

When translation status for each resource in the new language reaches 100%, the resource properties file is pushed to the master branch of ORCID-Source/orcid-core/src/main/resources/i18n automatically via TXGH

####Release new language

  1. 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)
  2. When the language picker changes have been release to QA, contact community translators for this language and ask them to review the translation
  3. 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.

##Remove a Resource

  1. Remove the entry for the resource from .tx/config

  2. 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
  1. Delete the resource from Transifex

     tx delete -r registry.[resource name]
    

(or delete via Transifex UI)

##Push/Pull to/from Transifex manually If automatic push/pull between Transifex and Github via TXGH fails, files can be transferred manually, via the Transifex client or the Transifex API.

###Install/configure Transifex client

  1. Install the Transifex client
  2. Configure the Transifex client to use your Transifex credentials. Complete the .transifexrc step only - do not edit .tx/config or language mappings.

###Push to Transifex

  1. Change to the directory containing the properties files

     cd ~/git/ORCID-Source/orcid-core/src/main/resources/i18n
    
  2. Push the project files to Transifex

     tx push -s
    

-s pushes only source (en) files; to push translation files as well, add -t. For additional options/usage http://docs.transifex.com/client/push

###Pull from Transifex

  1. Change to the directory containing the properties files

     cd ~/git/ORCID-Source/orcid-core/src/main/resources/i18n
    
  2. Pull only strings that have been marked as reviewed in Transifex

     tx pull --mode reviewed
    
  3. 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