Topic: Adding New Display Language
Greetings,
I want to add a new display language in QET. What changes are required to be made?
Can you please mention the individual files and changes?
I will be very grateful.
best regards,
Ahsan
You are not logged in. Please login or register.
QElectroTech → FR : Aide, suggestions, discussions, ... → Adding New Display Language
Greetings,
I want to add a new display language in QET. What changes are required to be made?
Can you please mention the individual files and changes?
I will be very grateful.
best regards,
Ahsan
Hello Ahsan,
you are welcome, what country you want to add?
Best regards,
Laurent
https://qelectrotech.org/forum/viewtopi … 126#p16126
https://qelectrotech.org/wiki_new/doc/translation
Code change after new country added and translation started or finished (see *.ts and *.qm file)
https://git.tuxfamily.org/qet/qet.git/c … 9806e62ba8
https://git.tuxfamily.org/qet/qet.git/c … 7097598363
Get GIT sources
git clone git://git.tuxfamily.org/gitroot/qet/qet.git qet_git
https://qelectrotech.org/wiki_new/doc/t … urce_files
How to update .ts files from source files?
Note: *.ts are generally updated by the developer when he considers that the character strings to be translated are viable or by translators.
Édit qelectrotech.pro file: Comment out the lines starting with TRANSLATIONS += :
sed -i 's/^TRANSLATIONS/#TRANSLATIONS/g' qelectrotech.pro
Run the following command:
lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de,ro,it,ar,sl,hr,el,nl,be,sl,zh,hu,pt_br,da,sr,fr,tr,sk,nb,mn,ja,cn,uk,zh-cn}.ts
Restore file qelectrotech.pro:
sed -i 's/^#TRANSLATIONS/TRANSLATIONS/g' qelectrotech.pro
http://doc.qt.io/qt-5/linguist-translators.html
Thank you for your quick and detailed response. I want to add Mandarin (Simplified Chinese) as a display language. I couldn't see it as a part of the installed package.
regards,
Ahsan
is zh-cn iso code, if yes I added file qet_zh-cn.ts in sources file, ready to translate it?
https://qelectrotech.org/forum/viewtopi … 701#p15701
regards,
Laurent
Date : 12/01/2022 13:18
> > Good morning Stephan,
> >
> > you are welcome.
> >
> > get
> > https://github.com/qelectrotech/qelectr … rce-mirror
> > or
> > git clone https://github.com/qelectrotech/qelectr … mirror.git
> >
> > Chinese country iso is CN or CHN?
> > Then I could create the qet_ts_cnh translation skeleton in the sources.
> >
> > On lang folder open qet_tr.ts with qtcreator on Windows/Linux/macOS,
> > translate, save and publish to upgrade qet_CHN.qm binary files. Send
> > me these 2 file or make a PR on Github.
> >
> > As the strings to translate are in French in the code, you can use the
> > English translation in the same windows to translate into Chinese.
> >
> > https://qelectrotech.org/wiki_new/doc/t … raductions
> >
> > https://download.qt.io/official_release … 14/4.14.1/
> > https://doc.qt.io/qt-5/linguist-translators.html
> > https://doc.qt.io/archives/qt-4.8/lingu … ators.html
> >
> > Some informations here for sync your Github mirror
> > https://qelectrotech.org/forum/viewtopi … 739#p13739
> >
> > If you have any questions do not hesitate to ask us.
> >
> >
> > Best regards,
> > Laurent
>
> Dear Stephan,
>
> I add new cn ts file to master git
> https://git.tuxfamily.org/qet/qet.git/c … dd472e3a7d
>
> Wait one clock to have this update on Github mirror.
>
> Greetings,
> Laurent
Sir, thank you. I can see the file (qet_zh.ts) in the source code.
I will skim through the recommended documentation to figure out what to do next.
regards,
Ahsan
You need to get qtcreator program here:
https://www.qt.io/offline-installers
Qt Creator
Qt Creator 10.0.2 is released and it is available via Qt online installer. If you need a standalone installer, please select the file according to your operating system from the list below to get the latest Qt Creator for your computer.Qt Creator 10.0.2 for Windows 64-bit (273 MB) (info)
Qt Creator 10.0.2 for Linux 64-bit (192 MB) (info)
Qt Creator 10.0.2 for macOS (250 MB) (info)
After just click on qet_zh.ts to open qtlinguist program for translation.
https://doc.qt.io/qt-5/linguist-translators.html
I have already installed Qt 5.15.2, and I can build QET from the source code.
I have another query, whenever I build QET using Qt then it always launches in French.
However, I can launch the (pre-compiled) installed version in desired display language using "Lancer QET.bat"
set LANG=en_US
I openned qet_zh-cn.ts and after open qet_en.ts to see English translation, that can help you if you don't know French language.
I have already installed Qt 5.15.2, and I can build QET from the source code.
I have another query, whenever I build QET using Qt then it always launches in French.
However, I can launch the (pre-compiled) installed version in desired display language using "Lancer QET.bat"set LANG=en_US
Oh you compile QET on Windows, you use mingw or vscode?
Yes, I've compiled using MinGW and Windows 11 (22H2) [OS Build: 22621.1848]
ahsn.uet09 wrote:I have already installed Qt 5.15.2, and I can build QET from the source code.
I have another query, whenever I build QET using Qt then it always launches in French.
However, I can launch the (pre-compiled) installed version in desired display language using "Lancer QET.bat"set LANG=en_US
Oh you compile QET on Windows, you use mingw or vscode?
It's normal, Chinese switch not yet added in QET source code, you need to set LANG on .bat.
Mandarin (Simplified Chinese) isn't the same than zh-cn?
I say this because a translation work was already in progress...
Dear Stephan,
yes it's a big job that will take you a lot of time, you can get help.
Do not hesitate to send your progress on the translation, even if it is not
finished, I could add the necessary code in the program so that you can see
what it looks like in real life.Have a nice day and best regards too,
Laurent
https://github.com/qelectrotech/qelectr … /qet_zh.ts
simplified Chinese code is zh-cn
Hi Ahsan,
you could see by example Japan translation GIT log:
https://git.tuxfamily.org/qet/qet.git/l … mp;q=japan
Regards,
Laurent
thank you very much. I will try to work on this and finish the translation work.
QElectroTech → FR : Aide, suggestions, discussions, ... → Adding New Display Language
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.031 seconds (43% PHP - 57% DB) with 11 queries