2013-01-05 01:22:52 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorTranslationsConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Translations');
|
2013-01-05 01:22:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Options relating to translations.');
|
2013-01-05 01:22:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getOptions() {
|
|
|
|
return array(
|
|
|
|
$this->newOption(
|
|
|
|
'translation.provider',
|
|
|
|
'class',
|
|
|
|
'PhabricatorEnglishTranslation')
|
|
|
|
->setBaseClass('PhabricatorTranslation')
|
2014-06-09 20:36:49 +02:00
|
|
|
->setSummary(pht('Translation class that should be used for strings.'))
|
2013-01-05 01:22:52 +01:00
|
|
|
->setDescription(
|
|
|
|
pht(
|
2014-06-09 20:36:49 +02:00
|
|
|
'This allows customizing texts used in Phabricator. The class '.
|
|
|
|
'must extend PhabricatorTranslation.'))
|
2013-01-05 01:22:52 +01:00
|
|
|
->addExample('PhabricatorEnglishTranslation', pht('Valid Setting')),
|
|
|
|
// TODO: This should be dict<string,string> I think, but that doesn't
|
|
|
|
// exist yet.
|
|
|
|
$this->newOption('translation.override', 'wild', array())
|
2014-06-09 20:36:49 +02:00
|
|
|
->setSummary(pht('Override translations.'))
|
2013-01-05 01:22:52 +01:00
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
"You can use 'translation.override' if you don't want to create ".
|
|
|
|
"a full translation to give users an option for switching to it ".
|
|
|
|
"and you just want to override some strings in the default ".
|
|
|
|
"translation."))
|
|
|
|
->addExample(
|
|
|
|
'{"some string": "my alternative"}',
|
|
|
|
pht('Valid Setting')),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|