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];