Localization
From Gephi:Wiki
Gephi has a localization program to provide the software in your language: this page describes how to get in! We use the Transifex platform.
Contents |
Short and long term team goal
Lots of people are not ease with English. The goal is to distribute Gephi also in French, Spanish and other languages the community will ask for.
Translation guide
Get started!
- Create an account on Transifex.
- Ask to be part of a Translation Team.
- If no team is set for your language, please ask to create one on the forum.
- When accepted, start translating it!
Note: when you start to translate a resource, Transifex grants you a "write lock" on it for 48h. It means that you will be the only one able to edit this resource in your language during this period, thus avoiding conflicts.
Important Note: only English texts should be written directly in the .properties files. All the translations should be made on Transifex platform otherwise they will be overridden.
Technical Details
Language strings are stored in Bundle.properties files, the common format used in Java world. We want to keep this simple mechanism, as Gephi has more than 240,000 lines of code now. In order to provide an efficient way to translate the application, Gettext .pot files (PO templates) are regularly generated and automatically submitted to Transifex. PO files are basically composed by string identifiers (msgid) and corresponding translations (msgstr).
Transifex allows to manage the translation process: each language has a user interface, like the French one. Translators simply translate English strings on a web page. Once done, Gephi admins retreive the translated strings and push them to the Gephi trunk.
Workflow for admins
The Transifex client is available here. All the following commands are executed from the Gephi repository root.
Setup
Initialize Transifex for Gephi (done only once and for all):
- Execute
properties2pot.shto refresh the local template files (POT). - Execute
python set_transifex.pyto scan recursively the Gephi repository and add POT files and existing PO files to the local Transifex config file (in .tx/config). - Execute
$tx push -tto push local translations (PO files) to the Transifex platform.
Update template files
- After modifying a
Bundle.propertiesfile or creating a new Gephi module, executeproperties2pot.shto refresh the POT files. - Execute
tx push -sto push sources (POT files) to Transifex platform.
Synchronize the repository
- Execute
tx pull -fto pull the translations (PO files) once translations are done. The local repository does now contain the up-to-date translations. - Execute
po2properties.shto update the .properties files. The translations are now available in the Gephi UI.
After adding a new Gephi module
If we add a module called "org-gephi-data-attributes-api":
- Execute
properties2pot.shto refresh the local POT files. - Execute
tx set --auto-local -r gephi.org-gephi-data-attributes-api --source-language=en --source-file org-gephi-data-attributes-api.pot "<lang>.po". This means "automatically find translations for this resource in this folder with this expression". This action updates the local Transifex config file (in .tx/config). - Execute
tx push -sto push sources (POT files) to Transifex platform.
After removing a Gephi module
- Delete the related lines in .tx/config
- Manually remove its resources on the Transifex platform.
Tools
- Platform: Transifex
- Transifex community support
- (for admins) Back-end tools: GNU Gettext tools
- Translation memory to search in past open source translations with Open-tran
- Automatic translation with Wordreference or BabelFish
Common terminology
Read the Generic Vocabulary.
How to get in contact with the team
How to force UI language in Gephi
Go to gephi/nbproject/private, then edit platform-private.properties by adding the line (French for instance):
run.args.extra=--locale fr:FR
Netbeans Tips
Search for a string by doing Edit > Find in Projects (Ctrl + Maj + F), with the file name pattern *.properties.

