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) »
  • Compilation of .po files
Pages: 1 [2]

Author Topic: Compilation of .po files  (Read 14826 times)

joomler

  • Guest
Re: Compilation of .po files
December 02, 2008, 09:56:11 am
Quote from: Piotr Szotkowski on February 28, 2008, 03:29:14 am
You don’t have to combine the PO files into one by hand (and definitely it’s not good doing it for translation, as we can’t get it back into CiviCRM in an easy way; it’s doable, just not trivial).

Basically, the best approach is to translate the PO files one by one. Once you want to check the translation, create a unique file out of them (with msgcat) and then compile it into a MO file (with msgfmt):

Code: [Select]
msgcat -o civicrm.po calendar.po civicrm-core.po civicrm-helpfiles.po civicrm-modules.po countries.po drupal-civicrm.po provinces.po
msgfmt -o civicrm.mo civicrm.po

If there are non-unique strings, feel free to delete one of them (but it shouldn’t happen with the current files).



I read all the topic and see that such problem (combine po files into one mo file) is very popular

i really dont understand where to  write these commands in windows XP sp3 :
Code: [Select]
msgcat -o civicrm.po calendar.po civicrm-core.po civicrm-helpfiles.po civicrm-modules.po countries.po drupal-civicrm.po provinces.po
msgfmt -o civicrm.mo civicrm.po

I tried  Start -> Execute  ->  cmd   
here in command line interpreter i write above strings, but i see only error messages that "no such command msgfmt"

please  give exact instructions step by step  what to do.


Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Compilation of .po files
December 03, 2008, 04:32:22 am
To have the msgcat and msgfmt programs you need gettext, and I think they do provide Windows version of it on their download pages – for example, http://mirrors.kernel.org/gnu/gettext/ seems to have some Windows-targeted .zip files.

(I don’t use Windows, so I haven’t actually tried running these commands on Windows.)

Do remember that if the translations are in our repository (because they were done on the translations server or sent to me directly) the compiled MO files can be found on http://svn.civicrm.org/civicrm/branches/v2.1/l10n/ (for CiviCRM 2.1).
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.

kasiawaka

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 4
    • Kasuwade Solutions Inc.
Re: Compilation of .po files
March 16, 2011, 01:22:18 pm
I created detailed instructions how to use Poedit, translate .po files and then compile them into one .mo file: http://forum.civicrm.org/index.php/topic,19068.0.html

Kasia
Kasia Wakarecy
http://kasuwade.ca

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Compilation of .po files

This forum was archived on 2017-11-26.