While making my humble commit on Github last week I couldn’t help noticing that .desktop
files are left out of localization efforts. I’ve been wrapping my head around this matter ever since, and here are some thoughts I would greatly appreciate any input on.
Specification advices certain entries in .desktop
are to be localestring instead of string. So additionally to the current entries like
GenericName=File synchronization
something along the lines of
GenericName[sv]=Filsynkronisering
GenericName[ru]=Синхронизация файлов
and so on would be welcome there.
My concept of what a possible solution can be:
- Introduce a new
.html
file somewhere ingui
folder (not to be linked to from anywhere or otherwise used in GUI proper) that would contain all the necessary strings. - Let the current translation handling facilities pick up those strings and have them translated.
- Have a script to (partially?) autogenerate
.desktop
files, somewhat similar how theAUTHORS
file is being generated now. That would likely have to:- parse the abovementioned
.html
for strings to look for, - look up the translations in
gui/default/assets/lang
, - perform a sanity check on each line so as, for instance, not to break a
.desktop
file with a line containing a rogue semicolon introduced by a translator, - compose the required lines and write to
.desktop
files.
- parse the abovementioned
Now, please be aware that I’m not a programmer (I actually teach medicine for living), and I’ve never written a line of Go in my life. That being said, I have actually done some clumsy ad-hoc coding in JS and bash, and am actually willing to at least attempt to make this contribution and learn some Go and better programming along the way.
So here are the actual questions that prompted me to write this post before opening an issue on Github or making a messy PR:
- Does the plan above look sane enough, or is it really a dirty kludge? Am I missing some elegant and straightforward way to go about this matter?
- With the recent activity in
cli
development, is there not a chance of a bigger outside-of-GUI-translation thing emerging? Is my proposal sane considering that scope?
What would you say?