ChrisOelmueller/uh-issues — Issue #69: Modify new strings so that translating them (and re-using existing translations) gets easier
Author: ChrisOelmueller
Created: 2012-02-27 00:50:49+00:00
State: open

* Split long strings in sensible chunks if content could be re-used or contains `\n`
* Remove trailing and ending newlines `\n` from strings
* Remove trailing and ending spaces from strings
* Remove output formatting from gettext unless really necessary
* Don't wrap useless stuff like `_("\n")` in gettext calls

I will just pick a recent string commit as example, no pun in there: 8eed40f7cb163cf70a1d00db278885570f5d4abe

Was:
{{{
message = headline + _(".\nCheck the data you entered in the Network section.\nDetails: ") + str(e)
}}}

Should look like:
{{{
message = headline + u".\n" + _("Check the data you entered in the Network section.") + u"\n" + _("Details:") + unicode(" %s") % e
}}}
Yes, this looks worse than before from a coder point of view, but if we continue inventing new formatting of e.g. this `Details: ` through all of our code, we end up with a senseless large amount of very similar strings that cause a lot of work for our translators.

A huge amount of strings is what keeps us from being translated into any language, so please try to modify stuff you add and perhaps look at guitranslations.py or our `.pot``file before.

----

''rolling'' means that the ticket won't be closed but rather new stuff will be added whenever necessary.