UPC / ravada

Remote Virtual Desktops Manager
https://ravada.upc.edu/
GNU Affero General Public License v3.0
543 stars 174 forks source link

Duplicate and confusing msgid's in translation files make it hard to help translating #2001

Open eltomato89 opened 11 months ago

eltomato89 commented 11 months ago

I think that the I18N implementation needs some rework.

The .po files do contain multiple duplicate entries like:

(ref: /ravada/lib/Ravada/I18N/de.po)

Line 152: "Shutdown", Line 1702: "Shutdown" Line 883: "Save", Line 1660: "Save" Line 116: "New Password", Line 1429: "New Password"

Sometimes they are also quite confusing like:

Line 1666: "Schedule". Schedule like in "(to) Schedule something"? Or more like "A Schedule"?

Right now, it is really hard to help translating the software, without looking up every reference in code. (Which makes no sense when dealing with 2000 lines of translations)

frankiejol commented 11 months ago

You are right @eltomato89 strings were added as they were needed without much care. First of all I see there are duplicated strings with mixed upper and lower cases. We will try to identify them to try to fix it when possible. Then there is the problem about knowing the proper meaning by the context. I don't see an easy way to address it, maybe we could add some comments before the strings.

eltomato89 commented 11 months ago

Yes, that comments would be a great start. Also, it seems that strings are broken up into multiple msgids, which makes it hard to get the meaning while just looking on the translation files.

Maybe its better to use placeholders or sprintf?

frankiejol commented 11 months ago

Actually the strings are in HTML templates. Code like sprintf could be added but I don't know how to use them with the po localization files. Could you give an example about the placeholders ?