Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About language translation #7

Closed
cneve opened this issue Sep 26, 2018 · 10 comments
Closed

About language translation #7

cneve opened this issue Sep 26, 2018 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@cneve
Copy link

cneve commented Sep 26, 2018

Hello, recently, I have encountered problems in language translation.
I copied a cn5X.en.ts file, and renamed it, and translated the characters using Linguist, and finally published the QM file using Linguist,which was saved in the same directory as the TS file.
The corresponding language selection is already shown on the software menu, but when I click the button, the command window appears "Locale () not usable, using default to english"
If I want to make a local language,What should I do next?

@fra589
Copy link
Owner

fra589 commented Sep 26, 2018

Hi @cneve
You also need to update the cn5X_locales.xml file in the i18n directory...
In wich language do you have made your translation ? It will be fine if you can send it to me :-)
@++;
Gauthier.

@cneve
Copy link
Author

cneve commented Sep 27, 2018

I am now changing in the en.ts file. After I have finished, I will send you the TS file. Gauthier thank you for your help.

@luisluna2
Copy link

@fra589
Friend, how can traslate?, with what program?

@fra589
Copy link
Owner

fra589 commented Sep 27, 2018

how can traslate?, with what program?

Hi @luisluna2,
You don't need to make any change in the Python .py files.

  • First, install the QT linguist software,
  • Then, go to the <cn5X>/i18n directory,
  • Duplicate the file cn5X.en.ts to cn5X.es.ts for example to make the spanish translation (the actual cn5X.es.ts is an empty translated file, so you can replace it),
  • Open your new .ts file with QT linguist software,
  • Change the language cible in the "Edit/File parameter" menu,
  • Replace all the items english translation by your new langage translation,
  • Save the new translated .ts file,
  • Use the "File/Publish" menu to publish the .qm file in the same <cn5X>/i18n directory. It is this cn5X.<LOCALE>.qm wich is used by cn5X to translate the interface at run time,
  • Don't forget to update the i18/cn5X_locales.xml to reflect your new translation,
  • Dont forget to send to me your new .ts file :-)

Thanks for your contribution,

@++;
Gauthier.

@fra589
Copy link
Owner

fra589 commented Sep 27, 2018

Hi all,

To avoid duplicate work, please, write here the translation you plan to do.

By the way, don't modify the files : mainWindow.py, dlgConfig.py and dlgAPropos.py. Those files are generated by the QT Designer devloppement tool and probably will be crushed by the next ui change.

I make the choice of don't translate some of the ui items, especially the originals Grbl commands or messages wich stay in the Grbl language (for example the "Soft Reset (^X)" button). This can be discuss here :-)

Thanks,
Gauthier.

@cneve
Copy link
Author

cneve commented Sep 27, 2018

Gauthier ,if translate some of the original code of grbl, will there be problems?Grblcom connection failure occurs several times when clicking connect.
Today, I translated most of the buttons and labels,I found many failed connections, which led me to reinstall grbl.˃̣̣̥᷄⌓˂̣̣̥᷅

@fra589
Copy link
Owner

fra589 commented Sep 27, 2018

HI @cneve,

If you translate the grbl code itself, cn5x to grbl serial com will stop to work since cn5X analyse and wait for the original sentences of grbl.
For example, to complete the connection, cn5X wait to receive a string (case sensitive) wich begin with "Grbl " and end with "help]"... So, if you translate the word "help" in the original code of grbl, cn5X never end its connection.

however, when you made many connections and deconnections, grbl crash ans stop to work correctly (I don't know why but it's a fact). In this case, generaly, it's enought to power off the grbl card and close cn5X, wait few seconds and restart the operation.

@++;
Gauthier.

@luisluna2
Copy link

Hi @fra589 I will modify to Spanish :)

@dbxzjq
Copy link

dbxzjq commented Feb 3, 2019

hi @fra589
CN5X can publish WINX86 installation file, thank you!

@fra589
Copy link
Owner

fra589 commented Feb 5, 2019

Hi @dbxzjq,
I am sorry, but my Windows develop box is broken (pleonasm 😋), so, I can't make Windows installation files for the moment(and probably for a long time).
But you can install prerequisites separately and run cn5X directly after...

To install on Windows :

  • Download and install latest Python 3 from https://www.python.org (don't forget to add Python in PATH environment variable)
  • Run cmd (as Administrator if you have installed Python for all users)
  • in cmd, type "pip install pyqt5"
  • Download and copy the whole cn5X directory from Github,

=> Double click on the cn5X.py downloaded file in Windows explorer...

Enjoy using cn5X++

@++;
Gauthier.

@fra589 fra589 added the help wanted Extra attention is needed label Apr 15, 2019
@fra589 fra589 closed this as completed Feb 22, 2021
Repository owner locked and limited conversation to collaborators Feb 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants