wiki:Translating

Version 7 (modified by skamster, 4 years ago) (diff)

--

Translating

SHR Applications supporting translations

  • opimd-utils
  • pyphonelog
  • shr-installer
  • libframeworkd-phonegui-efl
  • shr-settings

New Doc

It's just a idea of a rewritten doc, so feel free to make something better :)

===For every Project===

====First time==== To get the latest source from a project in git @ first time, you always should use

git clone http://shr.bearstech.com/repo/projectName.git

in Terminal/Console?.

For the several project's, you could visit  http://git.shr-project.org .

This command should create a new Folder with the name of the project.

Example:

git clone http://shr.bearstech.com/repo/opimd-utils.git
cd opimd-utils/

====On work==== If you already cloned a project from git and if you just want to update it with the new files from git, use

git pull http://shr.bearstech.com/repo/projectName.git

You have to do this in the projectfolder!

For example, on the example in First Time, you have to make

cd opimd-utils

if you're not in the opimd-utils folder.

===Opimd-Utils=== First:

git clone http://shr.bearstech.com/repo/projectName.git

Then you should found it some folders in data/po/ with language-shortnames (as example "de")

would be continied, lunchbreak :)

1. Obtaining the source code

git clone http://shr.bearstech.com/repo/shr.git
git clone http://shr.bearstech.com/repo/shr-settings.git

You should now have the sources in a directory called shr and shr-settings.

2. Creating the .pot file manually

gettext needs to be installed for this part

libframeworkd-phonegui-efl

cd shr/libframeworkd-phonegui-efl
xgettext -C --foreign-user -kD_ -o libframeworkd-phonegui-efl.pot `find . -name "*.[ch]" -print`

You should now have file libframeworkd-phonegui-efl.pot in Your current working directory.

shr-settings

cd shr-settings
xgettext -L python --foreign-user -kD_ -o shr-settings.pot shr-settings `find . -name "*.py" -print`

You should now have file shr-settings.pot in Your current working directory.

3. Merging translations

If You're starting a new translation, the previously created .pot file can be moved to po/ll_CC.po, e.g. po/fi.po and edited with Your editor of choice.

If a ".po" file for Your language already exists, you should run the following command to avoid work duplication:

msgmerge -o program_name_updated.pot po/ll_CC.po program_name.pot

where

program_name_updated.pot is a name for the new .pot file, e.g. libframeworkd-phonegui-efl_updated.pot
po/ll_CC.po is the name of the .po file You wish to update, e.g. po/fi.po
program_name.pot is the name of the .pot file created in previous step, e.g libframeworkd-phonegui-efl.pot

program_name_updated.pot can now be edited with Your editor of choice and then moved to po/ll_CC.po

4. Share your Translation

Just send the ".po" file to the  Shr-devel mailing list and your translation will hopefully be added to SHR.