Open Apereo 2015 Higher Education ... Open Source in a New Age
Translating Apereo Software: A Case Study using Sakai and Transifex Yuji Tokiwa (Hosei University, Japan) Daisuke Deguchi (Nagoya University, Japan) Juan Jose Merono Sanchez (University of Murcia, Spain) Jose Mariano Lujan Gonzalez (Universidad de Murcia, Spain) Diego del Blanco Orobitg (SCRIBA, Spain)
Agenda ■ Overview
■ Benefits for Apereo community
■ Context dependent translation by gettext Portable Object
■ Community translation strategy in Sakai Spanish Users (S2U)
■ Automatized process by Jenkins
Ja Sakai community project - Development of Common TMX
.prop.
Common TMX
.php
.php
.prop.
.php
.php
Transifex
Strategy l Use Crowdin and Transifex
l Up to regional communities to use Crowdin or Transifex because both platforms have almost same functions
• Interoperability by a Translation memory
• User interface
l Transifex will be maintained by JaSakai community.
Benefit l Sustainable
• Not lock in one system (There are pros and cons)
l Economic
• Free of Charge
l Functional
• Functionally complement for one another
L10n problems in Sakai CLE (1)
❖ There are too many properties files for translation Difficult to keep translation consistency between files
chat chat-impl
chat.properties chat-message.properties
chat-tool chat.properties permissions.properties
citations citations-util
More than 200 files for translation
Sakai 10.x
Format of Java properties file
❖ Each line contains single translation associated with key
➢ “key” and “value” are separated by “=“ or “:”
❖ Key should be unique in a properties file ➢ But this may not be hold between properties files
java.acccess = Access: java.theresource = The resource was not found. java.youdonot = You do not have permissions to access this resource. java.from = From: java.subject = Subject: java.attach = Attachments:
Example: access.properties of access module
L10n problems in Sakai CLE (2)
❖ Sakai CLE uses Java properties file for i18n ➢ A same key is reused between properties files
■ E.g. samigo reuses “assessment_title” for different translation targets
1. assessment_title = Title 2. assessment_title = Assessment Title
Keys in properties files are not unique in Sakai CLE
Approach (1) ❖ Difficult to keep translation consistency between files
➢ Concatenate all Java properties files in each module into a single file
■ Possible to improve consistency by comparing similar English resources in a module
.properties .properties .properties .properties .properties .properties
chat
.properties .properties .properties .properties .properties .properties
polls
.properties .properties .properties .properties .properties .properties
site
Approach (2) ❖ Keys in properties file are not unique in Sakai CLE
➢ Identify each English resource by a combination of filename + key (translation context)
■ Possible to treat translation strings separately even if it uses the same key
new.page.launch = Content opened in a new window. Make sure pop up windows are allowed in your browser.
basiclti.properties (basiclti tool) new.page.launch = Page opened in new window.
iframe.properties (basiclti tool)
Solution: Module translation via Transifex
❖ Generate Gettext Porable Object (PO) file containing all translation strings existing in each module ➢ PO is utilized in many popular systems for
supporting i18n and l10n
❖ Sync each module (PO file) through Transifex API ➢ Newly added English strings appear in Transifex
1. #. java.acccess 2. #: access.properties:1 3. msgctxt "access.properties:java.acccess" 4. msgid "Access:" 5. msgstr "アクセス:"
Example of PO file
1. Download latest sources from 2. Convert ‘.properties’ files of a module to PO file 3. Upload PO files to Transifex
4. Community Translation using Transifex
Translation workflow
chat.po
chat chat-impl
chat.properties chat-tool chatz.properties
Web interface of Transifex
Check all translation strings of each module in one view
Find similar translations from Translation memory
4. Community Translation using Transifex 5. Download translation from Transifex 6. Decompose PO file into ‘.properties’ files 7. Commit “.properties” files to
Translation workflow
chat.po
chat chat-impl
chat.properties chat-tool chatz.properties
Benefit of module translation using Transifex
❖ Possible to keep translation consistent in each module ➢ Translator can concentrate on translating a module
❖ Script program automatically synchronize translations between GitHub and Transifex
➢ No need for setting up translation environment
❖ Everyone can join translation workflow from anywhere
➢ No need for special knowledge about translation tools (Benten, OmegaT, etc.)
Remaining problems
❖ Context is important to choose appropriate translation ➢ Impossible to distinguish noun and verb only from
original English text (e.g. “grade”, “grade item”)
➢ Difficult to guess omitted words from short English sentence (e.g. “From”, “of”, etc.)
➢ There are multiple translation candidates ■ “Submit” can be translated to “送信”, “提出”, etc.
CROWDIN PROS
- Easy UI - Great functionality
CONS
- Problems with updates - Problems exporting
- Special characters. - Extensions.
- Translation by file, no by tool.
2013-2014 manually editing
.property files
CONS - hard to divide work - hard to review
translations - manual updates
start - 2013 TRANSIFEX
PROS - Clear UI - Automatized - Daily update - Same functionality
as Crowdin
2014-2015
Background S2U
- Sakai 10.3 was the first Sakai release to be fully 100% translated to Spanish
• Crowdin • We started to use it to manage translations. • Sakai 10, first release out with 100% Spanish translation. • Also used for other official languages in Spain.
Open Apereo ‘14 - ReThink
- After Open Apereo 2014 - Started joint effort with JA-Sakai - One member translate / Other member reviews - Include translations reviews in our Weekly calls
- Transifex TAG: S2U-REVIEW - Improve consistency by looking for ‘Concordance
Search’ - Plan Monthly exports from Transifex to Sakai
Master (Sakai’s base code).
New strategy https://www.transifex.com/projects/p/sakai-trunk/
Translations for 10.x and Master - Started working with
10.x. Sakai 10.3 was the very first Sakai release to be 100% fully translated to Spanish
- Now more focus on
translating Master (Trunk)
Deal with the dirty work
Translate from English to Spanish
Keep English updated (Ja-Sakai)
Download spanish translations and submit PR (S2U)
Daily Monthly
- Japanese community shared their python scripts. - We used them to import es locale to transifex. - We use them to download all translations from tx.
- Jenkins help us to: - Get a fresh clone from sakai master. - Install python scripts. - Run scripts to get all reviewed translations. - Generate a patch for master. - Optionally send the patch by email.
Deal with the dirty work