How to get "Plugins" menu name in other language?
-
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
-
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
-
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?
-
@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. -
@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.
-
@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. -
@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
-
@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. -
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. -
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...
Advertisement