update translation files(de,he,ru) and fix the language choice for linux

This commit is contained in:
Margaux Clerc 2013-01-07 15:06:31 +01:00
parent c7e98c7377
commit 361da1ab98
8 changed files with 3259 additions and 1314 deletions

View file

@ -97,7 +97,7 @@ fi
dnl Add the languages which your application supports here.
PKG_PROG_PKG_CONFIG
ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN nb_NO zh_TW"
ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN nb_NO zh_TW he"
AC_SUBST(ALL_LINGUAS)
AC_DEFINE_UNQUOTED(LINPHONE_ALL_LANGS, "$ALL_LINGUAS", [All supported languages])

View file

@ -1787,8 +1787,10 @@ int main(int argc, char *argv[]){
if (strncmp(lang,"zh",2)==0){
workaround_gtk_entry_chinese_bug=TRUE;
}
#else
#elif __APPLE__
setenv("LANG",lang,1);
#else
setenv("LANGUAGE",lang,1);
#endif
}

View file

@ -1141,7 +1141,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="dtmf_hash">
<object class="GtkButton" id="dtmf_#">
<property name="label" translatable="yes">#</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -1173,7 +1173,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="dtmf_star">
<object class="GtkButton" id="dtmf_*">
<property name="label" translatable="yes">*</property>
<property name="visible">True</property>
<property name="can_focus">True</property>

View file

@ -794,7 +794,12 @@ static void linphone_gtk_fill_langs(GtkWidget *pb){
const char *all_langs="C " LINPHONE_ALL_LANGS;
const char *name;
int i=0,index=0;
const char *cur_lang=getenv("LANG");
const char *cur_lang;
#if defined(WIN32) || defined(__APPLE__)
cur_lang=getenv("LANG");
#else
cur_lang=getenv("LANGUAGE");
#endif
int cur_lang_index=-1;
char text[256]={0};
if (cur_lang==NULL) cur_lang="C";
@ -818,7 +823,12 @@ static void linphone_gtk_fill_langs(GtkWidget *pb){
void linphone_gtk_lang_changed(GtkComboBox *combo){
const char *selected=gtk_combo_box_get_active_text(combo);
char code[10];
const char *cur_lang=getenv("LANG");
const char *cur_lang;
#if defined(WIN32) || defined(__APPLE__)
cur_lang=getenv("LANG");
#else
cur_lang=getenv("LANGUAGE");
#endif
if (selected!=NULL){
sscanf(selected,"%s",code);
if (cur_lang==NULL) cur_lang="C";
@ -1286,4 +1296,3 @@ void linphone_gtk_dscp_edit_response(GtkWidget *dialog, guint response_id){
}
gtk_widget_destroy(dialog);
}

View file

@ -156,7 +156,11 @@ const char *linphone_gtk_get_lang(const char *config_file){
void linphone_gtk_set_lang(const char *code){
LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
const char *curlang;
curlang=getenv("LANG");
#if defined(WIN32) || defined(__APPLE__)
curlang=getenv("LANG");
#else
curlang=getenv("LANGUAGE");
#endif
if (curlang!=NULL && strncmp(curlang,code,2)==0) {
/* do not loose the _territory@encoding part*/
return;
@ -166,8 +170,10 @@ void linphone_gtk_set_lang(const char *code){
char tmp[128];
snprintf(tmp,sizeof(tmp),"LANG=%s",code);
_putenv(tmp);
#else
#elif __APPLE__
setenv("LANG",code,1);
#else
setenv("LANGUAGE",code,1);
#endif
}

1318
po/de.po

File diff suppressed because it is too large Load diff

1722
po/he.po Normal file

File diff suppressed because it is too large Load diff

1498
po/ru.po

File diff suppressed because it is too large Load diff