Puzzled about the script menu

Reorganising my script menu, I realised that there is some secret sauce that Devonthink is using to organise its menus.

Look at Images section of the script menu

Screen Shot 2016-05-17 at 3.52.31 PM.jpg

And this is the directory of Devonthink Pro/Scripts/Images

Screen Shot 2016-05-17 at 3.51.48 PM.jpg

There is something interesting going on here (apart from the prefix of an _ to a script name to create a separator which is neat).

The names of the scripts sometimes don’t have any relationship to the names of the scripts as they appear in the script menu !

So the name of a script is’ Rotate 4 Portrait2Landscape.scpt’ but it appears in the menu as ‘Portrait to Landscape’. My first guess was that the true name was in the first line of the script but this is not the case.

There are examples of this all through the script menus.

Can anyone explain how this works? I couldn’t find any enlightenment in the manual.

Frederiko

It’s part of the localization code of the app, so that a single script will have its menus appear in the selected language of the user. As example, the same ‘Rotate 4 Portrait2Landscape.scpt’ script will appear in the script menu localized to German as ‘Hochformat nach Querformat drehen’.

Thanks Greg. I am guessing that this mechanism can’t be used by user installed scripts then.

Frederiko

Actually, you can do this on your machine, Frederiko.

You can modify the value in DEVONthink Pro Office/Contents/Resources/English.lproj/Scripts.strings and restart DEVONthink. TextWrangler will open these just fine.

Note: I’m only saying this because you know more of what you’re doing than many Users. We do not advocate messing about like this, in general. This is for academic purposes, so to anyone that jacks up their copy of DEVONthink… you have been warned. 8)
ModifiedScriptName.png

Also keep in mind that every update of the DEVONthink app will overwrite your customized settings.

Thanks Jim. I recognise that file from messing about with localisation in the template files but I didn’t realise it applied more broadly.

Agreed, definitely not something you want to mess with without keeping a backup of the internal files.

Frederiko