| Links: | About Decathlon | Software | Languages | Press |
|---|
The wordpress.pot file is quite large at 15924 words. There are also additional text to be translated that do not exist in the offial POT file, which we added ourselves.
On this page we also tell you how to create the official PO file again, and how to do some useful pre-translation offline. This information is really only for translation leaders or people who don't use the Pootle server even though they use our files.
Also visit the main page for WordPress on this wiki.
To facilitate volunteer translation, we've broken the official wordpress.pot file up into nine smaller files based on the content of the strings. The way we did it, is described here.
In addition to the above 9 files, there are three other PO files to be translated. The most important of these, is the terminology/glossary file.
Not all translatable text is contained in the wordpress.pot file. Some of it has to be inserted manually by the translator in two PHP files, and there is also the readme.html file. We've taken all the strings from those two PHP files and put them in a PO file named wordpress_PHP-additions.pot, to make them easier to translate, but keep in mind that they should be inserted into the various PHP files manually.
The two PHP files and HTML file can be downloaded here.
The following wording is quoted almost directly from the WordPress site:
define ('WPLANG', 'bg_BG');The nine files contain no redundant or duplicate strings. This means that you can create the official wordpress.po file by simply downloading all nine files for your language and putting them all together in a single file (be careful not to duplicate the file headers, and make sure your final file does have a header).
A different way of putting the translations from the nine files into the official wordpress.po file, is by creating a TM and pre-translating the official POT file. In fact, this can also be done if Wordpress should ever release a new POT file while you're still working on the old PO files.
Put the existing translations (PO files) in a folder, eg “mytranslations”. Using the Translate Toolkit, do this (where xx is your target language code):
po2tmx -l xx -i mytranslations -o myTM.tmx
Then, put myTM.tmx and wordpress.pot in a single folder, and do this:
pot2po --tm=myTM.tmx -i wordpress.pot -o wordpress_mylanguage.po
Since you're using a TMX file created by the Translate Toolkit itself, and not a TMX file you got from elsewhere, the pre-translation will be 100% successful. Strings for which no translations are found, will be translated with fuzzy matches (this can be disabled, read the helpfile).
The readme.html.pot file was created using html2po. This particular tool in the Translate Toolkit is still in development and doesn't usually generate very elegant PO files. The WordPress readme.html is, however, very simple (probably on purpose!) and fits well with html2po.
To generate an HTML file from the PO file, you must make sure that you've got the original HTML file that the PO file was generated from. So hopefully you've saved a copy of it somewhere. But suppose there is no copy of it, what then? How can we ensure that the HTML file and the translated PO file correspond to each other? Simple… by regenerating the PO file first. Here's how:
If you have an existing, partially/fully translated PO file, generate a new PO file from the HTML file:
html2po -t old_readme.html.po -i readme.html -o new_readme.html.po
Now you can check the new PO file to see if everything is translated as it should be, and if you're happy with it, generate the HTML file from it:
po2html -t readme.html -i new_readme.html.po -o new_readme.html
Of course, if you're absolutely certain that you've got a copy of the original HTML file, you can safely skip the first command.