openSUSE:YaST translation

Jump to: navigation, search

How to prepare pot files

Translators need the strings from the YaST source code that are marked for translation; these are all the strings, which would be visible to the user. These strings are stored in pot files for each YaST module.

From time to time (usually before releasing the product), translators require updated pot files from YaST modules, so they can translate all the new texts that appeared during the development cycle. The translators also check the English spelling and grammer of these texts, so YaST developers (not native speakers) can fix them.

  • Get the yast-meta package that can help you with checking out the YaST sources (this is optional; alternatively, you can check out the YaST modules manually):
git clone https://github.com/yast/yast-meta
cd yast-meta
ln -s `pwd`/y2m ~/bin/
  • Now, use yast2-meta to check out the sources of all the YaST modules from which you need the pot files from:
mkdir ~/yast-checkout
cd ~/yast-checkout
y2m clone ALL


Read more about yast-meta in its README file.

  • If you already have a complete checkout, you could also only fetch the newest code
for i in *; do echo $i; cd $i && { git pull; cd -; } done
  • Generate the pot files for your YaST modules. You need to have the package yast2-devtools installed.
cd ~/yast-checkout
for i in *; do cd $i && { y2tool y2makepot; cd -; } done

The y2makepot command requires having the 'yast2-devtools' package.

  • Some of such packages do not have translatable texts at all, so it is not a problem. If you see file starting with _MISSING_TEXTDOMAIN then please open bug report as given file missing its text domain and won't be properly marked for translation.
  • Some textdomains (notably control.pot) are scattered among multiple repositories (skelcd-control-*) so these must be merged. Use mcgcat for this (not msgmerge).
  • Now we must submit the pot files to the translators' repository. You'll need to ask the translation coordinator for access rights. Than, check out the needed part of translation subversion repository:
mkdir ~/pots
cd ~/pots
svn co http://svn.opensuse.org/svn/opensuse-i18n/trunk/yast/50-pot/

Note that their trunk is for the current openSUSE release. You'll need to know correct branch for the specific (e.g., enterprise) products.

For SLE 12, it's http://svn.opensuse.org/svn/opensuse-i18n/branches/SLE12/yast/50-pot/

  • Copy your new pot files to the local copy of translation repo and commit the changes. It is good idea to also look at some diffs, so you can see you are not accidentally submitting wrong texts (like texts from SLE versions of the YaST modules into a repository with openSUSE texts).
cd ~/pots
cp ~/yast-checkout/*/*.pot .
# some generated pot files are not wanted to be there anymore
rm -fv `xargs --arg-file=OBSOLETE_POT_FILES`
svn diff
svn ci
  • Sometimes a YaST module is dropped or a new one is created. In such a case, delete the respective pot file from the translation repository or do not forget to add the new one.

Packaging YaST translations

YaST translations are shipped in yast2-trans-$LL packages, where $LL is a 2- or 3-letter language code, optionally extended with an country code ($LL_$CC). These are sub-packages of the yast2-trans main package in openSUSE; in SLE 11 they are standalone packages.

See also

For more information about translating software strings, see openSUSE:Localization_guide.