@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't show "Limited" or "Test" translations unless an install is in developer mode

Summary:
Ref T5267. Although translations with very few strings are already put into a "Limited Translations" group, this isn't necessarily clear and was empirically confusing to at least one user, who was surprised that selecting "Spanish" had no UI effect.

Instead, hide limited and test translations entirely unless the install is in developer mode.

Test Plan: In a non-developer-mode install, viewed translations menu. No longer saw translations with very few strings.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16807

+14 -5
+14 -5
src/applications/settings/setting/PhabricatorTranslationSetting.php
··· 32 32 } 33 33 34 34 protected function getSelectOptionGroups() { 35 - $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); 36 35 $locales = PhutilLocale::loadAllLocales(); 37 36 38 37 $group_labels = array( ··· 56 55 unset($raw_scope); 57 56 58 57 if ($locale->isSillyLocale()) { 59 - if ($is_serious) { 60 - // Omit silly locales on serious business installs. 61 - continue; 62 - } 63 58 $groups['silly'][$code] = $name; 64 59 continue; 65 60 } ··· 87 82 } 88 83 89 84 $groups[$type][$code] = $name; 85 + } 86 + 87 + // Omit silly locales on serious business installs. 88 + $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); 89 + if ($is_serious) { 90 + unset($groups['silly']); 91 + } 92 + 93 + // Omit limited and test translations if Phabricator is not in developer 94 + // mode. 95 + $is_dev = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); 96 + if (!$is_dev) { 97 + unset($groups['limited']); 98 + unset($groups['test']); 90 99 } 91 100 92 101 $results = array();