issue-#88 support for localizable documentation

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

issue-#88 support for localizable documentation

Post by Josef Templ »

This issue is for adding support for localizable (multi language) documentation.
For the issue see http://redmine.blackboxframework.org/issues/88.

A proposal for the changes exists in CPC 1.7 rc6.
The basic idea is to first look up a file under the selected non-default language directory
and if not found use the default directory.

In addition, I have adapted the command 'Info-Documentation' to reuse an
already open docu window instead of creating a new one.
This reuse, I think, is in line with the Repository behavior and also with the 'Info->Source' command.
(This reuse actually simplified the implementation.)
I have also expanded the window title to include the full module name.
Previously the docu for e.g. TextModels had the title 'Models', now it is 'TextModels'.

For the changes see http://redmine.blackboxframework.org/pr ... 1ad9fa9b59.

I noticed one open point: the 'Repository' browser does not yet support multiple languages.
This should also be changed.

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

Re: issue-#88 support for localizable documentation

Post by Robert »

Josef Templ wrote:I have also expanded the window title to include the full module name.
Previously the docu for e.g. TextModels had the title 'Models', now it is 'TextModels'.
If I remember / understand correctly a recent change was to give this file the Window title "{Text}Models" when opened with the File->Open Menu?

Why are we suggesting a different convention here?

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

Re: issue-#88 support for localizable documentation

Post by Josef Templ »

The change with "{subsystem} docufile" applies only to editable documentation files (Views.Open).
The command 'Info->Documentation' as well as the 'Info->Repository' browser open an auxiliary window
which is not editable and don't use the subsystem naming convention. This was not affected by the {}[]() change.

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

Re: issue-#88 support for localizable documentation

Post by Ivan Denisov »

This is not very useful feature in general. However it is extensively used in Russian educational BlackBox assemblies.
Also this can have applications in commercial projects.
I am ready to vote.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#88 support for localizable documentation

Post by Josef Templ »

> I noticed one open point: the 'Repository' browser does not yet support multiple languages.
> This should also be changed.


Can we ignore this open point?

- Josef
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#88 support for localizable documentation

Post by Zinn »

In DevReferences and in DevSerach behind the statement
IF (Dialog.language # ""')
we add
& (Dialog.language # "en")
This should be done also in StdApi.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#88 support for localizable documentation

Post by Josef Templ »

Thanks for the hint.
Don't we also have to check if the file exists and if not we have to use the default language?
(The problem then is that there is no such File-Exists check in module Files.)

In addition, using StdApi's '*' feature means that we have to edit ALL links to docu files, hundreds of places.

It seems to me that localizable docu in CPC 1.7 rc6 has never been tested.

- Josef
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#88 support for localizable documentation

Post by Zinn »

In the original version and its test there was no change in the module StdApi.
After those test the language was added to the preferences.
But I did not repeat the test.
Later I realised that there was a problem with the search, because the English documentation was not found any more.
I found that I have to add & (Dialog.language # "en") and also the position in StdApi.
Yes, the StdApi was not tested.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#88 support for localizable documentation

Post by Josef Templ »

Zinn wrote:In the original version and its test there was no change in the module StdApi.
How did the original version solve the problem of references to docu files?
For example: look at menu item 'Help->Contents'.
How does it open the language specific version of the help file?
How did references within the Contents page to other more specific topic work?

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

Re: issue-#88 support for localizable documentation

Post by Ivan Denisov »

As I know this problem with Help file is not solved.

Fyodor Tkachov using second line in his assembly.

Code: Select all

MENU "Help"
	"Contents"	""	"StdCmds.OpenAuxDialog('Docu/Help', 'Help Contents')"	""
	"Содержание"	"F1"	"StdCmds.OpenAuxDialog('Docu/ru/Help', 'Help Contents')"	""
	SEPARATOR
In my assembly I am simply replacing the original Help file.
Post Reply