Page MenuHomePhabricator

D15980.diff
No OneTemporary

D15980.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2383,6 +2383,7 @@
'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 @@
'PhabricatorEmailVerificationController' => 'PhabricatorAuthController',
'PhabricatorEmbedFileRemarkupRule' => 'PhabricatorObjectRemarkupRule',
'PhabricatorEmojiRemarkupRule' => 'PhutilRemarkupRule',
+ 'PhabricatorEmojiTranslation' => 'PhutilTranslation',
'PhabricatorEmptyQueryException' => 'Exception',
'PhabricatorEnv' => 'Phobject',
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
diff --git a/src/applications/settings/panel/PhabricatorAccountSettingsPanel.php b/src/applications/settings/panel/PhabricatorAccountSettingsPanel.php
--- a/src/applications/settings/panel/PhabricatorAccountSettingsPanel.php
+++ b/src/applications/settings/panel/PhabricatorAccountSettingsPanel.php
@@ -102,7 +102,13 @@
$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) {
diff --git a/src/infrastructure/internationalization/translation/PhabricatorEmojiTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorEmojiTranslation.php
new file mode 100644
--- /dev/null
+++ b/src/infrastructure/internationalization/translation/PhabricatorEmojiTranslation.php
@@ -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)",
+ );
+ }
+}
diff --git a/src/infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php
--- a/src/infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php
+++ b/src/infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php
@@ -33,6 +33,7 @@
'Prototype' => 'Chew Toy',
'Continue' => 'Bark And Run',
'Countdown to Events' => 'To the Moon!',
+ 'English (Very Wow)' => 'Such English',
);
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 9:17 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6743880
Default Alt Text
D15980.diff (3 KB)

Event Timeline