Is it possible to support the template extraction of civicrm by this module? I don't refer to the drupal modules in civicrm but rather to the civicrm core.
Civicrm is using gettext, the translation comes from a mo-file which is a GNU Gettext Machine Object File (compiled po file). I plan to integrate the civicrm into the localize client (l10n_client) to make translation more easy. This will store the translations in drupals database. Later I'd like to export civicrms translatable strings to a po file (to compile them to a mo file and use it with civicrm).
The code itself uses a ts -function to translate the text and in the smarty templates the translatable text is wrapped by {ts} like this: {ts}Text to be translated{/ts}. Do you think its possible to change the potx code to use it for the civicrm code? Would be nice to get some inspiration on this. Will it be hard/much work to adapt the potx code to do this job?
Thanks.
Comments
Comment #1
gábor hojtsyPotx is itself a tool to extract strings following the special rules of Drupal. There are numerous special rules here. There must already be a tool for civicrm, or otherwise you would not be faced with a mo file. The mo files are most probably generated by a tool which generates a po file and then compiles (mo is a binary compiled po file). So gettext itself has tools to cross-convert from mo and po. I don't see a role of the potx module in here.
The localization server however was built to potentially support other software as well, so it is decoupled from the extraction process (which potx does for Drupal core). That provides a community translation UI.