OSDN Git Service

CHANGE:ロケール一覧をnucleus/localesフォルダにある言語ファイルから取得するように変更。の修正。
authorreine <reine@users.sourceforge.jp>
Wed, 16 May 2012 14:05:01 +0000 (23:05 +0900)
committerreine <reine@users.sourceforge.jp>
Wed, 16 May 2012 14:05:01 +0000 (23:05 +0900)
インストールスクリプトにUTF-8の文字を含まないようにした。

install/index.php

index f30a3b1..dd4b58f 100644 (file)
@@ -296,45 +296,12 @@ function show_footer()
  */\r
 function show_select_locale_form()\r
 {\r
-       // Get the browser language that can be displayed\r
-       // TODO: default locale select simple implementation\r
-       $languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\r
-       foreach ( $languages as $language )\r
-       {\r
-               $language = preg_replace('#([\w]+).*#', '$1', $language);\r
-               break;\r
-       }\r
-\r
        // get locale list\r
-       $native_locales = array(\r
-               'bg_Cyrl_BG' => 'български - България',\r
-               'ca_Latn_ES' => 'català - català',\r
-               'cs_Latn_CZ' => 'čeština - Česká republika',\r
-               'de_Latn_DE' => 'Deutsch - Deutschland',\r
-               'en_Latn_US' => 'English - United States',\r
-               'es_Latn_ES' => 'Español - España, alfabetización internacional',\r
-               'fa_Arab_IR' => 'فارسى - ایران',\r
-               'fi_Latn_FI' => 'suomi - Suomi',\r
-               'fr_Latn_FR' => 'français - France',\r
-               'gl_Latn_ES' => 'galego - galego',\r
-               'hu_Latn_HU' => 'magyar - Magyarország',\r
-               'it_Latn_IT' => 'italiano - Italia',\r
-               'ja_Jpan_JP' => '日本語 - 日本',\r
-               'ko_Kore_KR' => '한국어 - 대한민국',\r
-               'lv_Latn_LV' => 'latviešu - Latvija',\r
-               'nl_Latn_NL' => 'Nederlands - Nederland',\r
-               'pt_Latn_BR' => 'Português - Brasil',\r
-               'ru_Cyrl_RU' => 'русский - Россия',\r
-               'sk_Latn_SK' => 'slovenčina - Slovenská republika',\r
-               'zh_Hans_CN' => '中文 - 中华人民共和国',\r
-               'zh_Hant_TW' => '中文 - 台灣'\r
-       );\r
-       \r
        $localelist = i18n::get_available_locale_list();\r
        $locales = array();\r
        foreach ( $localelist as $locale ) {\r
                $checkfile = './locales/' . $locale . '.' . i18n::get_current_charset() . '.php';\r
-               $locales[] = array( $locale, (!file_exists($checkfile) ? '*' : '') . $native_locales[$locale] );\r
+               $locales[] = array( $locale, (!file_exists($checkfile) ? '*&nbsp;' : '') . $locale );\r
        }\r
 ?>\r
                <div id="container">\r
@@ -346,6 +313,11 @@ function show_select_locale_form()
                                <div class="prt">\r
                                        <select name="locale">\r
 <?php\r
+       // Get the browser language that can be displayed\r
+       // TODO: default locale select simple implementation\r
+       $languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\r
+       $language = (is_array($languages) && count($languages) > 0) ? preg_replace('#^([\w]+).*$#', '$1', $languages[0]) : '';\r
+\r
        foreach ( $locales as $locale )\r
        {\r
                echo "<option value=\"$locale[0]\"";\r
@@ -357,9 +329,8 @@ function show_select_locale_form()
        }\r
 ?>\r
                                        </select>\r
-                                       <p>\r
-                                       Locale with an asterisk, because there is no language file for the installation, will be in English.<br />\r
-                                       We will wait for the translator by volunteers!\r
+                                       <p>Nucleus is installed in the selected locale, the locale of the Asterisk prefixed will be displayed in English because there is no translation of the installer file.</p>\r
+                                       <p>We will wait for the translator by volunteers!</p>\r
                                        </p>\r
                                        <p class="sbt">\r
                                                <button type="submit" name="action" value="locale" class="sbt_arw">START</button>\r
@@ -1381,6 +1352,7 @@ function do_check_files()
                '../nucleus/libs/MEDIA.php',\r
                '../nucleus/libs/MEMBER.php',\r
                '../nucleus/libs/NOTIFICATION.php',\r
+               '../nucleus/libs/PAGEFACTORY.php',\r
                '../nucleus/libs/PARSER.php',\r
                '../nucleus/libs/PLUGIN.php',\r
                '../nucleus/libs/PLUGINADMIN.php',\r