Page MenuHomePhabricator

D16807.diff
No OneTemporary

D16807.diff

diff --git a/src/applications/settings/setting/PhabricatorTranslationSetting.php b/src/applications/settings/setting/PhabricatorTranslationSetting.php
--- a/src/applications/settings/setting/PhabricatorTranslationSetting.php
+++ b/src/applications/settings/setting/PhabricatorTranslationSetting.php
@@ -32,7 +32,6 @@
}
protected function getSelectOptionGroups() {
- $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$locales = PhutilLocale::loadAllLocales();
$group_labels = array(
@@ -56,10 +55,6 @@
unset($raw_scope);
if ($locale->isSillyLocale()) {
- if ($is_serious) {
- // Omit silly locales on serious business installs.
- continue;
- }
$groups['silly'][$code] = $name;
continue;
}
@@ -89,6 +84,20 @@
$groups[$type][$code] = $name;
}
+ // Omit silly locales on serious business installs.
+ $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
+ if ($is_serious) {
+ unset($groups['silly']);
+ }
+
+ // Omit limited and test translations if Phabricator is not in developer
+ // mode.
+ $is_dev = PhabricatorEnv::getEnvConfig('phabricator.developer-mode');
+ if (!$is_dev) {
+ unset($groups['limited']);
+ unset($groups['test']);
+ }
+
$results = array();
foreach ($groups as $key => $group) {
$label = $group_labels[$key];

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 14, 8:26 PM (3 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6748601
Default Alt Text
D16807.diff (1 KB)

Event Timeline