@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.

Add translations config group.

Summary:
Adds the translations group as per T2255. Currently `translation.override` is
`wild` -- it should be changed to dict<string, string> when that exists.

Also fixes a small bug from D4326 which caused "class" types to not ever
validate.

Test Plan:
- Looked at the settings.
- Successfully saved a setting relating to classes.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2255

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

authored by

Ricky Elrod and committed by
epriestley
ae0773b7 38944612

+46 -1
+2
src/__phutil_library_map__.php
··· 1217 1217 'PhabricatorTransactions' => 'applications/transactions/constants/PhabricatorTransactions.php', 1218 1218 'PhabricatorTransformedFile' => 'applications/files/storage/PhabricatorTransformedFile.php', 1219 1219 'PhabricatorTranslation' => 'infrastructure/internationalization/PhabricatorTranslation.php', 1220 + 'PhabricatorTranslationsConfigOptions' => 'applications/config/option/PhabricatorTranslationsConfigOptions.php', 1220 1221 'PhabricatorTrivialTestCase' => 'infrastructure/testing/__tests__/PhabricatorTrivialTestCase.php', 1221 1222 'PhabricatorTypeaheadCommonDatasourceController' => 'applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php', 1222 1223 'PhabricatorTypeaheadDatasourceController' => 'applications/typeahead/controller/PhabricatorTypeaheadDatasourceController.php', ··· 2518 2519 'PhabricatorTimer' => 'PhabricatorCountdownDAO', 2519 2520 'PhabricatorTransactionView' => 'AphrontView', 2520 2521 'PhabricatorTransformedFile' => 'PhabricatorFileDAO', 2522 + 'PhabricatorTranslationsConfigOptions' => 'PhabricatorApplicationConfigOptions', 2521 2523 'PhabricatorTrivialTestCase' => 'PhabricatorTestCase', 2522 2524 'PhabricatorTypeaheadCommonDatasourceController' => 'PhabricatorTypeaheadDatasourceController', 2523 2525 'PhabricatorTypeaheadDatasourceController' => 'PhabricatorController',
+1 -1
src/applications/config/controller/PhabricatorConfigEditController.php
··· 361 361 ->setConcreteOnly(true) 362 362 ->selectSymbolsWithoutLoading(); 363 363 $names = ipull($symbols, 'name', 'name'); 364 - sort($names); 364 + asort($names); 365 365 $names = array( 366 366 '' => pht('(Use Default)'), 367 367 ) + $names;
+43
src/applications/config/option/PhabricatorTranslationsConfigOptions.php
··· 1 + <?php 2 + 3 + final class PhabricatorTranslationsConfigOptions 4 + extends PhabricatorApplicationConfigOptions { 5 + 6 + public function getName() { 7 + return pht("Translations"); 8 + } 9 + 10 + public function getDescription() { 11 + return pht("Options relating to translations."); 12 + } 13 + 14 + public function getOptions() { 15 + return array( 16 + $this->newOption( 17 + 'translation.provider', 18 + 'class', 19 + 'PhabricatorEnglishTranslation') 20 + ->setBaseClass('PhabricatorTranslation') 21 + ->setSummary(pht("Translation class that should be used for strings.")) 22 + ->setDescription( 23 + pht( 24 + "This allows customizing texts used in Phabricator. The class ". 25 + "must extend PhabricatorTranslation.")) 26 + ->addExample('PhabricatorEnglishTranslation', pht('Valid Setting')), 27 + // TODO: This should be dict<string,string> I think, but that doesn't 28 + // exist yet. 29 + $this->newOption('translation.override', 'wild', array()) 30 + ->setSummary(pht("Override translations.")) 31 + ->setDescription( 32 + pht( 33 + "You can use 'translation.override' if you don't want to create ". 34 + "a full translation to give users an option for switching to it ". 35 + "and you just want to override some strings in the default ". 36 + "translation.")) 37 + ->addExample( 38 + '{"some string": "my alternative"}', 39 + pht('Valid Setting')), 40 + ); 41 + } 42 + 43 + }