sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    How to get "Plugins" menu name in other language?

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 5 Posters 2.9k Views 5 Watching
    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.
    • W Offline
      wikii
      last edited by

      In Sketchup English version , "Plugins" menu name is just "Plugins".
      But in Sketchup Chinese version, "Plugins" menu name always change.
      How to get the name of Plugins menu in ruby?
      Thanks!

      wikii

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by

        you could try and use a global call used by one of the SU plugins like webtexture...

        $wt_strings.GetString("Plugins")
        

        that should return the localised string...

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • W Offline
          wikii
          last edited by

          Thank you!

          Do you mean that I need to make a translation book?
          but when a new version Sketchup released, I must update it.

          Has a thorough solution?

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            @wikii said:

            In Sketchup English version , "Plugins" menu name is just "Plugins".
            But in Sketchup Chinese version, "Plugins" menu name always change.
            How to get the name of Plugins menu in ruby?
            Thanks!

            wikii

            The "Plugins" menu was renamed to "Extensions" in SU2015.
            Has the Chinese version of SketchUp changed on other versions than SU2015?

            What are you trying to do?
            UI.menu("Plugins") should always work regardless of version and language.

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • W Offline
              wikii
              last edited by

              @thomthom said:

              @wikii said:

              In Sketchup English version , "Plugins" menu name is just "Plugins".
              But in Sketchup Chinese version, "Plugins" menu name always change.
              How to get the name of Plugins menu in ruby?
              Thanks!

              wikii

              The "Plugins" menu was renamed to "Extensions" in SU2015.
              Has the Chinese version of SketchUp changed on other versions than SU2015?

              What are you trying to do?
              UI.menu("Plugins") should always work regardless of version and language.

              I have writen a ruby to shortcuts ,so I need the exact name of plugins menu.

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                @driven said:

                you could try and use a global call used by one of the SU plugins like webtexture...

                $wt_strings.GetString("Plugins")
                

                that should return the localised string...

                It will not. Because that string is not in the file used by the webtextures extension.

                I checked most of the normal trimble extensions, and none of them have the strings "Plugins" nor "Extensions".

                On PC, menu name strings are in a string table, in the resources, that are bundled into the executable file.

                The display names are not exposed to the Ruby API Sketchup::Menu class.

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by

                  @dan rathbun said:

                  ...
                  It will not. Because that string is not in the file used by the webtextures extension...

                  your right it's buried in "Localizable.strings" on a mac...
                  I tested by renaming and now have "Plugins" back in v2015 menu bar...

                  be nice to have easy access for 'user guides' etc...

                  john

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • W Offline
                    wikii
                    last edited by

                    @thomthom said:

                    @wikii said:

                    In Sketchup English version , "Plugins" menu name is just "Plugins".
                    But in Sketchup Chinese version, "Plugins" menu name always change.
                    How to get the name of Plugins menu in ruby?
                    Thanks!

                    wikii

                    The "Plugins" menu was renamed to "Extensions" in SU2015.
                    Has the Chinese version of SketchUp changed on other versions than SU2015?

                    What are you trying to do?
                    UI.menu("Plugins") should always work regardless of version and language.

                    I want to set shortcuts to some plugins.
                    So, I need to know the display name of Plugins menu.

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      You are attempting to write directly to the SketchUp registry hive whilst SketchUp itself is open ?

                      IF SO, Do you expect SketchUp to be able to handle this ?
                      Usually SketchUp overwrites any changes any code makes while SketchUp is open.
                      Generally, This is NOT a safe scenario.

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • TIGT Online
                        TIG Moderator
                        last edited by

                        It's also a bad idea to set shortcuts anyway [even if you could do it effectively !] - the user might be angry at you when you overwrite their own shortcuts with yours !

                        You can instruct the user of your tool how to add their own shortcuts, but don't force them - you are meant to be their friend, not their master.

                        If you want the user to press certain keys to do certain things in your Tool, then you are pretty much limited to Ctrl, Alt, Shift and Tab, or say numbers 0-9 followed by other characters which can be parsed off from the user's typed text input - so "1:3" can be read in as a slope of "1 in 3", or "1left" gives "left" when leading numerals are stripped off...
                        All other keys can potentially be already assigned to other tools and actions by the user, so pressing "L" for left is unlikely to work as that will likely invoke the "Line" tool - and it's including key-combos like Ctrl+Shift+V [typically for Edit>PasteInPlace]. So that's kind of use in your Tool is essentially a bad idea...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement