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 \n" -"POT-Creation-Date: 2010-01-20 12:49 PST\n" +"POT-Creation-Date: 2010-01-22 10:06 PST\n" "Last-Translator: Generated automatically from source files\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -17,10 +17,11 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" msgid "LANG_NAME_NATIVE" -msgstr "English" +msgstr "" msgid "LANG_NAME_INTERNATIONAL" -msgstr "English" +msgstr "" + #: ../inc/forum.inc:124 msgid "Search for words in forum messages" msgstr "" @@ -1472,54 +1473,42 @@ msgstr "" msgid "Language selection" msgstr "" -#: ../user/language_select.php:46 -msgid "LANG_NAME_INTERNATIONAL" -msgstr "" - -#: ../user/language_select.php:47 -msgid "LANG_NAME_NATIVE" -msgstr "" - -#: ../user/language_select.php:45 +#: ../user/language_select.php:68 msgid "" "This web site is available in several languages. The currently selected " -"language is: %1 (%2)." +"language is %1." msgstr "" -#: ../user/language_select.php:52 +#: ../user/language_select.php:73 msgid "" "Normally the choice of language is determined by your browser's language " "setting, which is: %1. You can change this setting using:" msgstr "" -#: ../user/language_select.php:57 +#: ../user/language_select.php:78 msgid "Firefox: Tools/Options/General" msgstr "" -#: ../user/language_select.php:59 +#: ../user/language_select.php:80 msgid "Microsoft IE: Tools/Internet Options/Languages" msgstr "" -#: ../user/language_select.php:63 +#: ../user/language_select.php:84 msgid "" "Or you can select a language by clicking on one of the links. This will " "send your browser a cookie; make sure your browser accepts cookies from our " "domain." msgstr "" -#: ../user/language_select.php:69 -msgid "Language symbol" -msgstr "" - -#: ../user/language_select.php:69 +#: ../user/language_select.php:90 msgid "Language name (click to select)" msgstr "" -#: ../user/language_select.php:71 +#: ../user/language_select.php:92 msgid "Use browser language setting" msgstr "" -#: ../user/language_select.php:84 +#: ../user/language_select.php:108 msgid "" "Translations are done by volunteers. If your native language is not here, %" "1you can provide a translation%2."