Translation problem for some strings?
Thomas De Schampheleire
patrickdepinguin at gmail.com
Fri Jun 16 20:41:42 UTC 2017
Hi,
2017-06-16 21:25 GMT+02:00 Thomas De Schampheleire <patrickdepinguin at gmail.com>:
> Hi,
>
> 2017-06-13 21:13 GMT+02:00 Thomas De Schampheleire <patrickdepinguin at gmail.com>:
>> Hi Andrew, all,
>>
>> I notice a problem with translation: some strings never seem to be
>> translated, even if the translation file contains a translation.
>> One example is the string 'Pull Requests' which is visible as a button
>> top-right when viewing a repository.
>>
>> For example, both 'fr' and 'ru' contain a translation for this string,
>> but it does not show in the web UI.
>>
>> Do you have any idea about this?
>> Do you see the same?
>
> I did a bisect of this problem, and it is caused by the TurboGears2 migration:
>
> changeset: 6826:e1ab82613133
> user: Alessandro Molina <alessandro.molina at axant.it>
> date: Sun Jan 29 21:08:49 2017 +0100
> summary: backend: replace Pylons with TurboGears2
>
> I will dig deeper in this commit to see if I can find the real problem.
It seems the root cause is the presence of an old .mo file for English:
kallithea/i18n/en/LC_MESSAGES/kallithea.mo
It seems that in the TurboGears2 case, this file is loaded along,
causing different behavior for some strings: if the string already
existed in that .mo file ('Pull Requests') then the translation would
be taken from that file (which is thus English -> English). For
strings that did not exist in that .mo file ('My Pull Requests') this
old file does not have a match, and the next file is attempted, in
this case the real language, e.g. fr or ru.
I assume, but have not verified explicitly, that under Pylons that
file did not get loaded.
Neither have I checked why TG2 is loading an English translation file
when e.g. French language is requested.
In any case, can we get rid of that old English file? All other files
were removed, and this one preserved, with following commit:
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1428367884 -7200
# Tue Apr 07 02:51:24 2015 +0200
# Node ID 7d6c4bd58abd55e6e29fb240421b30f7e067aef6
# Parent 04682d9fb33aff0cca53d1236e7a50f6b48f828c
i18n: don't include .mo files in the repo - build them on demand
(We do however keep the english .mo for now to preserve backwards
compatibility.)
Thanks,
Thomas
More information about the kallithea-general
mailing list