Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUG Fully qualified namespace for _t() in templates

Was inferred by the containing file previously,
which is deprecated behaviour, because it obscures
the fact that renaming an template file or copying
template code will change the context of the translations.
While it would be nice to use shorter and more readable namespaces,
this change would remove all existing translations.
Since there is no (easy) migration of entities to a new namespace,
having verbose template code is the lesser of two evils.
  • Loading branch information...
commit d0a98110872a875e358e98c554a7c80cebb735b0 1 parent b135218
@chillu chillu authored
View
2  admin/templates/Includes/BackLink_Button.ss
@@ -1,7 +1,7 @@
<% if Backlink %>
<div class="cms_backlink">
<a class="backlink ss-ui-button cms-panel-link" data-icon="back" href="$Backlink">
- <% _t('Back', 'Back') %>
+ <% _t('BackLink_Button.ss.Back', 'Back') %>
</a>
</div>
<% end_if %>
View
4 admin/templates/Includes/CMSLoadingScreen.ss
@@ -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...') %>" />
- <noscript><p class="nojs-warning"><span class="message notice"><% _t('REQUIREJS','The CMS requires that you have JavaScript enabled.') %></span></p></noscript>
+ <img class="loading-animation" src="$ModulePath(frameworkadmin)/images/spinner.gif" alt="<% _t('CMSLoadingScreen.ss.LOADING','Loading...') %>" />
+ <noscript><p class="nojs-warning"><span class="message notice"><% _t('CMSLoadingScreen.ss.REQUIREJS','The CMS requires that you have JavaScript enabled.') %></span></p></noscript>
</div>
</div>
View
4 admin/templates/Includes/LeftAndMain_Menu.ss
@@ -8,10 +8,10 @@
</div>
<div class="cms-login-status">
- <a href="Security/logout" class="logout-link" title="<% _t('LOGOUT','Log out') %>"><% _t('LOGOUT','Log out') %></a>
+ <a href="Security/logout" class="logout-link" title="<% _t('LeftAndMain_Menu.ss.LOGOUT','Log out') %>"><% _t('LeftAndMain_Menu.ss.LOGOUT','Log out') %></a>
<% with CurrentMember %>
<span>
- <% _t('Hello','Hi') %>
+ <% _t('LeftAndMain_Menu.ss.Hello','Hi') %>
<a href="{$AbsoluteBaseURL}admin/myprofile" class="profile-link ss-ui-dialog-link" data-popupclass="edit-profile-popup">
<% if FirstName && Surname %>$FirstName $Surname<% else_if FirstName %>$FirstName<% else %>$Email<% end_if %>
</a>
View
6 admin/templates/Includes/ModelAdmin_ImportSpec.ss
@@ -1,8 +1,8 @@
<div class="importSpec" id="SpecFor{$ModelName}">
<a href="#SpecDetailsFor{$ModelName}" class="detailsLink"><% sprintf(_t('IMPORTSPECLINK', 'Show Specification for %s'),$ModelName) %></a>
<div class="details" id="SpecDetailsFor{$ModelName}">
- <h4><% sprintf(_t('IMPORTSPECTITLE', 'Specification for %s'),$ModelName) %></h4>
- <h5><% _t('IMPORTSPECFIELDS', 'Database columns') %></h5>
+ <h4><% sprintf(_t('ModelAdmin_ImportSpec.ss.IMPORTSPECTITLE', 'Specification for %s'),$ModelName) %></h4>
+ <h5><% _t('ModelAdmin_ImportSpec.ss.IMPORTSPECFIELDS', 'Database columns') %></h5>
<% loop Fields %>
<dl>
<dt><em>$Name</em></dt>
@@ -10,7 +10,7 @@
</dl>
<% end_loop %>
- <h5><% _t('IMPORTSPECRELATIONS', 'Relations') %></h5>
+ <h5><% _t('ModelAdmin_ImportSpec.ss.IMPORTSPECRELATIONS', 'Relations') %></h5>
<% loop Relations %>
<dl>
<dt><em>$Name</em></dt>
View
6 admin/templates/Includes/ModelAdmin_Tools.ss
@@ -1,14 +1,14 @@
<div class="cms-content-tools west cms-panel cms-panel-layout" id="cms-content-tools-ModelAdmin" data-expandOnClick="true" data-layout-type="border">
<div class="cms-panel-content center">
- <h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
+ <h3 class="cms-panel-header"><% _t('ModelAdmin_Tools.ss.FILTER', 'Filter') %></h3>
$SearchForm
<% if ImportForm %>
- <h3 class="cms-panel-header"><% _t('IMPORT', 'Import') %></h3>
+ <h3 class="cms-panel-header"><% _t('ModelAdmin_Tools.ss.IMPORT', 'Import') %></h3>
$ImportForm
<% end_if %>
</div>
<div class="cms-panel-content-collapsed">
- <h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
+ <h3 class="cms-panel-header"><% _t('ModelAdmin_Tools.ss.FILTER', 'Filter') %></h3>
</div>
</div>
View
4 admin/templates/ModelSidebar.ss
@@ -1,7 +1,7 @@
-<h3><% _t('SEARCHLISTINGS','Search') %></h3>
+<h3><% _t('ModelSidebar.ss.SEARCHLISTINGS','Search') %></h3>
$SearchForm
<% if ImportForm %>
- <h3><% _t('IMPORT_TAB_HEADER', 'Import') %></h3>
+ <h3><% _t('ModelSidebar.ss.IMPORT_TAB_HEADER', 'Import') %></h3>
$ImportForm
<% end_if %>
View
8 templates/ComplexTableField.ss
@@ -17,9 +17,9 @@
<span class="sortLink <% if SortBy %><% else %>sortLinkHidden<% end_if %>">
<a href="$SortLink">
<% if SortDirection = desc %>
- <img src="$ModulePath(framework)/images/bullet_arrow_up.png" alt="<% _t('SORTASC', 'Sort ascending') %>" />
+ <img src="$ModulePath(framework)/images/bullet_arrow_up.png" alt="<% _t('ComplexTableField.ss.SORTASC', 'Sort ascending') %>" />
<% else %>
- <img src="$ModulePath(framework)/images/bullet_arrow_down.png" alt="<% _t('SORTDESC', 'Sort descending') %>" />
+ <img src="$ModulePath(framework)/images/bullet_arrow_down.png" alt="<% _t('ComplexTableField.ss.SORTDESC', 'Sort descending') %>" />
<% end_if %>
</a>
&nbsp;
@@ -49,7 +49,7 @@
<td colspan="$ItemCount">
<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') %>" />
+ <a class="popuplink addlink" href="$AddLink" alt="add"><img src="$ModulePath(framework)/images/add.gif" alt="<% _t('ComplexTableField.ss.ADDITEM', 'add') %>" />
<% sprintf(_t('ADDITEM', 'Add %s', 'Add [name]'),$Title) %>
</a>
</td>
@@ -65,7 +65,7 @@
<% else %>
<tr class="notfound">
<% if Markable %><th width="18">&nbsp;</th><% end_if %>
- <td colspan="$Headings.Count"><i><% _t('NOITEMSFOUND', 'No items found') %></i></td>
+ <td colspan="$Headings.Count"><i><% _t('ComplexTableField.ss.NOITEMSFOUND', 'No items found') %></i></td>
<% loop Actions %><td width="18">&nbsp;</td><% end_loop %>
</tr>
<% end_if %>
View
4 templates/ComplexTableField_popup.ss
@@ -15,7 +15,7 @@
<tr>
<% if Paginator.PrevLink %>
<td id="ComplexTableField_Pagination_Previous">
- <a href="$Paginator.PrevLink"><img src="$ModulePath(framework)/images/pagination/record-prev.png" /><% _t('PREVIOUS', 'Previous') %></a>
+ <a href="$Paginator.PrevLink"><img src="$ModulePath(framework)/images/pagination/record-prev.png" /><% _t('ComplexTableField_popup.ss.PREVIOUS', 'Previous') %></a>
</td>
<% end_if %>
<% if xdsfdsf %>
@@ -32,7 +32,7 @@
<% end_if %>
<% if Paginator.NextLink %>
<td id="ComplexTableField_Pagination_Next">
- <a href="$Paginator.NextLink"><% _t('NEXT', 'Next') %><img src="$ModulePath(framework)/images/pagination/record-next.png" /></a>
+ <a href="$Paginator.NextLink"><% _t('ComplexTableField_popup.ss.NEXT', 'Next') %><img src="$ModulePath(framework)/images/pagination/record-next.png" /></a>
</td>
<% end_if %>
</tr>
View
2  templates/FileIFrameField_iframe.ss
@@ -4,7 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<% base_tag %>
- <title><% _t('TITLE', 'Image Uploading Iframe') %></title>
+ <title><% _t('FileIFrameField_iframe.ss.TITLE', 'Image Uploading Iframe') %></title>
</head>
<body>
View
2  templates/Image_iframe.ss
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<% base_tag %>
- <title><% _t('TITLE', 'Image Uploading Iframe') %></title>
+ <title><% _t('Image_iframe.ss.TITLE', 'Image Uploading Iframe') %></title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
</head>
View
18 templates/Includes/TableListField_PageControls.ss
@@ -1,17 +1,17 @@
<% if ShowPagination %>
<% if TotalCount %>
<div class="PageControls">
- <% if FirstLink %><a class="First" href="$FirstLink" title="<% _t('VIEWFIRST', 'View first') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-first.png" alt="<% _t('VIEWFIRST', 'View first') %> $PageSize" /></a>
- <% else %><span class="First"><img src="$ModulePath(framework)/images/pagination/record-first-g.png" alt="<% _t('VIEWFIRST', 'View first') %> $PageSize" /></span><% end_if %>
- <% if PrevLink %><a class="Prev" href="$PrevLink" title="<% _t('VIEWPREVIOUS', 'View previous') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-prev.png" alt="<% _t('VIEWPREVIOUS', 'View previous') %> $PageSize" /></a>
- <% else %><img class="Prev" src="$ModulePath(framework)/images/pagination/record-prev-g.png" alt="<% _t('VIEWPREVIOUS', 'View previous') %> $PageSize" /><% end_if %>
+ <% if FirstLink %><a class="First" href="$FirstLink" title="<% _t('TableListField_PageControls.ss.VIEWFIRST', 'View first') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-first.png" alt="<% _t('TableListField_PageControls.ss.VIEWFIRST', 'View first') %> $PageSize" /></a>
+ <% else %><span class="First"><img src="$ModulePath(framework)/images/pagination/record-first-g.png" alt="<% _t('TableListField_PageControls.ss.VIEWFIRST', 'View first') %> $PageSize" /></span><% end_if %>
+ <% if PrevLink %><a class="Prev" href="$PrevLink" title="<% _t('TableListField_PageControls.ss.VIEWPREVIOUS', 'View previous') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-prev.png" alt="<% _t('TableListField_PageControls.ss.VIEWPREVIOUS', 'View previous') %> $PageSize" /></a>
+ <% else %><img class="Prev" src="$ModulePath(framework)/images/pagination/record-prev-g.png" alt="<% _t('TableListField_PageControls.ss.VIEWPREVIOUS', 'View previous') %> $PageSize" /><% end_if %>
<span class="Count">
- <% _t('DISPLAYING', 'Displaying') %> $FirstItem <% _t('TO', 'to') %> $LastItem <% _t('OF', 'of') %> $TotalCount
+ <% _t('DISPLAYING', 'Displaying') %> $FirstItem <% _t('TableListField_PageControls.ss.TO', 'to') %> $LastItem <% _t('TableListField_PageControls.ss.OF', 'of') %> $TotalCount
</span>
- <% if NextLink %><a class="Next" href="$NextLink" title="<% _t('VIEWNEXT', 'View next') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-next.png" alt="<% _t('VIEWNEXT', 'View next') %> $PageSize" /></a>
- <% else %><img class="Next" src="$ModulePath(framework)/images/pagination/record-next-g.png" alt="<% _t('VIEWNEXT', 'View next') %> $PageSize" /><% end_if %>
- <% if LastLink %><a class="Last" href="$LastLink" title="<% _t('VIEWLAST', 'View last') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-last.png" alt="<% _t('VIEWLAST', 'View last') %> $PageSize" /></a>
- <% else %><span class="Last"><img src="$ModulePath(framework)/images/pagination/record-last-g.png" alt="<% _t('VIEWLAST', 'View last') %> $PageSize" /></span><% end_if %>
+ <% if NextLink %><a class="Next" href="$NextLink" title="<% _t('TableListField_PageControls.ss.VIEWNEXT', 'View next') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-next.png" alt="<% _t('TableListField_PageControls.ss.VIEWNEXT', 'View next') %> $PageSize" /></a>
+ <% else %><img class="Next" src="$ModulePath(framework)/images/pagination/record-next-g.png" alt="<% _t('TableListField_PageControls.ss.VIEWNEXT', 'View next') %> $PageSize" /><% end_if %>
+ <% if LastLink %><a class="Last" href="$LastLink" title="<% _t('TableListField_PageControls.ss.VIEWLAST', 'View last') %> $PageSize"><img src="$ModulePath(framework)/images/pagination/record-last.png" alt="<% _t('TableListField_PageControls.ss.VIEWLAST', 'View last') %> $PageSize" /></a>
+ <% else %><span class="Last"><img src="$ModulePath(framework)/images/pagination/record-last-g.png" alt="<% _t('TableListField_PageControls.ss.VIEWLAST', 'View last') %> $PageSize" /></span><% end_if %>
</div>
<% end_if %>
View
6 templates/RelationComplexTableField.ss
@@ -34,7 +34,7 @@
<td colspan="$ItemCount">
<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="<% _t('ADD', 'Add') %>"><img src="$ModulePath(framework)/images/add.gif" alt="<% _t('ADD', 'Add') %>" /><% _t('ADD', 'Add') %> $Title</a>
+ <a class="popuplink addlink" href="$AddLink" alt="<% _t('RelationComplexTableField.ss.ADD', 'Add') %>"><img src="$ModulePath(framework)/images/add.gif" alt="<% _t('ADD', 'Add') %>" /><% _t('RelationComplexTableField.ss.ADD', 'Add') %> $Title</a>
</td>
<% if Can(show) %><td width="18">&nbsp;</td><% end_if %>
<% if Can(edit) %><td width="18">&nbsp;</td><% end_if %>
@@ -50,7 +50,7 @@
<% else %>
<tr class="notfound">
<% if Markable %><th width="18">&nbsp;</th><% end_if %>
- <td colspan="$Headings.Count"><i><% _t('NOTFOUND', 'No items found') %></i></td>
+ <td colspan="$Headings.Count"><i><% _t('RelationComplexTableField.ss.NOTFOUND', 'No items found') %></i></td>
<% if Can(show) %><td width="18">&nbsp;</td><% end_if %>
<% if Can(edit) %><td width="18">&nbsp;</td><% end_if %>
<% if Can(delete) %><td width="18">&nbsp;</td><% end_if %>
@@ -61,7 +61,7 @@
$ExtraData
<div class="utility">
<% if Can(export) %>
- <a href="$ExportLink" target="_blank"><% _t('CSVEXPORT', 'Export to CSV' ) %></a>
+ <a href="$ExportLink" target="_blank"><% _t('RelationComplexTableField.ss.CSVEXPORT', 'Export to CSV' ) %></a>
<% end_if %>
</div>
</div>
View
8 templates/TableField.ss
@@ -30,8 +30,8 @@
<% if Can(add) %>
<tr>
<td colspan="$ItemCount">
- <a href="#" class="addrow" title="<% _t('ADD', 'Add a new row') %>"><img src="$ModulePath(framework)/images/add.gif" alt="<% _t('ADD','Add a new row') %>" />
- <% sprintf(_t('ADDITEM','Add %s'),$Title) %>
+ <a href="#" class="addrow" title="<% _t('TableField.ss.ADD', 'Add a new row') %>"><img src="$ModulePath(framework)/images/add.gif" alt="<% _t('TableField.ss.ADD','Add a new row') %>" />
+ <% sprintf(_t('TableField.ss.ADDITEM','Add %s'),$Title) %>
</a>
</td>
<td style="display: none"></td>
@@ -47,13 +47,13 @@
<td class="$FieldClass $extraClass $ClassName $Title tablecolumn">$Field</td>
<% end_loop %>
<td style="display: none">$ExtraData</td>
- <% if Can(delete) %><td width="18"><a class="deletelink" href="$DeleteLink" title="<% _t('DELETEROW') %>"><img src="$ModulePath(framework)/images/delete.gif" alt="<% _t('DELETE') %>" /></a></td><% end_if %>
+ <% if Can(delete) %><td width="18"><a class="deletelink" href="$DeleteLink" title="<% _t('TableField.ss.DELETEROW') %>"><img src="$ModulePath(framework)/images/delete.gif" alt="<% _t('TableField.ss.DELETE') %>" /></a></td><% end_if %>
</tr>
<% end_loop %>
<% else %>
<tr class="notfound">
<% if Markable %><th width="18">&nbsp;</th><% end_if %>
- <td colspan="$Headings.Count"><i><% _t('NOITEMSFOUND') %></i></td>
+ <td colspan="$Headings.Count"><i><% _t('TableField.ss.NOITEMSFOUND') %></i></td>
<% if Can(delete) %><td width="18">&nbsp;</td><% end_if %>
</tr>
<% end_if %>
View
6 templates/TableListField.ss
@@ -24,9 +24,9 @@
</span>
<span class="sortLink <% if SortBy %><% else %>sortLinkHidden<% end_if %>">
<% if SortDirection = desc %>
- <a href="$SortLink"><img src="$ModulePath(framework)/images/bullet_arrow_up.png" alt="<% _t('SORTDESC', 'Sort in descending order') %>" /></a>
+ <a href="$SortLink"><img src="$ModulePath(framework)/images/bullet_arrow_up.png" alt="<% _t('TableListField.ss.SORTDESC', 'Sort in descending order') %>" /></a>
<% else %>
- <a href="$SortLink"><img src="$ModulePath(framework)/images/bullet_arrow_down.png" alt="<% _t('SORTASC', 'Sort in ascending order') %>" /></a>
+ <a href="$SortLink"><img src="$ModulePath(framework)/images/bullet_arrow_down.png" alt="<% _t('TableListField.ss.SORTASC', 'Sort in ascending order') %>" /></a>
<% end_if %>
</a>
&nbsp;
@@ -67,7 +67,7 @@
<% else %>
<tr class="notfound">
<% if Markable %><th width="18">&nbsp;</th><% end_if %>
- <td colspan="$Headings.Count"><i><% _t('NOITEMSFOUND','No items found') %></i></td>
+ <td colspan="$Headings.Count"><i><% _t('TableListField.ss.NOITEMSFOUND','No items found') %></i></td>
<% if Can(delete) %><td width="18">&nbsp;</td><% end_if %>
</tr>
<% end_if %>
View
10 templates/email/ChangePasswordEmail.ss
@@ -1,11 +1,11 @@
-<p><% _t('HELLO', 'Hi') %> $FirstName,</p>
+<p><% _t('ChangePasswordEmail.ss.HELLO', 'Hi') %> $FirstName,</p>
<p>
- <% _t('CHANGEPASSWORDTEXT1', 'You changed your password for', 'for a url') %> $AbsoluteBaseURL.<br />
- <% _t('CHANGEPASSWORDTEXT2', 'You can now use the following credentials to log in:') %>
+ <% _t('ChangePasswordEmail.ss.CHANGEPASSWORDTEXT1', 'You changed your password for', 'for a url') %> $AbsoluteBaseURL.<br />
+ <% _t('ChangePasswordEmail.ss.CHANGEPASSWORDTEXT2', 'You can now use the following credentials to log in:') %>
</p>
<p>
- <% _t('EMAIL', 'Email') %>: $Email<br />
- <% _t('PASSWORD', 'Password') %>: $CleartextPassword
+ <% _t('ChangePasswordEmail.ss.EMAIL', 'Email') %>: $Email<br />
+ <% _t('ChangePasswordEmail.ss.PASSWORD', 'Password') %>: $CleartextPassword
</p>
View
4 templates/email/ForgotPasswordEmail.ss
@@ -1,4 +1,4 @@
-<p><% _t('HELLO', 'Hi') %> $FirstName,</p>
+<p><% _t('ForgotPasswordEmail.ss.HELLO', 'Hi') %> $FirstName,</p>
-<p><% _t('TEXT1', 'Here is your') %> <a href="$PasswordResetLink"><% _t('TEXT2', 'password reset link') %></a> <% _t('TEXT3', 'for') %> $AbsoluteBaseURL.</p>
+<p><% _t('ForgotPasswordEmail.ss.TEXT1', 'Here is your') %> <a href="$PasswordResetLink"><% _t('ForgotPasswordEmail.ss.TEXT2', 'password reset link') %></a> <% _t('ForgotPasswordEmail.ss.TEXT3', 'for') %> $AbsoluteBaseURL.</p>
Please sign in to comment.
Something went wrong with that request. Please try again.