Translation problem for some strings?
Thomas De Schampheleire
patrickdepinguin at gmail.com
Sun Jun 18 10:37:00 UTC 2017
2017-06-18 0:13 GMT+02:00 Mads Kiilerich <mads at kiilerich.com>:
> On 06/17/2017 10:13 PM, Thomas De Schampheleire wrote:
>>
>> I dug deeper and found that TurboGears2 by default respects the
>> language requested by the browser, unlike Pylons did.
>> The 'lang' setting in the ini file is then merely a fallback. In my
>> case, I had English as preferred language, and while testing I had set
>> 'lang = fr' in the ini file. As a result, strings were first looked up
>> in the old English translation file, and strings not found there were
>> searched in the French file. The result was a mix of languages.
>
>
> Nice catch!
>
> I wonder if we should enable this automatic detection by default? Or perhaps
> only include translations that are close to complete.
By itself the automatic detection is a nice feature. But indeed, if a
translation is very incomplete, the result with mixed fallback and
preferred language is probably worse than using the fallback language
entirely.
I don't see a built-in way to restrict this. One solution is to save
the incomplete translations in another place than the (almost)
complete ones. By default TG2 will look in kallithea/i18n.
Andrew, what is your view on this?
>
> I also wonder if we have some places where we cache things and don't handle
> well that the language changes with each request. Hopefully not ;-)
It would be bad design if it's the case... :-o
Thanks for your feedback and for applying the patches!
/Thomas
More information about the kallithea-general
mailing list