diff --git a/controller/contactcontroller.php b/controller/contactcontroller.php index fdb5526632..935697d7d1 100644 --- a/controller/contactcontroller.php +++ b/controller/contactcontroller.php @@ -116,13 +116,13 @@ public function searchAttendee($search) { $r['EMAIL'] = [$r['EMAIL']]; } - $lang = $this->getPreferredLanguageFromUidOrDefault($r['UID'], $defaultLang); + $language = $this->getPreferredLanguageFromUidOrDefault($r['UID'], $defaultLang); $isLocalUser = isset($r['isLocalSystemBook']) && $r['isLocalSystemBook']; $contacts[] = [ 'email' => $r['EMAIL'], 'name' => $name, - 'lang' => $lang + 'lang' => $language ]; } @@ -153,6 +153,6 @@ private function getNameFromContact(array $r) { * @return string */ private function getPreferredLanguageFromUidOrDefault($uid, $default) { - return $this->config->getUserValue($uid, 'core', 'lang', $default); + return $this->config->getUserValue($uid, 'core', 'language', $default); } } diff --git a/controller/viewcontroller.php b/controller/viewcontroller.php index 82a80413ec..55e3a24bbe 100644 --- a/controller/viewcontroller.php +++ b/controller/viewcontroller.php @@ -133,30 +133,30 @@ public function index() { return []; } - $userLang = $this->config->getUserValue($userId, 'core', 'lang', $this->l10nFactory->findLanguage()); + $userLang = $this->config->getUserValue($userId, 'core', 'language', $this->l10nFactory->findLanguage()); $languageCodes = $this->l10nFactory->findAvailableLanguages(); $commonLanguages = []; $languages = []; - foreach($languageCodes as $lang) { - $l = \OC::$server->getL10N('settings', $lang); + foreach($languageCodes as $language) { + $l = \OC::$server->getL10N('settings', $language); // TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version $potentialName = (string) $l->t('__language_name__'); - if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file - $ln = array('code' => $lang, 'name' => $potentialName); - } elseif ($lang === 'en') { - $ln = ['code' => $lang, 'name' => 'English (US)']; + if($l->getLanguageCode() === $language && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file + $ln = array('code' => $language, 'name' => $potentialName); + } elseif ($language === 'en') { + $ln = ['code' => $language, 'name' => 'English (US)']; }else{//fallback to language code - $ln=array('code'=>$lang, 'name'=>$lang); + $ln=array('code'=>$language, 'name'=>$language); } // put appropriate languages into appropriate arrays, to print them sorted // used language -> common languages -> divider -> other languages - if ($lang === $userLang) { + if ($language === $userLang) { $userLang = $ln; - } elseif (in_array($lang, self::COMMON_LANGUAGE_CODES)) { - $commonLanguages[array_search($lang, self::COMMON_LANGUAGE_CODES)]=$ln; + } elseif (in_array($language, self::COMMON_LANGUAGE_CODES)) { + $commonLanguages[array_search($language, self::COMMON_LANGUAGE_CODES)]=$ln; } else { $languages[]=$ln; } diff --git a/js/app/controllers/attendeecontroller.js b/js/app/controllers/attendeecontroller.js index ede7e4bca9..f7becc8a3f 100644 --- a/js/app/controllers/attendeecontroller.js +++ b/js/app/controllers/attendeecontroller.js @@ -63,7 +63,7 @@ app.controller('AttendeeController', function($scope, AutoCompletionService) { 'rsvp': 'TRUE', 'partstat': 'NEEDS-ACTION', 'cutype': 'INDIVIDUAL', - 'lang': OC.getLocale() // Use current user's timezone as a default value + 'language': OC.getLocale() // Use current user's timezone as a default value } }); } @@ -98,7 +98,7 @@ app.controller('AttendeeController', function($scope, AutoCompletionService) { displayname: displayname, email: email, name: attendee.name, - lang: attendee.lang + language: attendee.language }); }); }); @@ -117,7 +117,7 @@ app.controller('AttendeeController', function($scope, AutoCompletionService) { rsvp: 'TRUE', partstat: 'NEEDS-ACTION', cutype: 'INDIVIDUAL', - lang: item.lang + language: item.language } }); $scope.nameofattendee = ''; diff --git a/js/app/models/simpleEventModel.js b/js/app/models/simpleEventModel.js index 99ab9da309..692c3e8c0f 100644 --- a/js/app/models/simpleEventModel.js +++ b/js/app/models/simpleEventModel.js @@ -52,7 +52,7 @@ app.factory('SimpleEvent', function () { 'cn', 'delegated-from', 'delegated-to', - 'lang' + 'language' ]; const organizerParameters = [