mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Show translation option names natively, instead of in the current translation
Summary: Ref T5267. Put "Deutsch" in the list instead of "German", so you can find your language without knowing the English word for it. Test Plan: {F1661598} Reviewers: chad Reviewed By: chad Maniphest Tasks: T5267 Differential Revision: https://secure.phabricator.com/D15980
This commit is contained in:
parent
10ffa42504
commit
5b77b86ffb
4 changed files with 24 additions and 0 deletions
|
@ -2383,6 +2383,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEmailVerificationController' => 'applications/auth/controller/PhabricatorEmailVerificationController.php',
|
'PhabricatorEmailVerificationController' => 'applications/auth/controller/PhabricatorEmailVerificationController.php',
|
||||||
'PhabricatorEmbedFileRemarkupRule' => 'applications/files/markup/PhabricatorEmbedFileRemarkupRule.php',
|
'PhabricatorEmbedFileRemarkupRule' => 'applications/files/markup/PhabricatorEmbedFileRemarkupRule.php',
|
||||||
'PhabricatorEmojiRemarkupRule' => 'applications/macro/markup/PhabricatorEmojiRemarkupRule.php',
|
'PhabricatorEmojiRemarkupRule' => 'applications/macro/markup/PhabricatorEmojiRemarkupRule.php',
|
||||||
|
'PhabricatorEmojiTranslation' => 'infrastructure/internationalization/translation/PhabricatorEmojiTranslation.php',
|
||||||
'PhabricatorEmptyQueryException' => 'infrastructure/query/PhabricatorEmptyQueryException.php',
|
'PhabricatorEmptyQueryException' => 'infrastructure/query/PhabricatorEmptyQueryException.php',
|
||||||
'PhabricatorEnv' => 'infrastructure/env/PhabricatorEnv.php',
|
'PhabricatorEnv' => 'infrastructure/env/PhabricatorEnv.php',
|
||||||
'PhabricatorEnvTestCase' => 'infrastructure/env/__tests__/PhabricatorEnvTestCase.php',
|
'PhabricatorEnvTestCase' => 'infrastructure/env/__tests__/PhabricatorEnvTestCase.php',
|
||||||
|
@ -6912,6 +6913,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEmailVerificationController' => 'PhabricatorAuthController',
|
'PhabricatorEmailVerificationController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||||
'PhabricatorEmojiRemarkupRule' => 'PhutilRemarkupRule',
|
'PhabricatorEmojiRemarkupRule' => 'PhutilRemarkupRule',
|
||||||
|
'PhabricatorEmojiTranslation' => 'PhutilTranslation',
|
||||||
'PhabricatorEmptyQueryException' => 'Exception',
|
'PhabricatorEmptyQueryException' => 'Exception',
|
||||||
'PhabricatorEnv' => 'Phobject',
|
'PhabricatorEnv' => 'Phobject',
|
||||||
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
|
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
|
||||||
|
|
|
@ -102,7 +102,13 @@ final class PhabricatorAccountSettingsPanel extends PhabricatorSettingsPanel {
|
||||||
$translations = array();
|
$translations = array();
|
||||||
foreach ($locales as $locale) {
|
foreach ($locales as $locale) {
|
||||||
$code = $locale->getLocaleCode();
|
$code = $locale->getLocaleCode();
|
||||||
|
|
||||||
|
// Get the locale's localized name if it's available. For example,
|
||||||
|
// "Deutsch" instead of "German". This helps users who do not speak the
|
||||||
|
// current language to find the correct setting.
|
||||||
|
$raw_scope = PhabricatorEnv::beginScopedLocale($code);
|
||||||
$name = $locale->getLocaleName();
|
$name = $locale->getLocaleName();
|
||||||
|
unset($raw_scope);
|
||||||
|
|
||||||
if ($locale->isSillyLocale()) {
|
if ($locale->isSillyLocale()) {
|
||||||
if ($is_serious) {
|
if ($is_serious) {
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorEmojiTranslation
|
||||||
|
extends PhutilTranslation {
|
||||||
|
|
||||||
|
public function getLocaleCode() {
|
||||||
|
return 'en_X*';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTranslations() {
|
||||||
|
return array(
|
||||||
|
'Emoji (Internet)' => "\xF0\x9F\x92\xAC (\xF0\x9F\x8C\x8D)",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,6 +33,7 @@ final class PhabricatorVeryWowEnglishTranslation
|
||||||
'Prototype' => 'Chew Toy',
|
'Prototype' => 'Chew Toy',
|
||||||
'Continue' => 'Bark And Run',
|
'Continue' => 'Bark And Run',
|
||||||
'Countdown to Events' => 'To the Moon!',
|
'Countdown to Events' => 'To the Moon!',
|
||||||
|
'English (Very Wow)' => 'Such English',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue