diff --git a/admin/code/CMSMenu.php b/admin/code/CMSMenu.php index 223031c10..d95c6d289 100644 --- a/admin/code/CMSMenu.php +++ b/admin/code/CMSMenu.php @@ -318,7 +318,7 @@ class CMSMenu extends Object implements IteratorAggregate, i18nEntityProvider foreach($cmsClasses as $cmsClass) { $defaultTitle = LeftAndMain::menu_title_for_class($cmsClass); $ownerModule = i18n::get_owner_module($cmsClass); - $entities["{$cmsClass}.MENUTITLE"] = array($defaultTitle, PR_HIGH, 'Menu title', $ownerModule); + $entities["{$cmsClass}.MENUTITLE"] = array($defaultTitle, 'Menu title', $ownerModule); } return $entities; } diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index e4051c616..75b557d48 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -160,7 +160,7 @@ class LeftAndMain extends Controller implements PermissionProvider { // can't be done in cms/_config.php as locale is not set yet CMSMenu::add_link( 'Help', - _t('LeftAndMain.HELP', 'Help', PR_HIGH, 'Menu title'), + _t('LeftAndMain.HELP', 'Help', 'Menu title'), self::$help_link ); @@ -1298,7 +1298,7 @@ class LeftAndMain extends Controller implements PermissionProvider { 'name' => sprintf(_t( 'CMSMain.ACCESS', "Access to '%s' section", - PR_MEDIUM, + "Item in permission selection identifying the admin section. Example: Access to 'Files & Images'" ), $title, null), 'category' => _t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access') diff --git a/admin/templates/Includes/CMSLoadingScreen.ss b/admin/templates/Includes/CMSLoadingScreen.ss index ed896c8d7..24551c224 100644 --- a/admin/templates/Includes/CMSLoadingScreen.ss +++ b/admin/templates/Includes/CMSLoadingScreen.ss @@ -1,6 +1,6 @@
diff --git a/core/Core.php b/core/Core.php index 2d51ae740..73c2238d3 100644 --- a/core/Core.php +++ b/core/Core.php @@ -391,8 +391,8 @@ function stripslashes_recursively(&$array) { /** * @see i18n::_t() */ -function _t($entity, $string = "", $priority = 40, $context = "") { - return i18n::_t($entity, $string, $priority, $context); +function _t($entity, $string = "", $context = "") { + return i18n::_t($entity, $string, $context); } /** diff --git a/filesystem/File.php b/filesystem/File.php index 2158fad53..65ba2cfc2 100644 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -856,7 +856,7 @@ class File extends DataObject { _t( 'File.INVALIDEXTENSION', 'Extension is not allowed (valid: %s)', - PR_MEDIUM, + 'Argument 1: Comma-separated list of valid extensions' ), wordwrap(implode(', ',$exts)) diff --git a/filesystem/Upload.php b/filesystem/Upload.php index 509e5eb8c..31339dcec 100644 --- a/filesystem/Upload.php +++ b/filesystem/Upload.php @@ -500,7 +500,7 @@ class Upload_Validator { _t( 'File.TOOLARGE', 'Filesize is too large, maximum %s allowed.', - PR_MEDIUM, + 'Argument 1: Filesize (e.g. 1MB)' ), $arg @@ -514,7 +514,7 @@ class Upload_Validator { _t( 'File.INVALIDEXTENSION', 'Extension is not allowed (valid: %s)', - PR_MEDIUM, + 'Argument 1: Comma-separated list of valid extensions' ), wordwrap(implode(', ', $this->allowedExtensions)) diff --git a/forms/ConfirmedPasswordField.php b/forms/ConfirmedPasswordField.php index 02a631640..889b3342a 100644 --- a/forms/ConfirmedPasswordField.php +++ b/forms/ConfirmedPasswordField.php @@ -107,7 +107,7 @@ class ConfirmedPasswordField extends FormField { $title = _t( 'ConfirmedPasswordField.SHOWONCLICKTITLE', 'Change Password', - PR_MEDIUM, + 'Label of the link which triggers display of the "change password" formfields' ); } diff --git a/forms/NullableField.php b/forms/NullableField.php index c1e17a53c..700950e0e 100644 --- a/forms/NullableField.php +++ b/forms/NullableField.php @@ -42,7 +42,7 @@ class NullableField extends FormField { $this->isNullLabel = $isNullLabel; if ( is_null($this->isNullLabel) ) { // Set a default label if one is not provided. - $this->isNullLabel = _t('NullableField.IsNullLabel', 'Is Null', PR_HIGH); + $this->isNullLabel = _t('NullableField.IsNullLabel', 'Is Null'); } parent::__construct($valueField->getName(), $valueField->Title(), $valueField->Value(), $valueField->getForm(), $valueField->RightTitle()); $this->readonly = $valueField->isReadonly(); diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php index aa714fc98..3b6f101df 100644 --- a/forms/TreeDropdownField.php +++ b/forms/TreeDropdownField.php @@ -175,7 +175,7 @@ class TreeDropdownField extends FormField { if($record) { $title = $record->{$this->labelField}; } else { - $title = _t('DropdownField.CHOOSE', '(Choose)', PR_MEDIUM, 'start value of a dropdown'); + $title = _t('DropdownField.CHOOSE', '(Choose)', 'start value of a dropdown'); } // TODO Implement for TreeMultiSelectField diff --git a/forms/TreeMultiselectField.php b/forms/TreeMultiselectField.php index 3529774fa..2647e0ba1 100644 --- a/forms/TreeMultiselectField.php +++ b/forms/TreeMultiselectField.php @@ -104,7 +104,7 @@ class TreeMultiselectField extends TreeDropdownField { $value = implode(",", $idArray); } } else { - $title = _t('DropdownField.CHOOSE', '(Choose)', PR_MEDIUM, 'start value of a dropdown'); + $title = _t('DropdownField.CHOOSE', '(Choose)', 'start value of a dropdown'); } return $this->createTag ( diff --git a/forms/gridfield/GridFieldAddExistingAutocompleter.php b/forms/gridfield/GridFieldAddExistingAutocompleter.php index e019667a8..a9f1f4629 100755 --- a/forms/gridfield/GridFieldAddExistingAutocompleter.php +++ b/forms/gridfield/GridFieldAddExistingAutocompleter.php @@ -252,13 +252,13 @@ class GridFieldAddExistingAutocompleter implements GridField_HTMLProvider, GridF } if($labels) { return sprintf( - _t('GridField.PlaceHolderWithLabels', 'Find %s by %s', PR_MEDIUM, 'Find by '), + _t('GridField.PlaceHolderWithLabels', 'Find %s by %s', 'Find by '), singleton($dataClass)->plural_name(), implode(', ', $labels) ); } else { return sprintf( - _t('GridField.PlaceHolder', 'Find %s', PR_MEDIUM, 'Find '), + _t('GridField.PlaceHolder', 'Find %s', 'Find '), singleton($dataClass)->plural_name() ); } diff --git a/i18n/i18n.php b/i18n/i18n.php index 31c017d2c..ba26922ba 100644 --- a/i18n/i18n.php +++ b/i18n/i18n.php @@ -12,7 +12,7 @@ require_once 'i18nRailsYamlAdapter.php'; * PHP: * * _t('MyNamespace.MYENTITY', 'My default natural language value'); - * _t('MyNamespace.MYENTITY', 'My default natural language value', PR_MEDIUM, 'My explanatory context'); + * _t('MyNamespace.MYENTITY', 'My default natural language value', 'My explanatory context'); * sprintf(_t('MyNamespace.MYENTITY', 'Counting %s things'), 42); * * diff --git a/i18n/i18nEntityProvider.php b/i18n/i18nEntityProvider.php index 86ae9e9d0..a9e620580 100644 --- a/i18n/i18nEntityProvider.php +++ b/i18n/i18nEntityProvider.php @@ -25,7 +25,7 @@ interface i18nEntityProvider { * foreach($this->stat('my_static_array) as $key => $value) { * $entities["MyTestClass.my_static_array_{$key}"] = array( * $value, - * PR_MEDIUM, + * * 'My context description' * ); * } @@ -52,7 +52,7 @@ interface i18nEntityProvider { * $entities = array(); * $entities["MyOtherModuleClass.MYENTITY"] = array( * $value, - * PR_MEDIUM, + * * 'My context description', * 'myothermodule' * ); diff --git a/model/DataObject.php b/model/DataObject.php index f6d12dd13..852ca21fd 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -3304,13 +3304,13 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity $entities["{$this->class}.SINGULARNAME"] = array( $this->singular_name(), - PR_MEDIUM, + 'Singular name of the object, used in dropdowns and to generally identify a single object in the interface' ); $entities["{$this->class}.PLURALNAME"] = array( $this->plural_name(), - PR_MEDIUM, + 'Pural name of the object, used in dropdowns and to generally identify a collection of this object in the interface' ); diff --git a/model/Versioned.php b/model/Versioned.php index 83360d369..5612cb201 100644 --- a/model/Versioned.php +++ b/model/Versioned.php @@ -1049,7 +1049,7 @@ class Versioned extends DataExtension { protected static $reading_mode = null; function updateFieldLabels(&$labels) { - $labels['Versions'] = _t('Versioned.has_many_Versions', 'Versions', PR_MEDIUM, 'Past Versions of this page'); + $labels['Versions'] = _t('Versioned.has_many_Versions', 'Versions', 'Past Versions of this page'); } function flushCache() { diff --git a/model/fieldtypes/Date.php b/model/fieldtypes/Date.php index f7630236f..7de0cca95 100644 --- a/model/fieldtypes/Date.php +++ b/model/fieldtypes/Date.php @@ -195,7 +195,7 @@ class Date extends DBField { _t( 'Date.TIMEDIFFAGO', "%s ago", - PR_MEDIUM, + 'Natural language time difference, e.g. 2 hours ago' ), $this->TimeDiff() @@ -205,7 +205,7 @@ class Date extends DBField { _t( 'Date.TIMEDIFFIN', "in %s", - PR_MEDIUM, + 'Natural language time difference, e.g. in 2 hours' ), $this->TimeDiff() diff --git a/security/Group.php b/security/Group.php index 0beb16083..65e1c45a5 100755 --- a/security/Group.php +++ b/security/Group.php @@ -189,13 +189,13 @@ class Group extends DataObject { $labels = parent::fieldLabels($includerelations); $labels['Title'] = _t('SecurityAdmin.GROUPNAME', 'Group name'); $labels['Description'] = _t('Group.Description', 'Description'); - $labels['Code'] = _t('Group.Code', 'Group Code', PR_MEDIUM, 'Programmatical code identifying a group'); - $labels['Locked'] = _t('Group.Locked', 'Locked?', PR_MEDIUM, 'Group is locked in the security administration area'); + $labels['Code'] = _t('Group.Code', 'Group Code', 'Programmatical code identifying a group'); + $labels['Locked'] = _t('Group.Locked', 'Locked?', 'Group is locked in the security administration area'); $labels['Sort'] = _t('Group.Sort', 'Sort Order'); if($includerelations){ - $labels['Parent'] = _t('Group.Parent', 'Parent Group', PR_MEDIUM, 'One group has one parent group'); - $labels['Permissions'] = _t('Group.has_many_Permissions', 'Permissions', PR_MEDIUM, 'One group has many permissions'); - $labels['Members'] = _t('Group.many_many_Members', 'Members', PR_MEDIUM, 'One group has many members'); + $labels['Parent'] = _t('Group.Parent', 'Parent Group', 'One group has one parent group'); + $labels['Permissions'] = _t('Group.has_many_Permissions', 'Permissions', 'One group has many permissions'); + $labels['Members'] = _t('Group.many_many_Members', 'Members', 'One group has many members'); } return $labels; diff --git a/security/Member.php b/security/Member.php index c589cf840..3b7f96bc6 100644 --- a/security/Member.php +++ b/security/Member.php @@ -630,7 +630,7 @@ class Member extends DataObject implements TemplateGlobalProvider { _t( 'Member.ValidationIdentifierFailed', 'Can\'t overwrite existing member #%d with identical identifier (%s = %s))', - PR_MEDIUM, + 'The values in brackets show a fieldname mapped to a value, usually denoting an existing email address' ), $existingRecord->ID, @@ -1104,7 +1104,7 @@ class Member extends DataObject implements TemplateGlobalProvider { $mainFields->replaceField('Locale', new DropdownField( "Locale", - _t('Member.INTERFACELANG', "Interface Language", PR_MEDIUM, 'Language of the CMS'), + _t('Member.INTERFACELANG', "Interface Language", 'Language of the CMS'), i18n::get_existing_translations() )); @@ -1208,11 +1208,11 @@ class Member extends DataObject implements TemplateGlobalProvider { $labels['Password'] = _t('Member.db_Password', 'Password'); $labels['NumVisit'] = _t('Member.db_NumVisit', 'Number of Visits'); $labels['LastVisited'] = _t('Member.db_LastVisited', 'Last Visited Date'); - $labels['PasswordExpiry'] = _t('Member.db_PasswordExpiry', 'Password Expiry Date', PR_MEDIUM, 'Password expiry date'); - $labels['LockedOutUntil'] = _t('Member.db_LockedOutUntil', 'Locked out until', PR_MEDIUM, 'Security related date'); + $labels['PasswordExpiry'] = _t('Member.db_PasswordExpiry', 'Password Expiry Date', 'Password expiry date'); + $labels['LockedOutUntil'] = _t('Member.db_LockedOutUntil', 'Locked out until', 'Security related date'); $labels['Locale'] = _t('Member.db_Locale', 'Interface Locale'); if($includerelations){ - $labels['Groups'] = _t('Member.belongs_many_many_Groups', 'Groups', PR_MEDIUM, 'Security Groups this member belongs to'); + $labels['Groups'] = _t('Member.belongs_many_many_Groups', 'Groups', 'Security Groups this member belongs to'); } return $labels; } @@ -1542,7 +1542,7 @@ class Member_ChangePasswordEmail extends Email { function __construct() { parent::__construct(); - $this->subject = _t('Member.SUBJECTPASSWORDCHANGED', "Your password has been changed", PR_MEDIUM, 'Email subject'); + $this->subject = _t('Member.SUBJECTPASSWORDCHANGED', "Your password has been changed", 'Email subject'); } } @@ -1560,7 +1560,7 @@ class Member_ForgotPasswordEmail extends Email { function __construct() { parent::__construct(); - $this->subject = _t('Member.SUBJECTPASSWORDRESET', "Your password reset link", PR_MEDIUM, 'Email subject'); + $this->subject = _t('Member.SUBJECTPASSWORDRESET', "Your password reset link", 'Email subject'); } } diff --git a/security/PermissionCheckboxSetField.php b/security/PermissionCheckboxSetField.php index 968ee929a..4f37bb854 100644 --- a/security/PermissionCheckboxSetField.php +++ b/security/PermissionCheckboxSetField.php @@ -114,7 +114,7 @@ class PermissionCheckboxSetField extends FormField { _t( 'PermissionCheckboxSetField.FromRole', 'inherited from role "%s"', - PR_MEDIUM, + 'A permission inherited from a certain permission role' ), $role->Title @@ -136,7 +136,7 @@ class PermissionCheckboxSetField extends FormField { _t( 'PermissionCheckboxSetField.FromRoleOnGroup', 'inherited from role "%s" on group "%s"', - PR_MEDIUM, + 'A permission inherited from a role on a certain group' ), $role->Title, @@ -153,7 +153,7 @@ class PermissionCheckboxSetField extends FormField { _t( 'PermissionCheckboxSetField.FromGroup', 'inherited from group "%s"', - PR_MEDIUM, + 'A permission inherited from a certain group' ), $parent->Title diff --git a/security/Security.php b/security/Security.php index cd4607360..3e1d05784 100644 --- a/security/Security.php +++ b/security/Security.php @@ -182,7 +182,7 @@ class Security extends Controller { 'Security.ALREADYLOGGEDIN', "You don't have access to this page. If you have another account that " . "can access that page, you can log in again below.", - PR_MEDIUM, + "%s will be replaced with a link to log in." ), 'logInAgain' => _t( diff --git a/templates/ComplexTableField.ss b/templates/ComplexTableField.ss index 79262244c..7df4cbc64 100644 --- a/templates/ComplexTableField.ss +++ b/templates/ComplexTableField.ss @@ -50,7 +50,7 @@ <% _t('ADDITEM', 'add') %> - <% sprintf(_t('ADDITEM', 'Add %s', PR_MEDIUM, 'Add [name]'),$Title) %> + <% sprintf(_t('ADDITEM', 'Add %s', 'Add [name]'),$Title) %> <% control Actions %> <% end_control %> diff --git a/templates/email/ChangePasswordEmail.ss b/templates/email/ChangePasswordEmail.ss index 749791c3d..5a7a8d374 100644 --- a/templates/email/ChangePasswordEmail.ss +++ b/templates/email/ChangePasswordEmail.ss @@ -1,7 +1,7 @@

<% _t('HELLO', 'Hi') %> $FirstName,

- <% _t('CHANGEPASSWORDTEXT1', 'You changed your password for', PR_MEDIUM, 'for a url') %> $AbsoluteBaseURL.
+ <% _t('CHANGEPASSWORDTEXT1', 'You changed your password for', 'for a url') %> $AbsoluteBaseURL.
<% _t('CHANGEPASSWORDTEXT2', 'You can now use the following credentials to log in:') %>

diff --git a/tests/filesystem/UploadTest.php b/tests/filesystem/UploadTest.php index 636ffed6f..8816d00b5 100644 --- a/tests/filesystem/UploadTest.php +++ b/tests/filesystem/UploadTest.php @@ -337,7 +337,7 @@ class UploadTest_Validator extends Upload_Validator implements TestOnly { _t( 'File.TOOLARGE', 'Filesize is too large, maximum %s allowed.', - PR_MEDIUM, + 'Argument 1: Filesize (e.g. 1MB)' ), $arg @@ -351,7 +351,7 @@ class UploadTest_Validator extends Upload_Validator implements TestOnly { _t( 'File.INVALIDEXTENSION', 'Extension is not allowed (valid: %s)', - PR_MEDIUM, + 'Argument 1: Comma-separated list of valid extensions' ), implode(',', $this->allowedExtensions) diff --git a/tests/i18n/_fakewebroot/i18ntestmodule/code/i18nTestModule.php b/tests/i18n/_fakewebroot/i18ntestmodule/code/i18nTestModule.php index 9275007fd..30ef4b6e0 100644 --- a/tests/i18n/_fakewebroot/i18ntestmodule/code/i18nTestModule.php +++ b/tests/i18n/_fakewebroot/i18ntestmodule/code/i18nTestModule.php @@ -9,7 +9,6 @@ class i18nTestModule extends DataObject implements TestOnly { _t( 'i18nTestModule.ENTITY', 'Entity with "Double Quotes"', - PR_LOW, 'Comment for entity' ); }