How do you translate the most quickly for the biggest impact. If you look at a GUI application you will notice that most strings are relatively short. Menu items are between one and three words long. Error messages are more desctiptive at perhaps 5-10 words. So in general the items that users see in normal operation are relatively short.
Therefore, if you can initialy focus your translation on the short strings then you can make a quick visual impact. Following that with longer and longer strings until the application is fully translated.
The problem with this method is that you lose context in that you are not sure in what situation the single word string was used. Did “Manual” mean “configure manually” or the “operations manual”.
Use pogrep to extract messages that are a certain number of words long:
pogrep --search=msgid -e '^\w+(\s+\w+){0,3}$' -i templates -o short-words
This will extract between 1 and 4 words from templates and place them in short-words. Once these strings have been translated you would use pomerge to combine them with the full PO file.
Use the following regex’s to extract specific word counts:
Words | Regex |
---|---|
1 | "^\w+$" |
2 | "^\w+\s+\w+$" |
3 | "^\w+(\s+\w+){2}$" |
4 | "^\w+(\s+\w+){4}$" |
1-4 | "^\w+(\s+\w+){0,4}$" |
As an example Mozilla 1.7.3 contains 32217 words for translation. However, breaking it down into the number of words in short strings you get the following:
Words | Word Count |
---|---|
1 | 1853 |
2 | 1774 |
3 | 1371 |
4 | 796 |
Or in total 5794 words, which is 17% of the original total.