International Zusi-Version (customizable lables)

Hey folks, everyone speaking English may write in this category!
Nachricht
Autor
Benutzeravatar
Carsten Hölscher
Administrator
Beiträge: 33450
Registriert: 04.07.2002 00:14:42
Wohnort: Braunschweig
Kontaktdaten:

International Zusi-Version (customizable lables)

#1 Beitrag von Carsten Hölscher »

I found a very simple way to customize most of the Zusi dialogs, labels and other Windows-elements.

It is not absolutely perfect because there are a few labels that are updated by the programme during operation. These cases cannot be covered by my algorithm but would require expensive manual changes in the programme-code.

But most of the texts are static, so it makes sense to add this functions in the next Zusi-versions.

Zusi will read the entrys from an ascii file (you see 4 menu-items of the 'Fahrsimulator' here):

Code: Alles auswählen

Datei1.Caption = &Strecke
ffnenimVollbildmodus1.Caption = Öffnen im &Vollbildmodus...
ffnen2.Caption = Öffnen im Fenstermodus...
Beenden2.Caption = &Beenden
The right part of each line can be replaced by individual text.

Carsten

Arie van Zon
Beiträge: 708
Registriert: 04.12.2002 20:44:14
Wohnort: Zwijndrecht (NL)
Kontaktdaten:

#2 Beitrag von Arie van Zon »

That's good news; thanks. :)

/Arie

Andreas Karg
Beiträge: 4718
Registriert: 28.04.2002 12:56:00
Kontaktdaten:

#3 Beitrag von Andreas Karg »

Is ja krass... :D
What does the '&' mean?

Benutzeravatar
Max Senft
Administrator
Beiträge: 3004
Registriert: 04.11.2001 14:01:40
Aktuelle Projekte: Dies und das
Wohnort: Blieskastel, Saarland, Deutschland
Kontaktdaten:

#4 Beitrag von Max Senft »

Hi,

das sind die "Shortcuts", bzw. die unterstrichenen Einträge in den Menüs Also z.B. Datei -> Öffnen... = &Datei -> Ö&ffnen

Bye
Max Senft
Administrator, Programmierer, Ansprechpartner bei Problemen mit dem Board

Andreas Karg
Beiträge: 4718
Registriert: 28.04.2002 12:56:00
Kontaktdaten:

#5 Beitrag von Andreas Karg »

Yeah, Max! And now in English please... :D

Benutzeravatar
Max Senft
Administrator
Beiträge: 3004
Registriert: 04.11.2001 14:01:40
Aktuelle Projekte: Dies und das
Wohnort: Blieskastel, Saarland, Deutschland
Kontaktdaten:

#6 Beitrag von Max Senft »

Hi,

oooops. ;) I didn't notice, that the other postings were in English. *lol*
So, my posting in English:

that are the "shortcuts" which means the underscored items in the menus.
Example: &File becomes File...

Bye
Max Senft
Zuletzt geändert von Max Senft am 11.02.2004 17:00:02, insgesamt 2-mal geändert.
Administrator, Programmierer, Ansprechpartner bei Problemen mit dem Board

Andreas Karg
Beiträge: 4718
Registriert: 28.04.2002 12:56:00
Kontaktdaten:

#7 Beitrag von Andreas Karg »

Braver Bupp. :)

(English: Something like "honest guy")

Benutzeravatar
Carsten Hölscher
Administrator
Beiträge: 33450
Registriert: 04.07.2002 00:14:42
Wohnort: Braunschweig
Kontaktdaten:

#8 Beitrag von Carsten Hölscher »

It works now. Does anyone want to translate? Please send me an email for further information.

Carsten

shangway
Beiträge: 37
Registriert: 07.05.2003 23:28:11

#9 Beitrag von shangway »

A question to the shortcut keys. Are they read from the file as well?
Example:
'ffnenimVollbildmodus1.Caption = Öffnen im &Vollbildmodus...'
opens in full screen by pressing "V".
Does it do the same when I change the file entry to
'ffnenimVollbildmodus1.Caption = Open in &Full Screen Mode'
or is the shortcut key also changed to "F"?

--- shangway

Mirko
Beiträge: 3410
Registriert: 04.11.2001 20:39:16
Aktuelle Projekte: Nothing in particular
Wohnort: Erftstadt
Kontaktdaten:

#10 Beitrag von Mirko »

Howdie!

The Shortcut will always be changed to the letter after the &. If You like to keep it You have to write
... = &V open in full screen mode

But as You can't reach more than one label at the same time the letters may change. It doesn't metter if You use the E for "Track / Exit Zusi" and "Timetable / Load Timetable in Editor"
You only have to take care that no two enties in one menu have the same letter. Otherwise Zusi takes the upper entry with that letter if I remember my Delphi-lessons correctly.

Mirko
Zuletzt geändert von Mirko am 11.02.2004 19:54:56, insgesamt 1-mal geändert.

Benutzeravatar
Carsten Hölscher
Administrator
Beiträge: 33450
Registriert: 04.07.2002 00:14:42
Wohnort: Braunschweig
Kontaktdaten:

#11 Beitrag von Carsten Hölscher »

Oliver Lamm will translate it - and he can begin after opening his mailbox :D

Thanks!
Carsten

Benutzeravatar
Roland Ziegler
Beiträge: 5508
Registriert: 04.11.2001 22:09:26
Wohnort: 32U 0294406 5629020
Kontaktdaten:

#12 Beitrag von Roland Ziegler »

Delphi-lessons
Nothing to do with Delphi. That's classic Windows, presumably been so ever since the 16 bit era.

And it's called an "Access Key", not a "Shortcut Key". Here's an extract from the Win32 SDK docs:
MSDN Library hat geschrieben:Menu Access Keys
The standard keyboard interface for menus can be enhanced by adding access keys (mnemonics) to menu items. An access key is an underlined letter in the text of a menu item. When a menu is active, the user can select a menu item by pressing the key that corresponds to the item's underlined letter. The user makes the menu bar active by pressing the ALT key to highlight the first item on the menu bar. A menu is active when it is displayed.

To create an access key for a menu item, precede any character in the item's text string with an ampersand. For example, the text string "&Move" causes the system to underline the letter "M".

Menu Shortcut Keys
In addition to having an access key, a menu item can have a shortcut key associated with it. A shortcut key is different from an access key, because the menu does not have to be active for the shortcut key to work. Also, an access key is always associated with a menu item, while an shortcut key is usually (but does not have to be) associated with a menu item.

Text that identifies the shortcut key is added to the menu-item text string. The shortcut text appears to the right of the menu item name, after a backslash and tab character (\t). For example, "&Close\tAlt+F4" represents a Close command with the ALT+F4 key combination as its shortcut key and with the letter "C" as its access key. For more information, see Keyboard Accelerators.

Zuletzt geändert von Roland Ziegler am 11.02.2004 22:38:27, insgesamt 1-mal geändert.

Benutzeravatar
Oliver Lamm
Beiträge: 3102
Registriert: 04.01.2002 15:02:17
Aktuelle Projekte: Aachen - Neuss für Zusi3
Wohnort: Essen
Kontaktdaten:

#13 Beitrag von Oliver Lamm »

Oliver Lamm will translate it - and he can begin after opening his mailbox
Just got it :D
I'll start with the translation probably today ...

Oli
Oliver Lamm
mail(AT)oliverlamm(DOT)de

Mirko
Beiträge: 3410
Registriert: 04.11.2001 20:39:16
Aktuelle Projekte: Nothing in particular
Wohnort: Erftstadt
Kontaktdaten:

#14 Beitrag von Mirko »

Howdie Roland!

Maybe it is independent of Delphi - but I only used this function when writing Delphi programs at the university.

Mirko

stuvar
Beiträge: 1409
Registriert: 22.07.2002 22:38:41
Wohnort: Leipzig

#15 Beitrag von stuvar »

Wird man darüber auch Unicode-Sprachen anzeigen können? Als Beispiel hier japanisch:

電車 oder 新大坂 um mal zwei Beispiele zu nennen.

English:

will it be possible to use Unicode lettern in these files? as example:

電車 or 新大坂

Benutzeravatar
Sven Jähnig
Beiträge: 613
Registriert: 04.11.2001 17:34:26
Aktuelle Projekte: Überraschunnnng!!!
Wohnort: Köln, Deutschland
Kontaktdaten:

#16 Beitrag von Sven Jähnig »

I'm just imagining Zusi in Japanese. Would be nice, but the most Menus would be in Jengrisch, I think (The File-Menu is "Fairu" titled in Japan).
But for what reason should Zusi be translated into Japanese? I don't think that there are so much Japanese Zusi-Fans.
BTW: Do you learn Japanese, Stuvar? I'm learning Japanese (And understood, that you've written the Japanese word for train (Densha), in the second word I've only understood the last 2 Kanji - Oosaka), but I think, a translation of Zusi to Japanese is a little too difficult for me :D.

Sven

stuvar
Beiträge: 1409
Registriert: 22.07.2002 22:38:41
Wohnort: Leipzig

#17 Beitrag von stuvar »

The 2nd word means Shin-Osaka which is the name of the Osaka Shinkansen station. As for your question: I don't think that there ist a need for it now, but its always better to ask before work is done. If you ask to change it afterwards it would be double of work to change all.
Somewhere someone had said, that Zusi 3 will support every languages, evan japanese so I asked if Carsten is aware of that problem.

Benutzeravatar
Roland Ziegler
Beiträge: 5508
Registriert: 04.11.2001 22:09:26
Wohnort: 32U 0294406 5629020
Kontaktdaten:

#18 Beitrag von Roland Ziegler »

Is there a market? Is Unicode a requirement, a "nice to have" or simply a matter of curiosity?

The Windows environment supports Unicode for ages, some, most or may be all of the SDK APIs tools provide, allow or even require 16bit strings. Tools for string conversion are available. The MS development suite allows for Unicode settings on project level. I would expect that the Delphi higher layers will offer similar capabilities.

Standardised languages like C++ have standardised wide string support (in the C++ Standard Lib, formerly STL). Presumably Delphi Object Pascal comes up with something similar.

However, it's not a 1:1 or better a 1:2 compatibility. Simple byte arrays for text no longer work, which may effect text processing throughout a whole lot of heritage code. And Unicode files, for example, are binary files. They introduce ugly file headers, as the users of MS Trainsim had to find out. (If you don't have MSTS create a "marker" file with Streckenkonverter and have a look at it.) After that experience with the SK I would rather save the time required to port a Zusi application to Unicode for something more useful.

Benutzeravatar
Carsten Hölscher
Administrator
Beiträge: 33450
Registriert: 04.07.2002 00:14:42
Wohnort: Braunschweig
Kontaktdaten:

#19 Beitrag von Carsten Hölscher »

btw, is anyone translating zusi.exe and the remaining editors?

Carsten

Benutzeravatar
Oliver Lamm
Beiträge: 3102
Registriert: 04.01.2002 15:02:17
Aktuelle Projekte: Aachen - Neuss für Zusi3
Wohnort: Essen
Kontaktdaten:

#20 Beitrag von Oliver Lamm »

I've got most of the other programs translated, but at the moment I'm short of time. If it isn't that urgent I'll continue after my final exam in july.

Oli
Oliver Lamm
mail(AT)oliverlamm(DOT)de

Antworten