From 32b14845c130a2739b00748e5c49871f5b92ef40 Mon Sep 17 00:00:00 2001 From: aaronskiba <71047780+aaronskiba@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:43:02 -0600 Subject: [PATCH 1/7] Fix issue #355 #trivial --- app/helpers/application_helper.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5a14260995..88e0456042 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -58,37 +58,37 @@ def current_locale_logo # we need different urls. This will be changed when we move to DMPRoadmap 3.0 # as there is a service that handles fetching this information. def contact_us_path - if I18n.locale == 'fr_CA' + if I18n.locale == :'fr-CA' 'https://portagenetwork.ca/fr/contactez-nous/' else - # Handling "en_CA" locale + # Handling :'en-CA' locale 'https://portagenetwork.ca/contact-us/' end end def terms_of_use_path - if I18n.locale == 'fr_CA' + if I18n.locale == :'fr-CA' 'https://portagenetwork.ca/fr/outils-et-ressources/assistant-pgd/conditions-dutilisation-de-lassistant-pgd/' else - # Handling "en_CA" locale + # Handling :'en-CA' locale 'https://assistant.portagenetwork.ca/terms' end end def how_to_manage_your_data_path - if I18n.locale == 'fr_CA' + if I18n.locale == :'fr-CA' 'https://portagenetwork.ca/fr/outils-et-ressources/assistant-pgd/comment-gerer-vos-donnees/' else - # Handling "en_CA" locale + # Handling :'en-CA' locale 'https://portagenetwork.ca/tools-and-resources/dmp-assistant/how-to-manage-your-data/' end end def contacts_at_your_instutution_path - if I18n.locale == 'fr_CA' + if I18n.locale == :'fr-CA' 'https://alliancecan.ca/fr/services/gestion-des-donnees-de-recherche/apprentissage-et-ressources/personnes-ressources-dans-les-etablissements' else - # Handling "en_CA" locale + # Handling :'en-CA' locale 'https://alliancecan.ca/en/services/research-data-management/learning-and-training/institutional-contacts' end end From 8a7dc020f427ee8ea3d5ba83ad5ee5facbae2e5f Mon Sep 17 00:00:00 2001 From: aaronskiba <71047780+aaronskiba@users.noreply.github.com> Date: Fri, 21 Jul 2023 12:26:37 -0600 Subject: [PATCH 2/7] Delete comment We will not be using the provided LocaleService. Thus, issue #390 can be closed. --- app/helpers/application_helper.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 88e0456042..4447faaa85 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -53,10 +53,6 @@ def current_locale_logo end end - # We are overriding this method in order to provide different contact us urls - # based on the chosen locale. Using the branding.yml does not work for this as - # we need different urls. This will be changed when we move to DMPRoadmap 3.0 - # as there is a service that handles fetching this information. def contact_us_path if I18n.locale == :'fr-CA' 'https://portagenetwork.ca/fr/contactez-nous/' From aedc50ce5bd74bf87afc10597230ae8eafd7404e Mon Sep 17 00:00:00 2001 From: aaronskiba <71047780+aaronskiba@users.noreply.github.com> Date: Fri, 21 Jul 2023 12:43:52 -0600 Subject: [PATCH 3/7] Make example text a bit clearer --- app/helpers/application_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4447faaa85..4920619ca4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -42,9 +42,9 @@ def title(page_title) content_for(:title) { page_title } end - # This method assumes there will be an image file called dmp_logo_xx_XX.png - # Where xx_XX is the current locale in ww-WW format. Examples of this are - # en_CA, fr_CA + # This method assumes there will be an image file called dmp_logo_xx-XX.png + # where xx-XX is the string formatted I18n.locale. + # e.g. if I18n.locale == :'en_CA', then "#{I18n.locale}" == 'en-CA' def current_locale_logo if FeatureFlagHelper.enabled?(:on_sandbox) "sandbox_logo_#{I18n.locale}.png" From 48a7b235148a9d508fc4fc3454c1672ae43a3fe7 Mon Sep 17 00:00:00 2001 From: aaronskiba <71047780+aaronskiba@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:43:40 -0600 Subject: [PATCH 4/7] Fix issue #397 Commit affects how "Terms of Use" is routed in footer and how "How to Manage Your Data" is routed on homepage. --- app/views/home/_welcome.html.erb | 2 +- app/views/layouts/_footer.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/home/_welcome.html.erb b/app/views/home/_welcome.html.erb index 1cf4827fb8..ac6cd0fa00 100644 --- a/app/views/home/_welcome.html.erb +++ b/app/views/home/_welcome.html.erb @@ -32,7 +32,7 @@ Primer – Data Management Plan