Skip to content
This repository
Browse code

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 77ec21fe9de8f23ca5116344e0e8ea188219121e 1 parent 2276336
Ingo Schommer authored August 06, 2012
10  templates/CMSPageHistoryController_versions.ss
@@ -2,9 +2,9 @@
2 2
 	<thead>
3 3
 		<tr>
4 4
 			<th class="ui-helper-hidden"></th>
5  
-			<th><% _t('WHEN','When') %></th>
6  
-			<th><% _t('AUTHOR','Author') %></th>
7  
-			<th><% _t('PUBLISHER','Publisher') %></th>
  5
+			<th><% _t('CMSPageHistoryController_versions.ss.WHEN','When') %></th>
  6
+			<th><% _t('CMSPageHistoryController_versions.ss.AUTHOR','Author') %></th>
  7
+			<th><% _t('CMSPageHistoryController_versions.ss.PUBLISHER','Publisher') %></th>
8 8
 		</tr>
9 9
 	</thead>
10 10
 	
@@ -15,8 +15,8 @@
15 15
 			<% with LastEdited %>
16 16
 				<td class="last-edited first-column" title="$Ago - $Nice">$Nice</td>
17 17
 			<% end_with %>
18  
-			<td><% if Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('UNKNOWN','Unknown') %><% end_if %></td>
19  
-			<td class="last-column"><% if Published %><% if Publisher %>$Publisher.FirstName $Publisher.Surname.Initial<% else %><% _t('UNKNOWN','Unknown') %><% end_if %><% else %><% _t('NOTPUBLISHED','Not published') %><% end_if %></td>			
  18
+			<td><% if Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %></td>
  19
+			<td class="last-column"><% if Published %><% if Publisher %>$Publisher.FirstName $Publisher.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %><% else %><% _t('CMSPageHistoryController_versions.ss.NOTPUBLISHED','Not published') %><% end_if %></td>			
20 20
 		</tr>
21 21
 		<% end_loop %>
22 22
 	</tbody>
4  templates/Includes/AssetAdmin_Tools.ss
... ...
@@ -1,9 +1,9 @@
1 1
 <div class="cms-content-tools west cms-panel cms-panel-layout collapsed" id="cms-content-tools-AssetAdmin" data-expandOnClick="true" data-layout-type="border">
2 2
 	<div class="cms-panel-content center">
3  
-		<h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
  3
+		<h3 class="cms-panel-header"><% _t('AssetAdmin_Tools.FILTER', 'Filter') %></h3>
4 4
 		$SearchForm
5 5
 	</div>
6 6
 	<div class="cms-panel-content-collapsed">
7  
-		<h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
  7
+		<h3 class="cms-panel-header"><% _t('AssetAdmin_Tools.FILTER', 'Filter') %></h3>
8 8
 	</div>
9 9
 </div>
4  templates/Includes/CMSPagesController_ContentToolbar.ss
@@ -3,12 +3,12 @@
3 3
 	<% if CanOrganiseSitetree %> 
4 4
 	<div class="checkboxAboveTree">
5 5
 		<input type="radio" name="view-mode" class="view-mode" value="draggable" id="view-mode-draggable" checked="checked" />
6  
-		<label for="view-mode-draggable"><% _t("ENABLEDRAGGING","Drag'n'drop") %></label>
  6
+		<label for="view-mode-draggable"><% _t("CMSPagesController_ContentToolbar.ss.ENABLEDRAGGING","Drag'n'drop") %></label>
7 7
 	</div>
8 8
 	<% end_if %>
9 9
 	<div>
10 10
 		<input type="radio" name="view-mode" class="view-mode" value="multiselect" id="view-mode-multiselect" />
11  
-		<label for="view-mode-multiselect"><% _t("MULTISELECT","Multi-selection") %></label>
  11
+		<label for="view-mode-multiselect"><% _t("CMSPagesController_ContentToolbar.ss.MULTISELECT","Multi-selection") %></label>
12 12
 	</div>
13 13
 </div>
14 14
 <% include CMSPagesController_ContentToolActions %>
4  templates/Includes/CMSPagesController_Tools.ss
... ...
@@ -1,9 +1,9 @@
1 1
 <div class="cms-content-tools west cms-panel cms-panel-layout collapsed" data-expandOnClick="true" data-layout-type="border" id="cms-content-tools-CMSPagesController">
2 2
 	<div class="cms-panel-content center">
3  
-		<h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
  3
+		<h3 class="cms-panel-header"><% _t('CMSPagesController_Tools.ss.FILTER', 'Filter') %></h3>
4 4
 		$SearchForm
5 5
 	</div>
6 6
 	<div class="cms-panel-content-collapsed">
7  
-		<h3 class="cms-panel-header"><% _t('FILTER', 'Filter') %></h3>
  7
+		<h3 class="cms-panel-header"><% _t('CMSPagesController_Tools.ss.FILTER', 'Filter') %></h3>
8 8
 	</div>
9 9
 </div>
4  templates/email/ViewArchivedEmail.ss
... ...
@@ -1,3 +1,3 @@
1  
-<% _t('HAVEASKED','You have asked to view the content of our site on',30,'Followed by a date') %> $ArchiveDate.Date
  1
+<% _t('ViewArchivedEmail.ss.HAVEASKED','You have asked to view the content of our site on',30,'Followed by a date') %> $ArchiveDate.Date
2 2
 
3  
-<% _t('CANACCESS','You can access the archived site at this link:') %> $ArchiveURL
  3
+<% _t('ViewArchivedEmail.ss.CANACCESS','You can access the archived site at this link:') %> $ArchiveURL

0 notes on commit 77ec21f

Please sign in to comment.
Something went wrong with that request. Please try again.