Details
-
Type: Task
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.1
-
Fix Version/s: 4.3.6
-
Component/s: None
-
Labels:None
Description
Currently, CiviCRM extensions can use the ts() function, but unless integrators implement their own translation function, the strings from extensions are not extracted into .pot files, and it is unlikely that the strings will be translated (unless they are already in Core).
Overview of what we should do to support extension translation:
- make sure that gettext (native & php-gettext?) can bind multiple domains
- civix: implement a function to generate a .pot file by extracting strings from .php, .tpl and .js files (based on what is currently used for core)
- on civicrm.org: on add/edit, flag an extension for "extraction"
- have a cron run and fetch extension code, run civix to extract the strings, and push the .pot to Transifex.
- on Transifex: create a new project for civicrm extensions (it's not a requirement to split from core components, but will probably be more practical, avoid cluttering the main project too much?)
- have a cron that downloads and compiles the translations, similar to what we do currently for core.
- when extensions are installed via the GUI, also download the .mo file for the (enabled) translations.
References:
http://forum.civicrm.org/index.php/topic,28426.msg121556.html
http://civicrm.org/blogs/joe-murray/translations-extensions