qelectrotech / qelectrotech-source-mirror

Main QET repository, Bugtracker: https://qelectrotech.org/bugtracker/
https://qelectrotech.org
GNU General Public License v2.0
283 stars 84 forks source link

Error using Portuguese Language #274

Closed dominus04 closed 6 months ago

dominus04 commented 9 months ago

The problem is when you choose Brazilian Portuguese as language. There is a conflict between block title language and app language. When you choose brazilian portuguese as app language, the block titles and sheets remain in french, but when you choose language as system language, the block title change to portuguese, but app change to french. My system is configured as brazilian portuguese.

scorpio810 commented 9 months ago

Maybe related to this https://github.com/qelectrotech/qelectrotech-source-mirror/issues/278

scorpio810 commented 9 months ago

@dominus04 what version of QET, OS?

plc-user commented 6 months ago

An additional question: Can QET handle language-encodings with more than two letters in titleblocks and/or elements? When I want to add a language like "pt_BR" for an element in element-editor the line is NOT added in the file. It isn't even added in the list of the dialog-box in element-editor! (close and re-open dialog) When I add a language like "pt_BR" to the list of languages in an element-file "by hand" and change the language of QET to Brazilian Portuguese the added name of the element is not shown: It is named in another language.

scorpio810 commented 6 months ago

For me the problem comes from the fact that more than two characters are not possible in the titleblock code.

plc-user commented 6 months ago

I think I found it: // ----------------------------- File: sources/NameList/nameslist.cpp Change this in line 47: if (lang.length() != 2) return;

to this line: if ((lang.length() != 2) && (lang.length() != 5)) return; // -----------------------------

Looks good ... at first sight! Created a pull-request -- please try!

scorpio810 commented 6 months ago

Please try new 0.100.0-dev packages, thanks plc-user.

Use "pt_BR" for your translation to Brazilian Portuguese element, titleblocks, etc.