Closed zetako closed 1 year ago
So I just explore some other repos and realize that the content/locale
should be generate when packaging instead of just store in the repo. But it seems that this repo dont have a build/packaging script. No sure how to do it automatically now.
Sorry I've been away from this for a while. Maintaining the project was super stressful and I've just not had access to a linux install as my daily driver. Can you catch me up to speed on what exactly I need to do on my end before I merge this?
Welcome back and thanks for your awesome project.
Can you catch me up to speed on what exactly I need to do on my end before I merge this?
I found this script in other plasma plugin and the original author seems to be the KDE developer. Check this link.
It work like this:
i18n()
(Already done in your code)merge
script.po
file as translatebuild
to generate .mo
file as i18n asset, the readme file showing translate progress will also updated.mo
file in content/locale
, the KDE framework will automatically use itI do some change on the script.
.desktop
file for plugin infos like name and website, and we dont have this file, so I simply just manully implement these infos.desktop
file, I just delete themThere's still a problem with the submit, that I added the generated .mo
file. It's a binary file so it can cause security issue and also diffcult to manage during version changing. I think we should only accept and store the .po
file and generate .mo
files everytime a new release is packaged.
Yeah I think that's a good idea. I'll add it to my list to implement build-time translations so that double duty isn't required to manage translations. Though you'll have to forgive me on this one, since it's not something I've implemented before.
This looks to be for an older version of Plasmoids using a metadata.desktop file. They use JSON now for this. I'll need to research the implementation of this further.
Manually merged in, feel free to update zh_CN.po as needed.
This MR add i18n related scripts from Zren/plasma-applet-lib, with some tweaks. I am totally new to KDE community, so I can't comfirm those changes are correct.
.Desktop
file since we don't have it.How to
merge
to generate a new template if components got changed; ignore it if you just want to translate.template.pot
as your translation file, likezh_CN.po
.msgstr
part.build
to generate translations form plaintext.po
file.translate
dir.Others
I also add a zh_CN translation as an example.