For that purpose the menus and menu items must use Strings resources
instead of hard coded strings.
The only technical complication are menu items that inlude a TAB character such as:
Code: Select all
"Delete [tab] Delete" "" "StdCmds.Clear" "HostCmds.CutGuard"
"Object Properties... [tab] Alt+Enter" "" "StdCmds.ShowProp" "StdCmds.ShowPropGuard"
a left part and a right part where the right part is right aligned. It does not have any
other meaning, i.e. it is not used for defining keyboard shortcuts although it looks like that.
There is a solution marked as 'hack' by Ivan in CPC 1.7 rc5.
Ivan also sketched out the 'clean' solution, which is to use a key without a TAB
and a value with a TAB. Currently, however, TABs inside the value of a Strings resource are not
supported. I have tried to solve this in Dialog.ReadStringFile and it turned out to be quite easy.
It only required two additional lines of code:
Code: Select all
ELSIF (s = 2) & (ch = TAB) THEN //new
tab.data[j] := TAB; INC(j); //new
ELSIF (s = 2) & (ch = CR) THEN
For the changes see http://redmine.blackboxframework.org/pr ... 8040b5ec28.
There are some open questions with respect to the CPC 1.7 rc5 proposal, though.
In System/Rsrc/Strings:
- What is 'Save All' used for?
- Do we really need both 'Inserting/Deleting' and 'Insertion/Deletion'?
It seems that there are two different naming conventions used for Texts and Forms.
- Do we need a separate key for 'Page Setup'. There is already 'PageSetup'.
- The keys 'Undo', 'Redo', and 'Help' are not unique in System/Rsrc/Strings.
I don't know where those existing keys may be used and if they are used at all.
This needs to be checked. Unfortunately there is no 'Search in Resources' available.
- The key 'HelpContents' is misspelled. It must be 'Help Contents'.
in System/Rsrc/Menus:
- There is a new menu item for color 'Purple'. Do we need it?
- Color green has been changed to a darker and thereby better readable form on most displays.
It is no longer MAX(Green) in RGB terms. Is this OK for everybody?
- Minor internal change: Leading space in keys for 8 and 9 Point removed.
One additional leading space inserted to value for better indentation.
Since it might be better to handle the Menus/Strings 'improvements' within a separate issue
I have not included them in the currently committed changes.
Also currently there is only one Menus file included, which is System/Rsrc/Menus.
- Josef