From d8921ccd85f3414c1f3e13b23b6da735bf9b69b8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 5 Jul 2017 17:36:43 +0200 Subject: Allow user to choose locale Signed-off-by: Thomas Citharel --- lib/private/Settings/Personal/PersonalInfo.php | 48 ++- lib/private/Settings/Personal/locales.json | 436 +++++++++++++++++++++++++ 2 files changed, 483 insertions(+), 1 deletion(-) create mode 100644 lib/private/Settings/Personal/locales.json (limited to 'lib/private/Settings') diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php index 305e3fb0a4d..f6fb9d48d99 100644 --- a/lib/private/Settings/Personal/PersonalInfo.php +++ b/lib/private/Settings/Personal/PersonalInfo.php @@ -4,6 +4,7 @@ * * @author Arthur Schiwon * @author Morris Jobke + * @author Thomas Citharel * * @license GNU AGPL version 3 or any later version * @@ -106,6 +107,7 @@ class PersonalInfo implements ISettings { } $languageParameters = $this->getLanguages($user); + $localeParameters = $this->getLocales($user); $messageParameters = $this->getMessageParameters($userData); $parameters = [ @@ -134,7 +136,7 @@ class PersonalInfo implements ISettings { 'twitterVerification' => $userData[AccountManager::PROPERTY_TWITTER]['verified'], 'groups' => $this->getGroups($user), 'passwordChangeSupported' => $user->canChangePassword(), - ] + $messageParameters + $languageParameters; + ] + $messageParameters + $languageParameters + $localeParameters; return new TemplateResponse('settings', 'settings/personal/personal.info', $parameters, ''); @@ -218,6 +220,50 @@ class PersonalInfo implements ISettings { ); } + private function getLocales(IUser $user) { + $forceLanguage = $this->config->getSystemValue('force_locale', false); + if($forceLanguage !== false) { + return []; + } + + $uid = $user->getUID(); + + $userLocaleString = $this->config->getUserValue($uid, 'core', 'locale', 'en_US'); + + $userLang = $this->config->getUserValue($uid, 'core', 'lang', $this->l10nFactory->findLanguage()); + + $localeData = file_get_contents(__DIR__ . '/locales.json'); + $localeCodes = json_decode($localeData, true); + + $userLocale = array_filter($localeCodes, function($value) use ($userLocaleString) { + return $userLocaleString === $value['code']; + }); + + if (count($userLocale) > 0) + { + $userLocale = reset($userLocale); + } + + $localesForLanguage = array_filter($localeCodes, function($localeCode) use ($userLang) { + return 0 === strpos($localeCode['code'], $userLang); + }); + + /*$localesForLanguage = []; + + foreach (array_keys($localeCodes) as $localeCode) { + if (0 === strpos($localeCode, $userLang)) { + $localesForLanguage[] = $localeCode; + } + }*/ + + return [ + 'activelocaleLang' => $userLocaleString, + 'activelocale' => $userLocale, + 'locales' => $localeCodes, + 'localesforlanguage' => $localesForLanguage, + ]; + } + /** * @param array $userData * @return array diff --git a/lib/private/Settings/Personal/locales.json b/lib/private/Settings/Personal/locales.json new file mode 100644 index 00000000000..1098973c5ef --- /dev/null +++ b/lib/private/Settings/Personal/locales.json @@ -0,0 +1,436 @@ +[ + { "code":"af_NA", "name":"Afrikaans (Namibia)"}, + { "code":"af_ZA", "name":"Afrikaans (South Africa)"}, + { "code":"af", "name":"Afrikaans"}, + { "code":"ak_GH", "name":"Akan (Ghana)"}, + { "code":"ak", "name":"Akan"}, + { "code":"sq_AL", "name":"Albanian (Albania)"}, + { "code":"sq", "name":"Albanian"}, + { "code":"am_ET", "name":"Amharic (Ethiopia)"}, + { "code":"am", "name":"Amharic"}, + { "code":"ar_DZ", "name":"Arabic (Algeria)"}, + { "code":"ar_BH", "name":"Arabic (Bahrain)"}, + { "code":"ar_EG", "name":"Arabic (Egypt)"}, + { "code":"ar_IQ", "name":"Arabic (Iraq)"}, + { "code":"ar_JO", "name":"Arabic (Jordan)"}, + { "code":"ar_KW", "name":"Arabic (Kuwait)"}, + { "code":"ar_LB", "name":"Arabic (Lebanon)"}, + { "code":"ar_LY", "name":"Arabic (Libya)"}, + { "code":"ar_MA", "name":"Arabic (Morocco)"}, + { "code":"ar_OM", "name":"Arabic (Oman)"}, + { "code":"ar_QA", "name":"Arabic (Qatar)"}, + { "code":"ar_SA", "name":"Arabic (Saudi Arabia)"}, + { "code":"ar_SD", "name":"Arabic (Sudan)"}, + { "code":"ar_SY", "name":"Arabic (Syria)"}, + { "code":"ar_TN", "name":"Arabic (Tunisia)"}, + { "code":"ar_AE", "name":"Arabic (United Arab Emirates)"}, + { "code":"ar_YE", "name":"Arabic (Yemen)"}, + { "code":"ar", "name":"Arabic"}, + { "code":"hy_AM", "name":"Armenian (Armenia)"}, + { "code":"hy", "name":"Armenian"}, + { "code":"as_IN", "name":"Assamese (India)"}, + { "code":"as", "name":"Assamese"}, + { "code":"asa_TZ", "name":"Asu (Tanzania)"}, + { "code":"asa", "name":"Asu"}, + { "code":"az_Cyrl", "name":"Azerbaijani (Cyrillic)"}, + { "code":"az_Cyrl_AZ", "name":"Azerbaijani (Cyrillic, Azerbaijan)"}, + { "code":"az_Latn", "name":"Azerbaijani (Latin)"}, + { "code":"az_Latn_AZ", "name":"Azerbaijani (Latin, Azerbaijan)"}, + { "code":"az", "name":"Azerbaijani"}, + { "code":"bm_ML", "name":"Bambara (Mali)"}, + { "code":"bm", "name":"Bambara"}, + { "code":"eu_ES", "name":"Basque (Spain)"}, + { "code":"eu", "name":"Basque"}, + { "code":"be_BY", "name":"Belarusian (Belarus)"}, + { "code":"be", "name":"Belarusian"}, + { "code":"bem_ZM", "name":"Bemba (Zambia)"}, + { "code":"bem", "name":"Bemba"}, + { "code":"bez_TZ", "name":"Bena (Tanzania)"}, + { "code":"bez", "name":"Bena"}, + { "code":"bn_BD", "name":"Bengali (Bangladesh)"}, + { "code":"bn_IN", "name":"Bengali (India)"}, + { "code":"bn", "name":"Bengali"}, + { "code":"bs_BA", "name":"Bosnian (Bosnia and Herzegovina)"}, + { "code":"bs", "name":"Bosnian"}, + { "code":"bg_BG", "name":"Bulgarian (Bulgaria)"}, + { "code":"bg", "name":"Bulgarian"}, + { "code":"my_MM", "name":"Burmese (Myanmar [Burma])"}, + { "code":"my", "name":"Burmese"}, + { "code":"ca_ES", "name":"Catalan (Spain)"}, + { "code":"ca", "name":"Catalan"}, + { "code":"tzm_Latn", "name":"Central Morocco Tamazight (Latin)"}, + { "code":"tzm_Latn_MA", "name":"Central Morocco Tamazight (Latin, Morocco)"}, + { "code":"tzm", "name":"Central Morocco Tamazight"}, + { "code":"chr_US", "name":"Cherokee (United States)"}, + { "code":"chr", "name":"Cherokee"}, + { "code":"cgg_UG", "name":"Chiga (Uganda)"}, + { "code":"cgg", "name":"Chiga"}, + { "code":"zh_Hans", "name":"Chinese (Simplified Han)"}, + { "code":"zh_Hans_CN", "name":"Chinese (Simplified Han, China)"}, + { "code":"zh_Hans_HK", "name":"Chinese (Simplified Han, Hong Kong SAR China)"}, + { "code":"zh_Hans_MO", "name":"Chinese (Simplified Han, Macau SAR China)"}, + { "code":"zh_Hans_SG", "name":"Chinese (Simplified Han, Singapore)"}, + { "code":"zh_Hant", "name":"Chinese (Traditional Han)"}, + { "code":"zh_Hant_HK", "name":"Chinese (Traditional Han, Hong Kong SAR China)"}, + { "code":"zh_Hant_MO", "name":"Chinese (Traditional Han, Macau SAR China)"}, + { "code":"zh_Hant_TW", "name":"Chinese (Traditional Han, Taiwan)"}, + { "code":"zh", "name":"Chinese"}, + { "code":"kw_GB", "name":"Cornish (United Kingdom)"}, + { "code":"kw", "name":"Cornish"}, + { "code":"hr_HR", "name":"Croatian (Croatia)"}, + { "code":"hr", "name":"Croatian"}, + { "code":"cs_CZ", "name":"Czech (Czech Republic)"}, + { "code":"cs", "name":"Czech"}, + { "code":"da_DK", "name":"Danish (Denmark)"}, + { "code":"da", "name":"Danish"}, + { "code":"nl_BE", "name":"Dutch (Belgium)"}, + { "code":"nl_NL", "name":"Dutch (Netherlands)"}, + { "code":"nl", "name":"Dutch"}, + { "code":"ebu_KE", "name":"Embu (Kenya)"}, + { "code":"ebu", "name":"Embu"}, + { "code":"en_AS", "name":"English (American Samoa)"}, + { "code":"en_AU", "name":"English (Australia)"}, + { "code":"en_BE", "name":"English (Belgium)"}, + { "code":"en_BZ", "name":"English (Belize)"}, + { "code":"en_BW", "name":"English (Botswana)"}, + { "code":"en_CA", "name":"English (Canada)"}, + { "code":"en_GU", "name":"English (Guam)"}, + { "code":"en_HK", "name":"English (Hong Kong SAR China)"}, + { "code":"en_IN", "name":"English (India)"}, + { "code":"en_IE", "name":"English (Ireland)"}, + { "code":"en_JM", "name":"English (Jamaica)"}, + { "code":"en_MT", "name":"English (Malta)"}, + { "code":"en_MH", "name":"English (Marshall Islands)"}, + { "code":"en_MU", "name":"English (Mauritius)"}, + { "code":"en_NA", "name":"English (Namibia)"}, + { "code":"en_NZ", "name":"English (New Zealand)"}, + { "code":"en_MP", "name":"English (Northern Mariana Islands)"}, + { "code":"en_PK", "name":"English (Pakistan)"}, + { "code":"en_PH", "name":"English (Philippines)"}, + { "code":"en_SG", "name":"English (Singapore)"}, + { "code":"en_ZA", "name":"English (South Africa)"}, + { "code":"en_TT", "name":"English (Trinidad and Tobago)"}, + { "code":"en_UM", "name":"English (U.S. Minor Outlying Islands)"}, + { "code":"en_VI", "name":"English (U.S. Virgin Islands)"}, + { "code":"en_GB", "name":"English (United Kingdom)"}, + { "code":"en_US", "name":"English (United States)"}, + { "code":"en_ZW", "name":"English (Zimbabwe)"}, + { "code":"en", "name":"English"}, + { "code":"eo", "name":"Esperanto"}, + { "code":"et_EE", "name":"Estonian (Estonia)"}, + { "code":"et", "name":"Estonian"}, + { "code":"ee_GH", "name":"Ewe (Ghana)"}, + { "code":"ee_TG", "name":"Ewe (Togo)"}, + { "code":"ee", "name":"Ewe"}, + { "code":"fo_FO", "name":"Faroese (Faroe Islands)"}, + { "code":"fo", "name":"Faroese"}, + { "code":"fil_PH", "name":"Filipino (Philippines)"}, + { "code":"fil", "name":"Filipino"}, + { "code":"fi_FI", "name":"Finnish (Finland)"}, + { "code":"fi", "name":"Finnish"}, + { "code":"fr_BE", "name":"French (Belgium)"}, + { "code":"fr_BJ", "name":"French (Benin)"}, + { "code":"fr_BF", "name":"French (Burkina Faso)"}, + { "code":"fr_BI", "name":"French (Burundi)"}, + { "code":"fr_CM", "name":"French (Cameroon)"}, + { "code":"fr_CA", "name":"French (Canada)"}, + { "code":"fr_CF", "name":"French (Central African Republic)"}, + { "code":"fr_TD", "name":"French (Chad)"}, + { "code":"fr_KM", "name":"French (Comoros)"}, + { "code":"fr_CG", "name":"French (Congo - Brazzaville)"}, + { "code":"fr_CD", "name":"French (Congo - Kinshasa)"}, + { "code":"fr_CI", "name":"French (Côte d’Ivoire)"}, + { "code":"fr_DJ", "name":"French (Djibouti)"}, + { "code":"fr_GQ", "name":"French (Equatorial Guinea)"}, + { "code":"fr_FR", "name":"French (France)"}, + { "code":"fr_GA", "name":"French (Gabon)"}, + { "code":"fr_GP", "name":"French (Guadeloupe)"}, + { "code":"fr_GN", "name":"French (Guinea)"}, + { "code":"fr_LU", "name":"French (Luxembourg)"}, + { "code":"fr_MG", "name":"French (Madagascar)"}, + { "code":"fr_ML", "name":"French (Mali)"}, + { "code":"fr_MQ", "name":"French (Martinique)"}, + { "code":"fr_MC", "name":"French (Monaco)"}, + { "code":"fr_NE", "name":"French (Niger)"}, + { "code":"fr_RW", "name":"French (Rwanda)"}, + { "code":"fr_RE", "name":"French (Réunion)"}, + { "code":"fr_BL", "name":"French (Saint Barthélemy)"}, + { "code":"fr_MF", "name":"French (Saint Martin)"}, + { "code":"fr_SN", "name":"French (Senegal)"}, + { "code":"fr_CH", "name":"French (Switzerland)"}, + { "code":"fr_TG", "name":"French (Togo)"}, + { "code":"fr", "name":"French"}, + { "code":"ff_SN", "name":"Fulah (Senegal)"}, + { "code":"ff", "name":"Fulah"}, + { "code":"gl_ES", "name":"Galician (Spain)"}, + { "code":"gl", "name":"Galician"}, + { "code":"lg_UG", "name":"Ganda (Uganda)"}, + { "code":"lg", "name":"Ganda"}, + { "code":"ka_GE", "name":"Georgian (Georgia)"}, + { "code":"ka", "name":"Georgian"}, + { "code":"de_AT", "name":"German (Austria)"}, + { "code":"de_BE", "name":"German (Belgium)"}, + { "code":"de_DE", "name":"German (Germany)"}, + { "code":"de_LI", "name":"German (Liechtenstein)"}, + { "code":"de_LU", "name":"German (Luxembourg)"}, + { "code":"de_CH", "name":"German (Switzerland)"}, + { "code":"de", "name":"German"}, + { "code":"el_CY", "name":"Greek (Cyprus)"}, + { "code":"el_GR", "name":"Greek (Greece)"}, + { "code":"el", "name":"Greek"}, + { "code":"gu_IN", "name":"Gujarati (India)"}, + { "code":"gu", "name":"Gujarati"}, + { "code":"guz_KE", "name":"Gusii (Kenya)"}, + { "code":"guz", "name":"Gusii"}, + { "code":"ha_Latn", "name":"Hausa (Latin)"}, + { "code":"ha_Latn_GH", "name":"Hausa (Latin, Ghana)"}, + { "code":"ha_Latn_NE", "name":"Hausa (Latin, Niger)"}, + { "code":"ha_Latn_NG", "name":"Hausa (Latin, Nigeria)"}, + { "code":"ha", "name":"Hausa"}, + { "code":"haw_US", "name":"Hawaiian (United States)"}, + { "code":"haw", "name":"Hawaiian"}, + { "code":"he_IL", "name":"Hebrew (Israel)"}, + { "code":"he", "name":"Hebrew"}, + { "code":"hi_IN", "name":"Hindi (India)"}, + { "code":"hi", "name":"Hindi"}, + { "code":"hu_HU", "name":"Hungarian (Hungary)"}, + { "code":"hu", "name":"Hungarian"}, + { "code":"is_IS", "name":"Icelandic (Iceland)"}, + { "code":"is", "name":"Icelandic"}, + { "code":"ig_NG", "name":"Igbo (Nigeria)"}, + { "code":"ig", "name":"Igbo"}, + { "code":"id_ID", "name":"Indonesian (Indonesia)"}, + { "code":"id", "name":"Indonesian"}, + { "code":"ga_IE", "name":"Irish (Ireland)"}, + { "code":"ga", "name":"Irish"}, + { "code":"it_IT", "name":"Italian (Italy)"}, + { "code":"it_CH", "name":"Italian (Switzerland)"}, + { "code":"it", "name":"Italian"}, + { "code":"ja_JP", "name":"Japanese (Japan)"}, + { "code":"ja", "name":"Japanese"}, + { "code":"kea_CV", "name":"Kabuverdianu (Cape Verde)"}, + { "code":"kea", "name":"Kabuverdianu"}, + { "code":"kab_DZ", "name":"Kabyle (Algeria)"}, + { "code":"kab", "name":"Kabyle"}, + { "code":"kl_GL", "name":"Kalaallisut (Greenland)"}, + { "code":"kl", "name":"Kalaallisut"}, + { "code":"kln_KE", "name":"Kalenjin (Kenya)"}, + { "code":"kln", "name":"Kalenjin"}, + { "code":"kam_KE", "name":"Kamba (Kenya)"}, + { "code":"kam", "name":"Kamba"}, + { "code":"kn_IN", "name":"Kannada (India)"}, + { "code":"kn", "name":"Kannada"}, + { "code":"kk_Cyrl", "name":"Kazakh (Cyrillic)"}, + { "code":"kk_Cyrl_KZ", "name":"Kazakh (Cyrillic, Kazakhstan)"}, + { "code":"kk", "name":"Kazakh"}, + { "code":"km_KH", "name":"Khmer (Cambodia)"}, + { "code":"km", "name":"Khmer"}, + { "code":"ki_KE", "name":"Kikuyu (Kenya)"}, + { "code":"ki", "name":"Kikuyu"}, + { "code":"rw_RW", "name":"Kinyarwanda (Rwanda)"}, + { "code":"rw", "name":"Kinyarwanda"}, + { "code":"kok_IN", "name":"Konkani (India)"}, + { "code":"kok", "name":"Konkani"}, + { "code":"ko_KR", "name":"Korean (South Korea)"}, + { "code":"ko", "name":"Korean"}, + { "code":"khq_ML", "name":"Koyra Chiini (Mali)"}, + { "code":"khq", "name":"Koyra Chiini"}, + { "code":"ses_ML", "name":"Koyraboro Senni (Mali)"}, + { "code":"ses", "name":"Koyraboro Senni"}, + { "code":"lag_TZ", "name":"Langi (Tanzania)"}, + { "code":"lag", "name":"Langi"}, + { "code":"lv_LV", "name":"Latvian (Latvia)"}, + { "code":"lv", "name":"Latvian"}, + { "code":"lt_LT", "name":"Lithuanian (Lithuania)"}, + { "code":"lt", "name":"Lithuanian"}, + { "code":"luo_KE", "name":"Luo (Kenya)"}, + { "code":"luo", "name":"Luo"}, + { "code":"luy_KE", "name":"Luyia (Kenya)"}, + { "code":"luy", "name":"Luyia"}, + { "code":"mk_MK", "name":"Macedonian (Macedonia)"}, + { "code":"mk", "name":"Macedonian"}, + { "code":"jmc_TZ", "name":"Machame (Tanzania)"}, + { "code":"jmc", "name":"Machame"}, + { "code":"kde_TZ", "name":"Makonde (Tanzania)"}, + { "code":"kde", "name":"Makonde"}, + { "code":"mg_MG", "name":"Malagasy (Madagascar)"}, + { "code":"mg", "name":"Malagasy"}, + { "code":"ms_BN", "name":"Malay (Brunei)"}, + { "code":"ms_MY", "name":"Malay (Malaysia)"}, + { "code":"ms", "name":"Malay"}, + { "code":"ml_IN", "name":"Malayalam (India)"}, + { "code":"ml", "name":"Malayalam"}, + { "code":"mt_MT", "name":"Maltese (Malta)"}, + { "code":"mt", "name":"Maltese"}, + { "code":"gv_GB", "name":"Manx (United Kingdom)"}, + { "code":"gv", "name":"Manx"}, + { "code":"mr_IN", "name":"Marathi (India)"}, + { "code":"mr", "name":"Marathi"}, + { "code":"mas_KE", "name":"Masai (Kenya)"}, + { "code":"mas_TZ", "name":"Masai (Tanzania)"}, + { "code":"mas", "name":"Masai"}, + { "code":"mer_KE", "name":"Meru (Kenya)"}, + { "code":"mer", "name":"Meru"}, + { "code":"mfe_MU", "name":"Morisyen (Mauritius)"}, + { "code":"mfe", "name":"Morisyen"}, + { "code":"naq_NA", "name":"Nama (Namibia)"}, + { "code":"naq", "name":"Nama"}, + { "code":"ne_IN", "name":"Nepali (India)"}, + { "code":"ne_NP", "name":"Nepali (Nepal)"}, + { "code":"ne", "name":"Nepali"}, + { "code":"nd_ZW", "name":"North Ndebele (Zimbabwe)"}, + { "code":"nd", "name":"North Ndebele"}, + { "code":"nb_NO", "name":"Norwegian Bokmål (Norway)"}, + { "code":"nb", "name":"Norwegian Bokmål"}, + { "code":"nn_NO", "name":"Norwegian Nynorsk (Norway)"}, + { "code":"nn", "name":"Norwegian Nynorsk"}, + { "code":"nyn_UG", "name":"Nyankole (Uganda)"}, + { "code":"nyn", "name":"Nyankole"}, + { "code":"or_IN", "name":"Oriya (India)"}, + { "code":"or", "name":"Oriya"}, + { "code":"om_ET", "name":"Oromo (Ethiopia)"}, + { "code":"om_KE", "name":"Oromo (Kenya)"}, + { "code":"om", "name":"Oromo"}, + { "code":"ps_AF", "name":"Pashto (Afghanistan)"}, + { "code":"ps", "name":"Pashto"}, + { "code":"fa_AF", "name":"Persian (Afghanistan)"}, + { "code":"fa_IR", "name":"Persian (Iran)"}, + { "code":"fa", "name":"Persian"}, + { "code":"pl_PL", "name":"Polish (Poland)"}, + { "code":"pl", "name":"Polish"}, + { "code":"pt_BR", "name":"Portuguese (Brazil)"}, + { "code":"pt_GW", "name":"Portuguese (Guinea-Bissau)"}, + { "code":"pt_MZ", "name":"Portuguese (Mozambique)"}, + { "code":"pt_PT", "name":"Portuguese (Portugal)"}, + { "code":"pt", "name":"Portuguese"}, + { "code":"pa_Arab", "name":"Punjabi (Arabic)"}, + { "code":"pa_Arab_PK", "name":"Punjabi (Arabic, Pakistan)"}, + { "code":"pa_Guru", "name":"Punjabi (Gurmukhi)"}, + { "code":"pa_Guru_IN", "name":"Punjabi (Gurmukhi, India)"}, + { "code":"pa", "name":"Punjabi"}, + { "code":"ro_MD", "name":"Romanian (Moldova)"}, + { "code":"ro_RO", "name":"Romanian (Romania)"}, + { "code":"ro", "name":"Romanian"}, + { "code":"rm_CH", "name":"Romansh (Switzerland)"}, + { "code":"rm", "name":"Romansh"}, + { "code":"rof_TZ", "name":"Rombo (Tanzania)"}, + { "code":"rof", "name":"Rombo"}, + { "code":"ru_MD", "name":"Russian (Moldova)"}, + { "code":"ru_RU", "name":"Russian (Russia)"}, + { "code":"ru_UA", "name":"Russian (Ukraine)"}, + { "code":"ru", "name":"Russian"}, + { "code":"rwk_TZ", "name":"Rwa (Tanzania)"}, + { "code":"rwk", "name":"Rwa"}, + { "code":"saq_KE", "name":"Samburu (Kenya)"}, + { "code":"saq", "name":"Samburu"}, + { "code":"sg_CF", "name":"Sango (Central African Republic)"}, + { "code":"sg", "name":"Sango"}, + { "code":"seh_MZ", "name":"Sena (Mozambique)"}, + { "code":"seh", "name":"Sena"}, + { "code":"sr_Cyrl", "name":"Serbian (Cyrillic)"}, + { "code":"sr_Cyrl_BA", "name":"Serbian (Cyrillic, Bosnia and Herzegovina)"}, + { "code":"sr_Cyrl_ME", "name":"Serbian (Cyrillic, Montenegro)"}, + { "code":"sr_Cyrl_RS", "name":"Serbian (Cyrillic, Serbia)"}, + { "code":"sr_Latn", "name":"Serbian (Latin)"}, + { "code":"sr_Latn_BA", "name":"Serbian (Latin, Bosnia and Herzegovina)"}, + { "code":"sr_Latn_ME", "name":"Serbian (Latin, Montenegro)"}, + { "code":"sr_Latn_RS", "name":"Serbian (Latin, Serbia)"}, + { "code":"sr", "name":"Serbian"}, + { "code":"sn_ZW", "name":"Shona (Zimbabwe)"}, + { "code":"sn", "name":"Shona"}, + { "code":"ii_CN", "name":"Sichuan Yi (China)"}, + { "code":"ii", "name":"Sichuan Yi"}, + { "code":"si_LK", "name":"Sinhala (Sri Lanka)"}, + { "code":"si", "name":"Sinhala"}, + { "code":"sk_SK", "name":"Slovak (Slovakia)"}, + { "code":"sk", "name":"Slovak"}, + { "code":"sl_SI", "name":"Slovenian (Slovenia)"}, + { "code":"sl", "name":"Slovenian"}, + { "code":"xog_UG", "name":"Soga (Uganda)"}, + { "code":"xog", "name":"Soga"}, + { "code":"so_DJ", "name":"Somali (Djibouti)"}, + { "code":"so_ET", "name":"Somali (Ethiopia)"}, + { "code":"so_KE", "name":"Somali (Kenya)"}, + { "code":"so_SO", "name":"Somali (Somalia)"}, + { "code":"so", "name":"Somali"}, + { "code":"es_AR", "name":"Spanish (Argentina)"}, + { "code":"es_BO", "name":"Spanish (Bolivia)"}, + { "code":"es_CL", "name":"Spanish (Chile)"}, + { "code":"es_CO", "name":"Spanish (Colombia)"}, + { "code":"es_CR", "name":"Spanish (Costa Rica)"}, + { "code":"es_DO", "name":"Spanish (Dominican Republic)"}, + { "code":"es_EC", "name":"Spanish (Ecuador)"}, + { "code":"es_SV", "name":"Spanish (El Salvador)"}, + { "code":"es_GQ", "name":"Spanish (Equatorial Guinea)"}, + { "code":"es_GT", "name":"Spanish (Guatemala)"}, + { "code":"es_HN", "name":"Spanish (Honduras)"}, + { "code":"es_419", "name":"Spanish (Latin America)"}, + { "code":"es_MX", "name":"Spanish (Mexico)"}, + { "code":"es_NI", "name":"Spanish (Nicaragua)"}, + { "code":"es_PA", "name":"Spanish (Panama)"}, + { "code":"es_PY", "name":"Spanish (Paraguay)"}, + { "code":"es_PE", "name":"Spanish (Peru)"}, + { "code":"es_PR", "name":"Spanish (Puerto Rico)"}, + { "code":"es_ES", "name":"Spanish (Spain)"}, + { "code":"es_US", "name":"Spanish (United States)"}, + { "code":"es_UY", "name":"Spanish (Uruguay)"}, + { "code":"es_VE", "name":"Spanish (Venezuela)"}, + { "code":"es", "name":"Spanish"}, + { "code":"sw_KE", "name":"Swahili (Kenya)"}, + { "code":"sw_TZ", "name":"Swahili (Tanzania)"}, + { "code":"sw", "name":"Swahili"}, + { "code":"sv_FI", "name":"Swedish (Finland)"}, + { "code":"sv_SE", "name":"Swedish (Sweden)"}, + { "code":"sv", "name":"Swedish"}, + { "code":"gsw_CH", "name":"Swiss German (Switzerland)"}, + { "code":"gsw", "name":"Swiss German"}, + { "code":"shi_Latn", "name":"Tachelhit (Latin)"}, + { "code":"shi_Latn_MA", "name":"Tachelhit (Latin, Morocco)"}, + { "code":"shi_Tfng", "name":"Tachelhit (Tifinagh)"}, + { "code":"shi_Tfng_MA", "name":"Tachelhit (Tifinagh, Morocco)"}, + { "code":"shi", "name":"Tachelhit"}, + { "code":"dav_KE", "name":"Taita (Kenya)"}, + { "code":"dav", "name":"Taita"}, + { "code":"ta_IN", "name":"Tamil (India)"}, + { "code":"ta_LK", "name":"Tamil (Sri Lanka)"}, + { "code":"ta", "name":"Tamil"}, + { "code":"te_IN", "name":"Telugu (India)"}, + { "code":"te", "name":"Telugu"}, + { "code":"teo_KE", "name":"Teso (Kenya)"}, + { "code":"teo_UG", "name":"Teso (Uganda)"}, + { "code":"teo", "name":"Teso"}, + { "code":"th_TH", "name":"Thai (Thailand)"}, + { "code":"th", "name":"Thai"}, + { "code":"bo_CN", "name":"Tibetan (China)"}, + { "code":"bo_IN", "name":"Tibetan (India)"}, + { "code":"bo", "name":"Tibetan"}, + { "code":"ti_ER", "name":"Tigrinya (Eritrea)"}, + { "code":"ti_ET", "name":"Tigrinya (Ethiopia)"}, + { "code":"ti", "name":"Tigrinya"}, + { "code":"to_TO", "name":"Tonga (Tonga)"}, + { "code":"to", "name":"Tonga"}, + { "code":"tr_TR", "name":"Turkish (Turkey)"}, + { "code":"tr", "name":"Turkish"}, + { "code":"uk_UA", "name":"Ukrainian (Ukraine)"}, + { "code":"uk", "name":"Ukrainian"}, + { "code":"ur_IN", "name":"Urdu (India)"}, + { "code":"ur_PK", "name":"Urdu (Pakistan)"}, + { "code":"ur", "name":"Urdu"}, + { "code":"uz_Arab", "name":"Uzbek (Arabic)"}, + { "code":"uz_Arab_AF", "name":"Uzbek (Arabic, Afghanistan)"}, + { "code":"uz_Cyrl", "name":"Uzbek (Cyrillic)"}, + { "code":"uz_Cyrl_UZ", "name":"Uzbek (Cyrillic, Uzbekistan)"}, + { "code":"uz_Latn", "name":"Uzbek (Latin)"}, + { "code":"uz_Latn_UZ", "name":"Uzbek (Latin, Uzbekistan)"}, + { "code":"uz", "name":"Uzbek"}, + { "code":"vi_VN", "name":"Vietnamese (Vietnam)"}, + { "code":"vi", "name":"Vietnamese"}, + { "code":"vun_TZ", "name":"Vunjo (Tanzania)"}, + { "code":"vun", "name":"Vunjo"}, + { "code":"cy_GB", "name":"Welsh (United Kingdom)"}, + { "code":"cy", "name":"Welsh"}, + { "code":"yo_NG", "name":"Yoruba (Nigeria)"}, + { "code":"yo", "name":"Yoruba"}, + { "code":"zu_ZA", "name":"Zulu (South Africa)"}, + { "code":"zu", "name":"Zulu"} +] \ No newline at end of file -- cgit v1.2.3 From 4a9f8623b50ab0ba6a7fd411c0750a6bd5f63c14 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 7 Jul 2017 11:17:54 +0200 Subject: Fix review & tests Signed-off-by: Thomas Citharel --- .../lib/Controller/UsersController.php | 4 +- .../tests/Controller/UsersControllerTest.php | 13 +- lib/private/L10N/Factory.php | 60 +++ lib/private/L10N/locales.json | 436 +++++++++++++++++++++ lib/private/Settings/Personal/PersonalInfo.php | 13 +- lib/private/Settings/Personal/locales.json | 436 --------------------- lib/public/L10N/IFactory.php | 22 ++ .../templates/settings/personal/personal.info.php | 2 + 8 files changed, 533 insertions(+), 453 deletions(-) create mode 100644 lib/private/L10N/locales.json delete mode 100644 lib/private/Settings/Personal/locales.json (limited to 'lib/private/Settings') diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 0430226e12c..32967742bd2 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -522,7 +522,9 @@ class UsersController extends AUserData { $this->config->setUserValue($targetUser->getUID(), 'core', 'lang', $value); break; case 'locale': - // do some stuff + if (!$this->l10nFactory->localeExists($value)) { + throw new OCSException('Invalid locale', 102); + } $this->config->setUserValue($targetUser->getUID(), 'core', 'locale', $value); break; case AccountManager::PROPERTY_EMAIL: diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 114742de4f9..0de62bc0d15 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -747,6 +747,10 @@ class UsersControllerTest extends TestCase { ->expects($this->once()) ->method('getDisplayName') ->will($this->returnValue('Demo User')); + $targetUser + ->expects($this->exactly(5)) + ->method('getUID') + ->will($this->returnValue('UID')); $targetUser ->expects($this->once()) ->method('getHome') @@ -759,10 +763,6 @@ class UsersControllerTest extends TestCase { ->expects($this->once()) ->method('getBackendClassName') ->will($this->returnValue('Database')); - $targetUser - ->expects($this->exactly(5)) - ->method('getUID') - ->will($this->returnValue('UID')); $expected = [ 'id' => 'UID', @@ -780,6 +780,7 @@ class UsersControllerTest extends TestCase { 'twitter' => 'twitter', 'groups' => ['group0', 'group1', 'group2'], 'language' => 'de', + 'locale' => null, ]; $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } @@ -865,7 +866,7 @@ class UsersControllerTest extends TestCase { ->method('getBackendClassName') ->will($this->returnValue('Database')); $targetUser - ->expects($this->exactly(5)) + ->expects($this->exactly(6)) ->method('getUID') ->will($this->returnValue('UID')); $this->accountManager->expects($this->any())->method('getUser') @@ -895,6 +896,7 @@ class UsersControllerTest extends TestCase { 'twitter' => 'twitter', 'groups' => [], 'language' => 'da', + 'locale' => null, ]; $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } @@ -1050,6 +1052,7 @@ class UsersControllerTest extends TestCase { 'twitter' => 'twitter', 'groups' => [], 'language' => 'ru', + 'locale' => null, ]; $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index c84bc53f9e4..a6b91d53e4f 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -115,6 +115,10 @@ class Factory implements IFactory { $lang = $this->findLanguage($app); } + if ($locale === null || !$this->localeExists($locale)) { + $locale = $this->findLocale($app, $lang); + } + if (!isset($this->instances[$lang][$app])) { $this->instances[$lang][$app] = new L10N( $this, $app, $lang, $locale, @@ -186,6 +190,38 @@ class Factory implements IFactory { return 'en'; } + public function findLocale($app = null, $lang = null) + { + if ($this->config->getSystemValue('installed', false)) { + $userId = null !== $this->userSession->getUser() ? $this->userSession->getUser()->getUID() : null; + $userLocale = null; + if (null !== $userId) { + $userLocale = $this->config->getUserValue($userId, 'core', 'locale', null); + } + } else { + $userId = null; + $userLocale = null; + } + + if ($userLocale && $this->localeExists($userLocale)) { + return $userLocale; + } + + // If no user locale set, use lang as locale + if (null !== $lang && $this->localeExists($lang)) { + return $lang; + } + + // Default : use system default locale + $defaultLocale = $this->config->getSystemValue('default_locale', false); + if ($defaultLocale !== false && $this->localeExists($defaultLocale)) { + return $defaultLocale; + } + + // At last, return USA + return 'en_US'; + } + /** * Find all available languages for an app * @@ -237,6 +273,12 @@ class Factory implements IFactory { return $available; } + public function findAvailableLocales() + { + $localeData = file_get_contents(__DIR__ . '/locales.json'); + return json_decode($localeData, true); + } + /** * @param string|null $app App id or null for core * @param string $lang @@ -251,6 +293,24 @@ class Factory implements IFactory { return array_search($lang, $languages) !== false; } + /** + * @param string $locale + * @return bool + */ + public function localeExists($locale) { + if ($locale === 'en') { //english is always available + return true; + } + + $locales = $this->findAvailableLocales(); + + $userLocale = array_filter($locales, function($value) use ($locale) { + return $locale === $value['code']; + }); + + return !empty($userLocale); + } + /** * @param string|null $app * @return string diff --git a/lib/private/L10N/locales.json b/lib/private/L10N/locales.json new file mode 100644 index 00000000000..1098973c5ef --- /dev/null +++ b/lib/private/L10N/locales.json @@ -0,0 +1,436 @@ +[ + { "code":"af_NA", "name":"Afrikaans (Namibia)"}, + { "code":"af_ZA", "name":"Afrikaans (South Africa)"}, + { "code":"af", "name":"Afrikaans"}, + { "code":"ak_GH", "name":"Akan (Ghana)"}, + { "code":"ak", "name":"Akan"}, + { "code":"sq_AL", "name":"Albanian (Albania)"}, + { "code":"sq", "name":"Albanian"}, + { "code":"am_ET", "name":"Amharic (Ethiopia)"}, + { "code":"am", "name":"Amharic"}, + { "code":"ar_DZ", "name":"Arabic (Algeria)"}, + { "code":"ar_BH", "name":"Arabic (Bahrain)"}, + { "code":"ar_EG", "name":"Arabic (Egypt)"}, + { "code":"ar_IQ", "name":"Arabic (Iraq)"}, + { "code":"ar_JO", "name":"Arabic (Jordan)"}, + { "code":"ar_KW", "name":"Arabic (Kuwait)"}, + { "code":"ar_LB", "name":"Arabic (Lebanon)"}, + { "code":"ar_LY", "name":"Arabic (Libya)"}, + { "code":"ar_MA", "name":"Arabic (Morocco)"}, + { "code":"ar_OM", "name":"Arabic (Oman)"}, + { "code":"ar_QA", "name":"Arabic (Qatar)"}, + { "code":"ar_SA", "name":"Arabic (Saudi Arabia)"}, + { "code":"ar_SD", "name":"Arabic (Sudan)"}, + { "code":"ar_SY", "name":"Arabic (Syria)"}, + { "code":"ar_TN", "name":"Arabic (Tunisia)"}, + { "code":"ar_AE", "name":"Arabic (United Arab Emirates)"}, + { "code":"ar_YE", "name":"Arabic (Yemen)"}, + { "code":"ar", "name":"Arabic"}, + { "code":"hy_AM", "name":"Armenian (Armenia)"}, + { "code":"hy", "name":"Armenian"}, + { "code":"as_IN", "name":"Assamese (India)"}, + { "code":"as", "name":"Assamese"}, + { "code":"asa_TZ", "name":"Asu (Tanzania)"}, + { "code":"asa", "name":"Asu"}, + { "code":"az_Cyrl", "name":"Azerbaijani (Cyrillic)"}, + { "code":"az_Cyrl_AZ", "name":"Azerbaijani (Cyrillic, Azerbaijan)"}, + { "code":"az_Latn", "name":"Azerbaijani (Latin)"}, + { "code":"az_Latn_AZ", "name":"Azerbaijani (Latin, Azerbaijan)"}, + { "code":"az", "name":"Azerbaijani"}, + { "code":"bm_ML", "name":"Bambara (Mali)"}, + { "code":"bm", "name":"Bambara"}, + { "code":"eu_ES", "name":"Basque (Spain)"}, + { "code":"eu", "name":"Basque"}, + { "code":"be_BY", "name":"Belarusian (Belarus)"}, + { "code":"be", "name":"Belarusian"}, + { "code":"bem_ZM", "name":"Bemba (Zambia)"}, + { "code":"bem", "name":"Bemba"}, + { "code":"bez_TZ", "name":"Bena (Tanzania)"}, + { "code":"bez", "name":"Bena"}, + { "code":"bn_BD", "name":"Bengali (Bangladesh)"}, + { "code":"bn_IN", "name":"Bengali (India)"}, + { "code":"bn", "name":"Bengali"}, + { "code":"bs_BA", "name":"Bosnian (Bosnia and Herzegovina)"}, + { "code":"bs", "name":"Bosnian"}, + { "code":"bg_BG", "name":"Bulgarian (Bulgaria)"}, + { "code":"bg", "name":"Bulgarian"}, + { "code":"my_MM", "name":"Burmese (Myanmar [Burma])"}, + { "code":"my", "name":"Burmese"}, + { "code":"ca_ES", "name":"Catalan (Spain)"}, + { "code":"ca", "name":"Catalan"}, + { "code":"tzm_Latn", "name":"Central Morocco Tamazight (Latin)"}, + { "code":"tzm_Latn_MA", "name":"Central Morocco Tamazight (Latin, Morocco)"}, + { "code":"tzm", "name":"Central Morocco Tamazight"}, + { "code":"chr_US", "name":"Cherokee (United States)"}, + { "code":"chr", "name":"Cherokee"}, + { "code":"cgg_UG", "name":"Chiga (Uganda)"}, + { "code":"cgg", "name":"Chiga"}, + { "code":"zh_Hans", "name":"Chinese (Simplified Han)"}, + { "code":"zh_Hans_CN", "name":"Chinese (Simplified Han, China)"}, + { "code":"zh_Hans_HK", "name":"Chinese (Simplified Han, Hong Kong SAR China)"}, + { "code":"zh_Hans_MO", "name":"Chinese (Simplified Han, Macau SAR China)"}, + { "code":"zh_Hans_SG", "name":"Chinese (Simplified Han, Singapore)"}, + { "code":"zh_Hant", "name":"Chinese (Traditional Han)"}, + { "code":"zh_Hant_HK", "name":"Chinese (Traditional Han, Hong Kong SAR China)"}, + { "code":"zh_Hant_MO", "name":"Chinese (Traditional Han, Macau SAR China)"}, + { "code":"zh_Hant_TW", "name":"Chinese (Traditional Han, Taiwan)"}, + { "code":"zh", "name":"Chinese"}, + { "code":"kw_GB", "name":"Cornish (United Kingdom)"}, + { "code":"kw", "name":"Cornish"}, + { "code":"hr_HR", "name":"Croatian (Croatia)"}, + { "code":"hr", "name":"Croatian"}, + { "code":"cs_CZ", "name":"Czech (Czech Republic)"}, + { "code":"cs", "name":"Czech"}, + { "code":"da_DK", "name":"Danish (Denmark)"}, + { "code":"da", "name":"Danish"}, + { "code":"nl_BE", "name":"Dutch (Belgium)"}, + { "code":"nl_NL", "name":"Dutch (Netherlands)"}, + { "code":"nl", "name":"Dutch"}, + { "code":"ebu_KE", "name":"Embu (Kenya)"}, + { "code":"ebu", "name":"Embu"}, + { "code":"en_AS", "name":"English (American Samoa)"}, + { "code":"en_AU", "name":"English (Australia)"}, + { "code":"en_BE", "name":"English (Belgium)"}, + { "code":"en_BZ", "name":"English (Belize)"}, + { "code":"en_BW", "name":"English (Botswana)"}, + { "code":"en_CA", "name":"English (Canada)"}, + { "code":"en_GU", "name":"English (Guam)"}, + { "code":"en_HK", "name":"English (Hong Kong SAR China)"}, + { "code":"en_IN", "name":"English (India)"}, + { "code":"en_IE", "name":"English (Ireland)"}, + { "code":"en_JM", "name":"English (Jamaica)"}, + { "code":"en_MT", "name":"English (Malta)"}, + { "code":"en_MH", "name":"English (Marshall Islands)"}, + { "code":"en_MU", "name":"English (Mauritius)"}, + { "code":"en_NA", "name":"English (Namibia)"}, + { "code":"en_NZ", "name":"English (New Zealand)"}, + { "code":"en_MP", "name":"English (Northern Mariana Islands)"}, + { "code":"en_PK", "name":"English (Pakistan)"}, + { "code":"en_PH", "name":"English (Philippines)"}, + { "code":"en_SG", "name":"English (Singapore)"}, + { "code":"en_ZA", "name":"English (South Africa)"}, + { "code":"en_TT", "name":"English (Trinidad and Tobago)"}, + { "code":"en_UM", "name":"English (U.S. Minor Outlying Islands)"}, + { "code":"en_VI", "name":"English (U.S. Virgin Islands)"}, + { "code":"en_GB", "name":"English (United Kingdom)"}, + { "code":"en_US", "name":"English (United States)"}, + { "code":"en_ZW", "name":"English (Zimbabwe)"}, + { "code":"en", "name":"English"}, + { "code":"eo", "name":"Esperanto"}, + { "code":"et_EE", "name":"Estonian (Estonia)"}, + { "code":"et", "name":"Estonian"}, + { "code":"ee_GH", "name":"Ewe (Ghana)"}, + { "code":"ee_TG", "name":"Ewe (Togo)"}, + { "code":"ee", "name":"Ewe"}, + { "code":"fo_FO", "name":"Faroese (Faroe Islands)"}, + { "code":"fo", "name":"Faroese"}, + { "code":"fil_PH", "name":"Filipino (Philippines)"}, + { "code":"fil", "name":"Filipino"}, + { "code":"fi_FI", "name":"Finnish (Finland)"}, + { "code":"fi", "name":"Finnish"}, + { "code":"fr_BE", "name":"French (Belgium)"}, + { "code":"fr_BJ", "name":"French (Benin)"}, + { "code":"fr_BF", "name":"French (Burkina Faso)"}, + { "code":"fr_BI", "name":"French (Burundi)"}, + { "code":"fr_CM", "name":"French (Cameroon)"}, + { "code":"fr_CA", "name":"French (Canada)"}, + { "code":"fr_CF", "name":"French (Central African Republic)"}, + { "code":"fr_TD", "name":"French (Chad)"}, + { "code":"fr_KM", "name":"French (Comoros)"}, + { "code":"fr_CG", "name":"French (Congo - Brazzaville)"}, + { "code":"fr_CD", "name":"French (Congo - Kinshasa)"}, + { "code":"fr_CI", "name":"French (Côte d’Ivoire)"}, + { "code":"fr_DJ", "name":"French (Djibouti)"}, + { "code":"fr_GQ", "name":"French (Equatorial Guinea)"}, + { "code":"fr_FR", "name":"French (France)"}, + { "code":"fr_GA", "name":"French (Gabon)"}, + { "code":"fr_GP", "name":"French (Guadeloupe)"}, + { "code":"fr_GN", "name":"French (Guinea)"}, + { "code":"fr_LU", "name":"French (Luxembourg)"}, + { "code":"fr_MG", "name":"French (Madagascar)"}, + { "code":"fr_ML", "name":"French (Mali)"}, + { "code":"fr_MQ", "name":"French (Martinique)"}, + { "code":"fr_MC", "name":"French (Monaco)"}, + { "code":"fr_NE", "name":"French (Niger)"}, + { "code":"fr_RW", "name":"French (Rwanda)"}, + { "code":"fr_RE", "name":"French (Réunion)"}, + { "code":"fr_BL", "name":"French (Saint Barthélemy)"}, + { "code":"fr_MF", "name":"French (Saint Martin)"}, + { "code":"fr_SN", "name":"French (Senegal)"}, + { "code":"fr_CH", "name":"French (Switzerland)"}, + { "code":"fr_TG", "name":"French (Togo)"}, + { "code":"fr", "name":"French"}, + { "code":"ff_SN", "name":"Fulah (Senegal)"}, + { "code":"ff", "name":"Fulah"}, + { "code":"gl_ES", "name":"Galician (Spain)"}, + { "code":"gl", "name":"Galician"}, + { "code":"lg_UG", "name":"Ganda (Uganda)"}, + { "code":"lg", "name":"Ganda"}, + { "code":"ka_GE", "name":"Georgian (Georgia)"}, + { "code":"ka", "name":"Georgian"}, + { "code":"de_AT", "name":"German (Austria)"}, + { "code":"de_BE", "name":"German (Belgium)"}, + { "code":"de_DE", "name":"German (Germany)"}, + { "code":"de_LI", "name":"German (Liechtenstein)"}, + { "code":"de_LU", "name":"German (Luxembourg)"}, + { "code":"de_CH", "name":"German (Switzerland)"}, + { "code":"de", "name":"German"}, + { "code":"el_CY", "name":"Greek (Cyprus)"}, + { "code":"el_GR", "name":"Greek (Greece)"}, + { "code":"el", "name":"Greek"}, + { "code":"gu_IN", "name":"Gujarati (India)"}, + { "code":"gu", "name":"Gujarati"}, + { "code":"guz_KE", "name":"Gusii (Kenya)"}, + { "code":"guz", "name":"Gusii"}, + { "code":"ha_Latn", "name":"Hausa (Latin)"}, + { "code":"ha_Latn_GH", "name":"Hausa (Latin, Ghana)"}, + { "code":"ha_Latn_NE", "name":"Hausa (Latin, Niger)"}, + { "code":"ha_Latn_NG", "name":"Hausa (Latin, Nigeria)"}, + { "code":"ha", "name":"Hausa"}, + { "code":"haw_US", "name":"Hawaiian (United States)"}, + { "code":"haw", "name":"Hawaiian"}, + { "code":"he_IL", "name":"Hebrew (Israel)"}, + { "code":"he", "name":"Hebrew"}, + { "code":"hi_IN", "name":"Hindi (India)"}, + { "code":"hi", "name":"Hindi"}, + { "code":"hu_HU", "name":"Hungarian (Hungary)"}, + { "code":"hu", "name":"Hungarian"}, + { "code":"is_IS", "name":"Icelandic (Iceland)"}, + { "code":"is", "name":"Icelandic"}, + { "code":"ig_NG", "name":"Igbo (Nigeria)"}, + { "code":"ig", "name":"Igbo"}, + { "code":"id_ID", "name":"Indonesian (Indonesia)"}, + { "code":"id", "name":"Indonesian"}, + { "code":"ga_IE", "name":"Irish (Ireland)"}, + { "code":"ga", "name":"Irish"}, + { "code":"it_IT", "name":"Italian (Italy)"}, + { "code":"it_CH", "name":"Italian (Switzerland)"}, + { "code":"it", "name":"Italian"}, + { "code":"ja_JP", "name":"Japanese (Japan)"}, + { "code":"ja", "name":"Japanese"}, + { "code":"kea_CV", "name":"Kabuverdianu (Cape Verde)"}, + { "code":"kea", "name":"Kabuverdianu"}, + { "code":"kab_DZ", "name":"Kabyle (Algeria)"}, + { "code":"kab", "name":"Kabyle"}, + { "code":"kl_GL", "name":"Kalaallisut (Greenland)"}, + { "code":"kl", "name":"Kalaallisut"}, + { "code":"kln_KE", "name":"Kalenjin (Kenya)"}, + { "code":"kln", "name":"Kalenjin"}, + { "code":"kam_KE", "name":"Kamba (Kenya)"}, + { "code":"kam", "name":"Kamba"}, + { "code":"kn_IN", "name":"Kannada (India)"}, + { "code":"kn", "name":"Kannada"}, + { "code":"kk_Cyrl", "name":"Kazakh (Cyrillic)"}, + { "code":"kk_Cyrl_KZ", "name":"Kazakh (Cyrillic, Kazakhstan)"}, + { "code":"kk", "name":"Kazakh"}, + { "code":"km_KH", "name":"Khmer (Cambodia)"}, + { "code":"km", "name":"Khmer"}, + { "code":"ki_KE", "name":"Kikuyu (Kenya)"}, + { "code":"ki", "name":"Kikuyu"}, + { "code":"rw_RW", "name":"Kinyarwanda (Rwanda)"}, + { "code":"rw", "name":"Kinyarwanda"}, + { "code":"kok_IN", "name":"Konkani (India)"}, + { "code":"kok", "name":"Konkani"}, + { "code":"ko_KR", "name":"Korean (South Korea)"}, + { "code":"ko", "name":"Korean"}, + { "code":"khq_ML", "name":"Koyra Chiini (Mali)"}, + { "code":"khq", "name":"Koyra Chiini"}, + { "code":"ses_ML", "name":"Koyraboro Senni (Mali)"}, + { "code":"ses", "name":"Koyraboro Senni"}, + { "code":"lag_TZ", "name":"Langi (Tanzania)"}, + { "code":"lag", "name":"Langi"}, + { "code":"lv_LV", "name":"Latvian (Latvia)"}, + { "code":"lv", "name":"Latvian"}, + { "code":"lt_LT", "name":"Lithuanian (Lithuania)"}, + { "code":"lt", "name":"Lithuanian"}, + { "code":"luo_KE", "name":"Luo (Kenya)"}, + { "code":"luo", "name":"Luo"}, + { "code":"luy_KE", "name":"Luyia (Kenya)"}, + { "code":"luy", "name":"Luyia"}, + { "code":"mk_MK", "name":"Macedonian (Macedonia)"}, + { "code":"mk", "name":"Macedonian"}, + { "code":"jmc_TZ", "name":"Machame (Tanzania)"}, + { "code":"jmc", "name":"Machame"}, + { "code":"kde_TZ", "name":"Makonde (Tanzania)"}, + { "code":"kde", "name":"Makonde"}, + { "code":"mg_MG", "name":"Malagasy (Madagascar)"}, + { "code":"mg", "name":"Malagasy"}, + { "code":"ms_BN", "name":"Malay (Brunei)"}, + { "code":"ms_MY", "name":"Malay (Malaysia)"}, + { "code":"ms", "name":"Malay"}, + { "code":"ml_IN", "name":"Malayalam (India)"}, + { "code":"ml", "name":"Malayalam"}, + { "code":"mt_MT", "name":"Maltese (Malta)"}, + { "code":"mt", "name":"Maltese"}, + { "code":"gv_GB", "name":"Manx (United Kingdom)"}, + { "code":"gv", "name":"Manx"}, + { "code":"mr_IN", "name":"Marathi (India)"}, + { "code":"mr", "name":"Marathi"}, + { "code":"mas_KE", "name":"Masai (Kenya)"}, + { "code":"mas_TZ", "name":"Masai (Tanzania)"}, + { "code":"mas", "name":"Masai"}, + { "code":"mer_KE", "name":"Meru (Kenya)"}, + { "code":"mer", "name":"Meru"}, + { "code":"mfe_MU", "name":"Morisyen (Mauritius)"}, + { "code":"mfe", "name":"Morisyen"}, + { "code":"naq_NA", "name":"Nama (Namibia)"}, + { "code":"naq", "name":"Nama"}, + { "code":"ne_IN", "name":"Nepali (India)"}, + { "code":"ne_NP", "name":"Nepali (Nepal)"}, + { "code":"ne", "name":"Nepali"}, + { "code":"nd_ZW", "name":"North Ndebele (Zimbabwe)"}, + { "code":"nd", "name":"North Ndebele"}, + { "code":"nb_NO", "name":"Norwegian Bokmål (Norway)"}, + { "code":"nb", "name":"Norwegian Bokmål"}, + { "code":"nn_NO", "name":"Norwegian Nynorsk (Norway)"}, + { "code":"nn", "name":"Norwegian Nynorsk"}, + { "code":"nyn_UG", "name":"Nyankole (Uganda)"}, + { "code":"nyn", "name":"Nyankole"}, + { "code":"or_IN", "name":"Oriya (India)"}, + { "code":"or", "name":"Oriya"}, + { "code":"om_ET", "name":"Oromo (Ethiopia)"}, + { "code":"om_KE", "name":"Oromo (Kenya)"}, + { "code":"om", "name":"Oromo"}, + { "code":"ps_AF", "name":"Pashto (Afghanistan)"}, + { "code":"ps", "name":"Pashto"}, + { "code":"fa_AF", "name":"Persian (Afghanistan)"}, + { "code":"fa_IR", "name":"Persian (Iran)"}, + { "code":"fa", "name":"Persian"}, + { "code":"pl_PL", "name":"Polish (Poland)"}, + { "code":"pl", "name":"Polish"}, + { "code":"pt_BR", "name":"Portuguese (Brazil)"}, + { "code":"pt_GW", "name":"Portuguese (Guinea-Bissau)"}, + { "code":"pt_MZ", "name":"Portuguese (Mozambique)"}, + { "code":"pt_PT", "name":"Portuguese (Portugal)"}, + { "code":"pt", "name":"Portuguese"}, + { "code":"pa_Arab", "name":"Punjabi (Arabic)"}, + { "code":"pa_Arab_PK", "name":"Punjabi (Arabic, Pakistan)"}, + { "code":"pa_Guru", "name":"Punjabi (Gurmukhi)"}, + { "code":"pa_Guru_IN", "name":"Punjabi (Gurmukhi, India)"}, + { "code":"pa", "name":"Punjabi"}, + { "code":"ro_MD", "name":"Romanian (Moldova)"}, + { "code":"ro_RO", "name":"Romanian (Romania)"}, + { "code":"ro", "name":"Romanian"}, + { "code":"rm_CH", "name":"Romansh (Switzerland)"}, + { "code":"rm", "name":"Romansh"}, + { "code":"rof_TZ", "name":"Rombo (Tanzania)"}, + { "code":"rof", "name":"Rombo"}, + { "code":"ru_MD", "name":"Russian (Moldova)"}, + { "code":"ru_RU", "name":"Russian (Russia)"}, + { "code":"ru_UA", "name":"Russian (Ukraine)"}, + { "code":"ru", "name":"Russian"}, + { "code":"rwk_TZ", "name":"Rwa (Tanzania)"}, + { "code":"rwk", "name":"Rwa"}, + { "code":"saq_KE", "name":"Samburu (Kenya)"}, + { "code":"saq", "name":"Samburu"}, + { "code":"sg_CF", "name":"Sango (Central African Republic)"}, + { "code":"sg", "name":"Sango"}, + { "code":"seh_MZ", "name":"Sena (Mozambique)"}, + { "code":"seh", "name":"Sena"}, + { "code":"sr_Cyrl", "name":"Serbian (Cyrillic)"}, + { "code":"sr_Cyrl_BA", "name":"Serbian (Cyrillic, Bosnia and Herzegovina)"}, + { "code":"sr_Cyrl_ME", "name":"Serbian (Cyrillic, Montenegro)"}, + { "code":"sr_Cyrl_RS", "name":"Serbian (Cyrillic, Serbia)"}, + { "code":"sr_Latn", "name":"Serbian (Latin)"}, + { "code":"sr_Latn_BA", "name":"Serbian (Latin, Bosnia and Herzegovina)"}, + { "code":"sr_Latn_ME", "name":"Serbian (Latin, Montenegro)"}, + { "code":"sr_Latn_RS", "name":"Serbian (Latin, Serbia)"}, + { "code":"sr", "name":"Serbian"}, + { "code":"sn_ZW", "name":"Shona (Zimbabwe)"}, + { "code":"sn", "name":"Shona"}, + { "code":"ii_CN", "name":"Sichuan Yi (China)"}, + { "code":"ii", "name":"Sichuan Yi"}, + { "code":"si_LK", "name":"Sinhala (Sri Lanka)"}, + { "code":"si", "name":"Sinhala"}, + { "code":"sk_SK", "name":"Slovak (Slovakia)"}, + { "code":"sk", "name":"Slovak"}, + { "code":"sl_SI", "name":"Slovenian (Slovenia)"}, + { "code":"sl", "name":"Slovenian"}, + { "code":"xog_UG", "name":"Soga (Uganda)"}, + { "code":"xog", "name":"Soga"}, + { "code":"so_DJ", "name":"Somali (Djibouti)"}, + { "code":"so_ET", "name":"Somali (Ethiopia)"}, + { "code":"so_KE", "name":"Somali (Kenya)"}, + { "code":"so_SO", "name":"Somali (Somalia)"}, + { "code":"so", "name":"Somali"}, + { "code":"es_AR", "name":"Spanish (Argentina)"}, + { "code":"es_BO", "name":"Spanish (Bolivia)"}, + { "code":"es_CL", "name":"Spanish (Chile)"}, + { "code":"es_CO", "name":"Spanish (Colombia)"}, + { "code":"es_CR", "name":"Spanish (Costa Rica)"}, + { "code":"es_DO", "name":"Spanish (Dominican Republic)"}, + { "code":"es_EC", "name":"Spanish (Ecuador)"}, + { "code":"es_SV", "name":"Spanish (El Salvador)"}, + { "code":"es_GQ", "name":"Spanish (Equatorial Guinea)"}, + { "code":"es_GT", "name":"Spanish (Guatemala)"}, + { "code":"es_HN", "name":"Spanish (Honduras)"}, + { "code":"es_419", "name":"Spanish (Latin America)"}, + { "code":"es_MX", "name":"Spanish (Mexico)"}, + { "code":"es_NI", "name":"Spanish (Nicaragua)"}, + { "code":"es_PA", "name":"Spanish (Panama)"}, + { "code":"es_PY", "name":"Spanish (Paraguay)"}, + { "code":"es_PE", "name":"Spanish (Peru)"}, + { "code":"es_PR", "name":"Spanish (Puerto Rico)"}, + { "code":"es_ES", "name":"Spanish (Spain)"}, + { "code":"es_US", "name":"Spanish (United States)"}, + { "code":"es_UY", "name":"Spanish (Uruguay)"}, + { "code":"es_VE", "name":"Spanish (Venezuela)"}, + { "code":"es", "name":"Spanish"}, + { "code":"sw_KE", "name":"Swahili (Kenya)"}, + { "code":"sw_TZ", "name":"Swahili (Tanzania)"}, + { "code":"sw", "name":"Swahili"}, + { "code":"sv_FI", "name":"Swedish (Finland)"}, + { "code":"sv_SE", "name":"Swedish (Sweden)"}, + { "code":"sv", "name":"Swedish"}, + { "code":"gsw_CH", "name":"Swiss German (Switzerland)"}, + { "code":"gsw", "name":"Swiss German"}, + { "code":"shi_Latn", "name":"Tachelhit (Latin)"}, + { "code":"shi_Latn_MA", "name":"Tachelhit (Latin, Morocco)"}, + { "code":"shi_Tfng", "name":"Tachelhit (Tifinagh)"}, + { "code":"shi_Tfng_MA", "name":"Tachelhit (Tifinagh, Morocco)"}, + { "code":"shi", "name":"Tachelhit"}, + { "code":"dav_KE", "name":"Taita (Kenya)"}, + { "code":"dav", "name":"Taita"}, + { "code":"ta_IN", "name":"Tamil (India)"}, + { "code":"ta_LK", "name":"Tamil (Sri Lanka)"}, + { "code":"ta", "name":"Tamil"}, + { "code":"te_IN", "name":"Telugu (India)"}, + { "code":"te", "name":"Telugu"}, + { "code":"teo_KE", "name":"Teso (Kenya)"}, + { "code":"teo_UG", "name":"Teso (Uganda)"}, + { "code":"teo", "name":"Teso"}, + { "code":"th_TH", "name":"Thai (Thailand)"}, + { "code":"th", "name":"Thai"}, + { "code":"bo_CN", "name":"Tibetan (China)"}, + { "code":"bo_IN", "name":"Tibetan (India)"}, + { "code":"bo", "name":"Tibetan"}, + { "code":"ti_ER", "name":"Tigrinya (Eritrea)"}, + { "code":"ti_ET", "name":"Tigrinya (Ethiopia)"}, + { "code":"ti", "name":"Tigrinya"}, + { "code":"to_TO", "name":"Tonga (Tonga)"}, + { "code":"to", "name":"Tonga"}, + { "code":"tr_TR", "name":"Turkish (Turkey)"}, + { "code":"tr", "name":"Turkish"}, + { "code":"uk_UA", "name":"Ukrainian (Ukraine)"}, + { "code":"uk", "name":"Ukrainian"}, + { "code":"ur_IN", "name":"Urdu (India)"}, + { "code":"ur_PK", "name":"Urdu (Pakistan)"}, + { "code":"ur", "name":"Urdu"}, + { "code":"uz_Arab", "name":"Uzbek (Arabic)"}, + { "code":"uz_Arab_AF", "name":"Uzbek (Arabic, Afghanistan)"}, + { "code":"uz_Cyrl", "name":"Uzbek (Cyrillic)"}, + { "code":"uz_Cyrl_UZ", "name":"Uzbek (Cyrillic, Uzbekistan)"}, + { "code":"uz_Latn", "name":"Uzbek (Latin)"}, + { "code":"uz_Latn_UZ", "name":"Uzbek (Latin, Uzbekistan)"}, + { "code":"uz", "name":"Uzbek"}, + { "code":"vi_VN", "name":"Vietnamese (Vietnam)"}, + { "code":"vi", "name":"Vietnamese"}, + { "code":"vun_TZ", "name":"Vunjo (Tanzania)"}, + { "code":"vun", "name":"Vunjo"}, + { "code":"cy_GB", "name":"Welsh (United Kingdom)"}, + { "code":"cy", "name":"Welsh"}, + { "code":"yo_NG", "name":"Yoruba (Nigeria)"}, + { "code":"yo", "name":"Yoruba"}, + { "code":"zu_ZA", "name":"Zulu (South Africa)"}, + { "code":"zu", "name":"Zulu"} +] \ No newline at end of file diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php index f6fb9d48d99..267be2878d0 100644 --- a/lib/private/Settings/Personal/PersonalInfo.php +++ b/lib/private/Settings/Personal/PersonalInfo.php @@ -232,14 +232,13 @@ class PersonalInfo implements ISettings { $userLang = $this->config->getUserValue($uid, 'core', 'lang', $this->l10nFactory->findLanguage()); - $localeData = file_get_contents(__DIR__ . '/locales.json'); - $localeCodes = json_decode($localeData, true); + $localeCodes = $this->l10nFactory->findAvailableLocales(); $userLocale = array_filter($localeCodes, function($value) use ($userLocaleString) { return $userLocaleString === $value['code']; }); - if (count($userLocale) > 0) + if (!empty($userLocale)) { $userLocale = reset($userLocale); } @@ -248,14 +247,6 @@ class PersonalInfo implements ISettings { return 0 === strpos($localeCode['code'], $userLang); }); - /*$localesForLanguage = []; - - foreach (array_keys($localeCodes) as $localeCode) { - if (0 === strpos($localeCode, $userLang)) { - $localesForLanguage[] = $localeCode; - } - }*/ - return [ 'activelocaleLang' => $userLocaleString, 'activelocale' => $userLocale, diff --git a/lib/private/Settings/Personal/locales.json b/lib/private/Settings/Personal/locales.json deleted file mode 100644 index 1098973c5ef..00000000000 --- a/lib/private/Settings/Personal/locales.json +++ /dev/null @@ -1,436 +0,0 @@ -[ - { "code":"af_NA", "name":"Afrikaans (Namibia)"}, - { "code":"af_ZA", "name":"Afrikaans (South Africa)"}, - { "code":"af", "name":"Afrikaans"}, - { "code":"ak_GH", "name":"Akan (Ghana)"}, - { "code":"ak", "name":"Akan"}, - { "code":"sq_AL", "name":"Albanian (Albania)"}, - { "code":"sq", "name":"Albanian"}, - { "code":"am_ET", "name":"Amharic (Ethiopia)"}, - { "code":"am", "name":"Amharic"}, - { "code":"ar_DZ", "name":"Arabic (Algeria)"}, - { "code":"ar_BH", "name":"Arabic (Bahrain)"}, - { "code":"ar_EG", "name":"Arabic (Egypt)"}, - { "code":"ar_IQ", "name":"Arabic (Iraq)"}, - { "code":"ar_JO", "name":"Arabic (Jordan)"}, - { "code":"ar_KW", "name":"Arabic (Kuwait)"}, - { "code":"ar_LB", "name":"Arabic (Lebanon)"}, - { "code":"ar_LY", "name":"Arabic (Libya)"}, - { "code":"ar_MA", "name":"Arabic (Morocco)"}, - { "code":"ar_OM", "name":"Arabic (Oman)"}, - { "code":"ar_QA", "name":"Arabic (Qatar)"}, - { "code":"ar_SA", "name":"Arabic (Saudi Arabia)"}, - { "code":"ar_SD", "name":"Arabic (Sudan)"}, - { "code":"ar_SY", "name":"Arabic (Syria)"}, - { "code":"ar_TN", "name":"Arabic (Tunisia)"}, - { "code":"ar_AE", "name":"Arabic (United Arab Emirates)"}, - { "code":"ar_YE", "name":"Arabic (Yemen)"}, - { "code":"ar", "name":"Arabic"}, - { "code":"hy_AM", "name":"Armenian (Armenia)"}, - { "code":"hy", "name":"Armenian"}, - { "code":"as_IN", "name":"Assamese (India)"}, - { "code":"as", "name":"Assamese"}, - { "code":"asa_TZ", "name":"Asu (Tanzania)"}, - { "code":"asa", "name":"Asu"}, - { "code":"az_Cyrl", "name":"Azerbaijani (Cyrillic)"}, - { "code":"az_Cyrl_AZ", "name":"Azerbaijani (Cyrillic, Azerbaijan)"}, - { "code":"az_Latn", "name":"Azerbaijani (Latin)"}, - { "code":"az_Latn_AZ", "name":"Azerbaijani (Latin, Azerbaijan)"}, - { "code":"az", "name":"Azerbaijani"}, - { "code":"bm_ML", "name":"Bambara (Mali)"}, - { "code":"bm", "name":"Bambara"}, - { "code":"eu_ES", "name":"Basque (Spain)"}, - { "code":"eu", "name":"Basque"}, - { "code":"be_BY", "name":"Belarusian (Belarus)"}, - { "code":"be", "name":"Belarusian"}, - { "code":"bem_ZM", "name":"Bemba (Zambia)"}, - { "code":"bem", "name":"Bemba"}, - { "code":"bez_TZ", "name":"Bena (Tanzania)"}, - { "code":"bez", "name":"Bena"}, - { "code":"bn_BD", "name":"Bengali (Bangladesh)"}, - { "code":"bn_IN", "name":"Bengali (India)"}, - { "code":"bn", "name":"Bengali"}, - { "code":"bs_BA", "name":"Bosnian (Bosnia and Herzegovina)"}, - { "code":"bs", "name":"Bosnian"}, - { "code":"bg_BG", "name":"Bulgarian (Bulgaria)"}, - { "code":"bg", "name":"Bulgarian"}, - { "code":"my_MM", "name":"Burmese (Myanmar [Burma])"}, - { "code":"my", "name":"Burmese"}, - { "code":"ca_ES", "name":"Catalan (Spain)"}, - { "code":"ca", "name":"Catalan"}, - { "code":"tzm_Latn", "name":"Central Morocco Tamazight (Latin)"}, - { "code":"tzm_Latn_MA", "name":"Central Morocco Tamazight (Latin, Morocco)"}, - { "code":"tzm", "name":"Central Morocco Tamazight"}, - { "code":"chr_US", "name":"Cherokee (United States)"}, - { "code":"chr", "name":"Cherokee"}, - { "code":"cgg_UG", "name":"Chiga (Uganda)"}, - { "code":"cgg", "name":"Chiga"}, - { "code":"zh_Hans", "name":"Chinese (Simplified Han)"}, - { "code":"zh_Hans_CN", "name":"Chinese (Simplified Han, China)"}, - { "code":"zh_Hans_HK", "name":"Chinese (Simplified Han, Hong Kong SAR China)"}, - { "code":"zh_Hans_MO", "name":"Chinese (Simplified Han, Macau SAR China)"}, - { "code":"zh_Hans_SG", "name":"Chinese (Simplified Han, Singapore)"}, - { "code":"zh_Hant", "name":"Chinese (Traditional Han)"}, - { "code":"zh_Hant_HK", "name":"Chinese (Traditional Han, Hong Kong SAR China)"}, - { "code":"zh_Hant_MO", "name":"Chinese (Traditional Han, Macau SAR China)"}, - { "code":"zh_Hant_TW", "name":"Chinese (Traditional Han, Taiwan)"}, - { "code":"zh", "name":"Chinese"}, - { "code":"kw_GB", "name":"Cornish (United Kingdom)"}, - { "code":"kw", "name":"Cornish"}, - { "code":"hr_HR", "name":"Croatian (Croatia)"}, - { "code":"hr", "name":"Croatian"}, - { "code":"cs_CZ", "name":"Czech (Czech Republic)"}, - { "code":"cs", "name":"Czech"}, - { "code":"da_DK", "name":"Danish (Denmark)"}, - { "code":"da", "name":"Danish"}, - { "code":"nl_BE", "name":"Dutch (Belgium)"}, - { "code":"nl_NL", "name":"Dutch (Netherlands)"}, - { "code":"nl", "name":"Dutch"}, - { "code":"ebu_KE", "name":"Embu (Kenya)"}, - { "code":"ebu", "name":"Embu"}, - { "code":"en_AS", "name":"English (American Samoa)"}, - { "code":"en_AU", "name":"English (Australia)"}, - { "code":"en_BE", "name":"English (Belgium)"}, - { "code":"en_BZ", "name":"English (Belize)"}, - { "code":"en_BW", "name":"English (Botswana)"}, - { "code":"en_CA", "name":"English (Canada)"}, - { "code":"en_GU", "name":"English (Guam)"}, - { "code":"en_HK", "name":"English (Hong Kong SAR China)"}, - { "code":"en_IN", "name":"English (India)"}, - { "code":"en_IE", "name":"English (Ireland)"}, - { "code":"en_JM", "name":"English (Jamaica)"}, - { "code":"en_MT", "name":"English (Malta)"}, - { "code":"en_MH", "name":"English (Marshall Islands)"}, - { "code":"en_MU", "name":"English (Mauritius)"}, - { "code":"en_NA", "name":"English (Namibia)"}, - { "code":"en_NZ", "name":"English (New Zealand)"}, - { "code":"en_MP", "name":"English (Northern Mariana Islands)"}, - { "code":"en_PK", "name":"English (Pakistan)"}, - { "code":"en_PH", "name":"English (Philippines)"}, - { "code":"en_SG", "name":"English (Singapore)"}, - { "code":"en_ZA", "name":"English (South Africa)"}, - { "code":"en_TT", "name":"English (Trinidad and Tobago)"}, - { "code":"en_UM", "name":"English (U.S. Minor Outlying Islands)"}, - { "code":"en_VI", "name":"English (U.S. Virgin Islands)"}, - { "code":"en_GB", "name":"English (United Kingdom)"}, - { "code":"en_US", "name":"English (United States)"}, - { "code":"en_ZW", "name":"English (Zimbabwe)"}, - { "code":"en", "name":"English"}, - { "code":"eo", "name":"Esperanto"}, - { "code":"et_EE", "name":"Estonian (Estonia)"}, - { "code":"et", "name":"Estonian"}, - { "code":"ee_GH", "name":"Ewe (Ghana)"}, - { "code":"ee_TG", "name":"Ewe (Togo)"}, - { "code":"ee", "name":"Ewe"}, - { "code":"fo_FO", "name":"Faroese (Faroe Islands)"}, - { "code":"fo", "name":"Faroese"}, - { "code":"fil_PH", "name":"Filipino (Philippines)"}, - { "code":"fil", "name":"Filipino"}, - { "code":"fi_FI", "name":"Finnish (Finland)"}, - { "code":"fi", "name":"Finnish"}, - { "code":"fr_BE", "name":"French (Belgium)"}, - { "code":"fr_BJ", "name":"French (Benin)"}, - { "code":"fr_BF", "name":"French (Burkina Faso)"}, - { "code":"fr_BI", "name":"French (Burundi)"}, - { "code":"fr_CM", "name":"French (Cameroon)"}, - { "code":"fr_CA", "name":"French (Canada)"}, - { "code":"fr_CF", "name":"French (Central African Republic)"}, - { "code":"fr_TD", "name":"French (Chad)"}, - { "code":"fr_KM", "name":"French (Comoros)"}, - { "code":"fr_CG", "name":"French (Congo - Brazzaville)"}, - { "code":"fr_CD", "name":"French (Congo - Kinshasa)"}, - { "code":"fr_CI", "name":"French (Côte d’Ivoire)"}, - { "code":"fr_DJ", "name":"French (Djibouti)"}, - { "code":"fr_GQ", "name":"French (Equatorial Guinea)"}, - { "code":"fr_FR", "name":"French (France)"}, - { "code":"fr_GA", "name":"French (Gabon)"}, - { "code":"fr_GP", "name":"French (Guadeloupe)"}, - { "code":"fr_GN", "name":"French (Guinea)"}, - { "code":"fr_LU", "name":"French (Luxembourg)"}, - { "code":"fr_MG", "name":"French (Madagascar)"}, - { "code":"fr_ML", "name":"French (Mali)"}, - { "code":"fr_MQ", "name":"French (Martinique)"}, - { "code":"fr_MC", "name":"French (Monaco)"}, - { "code":"fr_NE", "name":"French (Niger)"}, - { "code":"fr_RW", "name":"French (Rwanda)"}, - { "code":"fr_RE", "name":"French (Réunion)"}, - { "code":"fr_BL", "name":"French (Saint Barthélemy)"}, - { "code":"fr_MF", "name":"French (Saint Martin)"}, - { "code":"fr_SN", "name":"French (Senegal)"}, - { "code":"fr_CH", "name":"French (Switzerland)"}, - { "code":"fr_TG", "name":"French (Togo)"}, - { "code":"fr", "name":"French"}, - { "code":"ff_SN", "name":"Fulah (Senegal)"}, - { "code":"ff", "name":"Fulah"}, - { "code":"gl_ES", "name":"Galician (Spain)"}, - { "code":"gl", "name":"Galician"}, - { "code":"lg_UG", "name":"Ganda (Uganda)"}, - { "code":"lg", "name":"Ganda"}, - { "code":"ka_GE", "name":"Georgian (Georgia)"}, - { "code":"ka", "name":"Georgian"}, - { "code":"de_AT", "name":"German (Austria)"}, - { "code":"de_BE", "name":"German (Belgium)"}, - { "code":"de_DE", "name":"German (Germany)"}, - { "code":"de_LI", "name":"German (Liechtenstein)"}, - { "code":"de_LU", "name":"German (Luxembourg)"}, - { "code":"de_CH", "name":"German (Switzerland)"}, - { "code":"de", "name":"German"}, - { "code":"el_CY", "name":"Greek (Cyprus)"}, - { "code":"el_GR", "name":"Greek (Greece)"}, - { "code":"el", "name":"Greek"}, - { "code":"gu_IN", "name":"Gujarati (India)"}, - { "code":"gu", "name":"Gujarati"}, - { "code":"guz_KE", "name":"Gusii (Kenya)"}, - { "code":"guz", "name":"Gusii"}, - { "code":"ha_Latn", "name":"Hausa (Latin)"}, - { "code":"ha_Latn_GH", "name":"Hausa (Latin, Ghana)"}, - { "code":"ha_Latn_NE", "name":"Hausa (Latin, Niger)"}, - { "code":"ha_Latn_NG", "name":"Hausa (Latin, Nigeria)"}, - { "code":"ha", "name":"Hausa"}, - { "code":"haw_US", "name":"Hawaiian (United States)"}, - { "code":"haw", "name":"Hawaiian"}, - { "code":"he_IL", "name":"Hebrew (Israel)"}, - { "code":"he", "name":"Hebrew"}, - { "code":"hi_IN", "name":"Hindi (India)"}, - { "code":"hi", "name":"Hindi"}, - { "code":"hu_HU", "name":"Hungarian (Hungary)"}, - { "code":"hu", "name":"Hungarian"}, - { "code":"is_IS", "name":"Icelandic (Iceland)"}, - { "code":"is", "name":"Icelandic"}, - { "code":"ig_NG", "name":"Igbo (Nigeria)"}, - { "code":"ig", "name":"Igbo"}, - { "code":"id_ID", "name":"Indonesian (Indonesia)"}, - { "code":"id", "name":"Indonesian"}, - { "code":"ga_IE", "name":"Irish (Ireland)"}, - { "code":"ga", "name":"Irish"}, - { "code":"it_IT", "name":"Italian (Italy)"}, - { "code":"it_CH", "name":"Italian (Switzerland)"}, - { "code":"it", "name":"Italian"}, - { "code":"ja_JP", "name":"Japanese (Japan)"}, - { "code":"ja", "name":"Japanese"}, - { "code":"kea_CV", "name":"Kabuverdianu (Cape Verde)"}, - { "code":"kea", "name":"Kabuverdianu"}, - { "code":"kab_DZ", "name":"Kabyle (Algeria)"}, - { "code":"kab", "name":"Kabyle"}, - { "code":"kl_GL", "name":"Kalaallisut (Greenland)"}, - { "code":"kl", "name":"Kalaallisut"}, - { "code":"kln_KE", "name":"Kalenjin (Kenya)"}, - { "code":"kln", "name":"Kalenjin"}, - { "code":"kam_KE", "name":"Kamba (Kenya)"}, - { "code":"kam", "name":"Kamba"}, - { "code":"kn_IN", "name":"Kannada (India)"}, - { "code":"kn", "name":"Kannada"}, - { "code":"kk_Cyrl", "name":"Kazakh (Cyrillic)"}, - { "code":"kk_Cyrl_KZ", "name":"Kazakh (Cyrillic, Kazakhstan)"}, - { "code":"kk", "name":"Kazakh"}, - { "code":"km_KH", "name":"Khmer (Cambodia)"}, - { "code":"km", "name":"Khmer"}, - { "code":"ki_KE", "name":"Kikuyu (Kenya)"}, - { "code":"ki", "name":"Kikuyu"}, - { "code":"rw_RW", "name":"Kinyarwanda (Rwanda)"}, - { "code":"rw", "name":"Kinyarwanda"}, - { "code":"kok_IN", "name":"Konkani (India)"}, - { "code":"kok", "name":"Konkani"}, - { "code":"ko_KR", "name":"Korean (South Korea)"}, - { "code":"ko", "name":"Korean"}, - { "code":"khq_ML", "name":"Koyra Chiini (Mali)"}, - { "code":"khq", "name":"Koyra Chiini"}, - { "code":"ses_ML", "name":"Koyraboro Senni (Mali)"}, - { "code":"ses", "name":"Koyraboro Senni"}, - { "code":"lag_TZ", "name":"Langi (Tanzania)"}, - { "code":"lag", "name":"Langi"}, - { "code":"lv_LV", "name":"Latvian (Latvia)"}, - { "code":"lv", "name":"Latvian"}, - { "code":"lt_LT", "name":"Lithuanian (Lithuania)"}, - { "code":"lt", "name":"Lithuanian"}, - { "code":"luo_KE", "name":"Luo (Kenya)"}, - { "code":"luo", "name":"Luo"}, - { "code":"luy_KE", "name":"Luyia (Kenya)"}, - { "code":"luy", "name":"Luyia"}, - { "code":"mk_MK", "name":"Macedonian (Macedonia)"}, - { "code":"mk", "name":"Macedonian"}, - { "code":"jmc_TZ", "name":"Machame (Tanzania)"}, - { "code":"jmc", "name":"Machame"}, - { "code":"kde_TZ", "name":"Makonde (Tanzania)"}, - { "code":"kde", "name":"Makonde"}, - { "code":"mg_MG", "name":"Malagasy (Madagascar)"}, - { "code":"mg", "name":"Malagasy"}, - { "code":"ms_BN", "name":"Malay (Brunei)"}, - { "code":"ms_MY", "name":"Malay (Malaysia)"}, - { "code":"ms", "name":"Malay"}, - { "code":"ml_IN", "name":"Malayalam (India)"}, - { "code":"ml", "name":"Malayalam"}, - { "code":"mt_MT", "name":"Maltese (Malta)"}, - { "code":"mt", "name":"Maltese"}, - { "code":"gv_GB", "name":"Manx (United Kingdom)"}, - { "code":"gv", "name":"Manx"}, - { "code":"mr_IN", "name":"Marathi (India)"}, - { "code":"mr", "name":"Marathi"}, - { "code":"mas_KE", "name":"Masai (Kenya)"}, - { "code":"mas_TZ", "name":"Masai (Tanzania)"}, - { "code":"mas", "name":"Masai"}, - { "code":"mer_KE", "name":"Meru (Kenya)"}, - { "code":"mer", "name":"Meru"}, - { "code":"mfe_MU", "name":"Morisyen (Mauritius)"}, - { "code":"mfe", "name":"Morisyen"}, - { "code":"naq_NA", "name":"Nama (Namibia)"}, - { "code":"naq", "name":"Nama"}, - { "code":"ne_IN", "name":"Nepali (India)"}, - { "code":"ne_NP", "name":"Nepali (Nepal)"}, - { "code":"ne", "name":"Nepali"}, - { "code":"nd_ZW", "name":"North Ndebele (Zimbabwe)"}, - { "code":"nd", "name":"North Ndebele"}, - { "code":"nb_NO", "name":"Norwegian Bokmål (Norway)"}, - { "code":"nb", "name":"Norwegian Bokmål"}, - { "code":"nn_NO", "name":"Norwegian Nynorsk (Norway)"}, - { "code":"nn", "name":"Norwegian Nynorsk"}, - { "code":"nyn_UG", "name":"Nyankole (Uganda)"}, - { "code":"nyn", "name":"Nyankole"}, - { "code":"or_IN", "name":"Oriya (India)"}, - { "code":"or", "name":"Oriya"}, - { "code":"om_ET", "name":"Oromo (Ethiopia)"}, - { "code":"om_KE", "name":"Oromo (Kenya)"}, - { "code":"om", "name":"Oromo"}, - { "code":"ps_AF", "name":"Pashto (Afghanistan)"}, - { "code":"ps", "name":"Pashto"}, - { "code":"fa_AF", "name":"Persian (Afghanistan)"}, - { "code":"fa_IR", "name":"Persian (Iran)"}, - { "code":"fa", "name":"Persian"}, - { "code":"pl_PL", "name":"Polish (Poland)"}, - { "code":"pl", "name":"Polish"}, - { "code":"pt_BR", "name":"Portuguese (Brazil)"}, - { "code":"pt_GW", "name":"Portuguese (Guinea-Bissau)"}, - { "code":"pt_MZ", "name":"Portuguese (Mozambique)"}, - { "code":"pt_PT", "name":"Portuguese (Portugal)"}, - { "code":"pt", "name":"Portuguese"}, - { "code":"pa_Arab", "name":"Punjabi (Arabic)"}, - { "code":"pa_Arab_PK", "name":"Punjabi (Arabic, Pakistan)"}, - { "code":"pa_Guru", "name":"Punjabi (Gurmukhi)"}, - { "code":"pa_Guru_IN", "name":"Punjabi (Gurmukhi, India)"}, - { "code":"pa", "name":"Punjabi"}, - { "code":"ro_MD", "name":"Romanian (Moldova)"}, - { "code":"ro_RO", "name":"Romanian (Romania)"}, - { "code":"ro", "name":"Romanian"}, - { "code":"rm_CH", "name":"Romansh (Switzerland)"}, - { "code":"rm", "name":"Romansh"}, - { "code":"rof_TZ", "name":"Rombo (Tanzania)"}, - { "code":"rof", "name":"Rombo"}, - { "code":"ru_MD", "name":"Russian (Moldova)"}, - { "code":"ru_RU", "name":"Russian (Russia)"}, - { "code":"ru_UA", "name":"Russian (Ukraine)"}, - { "code":"ru", "name":"Russian"}, - { "code":"rwk_TZ", "name":"Rwa (Tanzania)"}, - { "code":"rwk", "name":"Rwa"}, - { "code":"saq_KE", "name":"Samburu (Kenya)"}, - { "code":"saq", "name":"Samburu"}, - { "code":"sg_CF", "name":"Sango (Central African Republic)"}, - { "code":"sg", "name":"Sango"}, - { "code":"seh_MZ", "name":"Sena (Mozambique)"}, - { "code":"seh", "name":"Sena"}, - { "code":"sr_Cyrl", "name":"Serbian (Cyrillic)"}, - { "code":"sr_Cyrl_BA", "name":"Serbian (Cyrillic, Bosnia and Herzegovina)"}, - { "code":"sr_Cyrl_ME", "name":"Serbian (Cyrillic, Montenegro)"}, - { "code":"sr_Cyrl_RS", "name":"Serbian (Cyrillic, Serbia)"}, - { "code":"sr_Latn", "name":"Serbian (Latin)"}, - { "code":"sr_Latn_BA", "name":"Serbian (Latin, Bosnia and Herzegovina)"}, - { "code":"sr_Latn_ME", "name":"Serbian (Latin, Montenegro)"}, - { "code":"sr_Latn_RS", "name":"Serbian (Latin, Serbia)"}, - { "code":"sr", "name":"Serbian"}, - { "code":"sn_ZW", "name":"Shona (Zimbabwe)"}, - { "code":"sn", "name":"Shona"}, - { "code":"ii_CN", "name":"Sichuan Yi (China)"}, - { "code":"ii", "name":"Sichuan Yi"}, - { "code":"si_LK", "name":"Sinhala (Sri Lanka)"}, - { "code":"si", "name":"Sinhala"}, - { "code":"sk_SK", "name":"Slovak (Slovakia)"}, - { "code":"sk", "name":"Slovak"}, - { "code":"sl_SI", "name":"Slovenian (Slovenia)"}, - { "code":"sl", "name":"Slovenian"}, - { "code":"xog_UG", "name":"Soga (Uganda)"}, - { "code":"xog", "name":"Soga"}, - { "code":"so_DJ", "name":"Somali (Djibouti)"}, - { "code":"so_ET", "name":"Somali (Ethiopia)"}, - { "code":"so_KE", "name":"Somali (Kenya)"}, - { "code":"so_SO", "name":"Somali (Somalia)"}, - { "code":"so", "name":"Somali"}, - { "code":"es_AR", "name":"Spanish (Argentina)"}, - { "code":"es_BO", "name":"Spanish (Bolivia)"}, - { "code":"es_CL", "name":"Spanish (Chile)"}, - { "code":"es_CO", "name":"Spanish (Colombia)"}, - { "code":"es_CR", "name":"Spanish (Costa Rica)"}, - { "code":"es_DO", "name":"Spanish (Dominican Republic)"}, - { "code":"es_EC", "name":"Spanish (Ecuador)"}, - { "code":"es_SV", "name":"Spanish (El Salvador)"}, - { "code":"es_GQ", "name":"Spanish (Equatorial Guinea)"}, - { "code":"es_GT", "name":"Spanish (Guatemala)"}, - { "code":"es_HN", "name":"Spanish (Honduras)"}, - { "code":"es_419", "name":"Spanish (Latin America)"}, - { "code":"es_MX", "name":"Spanish (Mexico)"}, - { "code":"es_NI", "name":"Spanish (Nicaragua)"}, - { "code":"es_PA", "name":"Spanish (Panama)"}, - { "code":"es_PY", "name":"Spanish (Paraguay)"}, - { "code":"es_PE", "name":"Spanish (Peru)"}, - { "code":"es_PR", "name":"Spanish (Puerto Rico)"}, - { "code":"es_ES", "name":"Spanish (Spain)"}, - { "code":"es_US", "name":"Spanish (United States)"}, - { "code":"es_UY", "name":"Spanish (Uruguay)"}, - { "code":"es_VE", "name":"Spanish (Venezuela)"}, - { "code":"es", "name":"Spanish"}, - { "code":"sw_KE", "name":"Swahili (Kenya)"}, - { "code":"sw_TZ", "name":"Swahili (Tanzania)"}, - { "code":"sw", "name":"Swahili"}, - { "code":"sv_FI", "name":"Swedish (Finland)"}, - { "code":"sv_SE", "name":"Swedish (Sweden)"}, - { "code":"sv", "name":"Swedish"}, - { "code":"gsw_CH", "name":"Swiss German (Switzerland)"}, - { "code":"gsw", "name":"Swiss German"}, - { "code":"shi_Latn", "name":"Tachelhit (Latin)"}, - { "code":"shi_Latn_MA", "name":"Tachelhit (Latin, Morocco)"}, - { "code":"shi_Tfng", "name":"Tachelhit (Tifinagh)"}, - { "code":"shi_Tfng_MA", "name":"Tachelhit (Tifinagh, Morocco)"}, - { "code":"shi", "name":"Tachelhit"}, - { "code":"dav_KE", "name":"Taita (Kenya)"}, - { "code":"dav", "name":"Taita"}, - { "code":"ta_IN", "name":"Tamil (India)"}, - { "code":"ta_LK", "name":"Tamil (Sri Lanka)"}, - { "code":"ta", "name":"Tamil"}, - { "code":"te_IN", "name":"Telugu (India)"}, - { "code":"te", "name":"Telugu"}, - { "code":"teo_KE", "name":"Teso (Kenya)"}, - { "code":"teo_UG", "name":"Teso (Uganda)"}, - { "code":"teo", "name":"Teso"}, - { "code":"th_TH", "name":"Thai (Thailand)"}, - { "code":"th", "name":"Thai"}, - { "code":"bo_CN", "name":"Tibetan (China)"}, - { "code":"bo_IN", "name":"Tibetan (India)"}, - { "code":"bo", "name":"Tibetan"}, - { "code":"ti_ER", "name":"Tigrinya (Eritrea)"}, - { "code":"ti_ET", "name":"Tigrinya (Ethiopia)"}, - { "code":"ti", "name":"Tigrinya"}, - { "code":"to_TO", "name":"Tonga (Tonga)"}, - { "code":"to", "name":"Tonga"}, - { "code":"tr_TR", "name":"Turkish (Turkey)"}, - { "code":"tr", "name":"Turkish"}, - { "code":"uk_UA", "name":"Ukrainian (Ukraine)"}, - { "code":"uk", "name":"Ukrainian"}, - { "code":"ur_IN", "name":"Urdu (India)"}, - { "code":"ur_PK", "name":"Urdu (Pakistan)"}, - { "code":"ur", "name":"Urdu"}, - { "code":"uz_Arab", "name":"Uzbek (Arabic)"}, - { "code":"uz_Arab_AF", "name":"Uzbek (Arabic, Afghanistan)"}, - { "code":"uz_Cyrl", "name":"Uzbek (Cyrillic)"}, - { "code":"uz_Cyrl_UZ", "name":"Uzbek (Cyrillic, Uzbekistan)"}, - { "code":"uz_Latn", "name":"Uzbek (Latin)"}, - { "code":"uz_Latn_UZ", "name":"Uzbek (Latin, Uzbekistan)"}, - { "code":"uz", "name":"Uzbek"}, - { "code":"vi_VN", "name":"Vietnamese (Vietnam)"}, - { "code":"vi", "name":"Vietnamese"}, - { "code":"vun_TZ", "name":"Vunjo (Tanzania)"}, - { "code":"vun", "name":"Vunjo"}, - { "code":"cy_GB", "name":"Welsh (United Kingdom)"}, - { "code":"cy", "name":"Welsh"}, - { "code":"yo_NG", "name":"Yoruba (Nigeria)"}, - { "code":"yo", "name":"Yoruba"}, - { "code":"zu_ZA", "name":"Zulu (South Africa)"}, - { "code":"zu", "name":"Zulu"} -] \ No newline at end of file diff --git a/lib/public/L10N/IFactory.php b/lib/public/L10N/IFactory.php index 9820082c72e..08e4f834168 100644 --- a/lib/public/L10N/IFactory.php +++ b/lib/public/L10N/IFactory.php @@ -53,6 +53,12 @@ interface IFactory { */ public function findAvailableLanguages($app = null); + /** + * @return array an array of available + * @since 13.0.0 + */ + public function findAvailableLocales(); + /** * @param string|null $app App id or null for core * @param string $lang @@ -60,4 +66,20 @@ interface IFactory { * @since 9.0.0 */ public function languageExists($app, $lang); + + /** + * @param string $locale + * @return bool + * @since 13.0.0 + */ + public function localeExists($locale); + + /** + * Creates a function from the plural string + * + * @param string $string + * @return string Unique function name + * @since 9.0.0 + */ + public function createPluralFunction($string); } diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php index 959650cf2f9..20e346c867a 100644 --- a/settings/templates/settings/personal/personal.info.php +++ b/settings/templates/settings/personal/personal.info.php @@ -381,6 +381,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); +

@@ -406,3 +407,4 @@ vendor_style('jcrop/css/jquery.Jcrop'); + -- cgit v1.2.3 From 51a35c23f6fcaff85be8e5785447092e2b982681 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 27 Jun 2018 19:40:06 +0200 Subject: fix camelCase for localesForLanguage Signed-off-by: Georg Ehrke --- lib/private/Settings/Personal/PersonalInfo.php | 2 +- settings/templates/settings/personal/personal.info.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/Settings') diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php index 267be2878d0..f4a8548e8f1 100644 --- a/lib/private/Settings/Personal/PersonalInfo.php +++ b/lib/private/Settings/Personal/PersonalInfo.php @@ -251,7 +251,7 @@ class PersonalInfo implements ISettings { 'activelocaleLang' => $userLocaleString, 'activelocale' => $userLocale, 'locales' => $localeCodes, - 'localesforlanguage' => $localesForLanguage, + 'localesForLanguage' => $localesForLanguage, ]; } diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php index b3952803abb..f2cc2700833 100644 --- a/settings/templates/settings/personal/personal.info.php +++ b/settings/templates/settings/personal/personal.info.php @@ -351,7 +351,7 @@ vendor_style('jcrop/css/jquery.Jcrop'); - + -- cgit v1.2.3