-DougUndo Deletion
Redo Deletion
issue-#80 localizable menus
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: issue-#80 localizable menus
I would use
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#80 localizable menus
I have added subsystem Dev as proposed by CPC 1.7 rc6 with the following
small modifications:
1. key 'Clear Log' was not unique, so I changed it in the menu to 'ClearLog'.
2. The keys starting with 'Ctls' don't belong to Dev but to the CPC package Ctls, so they have been removed.
For the subsystem 'System' there are multiple ambiguous keys in Strings:
We should find a way to get rid of them.
For #Host:HostBitmaps.ExportBitmap it is a simple delete.
For the changes see http://redmine.blackboxframework.org/pr ... 73a1e4c1b7.
- Josef
small modifications:
1. key 'Clear Log' was not unique, so I changed it in the menu to 'ClearLog'.
2. The keys starting with 'Ctls' don't belong to Dev but to the CPC package Ctls, so they have been removed.
For the subsystem 'System' there are multiple ambiguous keys in Strings:
Code: Select all
CheckKeys subsys=System
key not unique: Close
key not unique: Examples
key not unique: Help
key not unique: Redo
key not unique: Undo
CheckKeys subsys=Host
key not unique: HostBitmaps.ExportBitmap
For #Host:HostBitmaps.ExportBitmap it is a simple delete.
For the changes see http://redmine.blackboxframework.org/pr ... 73a1e4c1b7.
- Josef
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#80 localizable menus
I have now also added menu Text as proposed by CPC 1.7.
The String resources for the text dialogs, as opposed to the menus,
are not yet included because those belong to another issue (localizable forms).
Also the color blue for the CPC 1.7 changes has been reset to Default Color.
For the changes see http://redmine.blackboxframework.org/pr ... 663e3a01af.
- Josef
The String resources for the text dialogs, as opposed to the menus,
are not yet included because those belong to another issue (localizable forms).
Also the color blue for the CPC 1.7 changes has been reset to Default Color.
For the changes see http://redmine.blackboxframework.org/pr ... 663e3a01af.
- Josef
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#80 localizable menus
Form and Sql menus added as proposed in CPC 1.7 rc6 with the following small modification:
Strings resources for form/sql dialogs are not yet included because they belong to a different issue.
Now all menus are localizable except for 'Obx'.
How should we proceed with that one? Can we ignore it?
In addition I have resolved the ambiguity of several newly added keys in System/Rsrc/Strings
by appending _ to the ambiguous keys that have been introduced for this issue.
I have also added a simple debug feature in module Dialog.
Missing and duplicate keys in Strings resources can be logged by switching a logXXX debug flag on.
This helps in finding inconsistencies with Strings resources. Since it is a very simple
feature that we will also need for making dialog forms localizable I propose to leave it in the source code
at least for now.
By using the mentioned debug feature I have uncovered a bug in DevInspector.GetTypeName and MapLabel).
It creates illegal subsystem names ("Control."). This has currently no effect but it is definitely a bug and I have fixed it.
The debug feature confirmed that there are missing keys in System/Rsrc/Strings as observed before by Helmut.
#System:Inserting and Deleting have therefore been added as in CPC 1.7 rc6.
So far, I have not found any other missing 'simple' keys.
For the changes see http://redmine.blackboxframework.org/pr ... c0ad1796da.
- Josef
Strings resources for form/sql dialogs are not yet included because they belong to a different issue.
Now all menus are localizable except for 'Obx'.
How should we proceed with that one? Can we ignore it?
In addition I have resolved the ambiguity of several newly added keys in System/Rsrc/Strings
by appending _ to the ambiguous keys that have been introduced for this issue.
I have also added a simple debug feature in module Dialog.
Missing and duplicate keys in Strings resources can be logged by switching a logXXX debug flag on.
This helps in finding inconsistencies with Strings resources. Since it is a very simple
feature that we will also need for making dialog forms localizable I propose to leave it in the source code
at least for now.
By using the mentioned debug feature I have uncovered a bug in DevInspector.GetTypeName and MapLabel).
It creates illegal subsystem names ("Control."). This has currently no effect but it is definitely a bug and I have fixed it.
The debug feature confirmed that there are missing keys in System/Rsrc/Strings as observed before by Helmut.
#System:Inserting and Deleting have therefore been added as in CPC 1.7 rc6.
So far, I have not found any other missing 'simple' keys.
For the changes see http://redmine.blackboxframework.org/pr ... c0ad1796da.
- Josef
Re: issue-#80 localizable menus
I think we can leave it.Josef Templ wrote:Now all menus are localizable except for 'Obx'.
How should we proceed with that one? Can we ignore it?
But since English is my native language my opinion may be considered biased!
Robert
Re: issue-#80 localizable menus
Hi Josef,
in DevInspector you fix a bug by adding a line behind Kernel.SplitName:
Kernel.SplitName(control, subs, cntr);
IF subs[LEN(subs$) - 1] = "." THEN (* no subsystem *) subs := "System"; cntr := control$ END;
Is it not better to insert this IF line into the procedure Kernel.SplitName itself?
Otherwise we have to do the same bug fix in 10 other modules too.
- Helmut
in DevInspector you fix a bug by adding a line behind Kernel.SplitName:
Kernel.SplitName(control, subs, cntr);
IF subs[LEN(subs$) - 1] = "." THEN (* no subsystem *) subs := "System"; cntr := control$ END;
Is it not better to insert this IF line into the procedure Kernel.SplitName itself?
Otherwise we have to do the same bug fix in 10 other modules too.
- Helmut
Re: issue-#80 localizable menus
About the Obx question: I'm agree, we should leave it as it is and not localize it.
Helmut
Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#80 localizable menus
Yes and No.Zinn wrote:Hi Josef,
in DevInspector you fix a bug by adding a line behind Kernel.SplitName:
Kernel.SplitName(control, subs, cntr);
IF subs[LEN(subs$) - 1] = "." THEN (* no subsystem *) subs := "System"; cntr := control$ END;
Is it not better to insert this IF line into the procedure Kernel.SplitName itself?
Otherwise we have to do the same bug fix in 10 other modules too.
- Helmut
Kernel.SplitName returns an empty subsystem ("") if there is no subsystem in the name. This cannot be changed.
What can be changed is that qualified names return an invalid subsystem instead of an empty subsystem.
The IF after Kernel.SplitName in DevInspector will still be needed for mapping an empty subsystem to "System" but the advantage is that it will work for ALL qualified names independent from the capitalization of the characters following the ".". In the current solution there may actually be cases that still don't work (e.g. Control.pushButton).
I have done this fix now.
For the changes see http://redmine.blackboxframework.org/pr ... 42d4903625.
- Josef
Re: issue-#80 localizable menus
Hi Josef,
we need a convention to distinguish between menus entries and non menus entries inside the strings resource files.
Otherwise we always get the problem about key not unique.
I propose to add always the letter & in front of a menus entries for solving the problem (instead to add sometimes _ behind).
This letter is also used to mark a letter inside the menu for underline this letter.
Another advantage is that in a sorted strings file the menu entries come first.
...
&Edit Edit
&Undo &Undo
&Redo R&edo
&Cut Cu&t
&Copy &Copy
&Paste &Paste
&Delete &Delete Delete
...
- Helmut
we need a convention to distinguish between menus entries and non menus entries inside the strings resource files.
Otherwise we always get the problem about key not unique.
I propose to add always the letter & in front of a menus entries for solving the problem (instead to add sometimes _ behind).
This letter is also used to mark a letter inside the menu for underline this letter.
Another advantage is that in a sorted strings file the menu entries come first.
...
&Edit Edit
&Undo &Undo
&Redo R&edo
&Cut Cu&t
&Copy &Copy
&Paste &Paste
&Delete &Delete Delete
...
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#80 localizable menus
I like this proposal.Zinn wrote: we need a convention to distinguish between menus entries and non menus entries inside the strings resource files.
Otherwise we always get the problem about key not unique.
I propose to add always the letter & in front of a menus entries for solving the problem (instead to add sometimes _ behind).
This letter is also used to mark a letter inside the menu for underline this letter.
Another advantage is that in a sorted strings file the menu entries come first.
...
- Helmut
The only detail problem I see is with the "Delete" menu item, which appears twice in menu System.
Currently it is resolved by using "Del" and "Delete". Should we keep this distinction?
Before I make this change, which is a lot of editing, I would like to make sure that
the proposal will be accepted by the majority.
- Josef