1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +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:
vrana 2012-06-21 10:20:52 -07:00
parent c5c0324e1b
commit d6ec905fe3
2 changed files with 11 additions and 0 deletions

View file

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

View file

@ -23,4 +23,10 @@ final class PhabricatorEnglishTranslation
return 'English';
}
public function getTranslations() {
return
PhabricatorEnv::getEnvConfig('translation.override') +
parent::getTranslations();
}
}