mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-17 01:08: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:
parent
c5c0324e1b
commit
d6ec905fe3
2 changed files with 11 additions and 0 deletions
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue