Commit 361da1ab authored by Margaux Clerc's avatar Margaux Clerc
Browse files

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

parent c7e98c73
......@@ -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])
......
......@@ -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
}
......
......@@ -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>
......
......@@ -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);
}
......@@ -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
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment