issue-#80 localizable menus

Merged to the master branch
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

issue-#80 localizable menus

Post by Josef Templ »

This issue is supposed to support localizing BB to other languages.
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"
The TAB character, which seems to be an undocumented feature in BB1.6, splits the label into
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 issue see http://redmine.blackboxframework.org/issues/80.
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
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#80 localizable menus

Post by Ivan Denisov »

Default green is unreadable, so better to change to darker tone.
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#80 localizable menus

Post by Zinn »

Josef, I have problems with your solution:

What does mean "shortchar run" and "longchar run" ?

The menu File is often OK, but occasionally it shows wrong entries
. File
. . New Ctrl-N
. . OtherColor Ctrl-O
instead of
. File
. . New Ctrl-N
. . Open Files Ctrl-O
but it still works.

In the menu Edit
. . Delete Delete
is shown right, but at
. . Object Properties...
the Alt+Enter is always not displayed.

About your questions above I will look at them later.
- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#80 localizable menus

Post by Josef Templ »

Thanks, Helmut.
I have fixed this now.

For unknown reasons it does not show up in the redmine mirror
but you see it in github under https://github.com/BlackBoxCenter/black ... 73a1e4c1b7.

- Josef
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#80 localizable menus

Post by Ivan Denisov »

I have pushed the "Redeliver" button in GitHub Web Hooks menu and now it was delivered to our Redmine:
http://redmine.blackboxframework.org/pr ... 9c1a991612

It was strange timeout problem, if it will repeat we will change synchronisation from web hook to cron regular sync.
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#80 localizable menus

Post by Zinn »

Josef Templ wrote: - Do we really need both 'Inserting/Deleting' and 'Insertion/Deletion'?
"Deleting" is used in Text/Mod/Controllers.odc and Text/Mod/Models.odc
"Deletion" is used in Form/Mod/Controllers.odc and Form/Mod/Models.odc

"Inserting" is used in Text/Mod/Models.odc and Text/Mod/Controllers.odc
"Insertion" is used in Form/Mod/Models.odc and Form/Mod/Controllers.odc
Josef Templ wrote: - Do we need a separate key for 'Page Setup'. There is already 'PageSetup'.
"PageSetup" is used in System/Mod/Documents.odc
"Page Setup" is used in System/Rsrc/Menus

There are several other double keys with and without space.
Normally the program uses the key without space and the menus use the key with spaces
Which way should we prefer? With space or without space?
Josef Templ wrote: - 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.
All those keys are used. I don't know where are they using those keys, but their translation works.
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#80 localizable menus

Post by Zinn »

Josef Templ wrote: - What is 'Save All' used for?
- Josef
There exist commands which are not in the menus.
E.g.:

"Save All" "" "HostCmds.SaveAll" ""
"Insert EndCommander" "" "DevCommanders.DepositEnd; StdCmds.PasteView" "StdCmds.PasteViewGuard"

See also issue-#35 Add docu for DevSelectors

"Insert Left" "*F5" "DevSelectors.DepositLeft; StdCmds.PasteView" "StdCmds.PasteViewGuard"
"Insert Middle" "*F6" "DevSelectors.DepositMiddle; StdCmds.PasteView" "StdCmds.PasteViewGuard"
"Insert Right" "*F7" "DevSelectors.DepositRight; StdCmds.PasteView" "StdCmds.PasteViewGuard"

and also forms (e.g. StdStamps) which can be open via keyboard only, because currently there are no menus entry for it.

- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#80 localizable menus

Post by Josef Templ »

"Deleting" is used in Text/Mod/Controllers.odc and Text/Mod/Models.odc
"Deletion" is used in Form/Mod/Controllers.odc and Form/Mod/Models.odc

"Inserting" is used in Text/Mod/Models.odc and Text/Mod/Controllers.odc
"Insertion" is used in Form/Mod/Models.odc and Form/Mod/Controllers.odc
This is a question to our native speakers.
What is the correct/better form?
Undo Deleting
Redo Deleting
or
Undo Deletion
Redo Deletion

The former is used for texts, the latter is used for forms.
The same question applies to Insertion/Inserting.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#80 localizable menus

Post by Robert »

Deleting is present tense, Deletion is past tense.

We may be currently deleting a Document in the sense that we have already deleted 3 words, and intent to delete another 2 in the future.

But we can only Undo the deletions we have already done in the past.


So I think the correct form is "Undo Deletion".


------

I have just tried Word. It says "Undo Clear", not "Undo Clearing".


Robert
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#80 localizable menus

Post by DGDanforth »

Josef,
Using GftSearchFiles I find the following references under .../Rsrc/..
Location
C2cp/Rsrc/MenusX.odc
Help [1]
Com/Rsrc/Menus.odc
Help [3]
Ctls/Rsrc/Menus.odc
Help [1]
Ctls/Rsrc/MenusX.odc
Help [1]
Dos/Rsrc/StandAloneMenus.odc
Undo [3]
Redo [2]
Dos/Rsrc/Strings.odc
Help [2]
Html/Rsrc/MenusX.odc
Help [2]
Info/Rsrc/NoUse_Menus.odc
Help [2]
Info/Rsrc/Strings.odc
Help [2]
Info/Rsrc/_Menus.odc
Help [9]
Pac/Rsrc/StandAloneMenus.odc
Undo [3]
Redo [3]
Help [1]
Pac/Rsrc/StandAloneMenusMin.odc
Undo [3]
Redo [3]
Help [1]
Pac/Rsrc/StandAloneStrings1.odc
Help [2]
Pac/Rsrc/Strings.odc
Help [2]
Sql/Rsrc/Menus.odc
Help [1]
Sql/Rsrc/MenusX.odc
Help [1]
Sql/Rsrc/Strings.odc
Help [2]
System/Rsrc/Menus.odc
Undo [3]
Redo [2]
Help [3]
System/Rsrc/Strings.odc
Undo [2]
Redo [2]
Help [4]
Toolbar/Rsrc/Strings.odc
Help [2]
Toolbar/Rsrc/_Menus.odc
Undo [2]
Redo [2]
Help [3]
Webstat/Rsrc/MenusX.odc
Help [1]
Xy/Rsrc/_Menus.odc
Help [3]
Post Reply