CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Translating parts of civi offline
Pages: [1]

Author Topic: Translating parts of civi offline  (Read 1502 times)

dragontree

  • Guest
Translating parts of civi offline
February 08, 2010, 02:57:05 am
Some time ago I asked if there was a way to translate only a part of Civi. The answer was no.
Now I'm gonna rephrase my question  ;)

Does anybody know a .po file editor (like Poedit) which would show the strings based on the sources? Basically this would show the list of all files that contain strings to be translated.

That way I could skip the files for contributions or whatever parts I don't need.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Translating parts of civi offline
February 08, 2010, 08:14:20 am

does it make sense for civicrm to split the translation file for each directory seperately? main issue will be what about common strings? might be somethign we want to mov towards as we add more modules

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dragontree

  • Guest
Re: Translating parts of civi offline
February 08, 2010, 01:53:40 pm
I'm not to familiar how the gettext translation works but theoretically common strings would not be a problem if the whole translation system uses one source file, as it does now afaik.

An example:
Code: [Select]
#: templates/CRM/Mailing/Form/Component.tpl
#: templates/CRM/Mailing/Page/Component.tpl
#, fuzzy
msgid "New Mailing Component"
msgstr "Uus postituse komponente"
So the string "New Mailing Component" would be present in to separate files. But if the source is the same then if the string is changed in one file it would be changed in the other also.

Although the example would only be valid if there were only one person translating that string at a certain time.

Anyways, I don't really have any good suggestions at the moment how it would work, but the possibility of translating modules separately does seem appealing.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Translating parts of civi offline
February 15, 2010, 05:47:24 am
We currently break all of the CiviCRM strings into the following files: civicrm-core.pot (strings from core files), civicrm-helpfiles.pot (string from .hlp tempaltes), civicrm-menu.pot (menu entries) and civicrm-modules.pot (string from non-core Civi* modules).

The -core and -modules split is based on source subdirectories of the CRM and templates/CRM directories:
Code: [Select]
$modules  = array('Case', 'Contribute', 'Event', 'Grant', 'Mailing', 'Member', 'Pledge');
$excluded = array('Bridge', 'Project', 'Touchstone');
– this tends to work most of the time.

Would it make sense for the above to be split on a per-module basis (i.e., separate file for each module)?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

dragontree

  • Guest
Re: Translating parts of civi offline
February 18, 2010, 02:12:33 am
Splitting it based on modules sounds good. Although probably not that important as I originally thought.
It was important for me as I only needed to translate 2 modules for now. If you end up translating everything it really doesn't matter how you do it.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Translating parts of civi offline

This forum was archived on 2017-11-26.