fix translate.php, update resources

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@354 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-02-12 23:17:31 +00:00
parent 53756d7747
commit 2bf95fe22d
4 changed files with 10 additions and 10 deletions

View File

@ -16,9 +16,9 @@ require_once('../libs/common.php');
require_once('../libs/pagination.php');
function getparam( $name ) {
global $webim_encoding;
global $site_encoding;
if( isset($_POST[$name]) )
return myiconv(getoutputenc(), $webim_encoding, $_POST[$name]);
return myiconv(getoutputenc(), $site_encoding, $_POST[$name]);
die("no ".$name." parameter");
}
@ -30,10 +30,10 @@ function form_value($key) {
}
function save_message($locale,$key,$value) {
global $webim_encoding;
global $site_encoding;
$result = "";
$added = false;
$current_encoding = $webim_encoding;
$current_encoding = $site_encoding;
$fp = fopen(dirname(__FILE__)."/../locales/$locale/properties", "r");
while (!feof($fp)) {
$line = fgets($fp, 4096);
@ -42,7 +42,7 @@ function save_message($locale,$key,$value) {
if($keyval[0] == 'encoding') {
$current_encoding = trim($keyval[1]);
} else if(!$added && $keyval[0] == $key) {
$line = "$key=".myiconv($webim_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n";
$line = "$key=".myiconv($site_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n";
$added = true;
}
}
@ -50,7 +50,7 @@ function save_message($locale,$key,$value) {
}
fclose($fp);
if(!$added) {
$result .= "$key=".myiconv($webim_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n";
$result .= "$key=".myiconv($site_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n";
}
$fp = fopen(dirname(__FILE__)."/../locales/$locale/properties", "w");
fwrite($fp, $result);
@ -66,7 +66,7 @@ function save_message($locale,$key,$value) {
$remoteHost = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $extAddr;
fwrite($fp,"# ".date(DATE_RFC822)." by $remoteHost using $userbrowser\n");
fwrite($fp,"$key=".myiconv($webim_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n");
fwrite($fp,"$key=".myiconv($site_encoding, $current_encoding, str_replace("\r", "",str_replace("\n", "\\n",trim($value))))."\n");
fclose($fp);
}

View File

@ -20,7 +20,7 @@ index.how.title=How it works?
index.how=You should place the button of Web Messenger at your site. Your visitors click the button and chat with your operators who help them.
index.license.title=License
index.license=This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0.
index.hosted=Project is hosted by SourceForge.
index.hosted=Copyright 2009 Open Web Messenger Powered By Trilex Labs
features.price.title=Pricing
features.price=<ul><li>Open-source code, free of charge\n<li>Eclipse Public License 1.0</ul>

View File

@ -24,7 +24,7 @@ features.operator=<ul>\n<li>
features.price=<ul>\n<li>Открытый исходный код, свободное распространение\n<li>Eclipse Public License 1.0\n</ul>
features.price.title=Стоимость
index.license=В настоящее время Open Web Messenger выпускается под лицензией Eclipse Public License v1.0.
index.hosted=Ïðîåêò ðàçðàáàòûâàåòñÿ íà ñåðâåðå SourceForge.net.
index.hosted=Copyright 2009 Open Web Messenger Powered By Trilex Labs
index.how.title=Как это работает?
index.how=Вы размещаете предоставленную кнопку связи с оператором на вашем сайте. Ваши посетители получают возможность пообщаться с вашими операторами не устанавливая дополнительного ПО.
index.whatis="Open Мессенджер" - уникальное програмное обеспечение, позволяющее вашим посетителям общаться с операторами в режиме реального времени.

View File

@ -20,7 +20,7 @@ index.how.title=¿Cómo funciona?
index.how=Debes colocar el botón de Web Messenger en tu sitio web, para que tus visitantes hagan clic en el botón y entonces puedan comunicarse con tus operadores quienes lesproporcionaran la correspondiente ayuda en línea.
index.license.title=Licencia
index.license=Este programa y sus respectivos recursos están disponibles bajo los términos de Eclipse Public License v1.0.
index.hosted=Este proyecto es apoyado por SourceForge.
index.hosted=Derecho de Autor 2009 Abrir Web Messenger Inscríbase en Trilex Labs
demo.title=DEMO
features.price.title=Costo
features.price=<ul>\n<li>Código abierto, libre de pagos\n<li>Eclipse Public License 1.0\n</ul>