summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2021-08-14 00:16:31 +0000
committerChristopher Ng <chrng8@gmail.com>2021-08-27 05:06:12 +0000
commitcc5815dcd0342a521be400f35cbc8a666b83046d (patch)
treec632864b41e8bc0f991ff866e143423e2d20ec27 /lib
parent3b2be23fee0cef9edde5443bfa892ca6407d06ff (diff)
downloadnextcloud-server-cc5815dcd0342a521be400f35cbc8a666b83046d.tar.gz
nextcloud-server-cc5815dcd0342a521be400f35cbc8a666b83046d.zip
Provide initial state
- camelCase language strings Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/L10N/Factory.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 37599c21d8f..caa26d81cc4 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -619,18 +619,18 @@ class Factory implements IFactory {
$potentialName = $l->t('__language_name__');
return [
- 'commonlanguages' => [[
+ 'commonLanguages' => [[
'code' => $forceLanguage,
'name' => $potentialName,
]],
- 'languages' => [],
+ 'otherLanguages' => [],
];
}
$languageCodes = $this->findAvailableLanguages();
$commonLanguages = [];
- $languages = [];
+ $otherLanguages = [];
foreach ($languageCodes as $lang) {
$l = $this->get('lib', $lang);
@@ -658,14 +658,14 @@ class Factory implements IFactory {
if (in_array($lang, self::COMMON_LANGUAGE_CODES)) {
$commonLanguages[array_search($lang, self::COMMON_LANGUAGE_CODES)] = $ln;
} else {
- $languages[] = $ln;
+ $otherLanguages[] = $ln;
}
}
ksort($commonLanguages);
// sort now by displayed language not the iso-code
- usort($languages, function ($a, $b) {
+ usort($otherLanguages, function ($a, $b) {
if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
// If a doesn't have a name, but b does, list b before a
return 1;
@@ -680,8 +680,8 @@ class Factory implements IFactory {
return [
// reset indexes
- 'commonlanguages' => array_values($commonLanguages),
- 'languages' => $languages
+ 'commonLanguages' => array_values($commonLanguages),
+ 'otherLanguages' => $otherLanguages
];
}
}