lang file diff

please send me differences in english language file from previous version…

Once we get the next version finalized we’ll shoot it out to you oxionet.

Chris

diff finder…

i don’t need it anymore :slight_smile:
i wrote a php file for finding language differences


<?
//
// Project :
// File  :
// Coded by Hidayet Ok
//
$f1="en-us.txt";
$f2="tr.txt";
$f3="diff_out.txt";
$file=file($f2);
$cnt=0;
foreach($file as $val) 
{
  if(substr($val,0,3) == "LG_") 
  {
   list($akey,$aval)=explode("=",$val);
   $xa[$akey]=$aval;
  } // if 
} 
fclose($file);
$file=file($f1);
$out=fopen($f3,"w");
$cnt=0;
foreach($file as $val) 
{
  if(substr($val,0,3) == "LG_") 
  {
   list($akey,$aval)=explode("=",$val);
   if(!isset($xa[$akey])) 
   {
    print "$val<br>";
    fputs($out,$val); 
   } // if 
  } // if 
} 

;?>

Could I get it also please? I’m translating into Spanish…:wink:

it works if you have old version ( < 2.1.1) of language file… finds differences with your old file and new english file…

if this is good for you, use it … :slight_smile:

feel free…

I’d want the final English laguage file from the chaps at Iworx to be able to translate it…

i’ve updated my diff script


<?
//
// Project :
// File  :
// Coded by Hidayet Ok
//
$f1="english_global.lng";
$f2="turkish_global.lng";
$f3="diff_out2.txt";
$file=file($f2);
$cnt=0;
foreach($file as $val) 
{
  if(substr(trim($val),0,3) == "LG_") 
  {
   list($akey,$aval)=explode("=",$val);
   $akey=trim($akey);
   $aval=trim($aval);
   $xa[$akey]=$aval;
  } // if 
} 
$file=file($f1);
$out=fopen($f3,"w");
$cnt=0;
foreach($file as $val) 
{
  if(substr(trim($val),0,3) == "LG_") 
  {
   list($akey,$aval)=explode("=",$val);
   $akey=trim($akey);
   $aval=trim($aval);
   if(!isset($xa[$akey])) 
   {
    $cnt++;
    print "$val<br>";
    fputs($out,$val); 
   } // if 
  } // if 
} 
print "<li>COUNT : $cnt";
;?>

heu…

There was an interworx command to do this, before…

Don’t remenber which one, but this command gave you only difference between two languages. The good thinks was also the ability to stop your translation when you wanted without lost all the translations already done. (not the case now)

Socheat ? Paul ? one of you gave me this command a long time ago, when I began to translate iworx in fench…

Does it still exist ?

It remembers me that I have to translate the last versions :\

Pascal

Yes, there was a command, but as you noticed Pascal, you couldn’t stop midway. You’d have to finish all the added translations, or none at all, which is not the most user-friendly. So I’d rather people not use it while we work on a better way to manage languages. :slight_smile:

Socheat

but socheat, before this one, it was another one, with wichone you could stop midway. It was very good, why did you change it to the last one ?

There was also a web version (I think I named it the Language Wizard :wink: ), though I can’t remember if it was just in a devel release or if it was (briefly) in a production release. We hacked it together quickly, figuring it was a good idea and was simple enough to code. Which it was, but like with everything in InterWorx, we wanted the interface to be easy to use and functional.

The interface worked well when there were a handful of new translations to be made (less than 100 or so). The interface got really messy when you had to translate more than that. For example, if you were creating a new language, you would have 3000+ translations to make. With even 100 strings per page, that’s still 30 pages to flip through.

So, we decided to pull the language tool until we could put more thought into the usability of the interface.

Socheat

3000+ tags to translate?! :eek: thats not good news for me as i was just going to switch and start translating into arabic :frowning:

is it possible to have a look on the latest english file before switching?

Bashar,

I’ve just emailed you our latest language file to the email you registered with.

Socheat

Thanks Socheat, thats a REALLY huge file

is it possible to know which lines are going to show to end user to translate them only? and keep the administrative page in english as admin don’t really need it.

Unfortunately, in our current language setup, we don’t separate the SiteWorx translations from the NodeWorx translations. We do have plans to re-work our language setup to make translations in general easier and more managable. This may include breaking the large file up into smaller ones. However, I may be able to get you a fairly complete list of the language variables used in NodeWorx, just by grepping the source files. I’ll see what I can do tomorrow.

Socheat

Great thanks :slight_smile:

i’m not familiar with neither siteworx or nodeworx but i want to see after translating how it would look like and does it worth the hassle moving from cpanel to it or not (so far from the cluster feature it really worth it)

That’s it !!!

I have translated the EN language file to FR one year ago (under 1.2 or .3 don’t remenber) version. So I have had to translate everything in a file text

Then is comed a new version (v1.7 or 1.9) that has made a lot of changes in the language files : Translation job again, but you and paul gave me this tool and it was great for me.

Indeed now my needs is only to translate NEW sentence/word that come at every release. (some time a lot, indeed). I think that the need for translating everything is something else.

If you still have this tool I’d really have it (I’m not the only one to translate, we are 3, so sometimes one do some, and sometime the other do some)

For example, your next release will be put in production in few days/weeks and I’d really like to translate all before my end users see some tag no translated :-p

Thanks

Pascal

Alright, here you go guys, here are a few files.

  • 212-lg-diff.txt contains all the newly added entries since 2.1.1

  • siteworx_html_lgs.txt contains all the LG vars used in SiteWorx html files for 2.1.2

  • siteworx_templates_lgs.txt contains all the LG vars used in the SiteWorx smarty template files for 2.1.2

These are just the LG variables. You can get the actual english translations by using grepping /home/interworx/lang/en-us/global.lng and passing one of these files in as the pattern file.

For example, to get the english translations for the 212-lg-diff.txt file, run the following command:

grep --file=/tmp/212-lg-diff.txt /home/interworx/lang/en-us/global.lng > /tmp/new-translations.txt

This will create the file /tmp/new-translations.txt and it will contain all the english translations of the LG vars that were listed in /tmp/212-lg-diff.txt. Of course, this is assuming 212-lg-diff.txt file is in /tmp. Please note that these also include some, not all, translations for features that are coming in 2.2. That just means you’ll have less to translate when 2.2 is officially released. :slight_smile:

Socheat

212-lg-diff.txt (9.21 KB)

siteworx_html_lgs.txt (5.8 KB)

siteworx_templates_lgs.txt (3.02 KB)

Thanks Socheat!

I’ll send you an updated swedish langfile shortly.

Rgds
-tsl-