Translations

This forum is meant for questions and discussions about the X# language and tools
bondadoso
Posts: 1
Joined: Sun Feb 07, 2016 11:14 am

Translations

Post by bondadoso »

Hi, I'm going to find time to do the translation into Spanish, I do not know if I can have it finished by August but I'll try to move forward.
Jamal
Posts: 315
Joined: Mon Jul 03, 2017 7:02 pm

Translations

Post by Jamal »

Robert,

I am not sure what you mean by your question. Could you please explain further?
robert wrote:Jamal,
Having an Arabic translation would be nice. What would be the sort order attached to the translation when running in SetCollation(#Clipper) ?

Robert
User avatar
robert
Posts: 4519
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Translations

Post by robert »

Jamal,
Translations in VO are selected with SetNatDLL().
The nation DLL not only contains the translations but also the sorting rules for string comparisons when the program uses SetCollation(#Clipper). These sorting rules are the equivalent of the nation OBJ files that were linked in with Clipper.
The international version of Clipper had obj files like ntxger.obj, ntxdut.obj etc. In VO these are represented as the nation DLLs in the Nations folder in your VO28 installation.

The "Generic" rule simply sorts characters by their OEM byte number. But other rules change the sort order. For example accented characters (in the upper half of the ascii table) could be sorted between the unaccented characters in the lower half of the ascii table.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Translations

Post by Karl-Heinz »

Guys,

in the nation resources there is the define range:

RT_MSG_DOSERR_0

upto

RT_MSG_DOSERR_258

i wrote a util that lists the error text values that are currently stored in a nation resource. Also listed are the error text values acoording the OS you are running. Maybe it´s of some help to detect e.g. wrong error text descriptions within a nation resource.

Code: Select all

FUNCTION Start( ) AS VOID
LOCAL i AS INT
LOCAL h AS INTPTR   

	SetNatDLL( "german" )  // select e.g. "Dutch" ,  "Italian" etc.  instead
	
	IF ( h := FCreate ( "Errortext.txt" ) ) != F_ERROR

		FOR i := 0 UPTO 258
		
			? PadL ( i , 3 , " " ) , System.ComponentModel.Win32Exception{ i }.Message  // error text value acoording the OS you are running.
	    	? PadL ( i , 3 , " " ) , DosErrString ( (DWORD) i )  // error text value stored in the selected nation resource. 
		    ? 
	    

			FPutS ( h,PadL ( i , 3 , " " ) +  "  " + System.ComponentModel.Win32Exception{ i }.Message ) 
	    	FPutS ( h, PadL ( i , 3 , " " ) + "  " + DosErrString ( (DWORD) i ) )
	    	FPutS ( h , "" ) 
		    
		NEXT 
		
		FClose ( h ) 
		
	ENDIF		
	
 
RETURN


regards
Karl-Heinz
User avatar
robert
Posts: 4519
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Translations

Post by robert »

Karl-Heinz,
I can also change the runtime to read the error from the OS for the error messages RT_MSG_DOSERR_0 n to RT_MSG_DOSERR_258. Then we can remove these from the string table.
Would that be a good idea ?
Of course this would not allow to show a German message on a US English windows for these messages.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Translations

Post by FFF »

Robert,
"sooner the better": means, we should/could start now? If so, a list who does what might be helpful ;)

Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Translations

Post by Karl-Heinz »

robert wrote:Karl-Heinz,
I can also change the runtime to read the error from the OS for the error messages RT_MSG_DOSERR_0 n to RT_MSG_DOSERR_258. Then we can remove these from the string table.
Would that be a good idea ?
Of course this would not allow to show a German message on a US English windows for these messages.

Robert
There are tons of error codes

https://docs.microsoft.com/en-us/window ... es--0-499-

and because the nation resource error codes are limited to 258 it´s IMO a good idea to remove it completely from the nation resource. Though i´m always using in a VO app setnatdll("German" ), i never use the german.dll error text values. With VO i´m using a enhanced DosErrString()

Code: Select all

FUNCTION DosErrString  (nDosErr  AS DWORD) AS STRING PASCAL

//  
// Überschreibt die VO-eigene DosErrString()
//  
// _DLL FUNCTION DosErrString  (nDosErr  AS DWORD)  AS STRING PASCAL:VO28RUN.DosErrString
//

LOCAL cErrorText AS STRING
 
	cErrorText := GetSystemMessage(nDosErr )  

	IF Empty ( cErrorText ) 
		cErrorText := "Unbekannter Fehler" 
		
	ENDIF
	
	RETURN  cErrorText
GetSystemMessage () is a VO function that is still available in the X# World ;-) , but it might be replaced with Win32Exception{ id }.Message - if there are no better ways to retrieve a error text.

What do others think ?

regards
Karl-Heinz
User avatar
robert
Posts: 4519
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Translations

Post by robert »

Karl,
FFF wrote:Robert,
"sooner the better": means, we should/could start now? If so, a list who does what might be helpful ;)

Karl
Yes, you can start now.
So far I have the following names:

[table]
[tr]
[td]German[/td]
[td]Wolfgang, Karl [/td]
[/tr]
[tr]
[td]Italian[/td]
[td]Wolfgang, Giuseppe [/td]
[/tr]
[tr]
[td]Generic - English[/td]
[td]Johan & Karl-Heinz (DOS errors)[/td]
[/tr]
[tr]
[td]Dutch[/td]
[td]Dick[/td]
[/tr]
[tr]
[td]French[/td]
[td]Fabrice[/td]
[/tr]
[tr]
[td]Arab[/td]
[td]Jamal [/td]
[/tr]
[tr]
[td]Spanish[/td]
[td]Antonio [/td]
[/tr]
[/table]

I suggest we delete the DOS errors and retrieve them in the way that Karl-Heinz suggested.
And I really don't want to be responsible for coordinating things here (I am going on a holiday this weekend)
Most of you know each other, so please coordinate this yourselves.
If you have something finished, send it to Chris while I am away.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Translations

Post by ic2 »

Quick question:

If I click each of the 2 resource files it opens in the website; I can not download it. Can I just copy the page content in Textpad (they write they use urft8, see link below), edit it there and mail it to Robert/Chris? Or do I lose something this way?

I'll await the confirmation that the string table has been updates without DOS messages.

Dick

https://www.texpad.com/support/generic/ ... s/encoding
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Translations

Post by ic2 »

Oh and who is doing Klingon?

E.g. "selected text" is according to Bing:
wIv bIngDaq ghItlh leghlu'

It had an official language code in https://www.loc.gov/standards/iso639-2/ ... e_list.php :P

Dick
Post Reply