mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Removed deprecated usage of $priority argument in _t() calls
This commit is contained in:
parent
b81863cfd9
commit
d44f6b3e1f
@ -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;
|
||||
}
|
||||
|
@ -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')
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="ss-loading-screen">
|
||||
<div class="loading-logo">
|
||||
<img class="loading-animation" src="$ModulePath(frameworkadmin)/images/spinner.gif" alt="<% _t('LOADING','Loading...',PR_HIGH) %>" />
|
||||
<noscript><p class="nojs-warning"><span class="message notice"><% _t('REQUIREJS','The CMS requires that you have JavaScript enabled.',PR_HIGH) %></span></p></noscript>
|
||||
<img class="loading-animation" src="$ModulePath(frameworkadmin)/images/spinner.gif" alt="<% _t('LOADING','Loading...') %>" />
|
||||
<noscript><p class="nojs-warning"><span class="message notice"><% _t('REQUIREJS','The CMS requires that you have JavaScript enabled.') %></span></p></noscript>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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'
|
||||
);
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -252,13 +252,13 @@ class GridFieldAddExistingAutocompleter implements GridField_HTMLProvider, GridF
|
||||
}
|
||||
if($labels) {
|
||||
return sprintf(
|
||||
_t('GridField.PlaceHolderWithLabels', 'Find %s by %s', PR_MEDIUM, 'Find <object type> by <field names>'),
|
||||
_t('GridField.PlaceHolderWithLabels', 'Find %s by %s', 'Find <object type> by <field names>'),
|
||||
singleton($dataClass)->plural_name(),
|
||||
implode(', ', $labels)
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
_t('GridField.PlaceHolder', 'Find %s', PR_MEDIUM, 'Find <object type>'),
|
||||
_t('GridField.PlaceHolder', 'Find %s', 'Find <object type>'),
|
||||
singleton($dataClass)->plural_name()
|
||||
);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ require_once 'i18nRailsYamlAdapter.php';
|
||||
* PHP:
|
||||
* <code>
|
||||
* _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);
|
||||
* </code>
|
||||
*
|
||||
|
@ -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'
|
||||
* );
|
||||
|
@ -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'
|
||||
);
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
@ -50,7 +50,7 @@
|
||||
<input type="hidden" id="{$id}_PopupHeight" value="$PopupHeight" disabled="disabled">
|
||||
<input type="hidden" id="{$id}_PopupWidth" value="$PopupWidth" disabled="disabled">
|
||||
<a class="popuplink addlink" href="$AddLink" alt="add"><img src="$ModulePath(framework)/images/add.gif" alt="<% _t('ADDITEM', 'add') %>" />
|
||||
<% sprintf(_t('ADDITEM', 'Add %s', PR_MEDIUM, 'Add [name]'),$Title) %>
|
||||
<% sprintf(_t('ADDITEM', 'Add %s', 'Add [name]'),$Title) %>
|
||||
</a>
|
||||
</td>
|
||||
<% control Actions %><td width="18"> </td><% end_control %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<p><% _t('HELLO', 'Hi') %> $FirstName,</p>
|
||||
|
||||
<p>
|
||||
<% _t('CHANGEPASSWORDTEXT1', 'You changed your password for', PR_MEDIUM, 'for a url') %> $AbsoluteBaseURL.<br />
|
||||
<% _t('CHANGEPASSWORDTEXT1', 'You changed your password for', 'for a url') %> $AbsoluteBaseURL.<br />
|
||||
<% _t('CHANGEPASSWORDTEXT2', 'You can now use the following credentials to log in:') %>
|
||||
</p>
|
||||
|
||||
|
@ -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)
|
||||
|
@ -9,7 +9,6 @@ class i18nTestModule extends DataObject implements TestOnly {
|
||||
_t(
|
||||
'i18nTestModule.ENTITY',
|
||||
'Entity with "Double Quotes"',
|
||||
PR_LOW,
|
||||
'Comment for entity'
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user