aMule Forum

English => aMule Help => Topic started by: toshi on April 06, 2005, 07:25:47 AM

Title: using translated apps except 'amule'
Post by: toshi on April 06, 2005, 07:25:47 AM
When I launch other aMule apps, such as 'amulecmdDLG' for an exapmle, they are not translated, though aMule is using the language I've specified in options. The strings arre translated.
Can I make them running in the language I choose?
How the apps decide in what language they run?
Title: Re: using translated apps except 'amule'
Post by: stefanero on April 06, 2005, 08:06:51 AM
well if you run cvs atm it could be that most strings are NOT translated, due to the fact that we are changing a lot of textstring atm, which have to become "retranslated" , but the russian one should be up2date in todays snapshot, since hte translater was really fast.

the apps itself decide on your local in what language they start.
you can check with

echo $LANG
echo $LANGUAGE
echo $LC_ALL

what the settings are in your system. atleast one of those commands should retur something.

stefanero
Title: Re: using translated apps except 'amule'
Post by: toshi on April 06, 2005, 09:18:58 AM
In my evn 'LANG' is set to 'en_US.UTF-8'.
If to export 'ru_RU.UTF-8' value, everything works as it should work.
But I need it to be set in english.
So, i need every time to set a new value to environment var.
Can't those apps use settings fom amule config?!
Title: Re: using translated apps except 'amule'
Post by: stefanero on April 06, 2005, 09:41:39 AM
well since those programms run from console they will read the LANG variable....
and atm reading the config from amule.conf is not supported, but I guess this could be done....
Title: Re: using translated apps except 'amule'
Post by: GonoszTopi on April 06, 2005, 09:57:17 AM
Use the -l command-line option to select the language. For example, to launch amulecmd in English, you should type: "amulecmd -l en".  If you mostly want to use English, then it is adviced to do once "amulecmd -l en -w", which will write command-line options to config file (-l en in this case), and next time, if you don't specify a language, English will be used.
Title: Re: using translated apps except 'amule'
Post by: toshi on April 06, 2005, 11:15:49 AM
Oh! That works! Thanks!
But something funny comes with it.
In both ways - changing LANG and usoing '-l' options i get this in 'amulecmd':
Quote
amulecmd
(null)(null)(null)(null)(null)
---------------------------------
(null)---------------------------------

(null)aMulecmd$  
and this...
Quote
aMulecmd$ help
(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)aMulecmd$
What can be wrong with it?..
Title: Re: using translated apps except 'amule'
Post by: toshi on April 06, 2005, 11:18:59 AM
It works fine with GUI apps, but the same happens with all console apps...
Title: Re: using translated apps except 'amule'
Post by: stefanero on April 06, 2005, 11:50:46 AM
hmm maybe the translation is not up2date? did you try with todays snapshot?? since the russian translation is just updated today...
Title: Re: using translated apps except 'amule'
Post by: toshi on April 06, 2005, 12:10:56 PM
aMuleCVS Snaapshot Wed Apr 6 07:01:21 CEST 2005
Title: Re: using translated apps except 'amule'
Post by: GonoszTopi on April 07, 2005, 08:30:02 PM
The problem is, that for console apps unicode strings have to be translated to some 8-bit strings. For this conversion aMule uses the latin-1 (ISO-8859-1) character set as the destination 8-bit encoding, and - of course - russian characters will fail to convert to latin-1. This failure will result a NULL value from the conversion routine, which will be displayed as (null).

The problem is with the unicode2char() function, which does not let the user select the destination 8-bit encoding.
Title: Re: using translated apps except 'amule'
Post by: toshi on April 11, 2005, 04:04:53 PM
2 GonoszTopi:
 Can I change this latin-1 to any other or leave the messages unicoded?
Title: Re: using translated apps except 'amule'
Post by: GonoszTopi on April 11, 2005, 10:34:45 PM
You may try changing it to something else in StringFunctions.h:82, but I don't guarantee the result. Be sure that your console can display characters right in the selected encoding. (Of course you have to recompile everything after that)
But most probably you will have to stick to gui versions for Russian text.
Title: Re: using translated apps except 'amule'
Post by: toshi on April 12, 2005, 05:56:49 AM
Great! )))
I've changed 'iso8859-1' to 'utf-8' and recompiled.
It works as it should work!
Can this feature be added to configuration script to let the users choose codepage setting?
It will be really great!