From 0f781142315118d9ffac49dec14cbe1d7bdf8539 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Mon, 11 Jul 2016 17:57:31 +0100 Subject: [PATCH 1/4] Added translations to all english strings Moved locales back into conventional place to help people in the future find them where they'd expect --- .../document_footer.raw.html.erb | 22 ++++++-- .../government_navigation.raw.html.erb | 54 +++++++++++++++---- .../govuk_component/metadata.raw.html.erb | 16 +++--- .../previous_and_next_navigation.raw.html.erb | 6 ++- .../related_items.raw.html.erb | 3 +- app/views/locales/en.yml | 4 -- config/locales/en.yml | 32 +++++++++-- 7 files changed, 108 insertions(+), 29 deletions(-) delete mode 100644 app/views/locales/en.yml diff --git a/app/views/govuk_component/document_footer.raw.html.erb b/app/views/govuk_component/document_footer.raw.html.erb index 37b567313..587f14809 100644 --- a/app/views/govuk_component/document_footer.raw.html.erb +++ b/app/views/govuk_component/document_footer.raw.html.erb @@ -16,13 +16,21 @@ direction_class = " direction-#{direction}" if local_assigns.include?(:direction) %>
-

Document information

+

+ <%= translate("govuk_component.document_footer.document_information", default: "Document information") %> +

<% if local_assigns.include?(:published) && published %> -

Published: <%= published %>

+

+ <%= translate("govuk_component.document_footer.published", default: "Published") %> + <%= published %> +

<% end %> <% if local_assigns.include?(:updated) && updated %> -

Updated: <%= updated %>

+

+ <%= translate("govuk_component.document_footer.updated", default: "Updated") %> + <%= updated %> +

<% end %> <% if other_dates.present? %> <% other_dates.each do |title, date| %> @@ -32,7 +40,9 @@ <% if history.any? %>

- + full page history + + + <%= translate("govuk_component.document_footer.full_page_history", default: "full page history") %> +

    @@ -58,7 +68,9 @@

    <% end %> <% if part_of.any? %> -

    Part of: +

    + <%= translate("govuk_component.document_footer.part_of", default: "Part of") %>: + <% part_of.each do |definition| %> <%= definition.html_safe %> diff --git a/app/views/govuk_component/government_navigation.raw.html.erb b/app/views/govuk_component/government_navigation.raw.html.erb index 894f71e34..28c2f0f47 100644 --- a/app/views/govuk_component/government_navigation.raw.html.erb +++ b/app/views/govuk_component/government_navigation.raw.html.erb @@ -4,14 +4,50 @@

    diff --git a/app/views/govuk_component/metadata.raw.html.erb b/app/views/govuk_component/metadata.raw.html.erb index e714561ae..d08756c8b 100644 --- a/app/views/govuk_component/metadata.raw.html.erb +++ b/app/views/govuk_component/metadata.raw.html.erb @@ -13,25 +13,29 @@
    <% if from.any? %> -
    <%= t("govuk_component.metadata.from", default: "From") %>:
    +
    <%= translate("govuk_component.metadata.from", default: "From") %>:
    <%= from.to_sentence.html_safe %>
    <% end %> <% if part_of.any? %> -
    Part of:
    +
    <%= translate("govuk_component.metadata.part_of", default: "Part of") %>:
    <%= part_of.to_sentence.html_safe %>
    <% end %> <% if local_assigns.include?(:history) %> -
    History:
    +
    <%= translate("govuk_component.metadata.history", default: "History") %>:
    <%= history %>
    <% end %> <% if local_assigns.include?(:first_published) && first_published %> -
    First published:
    +
    <%= translate("govuk_component.metadata.first_published", default: "First published") %>:
    <%= first_published %>
    <% end %> <% if local_assigns.include?(:last_updated) && last_updated %> -
    Last updated:
    +
    <%= translate("govuk_component.metadata.last_updated", default: "Last updated") %>:
    - <%= last_updated %><% if local_assigns.include?(:see_updates_link) %>, see all updates<% end %> + <%= last_updated %><% if local_assigns.include?(:see_updates_link) %>, + + <%= translate("govuk_component.metadata.see_all_updates", default: "see all updates") %> + + <% end %>
    <% end %> <% if other.present? %> diff --git a/app/views/govuk_component/previous_and_next_navigation.raw.html.erb b/app/views/govuk_component/previous_and_next_navigation.raw.html.erb index 62851de50..eae6b63c6 100644 --- a/app/views/govuk_component/previous_and_next_navigation.raw.html.erb +++ b/app/views/govuk_component/previous_and_next_navigation.raw.html.erb @@ -1,5 +1,9 @@ <% if local_assigns.include?(:next_page) || local_assigns.include?(:previous_page) %> -