From 77ec21fe9de8f23ca5116344e0e8ea188219121e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 6 Aug 2012 13:44:33 +0200 Subject: [PATCH] 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. --- templates/CMSPageHistoryController_versions.ss | 10 +++++----- templates/Includes/AssetAdmin_Tools.ss | 4 ++-- .../Includes/CMSPagesController_ContentToolbar.ss | 4 ++-- templates/Includes/CMSPagesController_Tools.ss | 4 ++-- templates/email/ViewArchivedEmail.ss | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/templates/CMSPageHistoryController_versions.ss b/templates/CMSPageHistoryController_versions.ss index b69f7935..57e9a4ba 100755 --- a/templates/CMSPageHistoryController_versions.ss +++ b/templates/CMSPageHistoryController_versions.ss @@ -2,9 +2,9 @@ - <% _t('WHEN','When') %> - <% _t('AUTHOR','Author') %> - <% _t('PUBLISHER','Publisher') %> + <% _t('CMSPageHistoryController_versions.ss.WHEN','When') %> + <% _t('CMSPageHistoryController_versions.ss.AUTHOR','Author') %> + <% _t('CMSPageHistoryController_versions.ss.PUBLISHER','Publisher') %> @@ -15,8 +15,8 @@ <% with LastEdited %> $Nice <% end_with %> - <% if Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('UNKNOWN','Unknown') %><% end_if %> - <% if Published %><% if Publisher %>$Publisher.FirstName $Publisher.Surname.Initial<% else %><% _t('UNKNOWN','Unknown') %><% end_if %><% else %><% _t('NOTPUBLISHED','Not published') %><% end_if %> + <% if Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('CMSPageHistoryController_versions.ss.UNKNOWN','Unknown') %><% end_if %> + <% 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 %> <% end_loop %> diff --git a/templates/Includes/AssetAdmin_Tools.ss b/templates/Includes/AssetAdmin_Tools.ss index d36a13d7..74b8b47b 100644 --- a/templates/Includes/AssetAdmin_Tools.ss +++ b/templates/Includes/AssetAdmin_Tools.ss @@ -1,9 +1,9 @@ \ No newline at end of file diff --git a/templates/Includes/CMSPagesController_ContentToolbar.ss b/templates/Includes/CMSPagesController_ContentToolbar.ss index 6717ce38..5273e0e5 100644 --- a/templates/Includes/CMSPagesController_ContentToolbar.ss +++ b/templates/Includes/CMSPagesController_ContentToolbar.ss @@ -3,12 +3,12 @@ <% if CanOrganiseSitetree %>
- +
<% end_if %>
- +
<% include CMSPagesController_ContentToolActions %> diff --git a/templates/Includes/CMSPagesController_Tools.ss b/templates/Includes/CMSPagesController_Tools.ss index dc683273..c90e904f 100644 --- a/templates/Includes/CMSPagesController_Tools.ss +++ b/templates/Includes/CMSPagesController_Tools.ss @@ -1,9 +1,9 @@ \ No newline at end of file diff --git a/templates/email/ViewArchivedEmail.ss b/templates/email/ViewArchivedEmail.ss index 202e2bb8..c7863e01 100644 --- a/templates/email/ViewArchivedEmail.ss +++ b/templates/email/ViewArchivedEmail.ss @@ -1,3 +1,3 @@ -<% _t('HAVEASKED','You have asked to view the content of our site on',30,'Followed by a date') %> $ArchiveDate.Date +<% _t('ViewArchivedEmail.ss.HAVEASKED','You have asked to view the content of our site on',30,'Followed by a date') %> $ArchiveDate.Date -<% _t('CANACCESS','You can access the archived site at this link:') %> $ArchiveURL \ No newline at end of file +<% _t('ViewArchivedEmail.ss.CANACCESS','You can access the archived site at this link:') %> $ArchiveURL \ No newline at end of file