Skip to content

Commit 70a08b9

Browse files
monkeyiqtvdijen
andcommitted
locale: add support for transitioning st to en_LS (#2274)
* locale: add support for transitioning st to en_LS * Update config-template * rename locale directories including in the modules --------- Co-authored-by: Tim van Dijen <tvdijen@gmail.com>
1 parent 30f53e2 commit 70a08b9

8 files changed

Lines changed: 9 additions & 3 deletions

File tree

config/config.php.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ $config = [
826826
'language.available' => [
827827
'en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'ca', 'fr', 'it', 'nl', 'lb',
828828
'cs', 'sk', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt_BR', 'tr', 'ja', 'zh', 'zh_TW',
829-
'ru', 'et', 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af', 'zu', 'xh', 'st',
829+
'ru', 'et', 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af', 'zu', 'xh', 'en_LS',
830830
],
831831
'language.rtl' => ['ar', 'dv', 'fa', 'ur', 'he'],
832832
'language.default' => 'en',
File renamed without changes.
File renamed without changes.

modules/multiauth/locales/st/LC_MESSAGES/multiauth.po renamed to modules/multiauth/locales/en_LS/LC_MESSAGES/multiauth.po

File renamed without changes.
File renamed without changes.

src/SimpleSAML/Locale/Language.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,22 @@ private function getInstalledLanguages(): array
172172
);
173173

174174
// @deprecated - remove entire if-block in a new major release
175-
if (array_intersect(['pt-br', 'zh-tw'], $configuredAvailableLanguages)) {
175+
if (array_intersect(['pt-br', 'st', 'zh-tw'], $configuredAvailableLanguages)) {
176176
Logger::warning(
177177
"Deprecated locales found in `language.available`. "
178-
. "Please replace 'pt-br' with 'pt_BR' and 'zh-tw' with 'zh_TW'.",
178+
. "Please replace 'pt-br' with 'pt_BR',"
179+
. " and 'st' with 'en_LS',"
180+
. " and 'zh-tw' with 'zh_TW'.",
179181
);
180182

181183
if (($i = array_search('pt-br', $configuredAvailableLanguages)) !== false) {
182184
$configuredAvailableLanguages[$i] = 'pt_BR';
183185
}
184186

187+
if (($i = array_search('st', $configuredAvailableLanguages)) !== false) {
188+
$configuredAvailableLanguages[$i] = 'en_LS';
189+
}
190+
185191
if (($i = array_search('zh-tw', $configuredAvailableLanguages)) !== false) {
186192
$configuredAvailableLanguages[$i] = 'zh_TW';
187193
}

0 commit comments

Comments
 (0)