In some cases, it is necessary to fix a string in the code, e.g in drak tools.
Normally this ends up in breaking the translations, which is ok, if the meaning of the original string changes. The translators will see those changes in their translation tools and are then able to fix those as well.
When a developer changes a string in the code, she must regenerate the .pot file (which is a template of the strings for a specific software). As a consequence, all .po files (that is, the files which contain the translations, e.g. fr.po or nl.po) will be altered so that the fixed strings are tagged as "fuzzy". It means that since the original string was modified, the translation is probably no longer accurate, so it won't be used until the translators change it/unfuzzy it (and therefore the English string appears in its place). When the fix is just for a typo, the developer can remove the fuzzy tag from all .po files so that the translations are not lost.
In some cases, this can make life easier (or harder) for the translators, e.g. when you are only fixing a typo or a grammatical error in the original string. You can then fix that error without creating unnecessary work for the translators (because most likely they did not create the same typo or grammatical error in their translation).
How to do it
The following examples are part of an email exchange between tv and marja.
For just fixing stuff on a single line, you have to run the same regexp on the pot file and the po files. This can be done with a number of tools like sed or using Perl.
For replacing "Copyright (c) Mandriva" by "Copyright (c) Mageia" you simply have to use a one liner like:
Note, however, that for non-latin languages, names may be translitered, so if a name changes, correction on the translations would be needed too.
Basically tv's rule of thumb is to prevent fuzzing translations when:
- The fix really is an English typo fix.
- It is easy to adapt, i.e.
- adding/removing a final "." or "\n"
- replacing some hardcoded value by %s (GTK+ placeholder).
Using a placehoder instead hardcoded strings
Replacing "Copyright ..." in a larger text by "%s" because other people already inserted a new "copyright mga" below "copyright mdv".
When you can do something like (untested)
Importing translation catalogs
For importing from drakx:
If all translations are in the same encoding (UTF-8) you can use a sed GUI, KFileReplace.
More on this in the official KDE documentation (just use '*.po;*.pot' template for files). KFileReplace understands strings with newlines, so you can copy them directly in the search textbox.