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:
@@ -71,6 +71,11 @@ return array(
|
|||||||
// PhabricatorTranslation.
|
// PhabricatorTranslation.
|
||||||
'translation.provider' => 'PhabricatorEnglishTranslation',
|
'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 ------------------------------------------------------- //
|
// -- Access Policies ------------------------------------------------------- //
|
||||||
|
|
||||||
|
|||||||
@@ -23,4 +23,10 @@ final class PhabricatorEnglishTranslation
|
|||||||
return 'English';
|
return 'English';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTranslations() {
|
||||||
|
return
|
||||||
|
PhabricatorEnv::getEnvConfig('translation.override') +
|
||||||
|
parent::getTranslations();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user