CiviCRM Forums
News: You can learn more about CiviCRM from our new free book: Understanding CiviCRM. Also Check the CiviCRM Blog for updated information on CiviCRM
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 16, 2010, 04:43:46 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Translating parts of civi offline  (Read 225 times)
dragontree
I post occasionally
**

Karma: 0
Offline Offline

CMS: Joomla
Posts: 54


View Profile
« on: 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  Wink

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.
Logged
Donald Lobo
Administrator
I’m (like) Lobo ;)
*****

Karma: 297
Offline Offline

CiviCRM: 2.2
CMS: Drupal 6.x, Joomla 1.5.x
MySQL: MySQL 5.0.67
PHP: PHP 5.2.6

Posts: 8142



View Profile WWW
« Reply #1 on: 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
Logged

Use CiviCRM? Like CiviCRM? Then show your appreciation and make a donation.
dragontree
I post occasionally
**

Karma: 0
Offline Offline

CMS: Joomla
Posts: 54


View Profile
« Reply #2 on: 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:
#: 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.
Logged
Piotr Szotkowski
Administrator
I live on this forum
*****

Karma: 44
Offline Offline

CiviCRM: trunk
CMS: Drupal 6
MySQL: 5.1.31
PHP: 5.2.6

Posts: 1155



View Profile
« Reply #3 on: 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:
$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)?
Logged

Do you like CiviCRM? If so, please consider making a donation.
dragontree
I post occasionally
**

Karma: 0
Offline Offline

CMS: Joomla
Posts: 54


View Profile
« Reply #4 on: 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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM