diff --git a/checkin_notes b/checkin_notes index 5502732968..e3c9b64c33 100644 --- a/checkin_notes +++ b/checkin_notes @@ -622,3 +622,11 @@ Bernd 22 Jan 2010 lib/ Makefile.am +David 22 Jan 2010 + - user web: clean up LANG_NAME_* mess + + html/ + ops/ + build_po_boinc.php + user/ + language_select.php diff --git a/html/ops/build_po_boinc.php b/html/ops/build_po_boinc.php index d1c072e2eb..205174568a 100755 --- a/html/ops/build_po_boinc.php +++ b/html/ops/build_po_boinc.php @@ -31,10 +31,11 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\\n" msgid "LANG_NAME_NATIVE" -msgstr "English" +msgstr "" msgid "LANG_NAME_INTERNATIONAL" -msgstr "English" +msgstr "" + HDR; diff --git a/html/user/language_select.php b/html/user/language_select.php index 6a1197e8ab..8de39a9821 100644 --- a/html/user/language_select.php +++ b/html/user/language_select.php @@ -40,14 +40,35 @@ if ($set_lang){ page_head(tra("Language selection")); +function language_name($code) { + if ($code == 'en') { + return "en (English)"; + } else { + $lname = tr_specific("LANG_NAME_NATIVE", $code); + if ($lname == 'English' || $lname == '') { + return "$code"; + } else { + return "$code (" + .tr_specific("LANG_NAME_INTERNATIONAL", $code) + ."/$lname)" + ; + } + } +} + +if (count($languages_in_use)) { + $cur_lang_name = language_name($languages_in_use[0]); +} else { + echo "foo"; + $cur_lang_name = language_name('en'); +} + echo "
", tra( - "This web site is available in several languages. The currently selected language is: %1 (%2).", - "".tra("LANG_NAME_INTERNATIONAL")."", - tra("LANG_NAME_NATIVE") + "This web site is available in several languages. The currently selected language is %1.", + $cur_lang_name ), - "
", - "", + "
", tra( "Normally the choice of language is determined by your browser's language setting, which is: %1. You can change this setting using:", "$prefs" @@ -66,18 +87,21 @@ echo "
", ; start_table(); -row2(tra("Language symbol"), tra("Language name (click to select)")); -row2("", - "".tra("Use browser language setting")."" +row1(tra("Language name (click to select)")); +row1("" + .tra("Use browser language setting") + ."", + 1, "row1" ); sort($languages); +$i = 0; foreach ($languages as $language) { - $inter = tr_specific("LANG_NAME_INTERNATIONAL", $language); - $native = tr_specific("LANG_NAME_NATIVE", $language); - row2( - "$language", - "$inter ($native)" + $name = language_name($language); + row1( + "$name", + 1, "row$i" ); + $i = 1-$i; } end_table(); echo "
",
diff --git a/locale/templates/BOINC-Project-Generic.pot b/locale/templates/BOINC-Project-Generic.pot
index 19fc834134..4420df0a42 100644
--- a/locale/templates/BOINC-Project-Generic.pot
+++ b/locale/templates/BOINC-Project-Generic.pot
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BOINC $Id$\n"
"Report-Msgid-Bugs-To: BOINC translation team