Skip to content

Commit

Permalink
MNT Spelling error in Maori language name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Sep 20, 2023
1 parent 0b89d32 commit 153092d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/i18n/Data/Intl/IntlLocales.php
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,9 @@ public function getLocales()
$locales = $this->config()->get('locales');
$localised = [];
foreach ($locales as $code => $default) {
$localised[$code] = $this->localeName($code);
// Fix spelling Maori language
$localeName = str_replace('Maori', 'Māori', $this->localeName($code));
$localised[$code] = $localeName;
}

// Save cache
Expand Down
5 changes: 5 additions & 0 deletions tests/php/i18n/i18nTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,4 +477,9 @@ public function testGetLanguageName()
return i18n::getData()->languageName('de_CGN');
}));
}

public function testGetLocales()
{
$this->assertEquals('Māori (New Zealand)', i18n::getData()->getLocales()['mi_NZ']);
}
}

0 comments on commit 153092d

Please sign in to comment.