mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-11 03:48:34 +02:00
Allow extending English translation
Test Plan: Displayed home. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1139 Differential Revision: https://secure.phabricator.com/D2759
This commit is contained in:
parent
48ebcf0679
commit
325c2077ba
3 changed files with 59 additions and 34 deletions
|
@ -550,6 +550,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorAuditReplyHandler' => 'applications/audit/PhabricatorAuditReplyHandler.php',
|
'PhabricatorAuditReplyHandler' => 'applications/audit/PhabricatorAuditReplyHandler.php',
|
||||||
'PhabricatorAuditStatusConstants' => 'applications/audit/constants/PhabricatorAuditStatusConstants.php',
|
'PhabricatorAuditStatusConstants' => 'applications/audit/constants/PhabricatorAuditStatusConstants.php',
|
||||||
'PhabricatorAuthController' => 'applications/auth/controller/PhabricatorAuthController.php',
|
'PhabricatorAuthController' => 'applications/auth/controller/PhabricatorAuthController.php',
|
||||||
|
'PhabricatorBaseEnglishTranslation' => 'infrastructure/internationalization/PhabricatorBaseEnglishTranslation.php',
|
||||||
'PhabricatorBuiltinPatchList' => 'infrastructure/setup/sql/PhabricatorBuiltinPatchList.php',
|
'PhabricatorBuiltinPatchList' => 'infrastructure/setup/sql/PhabricatorBuiltinPatchList.php',
|
||||||
'PhabricatorCalendarBrowseController' => 'applications/calendar/controller/PhabricatorCalendarBrowseController.php',
|
'PhabricatorCalendarBrowseController' => 'applications/calendar/controller/PhabricatorCalendarBrowseController.php',
|
||||||
'PhabricatorCalendarController' => 'applications/calendar/controller/PhabricatorCalendarController.php',
|
'PhabricatorCalendarController' => 'applications/calendar/controller/PhabricatorCalendarController.php',
|
||||||
|
@ -1550,6 +1551,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorAuditPreviewController' => 'PhabricatorAuditController',
|
'PhabricatorAuditPreviewController' => 'PhabricatorAuditController',
|
||||||
'PhabricatorAuditReplyHandler' => 'PhabricatorMailReplyHandler',
|
'PhabricatorAuditReplyHandler' => 'PhabricatorMailReplyHandler',
|
||||||
'PhabricatorAuthController' => 'PhabricatorController',
|
'PhabricatorAuthController' => 'PhabricatorController',
|
||||||
|
'PhabricatorBaseEnglishTranslation' => 'PhabricatorTranslation',
|
||||||
'PhabricatorBuiltinPatchList' => 'PhabricatorSQLPatchList',
|
'PhabricatorBuiltinPatchList' => 'PhabricatorSQLPatchList',
|
||||||
'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController',
|
'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController',
|
||||||
'PhabricatorCalendarController' => 'PhabricatorController',
|
'PhabricatorCalendarController' => 'PhabricatorController',
|
||||||
|
@ -1611,7 +1613,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEmailLoginController' => 'PhabricatorAuthController',
|
'PhabricatorEmailLoginController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorEmailTokenController' => 'PhabricatorAuthController',
|
'PhabricatorEmailTokenController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorEmailVerificationController' => 'PhabricatorPeopleController',
|
'PhabricatorEmailVerificationController' => 'PhabricatorPeopleController',
|
||||||
'PhabricatorEnglishTranslation' => 'PhabricatorTranslation',
|
'PhabricatorEnglishTranslation' => 'PhabricatorBaseEnglishTranslation',
|
||||||
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
|
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorErrorExample' => 'PhabricatorUIExample',
|
'PhabricatorErrorExample' => 'PhabricatorUIExample',
|
||||||
'PhabricatorEvent' => 'PhutilEvent',
|
'PhabricatorEvent' => 'PhutilEvent',
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 2012 Facebook, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
abstract class PhabricatorBaseEnglishTranslation
|
||||||
|
extends PhabricatorTranslation {
|
||||||
|
|
||||||
|
final public function getLanguage() {
|
||||||
|
return 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTranslations() {
|
||||||
|
return array(
|
||||||
|
'Differential Revision(s)' => array(
|
||||||
|
'Differential Revision',
|
||||||
|
'Differential Revisions',
|
||||||
|
),
|
||||||
|
'file(s)' => array('file', 'files'),
|
||||||
|
'Maniphest Task(s)' => array('Maniphest Task', 'Maniphest Tasks'),
|
||||||
|
|
||||||
|
'Please fix these errors and try again.' => array(
|
||||||
|
'Please fix this error and try again.',
|
||||||
|
'Please fix these errors and try again.',
|
||||||
|
),
|
||||||
|
|
||||||
|
'%d Error(s)' => array('%d Error', '%d Errors'),
|
||||||
|
'%d Warning(s)' => array('%d Warning', '%d Warnings'),
|
||||||
|
'%d Auto-Fix(es)' => array('%d Auto-Fix', '%d Auto-Fixes'),
|
||||||
|
'%d Advice(s)' => array('%d Advice', '%d Pieces of Advice'),
|
||||||
|
'%d Detail(s)' => array('%d Detail', '%d Details'),
|
||||||
|
|
||||||
|
'(%d line(s))' => array('(%d line)', '(%d lines)'),
|
||||||
|
|
||||||
|
'COMMIT(S)' => array('COMMIT', 'COMMITS'),
|
||||||
|
|
||||||
|
'%d line(s)' => array('%d line', '%d lines'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -16,42 +16,11 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
final class PhabricatorEnglishTranslation extends PhabricatorTranslation {
|
final class PhabricatorEnglishTranslation
|
||||||
|
extends PhabricatorBaseEnglishTranslation {
|
||||||
public function getLanguage() {
|
|
||||||
return 'en';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
return 'English';
|
return 'English';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTranslations() {
|
|
||||||
return array(
|
|
||||||
'Differential Revision(s)' => array(
|
|
||||||
'Differential Revision',
|
|
||||||
'Differential Revisions',
|
|
||||||
),
|
|
||||||
'file(s)' => array('file', 'files'),
|
|
||||||
'Maniphest Task(s)' => array('Maniphest Task', 'Maniphest Tasks'),
|
|
||||||
|
|
||||||
'Please fix these errors and try again.' => array(
|
|
||||||
'Please fix this error and try again.',
|
|
||||||
'Please fix these errors and try again.',
|
|
||||||
),
|
|
||||||
|
|
||||||
'%d Error(s)' => array('%d Error', '%d Errors'),
|
|
||||||
'%d Warning(s)' => array('%d Warning', '%d Warnings'),
|
|
||||||
'%d Auto-Fix(es)' => array('%d Auto-Fix', '%d Auto-Fixes'),
|
|
||||||
'%d Advice(s)' => array('%d Advice', '%d Pieces of Advice'),
|
|
||||||
'%d Detail(s)' => array('%d Detail', '%d Details'),
|
|
||||||
|
|
||||||
'(%d line(s))' => array('(%d line)', '(%d lines)'),
|
|
||||||
|
|
||||||
'COMMIT(S)' => array('COMMIT', 'COMMITS'),
|
|
||||||
|
|
||||||
'%d line(s)' => array('%d line', '%d lines'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue