mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Allow overriding translations without creating PhabricatorTranslation
Test Plan: Overridden '%d Detail(s)', verified that it was used. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1139 Differential Revision: https://secure.phabricator.com/D2815
This commit is contained in:
parent
c5c0324e1b
commit
d6ec905fe3
2 changed files with 11 additions and 0 deletions
|
@ -71,6 +71,11 @@ return array(
|
|||
// PhabricatorTranslation.
|
||||
'translation.provider' => 'PhabricatorEnglishTranslation',
|
||||
|
||||
// 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.
|
||||
'translation.override' => array(),
|
||||
|
||||
|
||||
// -- Access Policies ------------------------------------------------------- //
|
||||
|
||||
|
|
|
@ -23,4 +23,10 @@ final class PhabricatorEnglishTranslation
|
|||
return 'English';
|
||||
}
|
||||
|
||||
public function getTranslations() {
|
||||
return
|
||||
PhabricatorEnv::getEnvConfig('translation.override') +
|
||||
parent::getTranslations();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue