LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Language Specific Forums » Translations » Status internationalization HyperVM
Status internationalization HyperVM [message #12104] Wed, 29 August 2007 16:12 Go to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

Lxhelp,

Hows it going with the internationalization at HyperVM?

As Suggested:
At login screen -> language selectbox with live change of login box text
Produced email messages from HyperVM with Subject edit

Those are the main things i do want to see.

Regards,




LxCenter - System Operations
Re: Status internationalization HyperVM [message #12154 is a reply to message #12104] Thu, 30 August 2007 06:21 Go to previous messageGo to next message
Lars is currently offline Lars  Germany
Messages: 29
Registered: August 2007
Location: Germany
Member
I stopped the German translation for this time. I see in the language files from update to update changes. That worries me so due to the fact that the new strings stand in the middle of the file and not at the end. Searching for new Lines is stressful.

[Updated on: Thu, 30 August 2007 06:21]

Report message to a moderator

Re: Status internationalization HyperVM [message #12156 is a reply to message #12154] Thu, 30 August 2007 07:31 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
That's simple. You can run this program specifically meant to find the words that are untranslated.

 
cd /usr/local/lxlabs/hypervm/httpdocs/
lphp.exe ../bin/common/langcompare.phps en gr


It will output a list of strings that are missing in the gr file when compared to the en. Please wait for sometime and then update hyperVM to version 532.

Thanks.


On Thu, Aug 30, 2007 at 10:21:05AM -0000, Lars wrote:
>
>
> I stopped the german translation for this time. I see in the language files from update to update changes. That worries me so due to the fact that the new strings stand in the middle of the file and not at the end. Searching for new Lines is stressful.
Re: Status internationalization HyperVM [message #12159 is a reply to message #12104] Thu, 30 August 2007 08:19 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

I do see double lines and empty lines.

$__description["."] = array(".");
$__description[""] = array("");

And a lot of
$__description["i"] = array("I");
like translations. Makes no sense to me where used why it must be uppercase.





LxCenter - System Operations
Re: Status internationalization HyperVM [message #12160 is a reply to message #12156] Thu, 30 August 2007 08:22 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

 
cd /usr/local/lxlabs/hypervm/httpdocs/
lphp.exe ../bin/common/langcompare.phps en gr


Can you change that code a bit?

If missing,atautomaticly add english line to the destination at the bottom.





LxCenter - System Operations
Re: Status internationalization HyperVM [message #12161 is a reply to message #12159] Thu, 30 August 2007 08:25 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
Quote:


>
>
> I do see double lines and empty lines.
>
> $__description["."] = array(".");
> $__description[""] = array("");
>
> And a lot of
> $__description["i"] = array("I");
> like translations. Makes no sense to me where used why it must be uppercase.
>




The description list is automatically generated from our internal class definitions. But there will be absolutely no redundance as far as the key is concerned. You will only have one single $__description["$var"]. The left keys will always be in small. The right hand side must always be capitalized. You can ignore the untranslateable keys like $__description[""].

Thanks.


Re: Status internationalization HyperVM [message #12162 is a reply to message #12160] Thu, 30 August 2007 08:27 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
Code is phps and thus open. You can create your own langcompare and do what you want to do. It is very simple linear logic.

 
 cd /usr/local/lxlabs/hypervm/httpdocs/
 cp ../bin/common/langcompare.phps ../bin/common/langcompare_nettune.phps
 


Then make changes to langcompare_nettune

Thanks.


Re: Status internationalization HyperVM [message #12170 is a reply to message #12104] Thu, 30 August 2007 09:15 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

I am not a good programmer, but i want to try and need some help.

As far i have this :

        if (!isset($__description[$k])) {
                print("\$__description[\"$k\"] = array(\" .. \");\n");
        }


That give me output:
$__description["fix_centos4.5_dev"] = array(" .. ");


So far so good ( i think ).
How do i get the array line from the english one?
After this i can google on php.net website for file read/write actions.






LxCenter - System Operations
Re: Status internationalization HyperVM [message #12171 is a reply to message #12170] Thu, 30 August 2007 09:20 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
On Thu, Aug 30, 2007 at 01:15:21PM -0000, Danny wrote:
>
>
> I am not a good programmer, but i want to try and need some help.
>
> As far i have this :


 

         if (!isset($__description[$k])) {
                 print("\$__description[\"$k\"] = array(\"{$__description[$k]}\");
 ");
         }


Re: Status internationalization HyperVM [message #12172 is a reply to message #12104] Thu, 30 August 2007 09:27 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

Notice: Undefined index:  fix_centos4.5_dev in /usr/local/lxlabs/hypervm/bin/common/langcompare_nettune.phps on line 18
$__description["fix_centos4.5_dev"] = array("");


and changing it to
print("\$__description[\"$k\"] = array(\"{$eng_description[$k]}\");\n");


Gives
$__description["fix_centos4.5_dev"] = array("Array");







LxCenter - System Operations
Re: Status internationalization HyperVM [message #12173 is a reply to message #12171] Thu, 30 August 2007 09:46 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion

Please use this.


 

         if (!isset($__description[$k])) {
                 print("\$__description[\"$k\"] = array(\"{$__description[$k][0]}\");
 ");
         }



Thanks.


Re: Status internationalization HyperVM [message #12179 is a reply to message #12104] Thu, 30 August 2007 09:58 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

Ok that is working.
Thanks for so far...




LxCenter - System Operations
Re: Status internationalization HyperVM [message #12183 is a reply to message #12104] Thu, 30 August 2007 10:35 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative


For the people that are intrested:

Lxhelp, not a good idea to put it in the original file and add some code checking if a non exisiting argv (language) is given.

it is working here. have fun translating.

Maybe i do some more things in here.. running as a cronjob and tell in email there new translations to be checked..

<?php
if (!isset($argv[1])) {
print("Usage: Need a language template code (like en tr nl de)\n");
} else {
print("Using $argv[1] to compare with en and adding them to bottom of the file.\n");
include_once "lang/en/desclib.php";
$eng_description = $__description;
$__description = null;
include_once "lang/en/messagelib.php";
$eng_information = $__information;
$__information = null;
include_once "lang/$argv[1]/desclib.php";
print ("----Processing desclib.php...----------------------------------------\n");
foreach($eng_description as $k => $v) {
        if (!isset($__description[$k])) {
$missingline = "\$__description[\"$k\"] = array(\"{$eng_description[$k][0]}\");\n";
     print("ADDING: $missingline");
$handle = fopen("lang/$argv[1]/desclib.php", "a");
fwrite($handle, $missingline, strlen($missingline));
fclose($handle);
 }
}
include_once "lang/$argv[1]/messagelib.php";
print ("----Processing  messagelib.php...-------------------------------------\n");

foreach($eng_information as $k => $v) {
        if (!isset($__information[$k])) {
$missingline = "\$__information['$k'] = array(\"{$eng_information[$k]}\");\n";
print("ADDING: $missingline");
$handle = fopen("lang/$argv[1]/messagelib.php", "a");
fwrite($handle, $missingline, strlen($missingline));
fclose($handle);
        }
}
}




LxCenter - System Operations
Re: Status internationalization HyperVM [message #12184 is a reply to message #12104] Thu, 30 August 2007 10:45 Go to previous messageGo to next message
Lars is currently offline Lars  Germany
Messages: 29
Registered: August 2007
Location: Germany
Member
Cool Snippet, thanks. Wink
Re: Status internationalization HyperVM [message #15100 is a reply to message #12104] Mon, 08 October 2007 22:20 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

Status please?


Hows it going with the internationalization?


Quote:



As Suggested:
At login screen -> language selectbox with live change of login box text
Produced email messages from HyperVM with Subject edit




LxCenter - System Operations
Re: Status internationalization HyperVM [message #16340 is a reply to message #12173] Sun, 04 November 2007 21:37 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2068
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

Any news?



LxCenter - System Operations
Re: Status internationalization HyperVM [message #105981 is a reply to message #12104] Tue, 26 March 2013 00:07 Go to previous message
kittikron is currently offline kittikron
Messages: 6
Registered: March 2013
Member
thank you very much. Very Happy

เทคนิคการเล่น คาสิโน ง่ายๆยิ่งเล่นแทงบอล ยิ่งง่าย

Previous Topic:Russian
Next Topic:Bengali Sub-Forum
Goto Forum:
  


Current Time: Fri May 24 07:58:16 EDT 2013

Total time taken to generate the page: 0.01339 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software