LubosD / twinkle

Qt 5 port of Twinkle
http://twinkle.dolezel.info
GNU General Public License v2.0
169 stars 50 forks source link

Not all strings were marked for translation #28

Open glixx opened 9 years ago

glixx commented 9 years ago

For example: src/parser/response.h:#define REASON_487 "Request Terminated" src/parser/response.h:#define REASON_183 "Session Progress" src/userintf.h:#define PRODUCT_AUTHOR "Michel de Boer and contributors" src/sys_settings.cpp: s += " comes with ABSOLUTELY NO WARRANTY."; s += "This program is free software; you can redistribute it and/or modify"; s += "it under the terms of the GNU General Public License as published by"; s += "the Free Software Foundation; either version 2 of the License, or"; s += "(at your option) any later version."; etc.

Missing in TS files src/gui/addresstablemodel.cpp: return tr("Name"); return tr("Phone"); return tr("Remark");

All code needs review.

jose1711 commented 4 years ago

@glixx hey, is still still an issue? I can see all 3 strings in the .ts files for quite a while.

glixx commented 4 years ago

All code needs review.

jose1711 commented 4 years ago

To me it has all been fixed in 3ff7104e1a3d7a3dec3fe173199219e168cd98cf

glixx commented 4 years ago

Missing in TS files src/gui/addresstablemodel.cpp: return tr("Name"); return tr("Phone"); return tr("Remark");

It was fixed, but nothing more.

src/parser/response.h:#define REASON_487 "Request Terminated" src/parser/response.h:#define REASON_183 "Session Progress" src/userintf.h:#define PRODUCT_AUTHOR "Michel de Boer and contributors" src/sys_settings.cpp: s += " comes with ABSOLUTELY NO WARRANTY."; s += "This program is free software; you can redistribute it and/or modify"; s += "it under the terms of the GNU General Public License as published by"; s += "the Free Software Foundation; either version 2 of the License, or"; s += "(at your option) any later version."; etc.

There are many strings in code, that were not marked for translation. Needs to review code full.

Just for example: 0 <- translation and anchor problem 1 2 3

fbriere commented 4 years ago

Just for example: 0

Fixed in #204. Thanks!

1

This string is within a .ui file, and is therefore automatically marked:

https://github.com/LubosD/twinkle/blob/aaa3593b1e1f1c43ccb62028071842e376341c5e/src/gui/syssettingsform.ui#L897-L899

3

This string is already passed to tr():

https://github.com/LubosD/twinkle/blob/aaa3593b1e1f1c43ccb62028071842e376341c5e/src/gui/mphoneform.cpp#L3264

Just because a string is displayed in English does not automatically mean that it was not marked for translation; it may simply be that no one has come forward yet and provided a translation of that string in your language. (Pull requests filling these gaps are always welcome!)

glixx commented 4 years ago

Twinkle was translated into Russian 100%, but these strings are still in English.

fbriere commented 4 years ago

Ah, I finally see the misunderstanding! I thought you were a user pointing out strings left in English in the GUI, while you're actually a translator pointing out the lack of these strings in the .ts files. No wonder we could not see eye-to-eye on this matter.

The explanation is quite simple: while @jose1711 did run lupdate to update the .ts files in #191, this was merged (3ff7104) alongside a flurry of other PRs, many of which added new strings. I guess another lupdate run should have followed to keep the .ts files up-to-date, but that wasn't done; hence why the copy of twinkle_ru.ts you worked on in #194 was lacking these new strings.

@jose1711 Could you do another lupdate run? (And could you tell me the command you use while you're at it? I can never seem to get this right when I try.)

(The entire question of when to run lupdate has always baffled me. Qt's models of "do it when preparing your final release" or "do it before your team of paid translators show up" don't apply here. And the idea of running it for every commit is fraught with problems. I guess a mix of "when the translators request it", "after merging a lot of stuff" and "once in a while" is the best we can do.)

jose1711 commented 4 years ago

@fbriere hi frederic, i am not saying i did the right thing but this is how it was done:

cd src/gui/lang
for i in *.ts; do lupdate ../../ -ts $i; done

will leave the potential PR with you.