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) »
  • best way to cooperate on regionalized versions of a translation
Pages: [1]

Author Topic: best way to cooperate on regionalized versions of a translation  (Read 2501 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
best way to cooperate on regionalized versions of a translation
December 07, 2009, 06:54:21 am
What's the best way to take advantage of translations that have been made for one regional version of a language but not yet for another?

I'm working on a French - English bilingual site for Canada. We noticed that the fr_CA translation was less complete than the fr_FR file, so we thought we'd use the latter. I've put in a couple fixed for the latter (eg Credit Card information as a fieldset title on CiviContribute pages wasn't translated, and there was a weird value for Middle name rather Autres prénoms). Nonetheless, I'm realizing there are regionalisms that just don't work for us and that we will need to switch to fr_CA: eg Département rather than Province, Email rather than Courriel.

Not having done work on .pot and .po files before I may be missing something with respect to fallback languages, or ways of sharing string translations somehow. Ideally, I would like to get all of the fr_FR translations for strings that are not translated in fr_CA and put them into the latter in one batch. Then we can fixup / override the values as necessary. Is this possible? Where would I find some documentation? I'm happy to use a different tool than Pootle if Pootle doesn't have this feature.

Cheers,
Joe
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: best way to cooperate on regionalized versions of a translation
December 08, 2009, 05:20:28 am
Sorting out how to port strings between versions was one of the points in my Google Summer of Code project this year, so I’m happy to report that this is simpler than you think. :)

All of the translations are now kept in a separate repository and I created a Bash script to manage updates of the PO files in various ways (you might want to check it out, it’s in the bin/tools.sh file).

After examination of that script it was more or less obvious to me that all that’s really needed (after refreshing the v3.0 and monolithic French and Canadian French PO files) was to do a msgcat --use-first branches/fr_CA.po branches/fr_FR.po | sponge branches/fr_CA.po, which took the strings from both files (giving priority to the Canadian French ones). I did that, refreshed the v3.0 files, recompiled MO files and uploaded all this to the repo – so these changes should be reflected in Pootle now.

You can check the diff to the monolithic Canadian French file with svn diff -c 266 http://svn.civicrm.org/l10n (which will fetch the diff for the commit that merged the French strings in) and with svn diff -c 267 http://svn.civicrm.org/l10n/branches/v3.0/fr_CA (which holds the update from the monolithic Canadian French PO file to the separate v3.0 Canadian French PO files).
« Last Edit: December 08, 2009, 05:22:15 am by Piotr Szotkowski »
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.

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: best way to cooperate on regionalized versions of a translation
December 09, 2009, 11:03:01 am
Many thanks, Piotr!

Great service!!
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • best way to cooperate on regionalized versions of a translation

This forum was archived on 2017-11-26.