1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-03-12 20:34:53 +01:00
phorge-arcanist/src/internationalization/locales/PhutilPortugueseBrazilLocale.php
Pppery 0af89f7d32 Add fallback languages for locale files
Summary: Upstream version of https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1047593

Test Plan:
Set any languages and observe untranslated strings display proper PLURAL rules

With the downstream "translations" extension installed, set the language to traditional Chinese and see Simplified Chinese rather than English translations if they exist, like "Foo added/removed a project"

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25695
2024-06-21 13:10:22 -04:00

25 lines
603 B
PHP

<?php
/**
* Locale for "Portuguese (Brazil)".
*/
final class PhutilPortugueseBrazilLocale extends PhutilLocale {
public function getLocaleCode() {
return 'pt_BR';
}
public function getLocaleName() {
return pht('Portuguese (Brazil)');
}
public function getFallbackLocaleCode() {
// Phabricator does not support bidirectional
// fallbacks (pt_BR -> pt and pt -> pt_BR simultaneously)
// since Translatewiki calls pt_PT "Portugese" without a country
// it makes slightly more sense to fall back in this direction
// than the other one
return 'pt_PT';
}
}