Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue with software application that utilizes qt
Forum Updated to NodeBB v4.3 + New Features

Issue with software application that utilizes qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
20 Posts 6 Posters 1.1k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tristan S
    wrote on last edited by
    #1

    Not sure if this is the best place to look for help for this, but our manufacturing company recently purchased a CNC machine. The machine is Chinese in origin and defaults to the Chinese when opening. The software is basically a bunch of folders and dll files and the main .exe that launches the application. I can see that there are .qm files for multiple languages, but I'm not sure how to get the app to use them. There's also a qt.conf file in the root directory but it doesn't have a translation path set and setting one didn't seem to work. I'm relatively inexperienced with qt so I don't entirely know what the process of applying a .qm to a compiled file is like. This software is also running on Windows 7 32-bit in English. If further info is required I'm more than happy to send it. Thanks!

    Pl45m4P 1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      Hi, normally there is a qm file for each language. Have you found the qm file related to your?
      In my prohjects I use to embed the qm file in the executable and the right qm file is choosed during program start. In your case i think the developer has embded a function to search the right qm file in the executable path.
      This is not a rule, a developer can do as he prefear.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tristan S
        wrote on last edited by
        #3

        Hello, thank you for your reply. I have the qm file for english, however there appears to be nothing within the application that allows for the language to be changed. There is an administrator login for this application, however when we received the pc with the PC with the software already installed on it, we weren't given a password any administrator login. There's a slight possibility that the way to change language is locked behind the administrator tab.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Usually, it should be under some preferences in the application. One other possibility (but less likely I think) is to check whether the application takes a launch parameter with the language to select.
          If they used QSettings to store the language, there might be something in the Windows registry.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tristan S
            wrote on last edited by Tristan S
            #5

            So I've been playing around in the registry, and while I can't find QSettings within the project, I found a key in HKEY_CURRENT_USER/Software/Classes called qm_auto_file. I also found HKEY_CURRENT_USER/Software/QtProject. Would either of these be useful in fixing the issue?

            Edit: I'm also wondering if the program automatically uses the system language. When we received this pc, the windows language was set to chinese. In order to properly switch it to english we had to meddle with some registry keys and use external methods given windows won't let you change the language unless you have windows 7 ultimate. I'm wondering if despite text showing up as english the pc still has it's locale set to China.

            1 Reply Last reply
            0
            • mrdebugM Offline
              mrdebugM Offline
              mrdebug
              wrote on last edited by
              #6

              You have to ask yo the developer because each developer uses a own procedure in order to select the language. I normally use the current lang. Other developers use a form where the user can select the lang.
              Is the os menu in english now? If not try to open the software from a console. Before to run the software please set local lang variable to english. In linux it works.

              Need programmers to hire?
              www.labcsp.com
              www.denisgottardello.it
              GMT+1
              Skype: mrdebug

              T 1 Reply Last reply
              0
              • mrdebugM mrdebug

                You have to ask yo the developer because each developer uses a own procedure in order to select the language. I normally use the current lang. Other developers use a form where the user can select the lang.
                Is the os menu in english now? If not try to open the software from a console. Before to run the software please set local lang variable to english. In linux it works.

                T Offline
                T Offline
                Tristan S
                wrote on last edited by
                #7

                @mrdebug The developers are Chinese and don't have an easy way for our company to access them. The OS had a language pack applied to it so it reads in english and the locale is set to english, but it still reads chinese. I've tried opening the software with language parameters from cmd to no avail.

                1 Reply Last reply
                0
                • T Tristan S

                  Not sure if this is the best place to look for help for this, but our manufacturing company recently purchased a CNC machine. The machine is Chinese in origin and defaults to the Chinese when opening. The software is basically a bunch of folders and dll files and the main .exe that launches the application. I can see that there are .qm files for multiple languages, but I'm not sure how to get the app to use them. There's also a qt.conf file in the root directory but it doesn't have a translation path set and setting one didn't seem to work. I'm relatively inexperienced with qt so I don't entirely know what the process of applying a .qm to a compiled file is like. This software is also running on Windows 7 32-bit in English. If further info is required I'm more than happy to send it. Thanks!

                  Pl45m4P Offline
                  Pl45m4P Offline
                  Pl45m4
                  wrote on last edited by Pl45m4
                  #8

                  Hi and welcome :)

                  @Tristan-S said in Issue with software application that utilizes qt:

                  our manufacturing company recently purchased a CNC machine

                  So it was used in China / by a Chinese company before?!
                  There is no support by the manufacturer?!
                  No handbook? No manual?! No online portal where to seek help?!

                  I can see that there are .qm files for multiple languages

                  Might be a little hacky and dirty but as a test you could search for the Chinese language file, backup it and then replace it with the language of your choice, English, German etc...
                  If the app loads a given language config at startup it might work... obviously not a good solution but at least then you know how it works and can investigate further.

                  Have you tried to use parameters as suggested by @SGaist ? Start app from console and see if there is any --help or so.
                  Small chance that something like app.exe -qm path/to/language.qm works (not sure about -qm... could be any "switch")


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  T 1 Reply Last reply
                  1
                  • Pl45m4P Pl45m4

                    Hi and welcome :)

                    @Tristan-S said in Issue with software application that utilizes qt:

                    our manufacturing company recently purchased a CNC machine

                    So it was used in China / by a Chinese company before?!
                    There is no support by the manufacturer?!
                    No handbook? No manual?! No online portal where to seek help?!

                    I can see that there are .qm files for multiple languages

                    Might be a little hacky and dirty but as a test you could search for the Chinese language file, backup it and then replace it with the language of your choice, English, German etc...
                    If the app loads a given language config at startup it might work... obviously not a good solution but at least then you know how it works and can investigate further.

                    Have you tried to use parameters as suggested by @SGaist ? Start app from console and see if there is any --help or so.
                    Small chance that something like app.exe -qm path/to/language.qm works (not sure about -qm... could be any "switch")

                    T Offline
                    T Offline
                    Tristan S
                    wrote on last edited by
                    #9

                    @Pl45m4

                    Thank you for your reply! Yes, for whatever reason they just dropped of the machine with a fully chinese machine. So far I can't find any details on anything related to the software whatsoever, only that it's made by Sunvega. I thought of changing the .qm file to be the english one, but it seems like the software doesn't use a .qm file for chinese, only for other languages. Deleting all .qm files didn't seem to affect the app at all. I was able to successfully reach the admin panel, however there sadly isn't any language options baked into the ui. I'm gonna try to see if I can figure out if there are any switches.

                    Pl45m4P C 2 Replies Last reply
                    0
                    • mrdebugM Offline
                      mrdebugM Offline
                      mrdebug
                      wrote on last edited by
                      #10

                      Try to rename the en file to ch

                      Need programmers to hire?
                      www.labcsp.com
                      www.denisgottardello.it
                      GMT+1
                      Skype: mrdebug

                      T 1 Reply Last reply
                      0
                      • mrdebugM mrdebug

                        Try to rename the en file to ch

                        T Offline
                        T Offline
                        Tristan S
                        wrote on last edited by
                        #11

                        @mrdebug I have tried this to no avail. I tried qt_zh.qm and qt_zh_TWqm and qt_zh_CN.qm following the format and that didn't work.

                        1 Reply Last reply
                        0
                        • T Tristan S

                          @Pl45m4

                          Thank you for your reply! Yes, for whatever reason they just dropped of the machine with a fully chinese machine. So far I can't find any details on anything related to the software whatsoever, only that it's made by Sunvega. I thought of changing the .qm file to be the english one, but it seems like the software doesn't use a .qm file for chinese, only for other languages. Deleting all .qm files didn't seem to affect the app at all. I was able to successfully reach the admin panel, however there sadly isn't any language options baked into the ui. I'm gonna try to see if I can figure out if there are any switches.

                          Pl45m4P Offline
                          Pl45m4P Offline
                          Pl45m4
                          wrote on last edited by
                          #12

                          @Tristan-S said in Issue with software application that utilizes qt:

                          only that it's made by Sunvega

                          A google search on Sunvega OS lead me to:

                          • https://zicar.cn/cnc-six-sided-drilling-machine-c6/

                          Bottom of the page:

                          Oversea Service (Technical Assistance)

                          Our machine is almost installed and tested well before delivery. Manual and instruction book are sent to you free together with the machine, and we also provide different language version, such as Spanish, Russian and other languages.


                          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                          ~E. W. Dijkstra

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            Tristan S
                            wrote on last edited by
                            #13

                            Unfortunately, Zicar isn't where we ordered the machine from. The link to the machine is https://sagamac.com/product/m4g2-door-4-edge-cutting-sizing-machine/

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              Tristan S
                              wrote on last edited by
                              #14

                              image.png
                              In case this helps at all, this is the file structure. Language and UTF-8 were both created by me and didn't come with the project. Translator.exe only translates XML files and TS files which doesn't change anything in the app itself. The translation folder just has a bunch of .qm files for various languages. The resource folder has a variety of "(cnc name)_en.qm" files which are referenced in the hex code for the main EXE but don't seem to be read at any point.

                              J.HilkJ 1 Reply Last reply
                              0
                              • T Tristan S

                                @Pl45m4

                                Thank you for your reply! Yes, for whatever reason they just dropped of the machine with a fully chinese machine. So far I can't find any details on anything related to the software whatsoever, only that it's made by Sunvega. I thought of changing the .qm file to be the english one, but it seems like the software doesn't use a .qm file for chinese, only for other languages. Deleting all .qm files didn't seem to affect the app at all. I was able to successfully reach the admin panel, however there sadly isn't any language options baked into the ui. I'm gonna try to see if I can figure out if there are any switches.

                                C Offline
                                C Offline
                                ChrisW67
                                wrote on last edited by ChrisW67
                                #15

                                @Tristan-S said:

                                Deleting all .qm files didn't seem to affect the app at all.

                                Hmm, so the code is actually built with strings in Chinese and (presumably) is relying on translation to present English versions. The fact that you have qt_zh.qm, qt_zh_TW.qm and qt_zh_CN.qm is a little at odds with this though: why would you need a translation file for an app that is most likely natively one of these.

                                Yes, for whatever reason they just dropped of the machine with a fully chinese machine.

                                This could be part of the problem. Even though you have added an English language pack to Windows the default system locale may still be reported/derived as China.

                                The QLocale code looks for LANG, LC_ALL, and LANGUAGE environment variables at different times on Linux. On Windows it seems to look only at LANG, so you could try something like this from a CMD shell:

                                cd program directory
                                set LANG=en_US
                                .\program
                                

                                If the qt.conf does not specify Translations then the translations folder next to the executable is the default.

                                Pl45m4P T 2 Replies Last reply
                                0
                                • C ChrisW67

                                  @Tristan-S said:

                                  Deleting all .qm files didn't seem to affect the app at all.

                                  Hmm, so the code is actually built with strings in Chinese and (presumably) is relying on translation to present English versions. The fact that you have qt_zh.qm, qt_zh_TW.qm and qt_zh_CN.qm is a little at odds with this though: why would you need a translation file for an app that is most likely natively one of these.

                                  Yes, for whatever reason they just dropped of the machine with a fully chinese machine.

                                  This could be part of the problem. Even though you have added an English language pack to Windows the default system locale may still be reported/derived as China.

                                  The QLocale code looks for LANG, LC_ALL, and LANGUAGE environment variables at different times on Linux. On Windows it seems to look only at LANG, so you could try something like this from a CMD shell:

                                  cd program directory
                                  set LANG=en_US
                                  .\program
                                  

                                  If the qt.conf does not specify Translations then the translations folder next to the executable is the default.

                                  Pl45m4P Offline
                                  Pl45m4P Offline
                                  Pl45m4
                                  wrote on last edited by Pl45m4
                                  #16

                                  @ChrisW67 said in Issue with software application that utilizes qt:

                                  The fact that you have qt_zh.qm, qt_zh_TW.qm and qt_zh_CN.qm is a little at odds with this though: why would you need a translation file for an app that is most likely natively one of these.

                                  Probably because of variations in dialects/regional spoken language as zh_CN is for mainland China (PRC) while zh_TW is the file for the Taiwanese version of the program... I don't speak Chinese, so I don't know if there are any major differences.
                                  So these files are needed to put the app back to Chinese if any other language is in use.
                                  Therefore I think at least the devs must know how, lol :) There must be some way.

                                  This could be part of the problem. Even though you have added an English language pack to Windows the default system locale may still be reported/derived as China.

                                  @Tristan-S
                                  Reading this from @ChrisW67 , is it possible to run the software on a computer with your desired languague?
                                  Doesn't even have to work properly, but only a start would unveil the language... if Chinese again, it's not using the OS Locale language.

                                  And just to make sure... have you tried the obvious?
                                  You said the program is completely in Chinese... have to tried every single menu, option, button, toolbar... whatever... where they could have hidden the language settings?!


                                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                                  ~E. W. Dijkstra

                                  1 Reply Last reply
                                  0
                                  • T Tristan S

                                    image.png
                                    In case this helps at all, this is the file structure. Language and UTF-8 were both created by me and didn't come with the project. Translator.exe only translates XML files and TS files which doesn't change anything in the app itself. The translation folder just has a bunch of .qm files for various languages. The resource folder has a variety of "(cnc name)_en.qm" files which are referenced in the hex code for the main EXE but don't seem to be read at any point.

                                    J.HilkJ Offline
                                    J.HilkJ Offline
                                    J.Hilk
                                    Moderators
                                    wrote on last edited by
                                    #17

                                    @Tristan-S There is a Settings folder what's the content of that ?


                                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                    Q: What's that?
                                    A: It's blue light.
                                    Q: What does it do?
                                    A: It turns blue.

                                    1 Reply Last reply
                                    0
                                    • C ChrisW67

                                      @Tristan-S said:

                                      Deleting all .qm files didn't seem to affect the app at all.

                                      Hmm, so the code is actually built with strings in Chinese and (presumably) is relying on translation to present English versions. The fact that you have qt_zh.qm, qt_zh_TW.qm and qt_zh_CN.qm is a little at odds with this though: why would you need a translation file for an app that is most likely natively one of these.

                                      Yes, for whatever reason they just dropped of the machine with a fully chinese machine.

                                      This could be part of the problem. Even though you have added an English language pack to Windows the default system locale may still be reported/derived as China.

                                      The QLocale code looks for LANG, LC_ALL, and LANGUAGE environment variables at different times on Linux. On Windows it seems to look only at LANG, so you could try something like this from a CMD shell:

                                      cd program directory
                                      set LANG=en_US
                                      .\program
                                      

                                      If the qt.conf does not specify Translations then the translations folder next to the executable is the default.

                                      T Offline
                                      T Offline
                                      Tristan S
                                      wrote on last edited by
                                      #18

                                      @ChrisW67 @Pl45m4
                                      Alright, so to clarify there is neither a qt_zh_CN.qm or a qt_zh.qm, only a qt_zh_TW. I was referring to changing the the name of qt_en.qm to all of those names on the off chance it was looking for one of those by default.

                                      So some updates since I last posted. Thanks to the devs using unsalted encryption I was able to figure out the password for the administrator account which showed me a lot more panels, however even with all of the available tabs at my disposal, none of them have language settings. I was also able to get the software to load on windows 10 English, which didn't resolve the issue. I even tried setting the locale in cmd and that didn't work either

                                      @J-Hilk said in Issue with software application that utilizes qt:

                                      There is a Settings folder what's the content of that ?

                                      Settings folder contains a variety of xml files, however none of them mention language and they were in Chinese until I used translator.exe to correct them. You would think the data in the xml file would be what the application reads from to populate it's text boxes, but for whatever reason even changing all chinese to english doesn't change anything in the app.

                                      I ran the exe through a hex editor and found some lines referencing a .qm file, but it's hard to really get an idea of what it means.
                                      ca0f2dfb-ea42-4107-b53c-4c8b07f0262b-image.png

                                      At this rate I better start brushing up on my Mandarin.

                                      Pl45m4P 1 Reply Last reply
                                      0
                                      • T Tristan S

                                        @ChrisW67 @Pl45m4
                                        Alright, so to clarify there is neither a qt_zh_CN.qm or a qt_zh.qm, only a qt_zh_TW. I was referring to changing the the name of qt_en.qm to all of those names on the off chance it was looking for one of those by default.

                                        So some updates since I last posted. Thanks to the devs using unsalted encryption I was able to figure out the password for the administrator account which showed me a lot more panels, however even with all of the available tabs at my disposal, none of them have language settings. I was also able to get the software to load on windows 10 English, which didn't resolve the issue. I even tried setting the locale in cmd and that didn't work either

                                        @J-Hilk said in Issue with software application that utilizes qt:

                                        There is a Settings folder what's the content of that ?

                                        Settings folder contains a variety of xml files, however none of them mention language and they were in Chinese until I used translator.exe to correct them. You would think the data in the xml file would be what the application reads from to populate it's text boxes, but for whatever reason even changing all chinese to english doesn't change anything in the app.

                                        I ran the exe through a hex editor and found some lines referencing a .qm file, but it's hard to really get an idea of what it means.
                                        ca0f2dfb-ea42-4107-b53c-4c8b07f0262b-image.png

                                        At this rate I better start brushing up on my Mandarin.

                                        Pl45m4P Offline
                                        Pl45m4P Offline
                                        Pl45m4
                                        wrote on last edited by Pl45m4
                                        #19

                                        @Tristan-S

                                        The hex dumb mentions an .ini file somewhere in Resources.
                                        Have you checked all ini files you can find in the program folder? Maybe some of them contains a string which tells what lang to use...

                                        And there is no way to contact the developers (i.e. the Chinese company) and ask for assistance with changing the language?
                                        Btw: The website you have linked above contains a WhatsApp contact :)
                                        Maybe ask the broadly grinning guy in the whatsapp contact profile picture how to change the language 😄
                                        As I doubt that you guys are their first international customer and every other customer uses the software in Chinese language.

                                        Edit:
                                        Do all the other translation files actually contain something? Or are these just placeholders?


                                        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                                        ~E. W. Dijkstra

                                        T 1 Reply Last reply
                                        0
                                        • Pl45m4P Pl45m4

                                          @Tristan-S

                                          The hex dumb mentions an .ini file somewhere in Resources.
                                          Have you checked all ini files you can find in the program folder? Maybe some of them contains a string which tells what lang to use...

                                          And there is no way to contact the developers (i.e. the Chinese company) and ask for assistance with changing the language?
                                          Btw: The website you have linked above contains a WhatsApp contact :)
                                          Maybe ask the broadly grinning guy in the whatsapp contact profile picture how to change the language 😄
                                          As I doubt that you guys are their first international customer and every other customer uses the software in Chinese language.

                                          Edit:
                                          Do all the other translation files actually contain something? Or are these just placeholders?

                                          T Offline
                                          T Offline
                                          Tristan S
                                          wrote on last edited by Tristan S
                                          #20

                                          @Pl45m4 said in Issue with software application that utilizes qt:

                                          The hex dumb mentions an .ini file somewhere in Resources.
                                          Have you checked all ini files you can find in the program folder?

                                          So for whatever reason, the exe mentions folders that don't seem to exist. There isn't any folder named Sunvega CncHmi2 in Resources and there is only a single ini file in the entire project which is debug.ini and it's contents are simply

                                          simul.enable = 1
                                          simul.address = 0.0.0.0:0
                                          

                                          I believe that the correct translation file isn't actually qt_en.qm but rather the .qm files found within resources, as the resources folder has many _en.qm files and examining them seems like they're translations of the ui. I tried linking the path in qt.conf as follows to no avail.

                                          [Paths]
                                          Documentation=../../Docs/Qt-5.13.2
                                          Examples=../../Examples/Qt-5.13.2
                                          Prefix=.
                                          Translations = Resources
                                          

                                          These attempts included variations like ./Resources and ../Resources but neither worked.

                                          @Pl45m4 said in Issue with software application that utilizes qt:

                                          And there is no way to contact the developers (i.e. the Chinese company) and ask for assistance with changing the language?

                                          Because the developer of the app as well as the distributor are located in China, coordinating times becomes incredibly difficult given the time distance, in addition to the language barrier. Even trying to track down anything related to the software is difficult. We did manage to track down the guy on whatsapp, but he kinda just told us that it still works in chinese and he might send us a video on how to fix it at some point. Hopefully that ends up pulling through.

                                          @Pl45m4 said in Issue with software application that utilizes qt:

                                          Do all the other translation files actually contain something? Or are these just placeholders?

                                          All of the language files have things in them ironically with the exception of the english file, however there seems to be another english file in the root directory which actually has things translated (though it seems like it doesn't involve ui elements).

                                          Thank you for all the assistance both you and everyone else have provided. People like you who help others out of the kindness of your hearts are amazing human beings. Hopefully this can get resolved soon!

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved