mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +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',
|
||||
'PhabricatorEmbedFileRemarkupRule' => 'applications/files/markup/PhabricatorEmbedFileRemarkupRule.php',
|
||||
'PhabricatorEmojiRemarkupRule' => 'applications/macro/markup/PhabricatorEmojiRemarkupRule.php',
|
||||
'PhabricatorEmojiTranslation' => 'infrastructure/internationalization/translation/PhabricatorEmojiTranslation.php',
|
||||
'PhabricatorEmptyQueryException' => 'infrastructure/query/PhabricatorEmptyQueryException.php',
|
||||
'PhabricatorEnv' => 'infrastructure/env/PhabricatorEnv.php',
|
||||
'PhabricatorEnvTestCase' => 'infrastructure/env/__tests__/PhabricatorEnvTestCase.php',
|
||||
|
@ -6912,6 +6913,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorEmailVerificationController' => 'PhabricatorAuthController',
|
||||
'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||
'PhabricatorEmojiRemarkupRule' => 'PhutilRemarkupRule',
|
||||
'PhabricatorEmojiTranslation' => 'PhutilTranslation',
|
||||
'PhabricatorEmptyQueryException' => 'Exception',
|
||||
'PhabricatorEnv' => 'Phobject',
|
||||
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
|
||||
|
|
|
@ -102,7 +102,13 @@ final class PhabricatorAccountSettingsPanel extends PhabricatorSettingsPanel {
|
|||
$translations = array();
|
||||
foreach ($locales as $locale) {
|
||||
$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();
|
||||
unset($raw_scope);
|
||||
|
||||
if ($locale->isSillyLocale()) {
|
||||
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',
|
||||
'Continue' => 'Bark And Run',
|
||||
'Countdown to Events' => 'To the Moon!',
|
||||
'English (Very Wow)' => 'Such English',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue