I made no judgement on the verbosity of the code, though it seems very noisy to me, and simply took all the strings, touched them up, and moved them out.
I initially tried to place the strings in a file more specific to the script editor, but the translation system could never find them. So I gave up and placed them in the global string definition file.
Initially I tried to use a "#pragma"-esque marker, but LSL chokes on the hash. So I moved to the simple hack of using a special-form comment.
I also started out by trying to detect the marker in the first non-whitespace line. After some thought I realized that this might conflict with some people's editors or other things they like to add to their scripts.
To correct for this I had two options - go through all the effort of skipping commented blocks, or just simply scan the entire script for that character sequence. I chose the latter because it is far simpler to code, even though it is more open to abuse. The abuse, that of putting the tag in arbitrary locations in the script, can be mitigated by having the documentation state that the marker is to be located at the beginning of the script on its own line.
Because of the added scope restrictions that came about because I wrapped a block of code in an 'if' statement, I would up making the treatment of the "err" variable more consistent. Instead of some places using the function-scoped variable and some using deeper-placed name overrides the code now just creates said variable whereever needed.
Changes in detail:
- Moved...
"Show lag meter" (renamed to "Show traffic indicator in upper right corner of the screen", in tooltip as well),
"Use legacy period mean per second display for lag meter" (renamed to "Use legacy period mean per second display for traffic indicator", in tooltip as well),
"Show media controls in top menu",
"Show simulator channel in status bar"
... from "Interface" => "General" to "Interface" => "Top Bars" (new tab). New tab also has two labels, "Status bar:" and "Navigation & Favourites bars:".
- Added...
"Clicking on traffic indicator opens Statistics instead of the Lag Meter",
"Show Location in Top Menu",
"Show Favorites Bar",
"Show Navigation and Search Bar",
"Show Search Bar"
... to "Interface" => "Top Bars". The last four comes from the context menu of the status bar (menu_hide_navbar.xml).
- Moved "Show Menu Search" option from "Advanced" tab to the new "Interface" => "Top Bars" one.
- Added "Disable VRAM detection via WMI probing on Windows systems" in "Advanced" tab; This option will be gray-ed out on non-Windows systems.
* 32bit builds will clamp max textures in memory back to 768MB which matches the limit in V3 so it doesn't run out of memory that fast anymore
* 64bit builds get a texture limit of 1GB now, which results in 2GB max textures in memory