Skip to content

Commit

Permalink
rename pt_PT to pt
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Dec 11, 2024
1 parent f17bbc4 commit cd7b8e9
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions tests/classes/i18n/LocaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class LocaleTest extends PKPTestCase
{
private \PKP\i18n\Locale $_locale;
private array $_supportedLocales = ['en' => 'English', 'pt_BR' => 'Portuguese (Brazil)', 'pt_PT' => 'Portuguese (Portugal)'];
private array $_supportedLocales = ['en' => 'English', 'pt_BR' => 'Portuguese (Brazil)', 'pt' => 'Portuguese'];
private string $_primaryLocale = 'pt_BR';

protected function setUp(): void
Expand All @@ -53,7 +53,7 @@ protected function setUp(): void
[
'en' => $this->_createMetadataMock('en', true),
'pt_BR' => $this->_createMetadataMock('pt_BR'),
'pt_PT' => $this->_createMetadataMock('pt_PT'),
'pt' => $this->_createMetadataMock('pt'),
'de' => $this->_createMetadataMock('de')
]
)
Expand Down Expand Up @@ -102,7 +102,7 @@ public function testGetLocales()
$expectedLocales = [
'en' => 'English',
'pt_BR' => 'Portuguese',
'pt_PT' => 'Portuguese',
'pt' => 'Portuguese',
'de' => 'German'
];
$locales = array_map(fn (LocaleMetadata $locale) => $locale->getDisplayName(), Locale::getLocales());
Expand All @@ -114,7 +114,7 @@ public function testGetLocalesWithCountryName()
$expectedLocalesWithCountry = [
'en' => 'English',
'pt_BR' => 'Portuguese (Brazil)',
'pt_PT' => 'Portuguese (Portugal)',
'pt' => 'Portuguese',
'de' => 'German'
];
$locales = array_map(fn (LocaleMetadata $locale) => $locale->getDisplayName('en', true), Locale::getLocales());
Expand All @@ -141,7 +141,7 @@ public function testGet3LetterIsoFromLocale()
{
self::assertEquals('eng', LocaleConversion::get3LetterIsoFromLocale('en'));
self::assertEquals('por', LocaleConversion::get3LetterIsoFromLocale('pt_BR'));
self::assertEquals('por', LocaleConversion::get3LetterIsoFromLocale('pt_PT'));
self::assertEquals('por', LocaleConversion::get3LetterIsoFromLocale('pt'));
self::assertNull(LocaleConversion::get3LetterIsoFromLocale('xx_XX'));
}
}

0 comments on commit cd7b8e9

Please sign in to comment.