Closed fairycn closed 7 months ago
So we actually try to do our best to mark all strings for translation, but we've never gotten any offers for translation. If you're interested in helping with Simplified Chines, we'd love your help. let me know and I'll setup instructions on how to create a translation file!
You can refer to this project for the interface multi-language support feature. https://github.com/j6t/kdbg
You only need to provide a language package (po file), and the translator will translate into the language you need based on this language package. The naming of language packages can be based on the language ID: en-us、zh-CN
Qt reference:
Oh, I'm very familiar with how it's done :-).
For edb it would be slightly different than .po
files because we would use Qt's built in internationalization system with Qt linguist, but the concept is similar enough to what you described.
I was just saying that if you're interested in being our first translator, I'm happy to create some instructions for how we'd want to do it for this project.
That, and we'd have to write a little bit of code on our end to embed the language resources in edb, and load them as needed at runtime.
Specifically, as the second link you shared says, we'd use .ts
files which get compiled into .qm
files. We'd then want to just make it so edb can load them. Nothing too complex, I've done it before with other projects.
@cn-fairy If you are still interested in helping translate things, this would be a great start:
I believe the result will be a .qm
file. From once you have that, please just comment on this issue and we can discuss the strategies for adding it to the codebase via a PR. Since it would be the first translation, we don't yet have a "proper place to put the files".
In the meantime I can plan out where it should go and how we plan to have edb load it.
windows run : lupdate error: File '*.cpp' does not exist. lupdate version 6.3.0
linux run :Updating 'edb-cn.ts'...Found 321 source text(s) (321 new and 0 already existing)
I moved it to Windows. It can be opened using linguist
File:
edb-zh-CN.zip
Ok! that was fast, I'll look into how to best work this into the system as soon as I can.
@cn-fairy Don't worry, I haven't forgotten about you! I just merged in a PR that I had been working on for a visual improvement and will soon look at how I'd like to include your translation files :-)
Thanks again!
@fairycn I know it's been forever, but I am currently working on trying to integrate your efforts here. Thanks so much.
Your translation has been merged in and is working with: LANG=zh_CN ./edb
At present, the version does not support the function of custom interface language. I hope this function can be added to facilitate the use of non-English users. If you have this idea, I can provide assistance in Simplified Chinese translation.