aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: using translated apps except 'amule'  (Read 3141 times)

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
using translated apps except 'amule'
« 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?
Logged
God is real, unless declared as integer...

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: using translated apps except 'amule'
« Reply #1 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
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
Re: using translated apps except 'amule'
« Reply #2 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?!
Logged
God is real, unless declared as integer...

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: using translated apps except 'amule'
« Reply #3 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....
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: using translated apps except 'amule'
« Reply #4 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.
Logged
concordia cum veritate

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
Re: using translated apps except 'amule'
« Reply #5 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?..
Logged
God is real, unless declared as integer...

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
Re: using translated apps except 'amule'
« Reply #6 on: April 06, 2005, 11:18:59 AM »

It works fine with GUI apps, but the same happens with all console apps...
Logged
God is real, unless declared as integer...

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: using translated apps except 'amule'
« Reply #7 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...
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
Re: using translated apps except 'amule'
« Reply #8 on: April 06, 2005, 12:10:56 PM »

aMuleCVS Snaapshot Wed Apr 6 07:01:21 CEST 2005
Logged
God is real, unless declared as integer...

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: using translated apps except 'amule'
« Reply #9 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.
Logged
concordia cum veritate

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
Re: using translated apps except 'amule'
« Reply #10 on: April 11, 2005, 04:04:53 PM »

2 GonoszTopi:
 Can I change this latin-1 to any other or leave the messages unicoded?
Logged
God is real, unless declared as integer...

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: using translated apps except 'amule'
« Reply #11 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.
Logged
concordia cum veritate

toshi

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 67
Re: using translated apps except 'amule'
« Reply #12 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!
Logged
God is real, unless declared as integer...