• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

File to edit language in Duet 3D

Scheduled Pinned Locked Moved
Duet Web Control
4
26
1.3k
Loading More Posts
  • 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.
  • undefined
    Chri55
    last edited by 6 Jul 2021, 11:34

    Hey,
    I am looking for a file, which is possible to edit and to add language it the code. I have a task to add my language to the printer to make my work easier.
    Is there any place to download that file, I searched Gighub and I didn't manage to find it. I am interested in 3.3 version of Web Panel.
    Thanks in advance

    undefined 1 Reply Last reply 6 Jul 2021, 11:40 Reply Quote 0
    • undefined
      jay_s_uk @Chri55
      last edited by 6 Jul 2021, 11:40

      @chri55 the languages are set here https://github.com/Duet3D/DuetWebControl/tree/master/src/i18n
      you'll have to build your own version of DWC or issue a PR to github to get it included

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 2 Replies Last reply 6 Jul 2021, 11:54 Reply Quote 1
      • undefined
        Chri55 @jay_s_uk
        last edited by 6 Jul 2021, 11:54

        @jay_s_uk Thanks for the information, I'll try to create a file based on those in the link.

        1 Reply Last reply Reply Quote 0
        • undefined
          Chri55 @jay_s_uk
          last edited by 8 Jul 2021, 10:23

          @jay_s_uk Hey, maybe you know where can I download language files for integrated panel i5 and i7 to also translate it. I will be very grateful!

          undefined 1 Reply Last reply 8 Jul 2021, 10:26 Reply Quote 0
          • undefined
            jay_s_uk @Chri55
            last edited by 8 Jul 2021, 10:26

            @chri55 this one https://github.com/Duet3D/PanelDueFirmware/blob/3.3-dev/src/UI/Strings.hpp

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            undefined 2 Replies Last reply 8 Jul 2021, 12:08 Reply Quote 1
            • undefined
              Chri55 @jay_s_uk
              last edited by 8 Jul 2021, 12:08

              @jay_s_uk Thanks again, it helped a lot 🙂

              1 Reply Last reply Reply Quote 0
              • undefined
                Chri55 @jay_s_uk
                last edited by 9 Jul 2021, 08:39

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • undefined
                  Chri55
                  last edited by 9 Jul 2021, 08:48

                  Hey, I have a problem with updating language files on web panel. I found information that if I Upload a zip file they should unpack automatically and it did (I zipped all DWC files )but the language files were not visible. I also tried to upload only one directory with just language .js files but after unpacking it from zip it is not shown in system files and new language is not available in the options. I coudn't find a solution on github, do you know may be what can I do? Also if there is a tutorial for future, how to upload files into the integrated panels I would be very thankful, because I will probably need one, it would be good to check if my translations are at least half correct. Thanks in advance

                  undefined 1 Reply Last reply 9 Jul 2021, 08:54 Reply Quote 0
                  • undefined
                    jay_s_uk @Chri55
                    last edited by 9 Jul 2021, 08:54

                    @chri55 did you add them to the index file?
                    https://github.com/Duet3D/DuetWebControl/blob/master/src/i18n/index.js

                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    undefined 2 Replies Last reply 9 Jul 2021, 08:58 Reply Quote 1
                    • undefined
                      Chri55 @jay_s_uk
                      last edited by 9 Jul 2021, 08:58

                      @jay_s_uk No, did not. I will add it and check.

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        Chri55 @jay_s_uk
                        last edited by 9 Jul 2021, 09:28

                        @jay_s_uk I added it to the index file and unfortunately, it didn't help. I uploaded a zip file via "upload system files" on web panel. Is that a correct way to do it? Or is there a solution that I can upload it directly on the SD card. I check the files on the raspberry that the Duet is connected to and files sims to be loaded correctly.

                        undefined undefined 2 Replies Last reply 9 Jul 2021, 10:05 Reply Quote 0
                        • undefined
                          jay_s_uk @Chri55
                          last edited by 9 Jul 2021, 10:05

                          @chri55 there shouldn't be anything else to change and as long as you're getting an SBC zip file output, you can just upload it via DWC as you've described.

                          Language is set by the browser and then stored in dwc-settings.json (and/or dwc2settings.json).
                          Try deleting both of those files and rebooting.
                          If that doesn't work, you can also edit them and change the language there.

                          What language are you looking to add? are you using the correct 2 letter identifier?

                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                          undefined 1 Reply Last reply 9 Jul 2021, 10:25 Reply Quote 0
                          • undefined
                            chrishamm administrators @Chri55
                            last edited by 9 Jul 2021, 10:24

                            @chri55 Did you generate the actual DWC bundle with npm run build before uploading the file from the dist folder? If yes, try clearing the browser cache or reload DWC with Ctrl+Shift+R.

                            Duet software engineer

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              Chri55 @jay_s_uk
                              last edited by 9 Jul 2021, 10:25

                              @jay_s_uk I am trying to add a Polish language, letter identifier is "pl" which I used.
                              To confirm which files should I upload? may be I am making a mistake not sending correct files.
                              I uploaded zip with a directory named "i18n" that consists all language files like fr.js, en.js and new pl.js an corrected index.js.
                              Should I upload something more?
                              Where I can find those .json files?

                              undefined 1 Reply Last reply 9 Jul 2021, 10:29 Reply Quote 0
                              • undefined
                                chrishamm administrators @Chri55
                                last edited by 9 Jul 2021, 10:29

                                @chri55 You cannot simply change a source code file and upload it on the System page, it's required to rebuild DWC every time that's done. Can you share your pl translations file? Then I can build new DWC ZIPs for you and I can integrate your translations right away into the next DWC version.

                                Duet software engineer

                                undefined 1 Reply Last reply 9 Jul 2021, 10:34 Reply Quote 0
                                • undefined
                                  Chri55 @chrishamm
                                  last edited by 9 Jul 2021, 10:34

                                  @chrishamm In what file extension should i send it because I con not sent .js file?
                                  And the translation is not 100% done but It needs a few corrections but to do that i need to see context when text is shown.

                                  undefined 1 Reply Last reply 9 Jul 2021, 10:43 Reply Quote 0
                                  • undefined
                                    chrishamm administrators @Chri55
                                    last edited by 9 Jul 2021, 10:43

                                    @chri55 .txt should work.

                                    Duet software engineer

                                    undefined 1 Reply Last reply 9 Jul 2021, 10:52 Reply Quote 0
                                    • undefined
                                      Chri55 @chrishamm
                                      last edited by 9 Jul 2021, 10:52

                                      @chrishamm pl.txt
                                      Here is the file.
                                      And I have a question if you can write the steps what should be done if I would like to do It myself (if it is not a big problem, and may be it will help some other people). It is a completely new thing for me and don't understand it 100 %.

                                      undefined 1 Reply Last reply 9 Jul 2021, 11:17 Reply Quote 0
                                      • undefined
                                        chrishamm administrators @Chri55
                                        last edited by 9 Jul 2021, 11:17

                                        @chri55 You've got to set up NodeJS first (there are countless tutorials for that on the web) and when you're done, just run two commands from a command-line prompt in the DWC directory:

                                        npm install
                                        npm run build

                                        That will generate DuetWebControl-*.zip files in the dist directory. This procedure is already documented here.

                                        I'm going to build new DWC versions for you in a moment.

                                        Duet software engineer

                                        undefined 1 Reply Last reply 9 Jul 2021, 11:42 Reply Quote 0
                                        • undefined
                                          Chri55 @chrishamm
                                          last edited by 9 Jul 2021, 11:42

                                          @chrishamm Ok. I need to watch some of those tutorials and educate myself. Thank you for the information. I never did stuff like that and it seemed like and easy task just to translate but it happened to be a bit over my abilities. Thank you again.

                                          undefined 1 Reply Last reply 9 Jul 2021, 13:47 Reply Quote 0
                                          6 out of 26
                                          • First post
                                            6/26
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA