From c138f8576aa3ce2ebcbef6c3076435216b0baeab Mon Sep 17 00:00:00 2001 From: Seamus Johnston Date: Wed, 20 Nov 2024 08:35:31 -0600 Subject: [PATCH 1/5] Insert translation keys into twig files --- .../tests/fixtures/t.filter.html.twig | 4 +- .../tests/fixtures/t.variable.twig | 4 +- web/modules/weather_i18n/translations/en.po | 526 +++++++----------- .../src/Form/LoginSettingsForm.php | 8 +- ...ergov-dynamic-safety-information.html.twig | 2 +- ...lock--weathergov-location-search.html.twig | 4 +- .../block--weathergov-wfo-promo.html.twig | 4 +- .../content/node--wfo-promo.html.twig | 4 +- .../node--wfo-weather-story-upload.html.twig | 2 +- .../templates/content/node.html.twig | 2 +- .../field--node--field-address.html.twig | 2 +- .../field--node--field-facebook-url.html.twig | 2 +- ...ld--node--field-phone-number-opt.html.twig | 2 +- .../field--node--field-twitter-url.html.twig | 2 +- .../field--node--field-wfo_email.html.twig | 2 +- .../field--node--field-youtube-url.html.twig | 2 +- .../templates/layout/footer.html.twig | 4 +- .../templates/layout/frontpage.html.twig | 4 +- .../layout/html--node--preview.html.twig | 2 +- .../templates/layout/html.html.twig | 2 +- .../templates/layout/page--point.html.twig | 8 +- .../partials/alerts-in-hourly-table.html.twig | 4 +- .../daily-forecast-list-item.html.twig | 10 +- .../partials/daily-high-low.html.twig | 4 +- .../daily-summary-list-item.html.twig | 16 +- .../templates/partials/gov-banner.html.twig | 29 +- .../partials/hourly-charts.html.twig | 18 +- .../templates/partials/hourly-table.html.twig | 30 +- .../partials/location-search.html.twig | 4 +- .../partials/observation-table.html.twig | 26 +- .../templates/partials/precip-table.html.twig | 4 +- .../quick-forecast-link-item.html.twig | 12 +- .../templates/partials/radar.html.twig | 20 +- .../partials/scroll-buttons.html.twig | 4 +- .../partials/today-summary-forecast.html.twig | 4 +- .../templates/partials/wind.html.twig | 10 +- .../templates/partials/wx-loader.html.twig | 2 +- .../templates/point/alerts.html.twig | 12 +- .../templates/point/forecast.html.twig | 2 +- .../templates/point/observations.html.twig | 15 +- .../wfo-info/node--wfo-info.html.twig | 12 +- 41 files changed, 353 insertions(+), 477 deletions(-) diff --git a/tests/translations/tests/fixtures/t.filter.html.twig b/tests/translations/tests/fixtures/t.filter.html.twig index 7f25772fd..3679a0fa6 100644 --- a/tests/translations/tests/fixtures/t.filter.html.twig +++ b/tests/translations/tests/fixtures/t.filter.html.twig @@ -1,11 +1,11 @@ {% if period.probabilityOfPrecipitation and period.probabilityOfPrecipitation > 1 %}

- {{period.probabilityOfPrecipitation}}% {{ "chance of precipitation" | t }} + {{period.probabilityOfPrecipitation}}% {{ "daily-forecast.text.chance-precip.01" | t }}

{% endif %}
-
{{ "Feels like" | t }}
+
{{ "forecast.current.feels-like.01" | t }}

{{ content.feels_like }}°F diff --git a/tests/translations/tests/fixtures/t.variable.twig b/tests/translations/tests/fixtures/t.variable.twig index 3da9b8e4d..e5cb6570a 100644 --- a/tests/translations/tests/fixtures/t.variable.twig +++ b/tests/translations/tests/fixtures/t.variable.twig @@ -1,9 +1,9 @@ {% if content.error %} - {% set message = "There was an error loading the current conditions." | t %} + {% set message = "forecast.errors.current-conditions.01" | t %} {% include '@new_weather_theme/partials/uswds-alert.html.twig' with { 'level': "error", body: message } %} {% endif %} {% if period.isOvernight %} - {% set label = "Overnight" | t %} + {% set label = "daily-forecast.labels.overnight.01" | t %} {% set lineColor = "midnight-indigo" %} {% set tabletCol = 12 %} {% set tabletMarginUnit = 3 %} diff --git a/web/modules/weather_i18n/translations/en.po b/web/modules/weather_i18n/translations/en.po index 02415ffd5..64a9e5776 100644 --- a/web/modules/weather_i18n/translations/en.po +++ b/web/modules/weather_i18n/translations/en.po @@ -1,423 +1,309 @@ # English translation of beta.weather.gov # -msgid ""msgstr "" +# ⚠️ Strings in English need to be immutable, +# to prevent translations falling out of sync. +# Example: Do not change "Forecasters predict rain" +# to "Rain predicted". Delete "Forecasters predict rain" and +# add "Rain predicted" with a new `msgid`. This will +# invalidate the stale translation and ensure the new +# string gets picked up for fresh translation. +# +# Message IDs are versioned, to remind you of this rule. ⚠️ +# +msgid "" +msgstr "" "Project-Id-Version: Weather.gov Utility\\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=utf-8\\n" "Content-Transfer-Encoding: 8bit\\n" -#: abbreviations.not-applicable -msgid "N/A" -msgstr "" +msgid "abbreviations.not-applicable.01" +msgstr "N/A" -#: alerts.labels.areas-impacted -msgid "Areas impacted" -msgstr "" +msgid "alerts.labels.areas-impacted.01" +msgstr "Areas impacted" -#: alerts.labels.what-to-do -msgid "What to do" -msgstr "" +msgid "alerts.labels.what-to-do.01" +msgstr "What to do" -#: alerts.text.counties-in -msgid "Counties in" -msgstr "" +msgid "alerts.text.counties-in.01" +msgstr "Counties in" -#: alerts.text.in-effect-from -msgid "In effect from" -msgstr "" +msgid "alerts.text.in-effect-from.01" +msgstr "In effect from" -#: alerts.text.including-cities -msgid "Including these cities" -msgstr "" +msgid "alerts.text.including-cities.01" +msgstr "Including these cities" -#: alerts.text.issued-by -msgid "Issued by @sender" -msgstr "" +msgid "alerts.text.issued-by.01" +msgstr "Issued by @sender" -#: backend.login.cancel-text -msgid "Cancel Text" -msgstr "" +msgid "backend.login.cancel-text.01" +msgstr "Cancel Text" -#: backend.login.login-text -msgid "Login Text" -msgstr "" +msgid "backend.login.login-text.01" +msgstr "Login Text" -#: backend.login.sso-cancel-path -msgid "SSO Cancel Path" -msgstr "" +msgid "backend.login.sso-cancel-path.01" +msgstr "SSO Cancel Path" -#: backend.login.sso-login-path -msgid "SSO Login Path" -msgstr "" +msgid "backend.login.sso-login-path.01" +msgstr "SSO Login Path" -#: daily-forecast.labels.alert -msgid "Alert" -msgstr "" +msgid "daily-forecast.labels.alert.01" +msgstr "Alert" -#: daily-forecast.labels.day -msgid "Day" -msgstr "" +msgid "daily-forecast.labels.day.01" +msgstr "Day" -#: daily-forecast.labels.high -msgid "High" -msgstr "" +msgid "daily-forecast.labels.high.01" +msgstr "High" -#: daily-forecast.labels.low -msgid "Low" -msgstr "" +msgid "daily-forecast.labels.low.01" +msgstr "Low" -#: daily-forecast.labels.multiple-alerts -msgid "Multiple alerts" -msgstr "" +msgid "daily-forecast.labels.multiple-alerts.01" +msgstr "Multiple alerts" -#: daily-forecast.labels.night -msgid "Night" -msgstr "" +msgid "daily-forecast.labels.night.01" +msgstr "Night" -#: daily-forecast.labels.overnight -msgid "Overnight" -msgstr "" +msgid "daily-forecast.labels.overnight.01" +msgstr "Overnight" -#: daily-forecast.labels.today -msgid "Today" -msgstr "" +msgid "daily-forecast.labels.today.01" +msgstr "Today" -#: daily-forecast.text.chance-precip -msgid "chance of precipitation" -msgstr "" +msgid "daily-forecast.text.chance-precip.01" +msgstr "chance of precipitation" -#: daily-forecast.text.hide-details -msgid "Hide hourly details" -msgstr "" +msgid "daily-forecast.text.hide-details.01" +msgstr "Hide hourly details" -#: daily-forecast.text.show-details -msgid "Show hourly details" -msgstr "" +msgid "daily-forecast.text.show-details.01" +msgstr "Show hourly details" -#: daily-forecast.text.usa-gov-site -msgid "Official website of the United States government" -msgstr "" +msgid "daily-forecast.text.usa-gov-site.01" +msgstr "Official website of the United States government" -#: footer.noaa-motto -msgid "Science. Service. Stewardship" -msgstr "" +msgid "footer.aria.noaa-logo.01" +msgstr "National Oceanic and Atmospheric Administration logo" -#: footer.text.usa-gov-site-alt -msgid "An official website of the United States government" -msgstr "" +msgid "footer.noaa-motto.01" +msgstr "Science. Service. Stewardship" -#: forecast.current.aria.feels-like -msgid "It feels like @feelsLike ℉." -msgstr "" +msgid "footer.text.usa-gov-site-alt.01" +msgstr "An official website of the United States government" -#: forecast.current.feels-like -msgid "Feels like" -msgstr "" - -#: forecast.current.last-updated -msgid "Last updated" -msgstr "" - -#: forecast.current.obs-station -msgid "Observation station" -msgstr "" - -#: forecast.current.weather-as-of -msgid "Weather as of" -msgstr "" - -#: forecast.current.weather-temp-description -msgid "The weather in @place, is @conditions.\n Temperature is @temperature ℉." -msgstr "" - -#: forecast.errors.current-conditions -msgid "There was an error loading the current conditions." -msgstr "" - -#: forecast.errors.daily -msgid "There was an error loading the daily forecast." -msgstr "" - -#: forecast.errors.hourly -msgid "There was an error loading the hourly forecast." -msgstr "" +msgid "forecast.current.aria.feels-like.01" +msgstr "It feels like @feelsLike ℉." -#: forecast.labels.alerts -msgid "Alerts" -msgstr "" +msgid "forecast.current.feels-like.01" +msgstr "Feels like" -#: forecast.labels.current -msgid "Current" -msgstr "" +msgid "forecast.current.last-updated.01" +msgstr "Last updated" -#: forecast.labels.seven-days -msgid "7 Days" -msgstr "" +msgid "forecast.current.obs-station.01" +msgstr "Observation station" -#: forecast.labels.weather-info -msgid "Weather information sections" -msgstr "" +msgid "forecast.current.weather-as-of.01" +msgstr "Weather as of" -#: forecast.labels.weather-story -msgid "Forecaster's report" -msgstr "" +msgid "forecast.current.weather-temp-description.01" +msgstr "The weather in @place, is @conditions.\n Temperature is @temperature ℉." -#: hourly-forecast.labels.forecast -msgid "Forecast" -msgstr "" +msgid "forecast.errors.current-conditions.01" +msgstr "There was an error loading the current conditions." -#: hourly-table.aria.scroll-left -msgid "scroll left" -msgstr "" +msgid "forecast.errors.daily.01" +msgstr "There was an error loading the daily forecast." -#: hourly-table.aria.scroll-right -msgid "scroll right" -msgstr "" +msgid "forecast.labels.alerts.01" +msgstr "Alerts" -#: hourly-table.aria.table-description -msgid "Detailed hourly weather data for @place. The rows are weather variables, the columns are hours." -msgstr "" +msgid "forecast.labels.seven-days.01" +msgstr "7 Days" -#: hourly-table.labels.chance-precip -msgid "Chance of precipitation" -msgstr "" +msgid "forecast.labels.weather-info.01" +msgstr "Weather information sections" -#: hourly-table.labels.condition -msgid "Condition" -msgstr "" +msgid "hourly-table.aria.scroll-left.01" +msgstr "scroll left" -#: hourly-table.labels.dewpoint#: observation-table.labels.dewpoint -msgid "Dewpoint" -msgstr "" +msgid "hourly-table.aria.scroll-right.01" +msgstr "scroll right" -#: hourly-table.labels.humidity#: observation-table.labels.humidity -msgid "Humidity" -msgstr "" +msgid "hourly-table.aria.table-description.01" +msgstr "Detailed hourly weather data for @place. The rows are weather variables, the columns are hours." -#: hourly-table.labels.temperature -msgid "Temperature" -msgstr "" +msgid "hourly-table.labels.condition.01" +msgstr "Condition" -#: hourly-table.labels.time -msgid "Time" -msgstr "" +msgid "hourly-table.labels.dewpoint.01" +msgstr "Dewpoint" -#: hourly-table.labels.wind-speed -msgid "Wind speed" -msgstr "" +msgid "hourly-table.labels.humidity.01" +msgstr "Humidity" -#: hourly-table.text.gusting -msgid "with gusts up to @gustSpeed mph" -msgstr "" +msgid "hourly-table.labels.temperature.01" +msgstr "Temperature" -#: loader.loading-text -msgid "Loading the forecast" -msgstr "" +msgid "hourly-table.labels.time.01" +msgstr "Time" -#: location-search.labels.enter-city-zip -msgid "Enter city or zip code" -msgstr "" +msgid "hourly-table.labels.wind-speed.01" +msgstr "Wind speed" -#: location-search.labels.use-location -msgid "Use my location" -msgstr "" +msgid "hourly-table.text.gusting.01" +msgstr "with gusts up to @gustSpeed mph" -#: node.fields.labels.field_address -msgid "address" -msgstr "" +msgid "loader.loading-text.01" +msgstr "Loading the forecast" -#: node.fields.labels.field_phone_number_opt -msgid "phone" -msgstr "" +msgid "location-search.labels.enter-city-zip.01" +msgstr "Enter city or zip code" -#: node.fields.labels.field_wfo_email -msgid "email" -msgstr "" +msgid "location-search.labels.use-location.01" +msgstr "Use my location" -#: observation-table.labels.gusts -msgid "Gusts" -msgstr "" +msgid "node.fields.labels.field_address.01" +msgstr "address" -#: observation-table.labels.pressure -msgid "Pressure" -msgstr "" +msgid "node.fields.labels.field_phone_number_opt.01" +msgstr "phone" -#: observation-table.labels.visibility -msgid "Visibility" -msgstr "" +msgid "node.fields.labels.field_wfo_email.01" +msgstr "email" -#: observation-table.labels.wind -msgid "Wind" -msgstr "" +msgid "observation-table.labels.dewpoint.01" +msgstr "Dewpoint" -#: precip-table.aria.amounts -msgid "precipitation amounts for the coming hours" -msgstr "" +msgid "observation-table.labels.gusts.01" +msgstr "Gusts" -#: precip-table.aria.period -msgid "time period" -msgstr "" +msgid "observation-table.labels.humidity.01" +msgstr "Humidity" -#: precip-table.aria.precipitation -msgid "forecast precipitation" -msgstr "" +msgid "observation-table.labels.pressure.01" +msgstr "Pressure" -#: precip-table.labels.amounts -msgid "Precipitation amounts" -msgstr "" +msgid "observation-table.labels.visibility.01" +msgstr "Visibility" -#: radar.aria.collapse-map -msgid "collapse the radar map" -msgstr "" +msgid "observation-table.labels.wind.01" +msgstr "Wind" -#: radar.aria.description -msgid "Listed below is a visual representation of radar data for\n @place. For more details on specific weather conditions,\n view hourly data within the" -msgstr "" +msgid "precip-table.aria.amounts.01" +msgstr "precipitation amounts for the coming hours" -#: radar.aria.expand-map -msgid "expand the radar map" -msgstr "" +msgid "precip-table.labels.amounts.01" +msgstr "Precipitation amounts" -#: radar.aria.legend -msgid "Legend which describes the intensity levels that correspond to color and dBz values" -msgstr "" +msgid "radar.aria.collapse-map.01" +msgstr "collapse the radar map" -#: radar.labels.daily-tab -msgid "daily tab" -msgstr "" +msgid "radar.aria.description.01" +msgstr "Listed below is a visual representation of radar data for\n @place. For more details on specific weather conditions,\n view hourly data within the" -#: radar.labels.intensity -msgid "Intensity" -msgstr "" +msgid "radar.aria.expand-map.01" +msgstr "expand the radar map" -#: radar.labels.legend -msgid "Radar legend" -msgstr "" +msgid "radar.aria.legend.01" +msgstr "Legend which describes the intensity levels that correspond to color and dBz values" -#: radar.labels.radar -msgid "Radar" -msgstr "" +msgid "radar.labels.daily-tab.01" +msgstr "daily tab" -#: safety.labels.tips -msgid "Tips to stay safe" -msgstr "" +msgid "radar.labels.intensity.01" +msgstr "Intensity" -#: theme.text.submitted-by -msgid "Submitted by @author_name on @date" -msgstr "" +msgid "radar.labels.legend.01" +msgstr "Radar Legend" -#: units.dbz -msgid "dBz" -msgstr "" +msgid "radar.labels.radar.01" +msgstr "Radar" -#: units.inches -msgid "inches" -msgstr "" +msgid "safety.labels.tips.01" +msgstr "Tips to stay safe" -#: units.mercury-inches -msgid "@mercury_inches in (@mbar mb)" -msgstr "" +msgid "theme.text.submitted-by.01" +msgstr "Submitted by @author_name on @date" -#: units.miles -msgid "miles" -msgstr "" +msgid "units.dbz.01" +msgstr "dBz" -#: units.mph -msgid "mph" -msgstr "" +msgid "units.mercury-inches.01" +msgstr "@mercury_inches in (@mbar mb)" -#: uswds-banner.gov.description -msgid "Official websites use .gov" -msgstr "" +msgid "units.miles.01" +msgstr "miles" -#: uswds-banner.gov.description_html -msgid "A .gov\n website belongs to an official government organization in the\n United States." -msgstr "" +msgid "units.mph.01" +msgstr "mph" -#: uswds-banner.gov.https -msgid "Secure .gov websites use HTTPS" -msgstr "" +msgid "uswds-banner.gov.description_html.01" +msgstr "A .gov website belongs to an official government organization in the United States." -#: uswds-banner.gov.safely-connected_html -msgid "or https://\n means you've safely connected to the .gov website. Share\n sensitive information only on official, secure websites." -msgstr "" +msgid "uswds-banner.gov.description.01" +msgstr "Official websites use .gov" -#: uswds-banner.how-you-know -msgid "Here’s how you know" -msgstr "" +msgid "uswds-banner.gov.https.01" +msgstr "Secure .gov websites use HTTPS" -#: uswds-banner.lock -msgid "Lock" -msgstr "" +msgid "uswds-banner.gov.safely-connected_html.01" +msgstr "or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites." -#: uswds-banner.lock_alt -msgid "Locked padlock icon" -msgstr "" +msgid "uswds-banner.how-you-know.01" +msgstr "Here’s how you know" -#: uswds-banner.lock_html -msgid "A lock" -msgstr "" +msgid "uswds-banner.lock_alt.01" +msgstr "Locked padlock icon" -#: uswds-banner.skip-to-content -msgid "Skip to main content" -msgstr "" +msgid "uswds-banner.lock_html.01" +msgstr "A lock" -#: wfo-info.labels.about -msgid "About" -msgstr "" +msgid "uswds-banner.lock.01" +msgstr "Lock" -#: wfo-info.labels.contact-us -msgid "Contact us" -msgstr "" +msgid "uswds-banner.skip-to-content.01" +msgstr "Skip to main content" -#: wfo-info.labels.coverage-area-map-caption -msgid "Coverage area for @wfo wfo" -msgstr "" +msgid "wfo-info.labels.about.01" +msgstr "About" -#: wfo-info.labels.forecast-discussion -msgid "Forecaster's discussion" -msgstr "" +msgid "wfo-info.labels.contact-us.01" +msgstr "Contact us" -#: wfo-info.labels.local-expertise -msgid "Local expertise" -msgstr "" +msgid "wfo-info.labels.coverage-area-map-caption.01" +msgstr "Coverage area for @wfo WFO" -#: wfo-info.labels.wfo -msgid "@wfoName (@wfoCode) National Weather Service Office" -msgstr "" +msgid "wfo-info.labels.forecast-discussion.01" +msgstr "Forecaster's discussion" -#: wfo.labels.facebook -msgid "Facebook" -msgstr "" +msgid "wfo-info.labels.local-expertise.01" +msgstr "Local expertise" -#: wfo.labels.find-us -msgid "Find us on" -msgstr "" +msgid "wfo-info.labels.wfo.01" +msgstr "@wfoName (@wfoCode) National Weather Service Office" -#: wfo.labels.local-office -msgid "Your Local Forecast Office" -msgstr "" +msgid "wfo.labels.facebook.01" +msgstr "Facebook" -#: wfo.labels.phone -msgid "Phone" -msgstr "" +msgid "wfo.labels.find-us.01" +msgstr "Find us on" -#: wfo.labels.twitter -msgid "X (Twitter)" -msgstr "" +msgid "wfo.labels.local-office.01" +msgstr "Your Local Forecast Office" -#: wfo.labels.youtube -msgid "YouTube" -msgstr "" +msgid "wfo.labels.twitter.01" +msgstr "X (Twitter)" -#: wind.labels.calm -msgid "calm" -msgstr "" +msgid "wfo.labels.youtube.01" +msgstr "YouTube" -#: wind.labels.speed-from-direction -msgid "@speed mph from the @direction" -msgstr "" +msgid "wind.labels.calm.01" +msgstr "calm" -#:footer.aria.noaa-logo -msgid "National Oceanic and Atmospheric Administration logo" -msgstr "" +msgid "wind.labels.speed-from-direction.01" +msgstr "@speed mph from the @direction" diff --git a/web/modules/weather_login/src/Form/LoginSettingsForm.php b/web/modules/weather_login/src/Form/LoginSettingsForm.php index d03eb0f6b..5c348cffe 100644 --- a/web/modules/weather_login/src/Form/LoginSettingsForm.php +++ b/web/modules/weather_login/src/Form/LoginSettingsForm.php @@ -68,7 +68,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['sso_login_path'] = [ '#type' => 'textfield', - '#title' => $this->t('SSO Login Path'), + '#title' => $this->t('backend.login.sso-login-path.01'), '#default_value' => $this->config('weather_login.settings') ->get('sso_login_path'), '#required' => false, @@ -76,7 +76,7 @@ public function buildForm(array $form, FormStateInterface $form_state) $form['sso_login_text'] = [ '#type' => 'textfield', - '#title' => $this->t('Login Text'), + '#title' => $this->t('backend.login.login-text.01'), '#default_value' => $this->config('weather_login.settings') ->get('sso_login_text'), '#required' => false, @@ -84,7 +84,7 @@ public function buildForm(array $form, FormStateInterface $form_state) $form['sso_cancel_path'] = [ '#type' => 'textfield', - '#title' => $this->t('SSO Cancel Path'), + '#title' => $this->t('backend.login.sso-cancel-path.01'), '#default_value' => $this->config('weather_login.settings') ->get('sso_cancel_path'), '#required' => false, @@ -92,7 +92,7 @@ public function buildForm(array $form, FormStateInterface $form_state) $form['sso_cancel_text'] = [ '#type' => 'textfield', - '#title' => $this->t('Cancel Text'), + '#title' => $this->t('backend.login.cancel-text.01'), '#default_value' => $this->config('weather_login.settings') ->get('sso_cancel_text'), '#required' => false, diff --git a/web/themes/new_weather_theme/templates/block/block--weathergov-dynamic-safety-information.html.twig b/web/themes/new_weather_theme/templates/block/block--weathergov-dynamic-safety-information.html.twig index 520743538..64791a8da 100644 --- a/web/themes/new_weather_theme/templates/block/block--weathergov-dynamic-safety-information.html.twig +++ b/web/themes/new_weather_theme/templates/block/block--weathergov-dynamic-safety-information.html.twig @@ -1,5 +1,5 @@ {% if content.body %} -

{{ "Tips to stay safe" | t }}

+

{{ "safety.labels.tips.01" | t }}

{{- content.body | raw -}}
diff --git a/web/themes/new_weather_theme/templates/block/block--weathergov-location-search.html.twig b/web/themes/new_weather_theme/templates/block/block--weathergov-location-search.html.twig index f3536be52..311a9b100 100644 --- a/web/themes/new_weather_theme/templates/block/block--weathergov-location-search.html.twig +++ b/web/themes/new_weather_theme/templates/block/block--weathergov-location-search.html.twig @@ -4,11 +4,11 @@
|
- +
diff --git a/web/themes/new_weather_theme/templates/block/block--weathergov-wfo-promo.html.twig b/web/themes/new_weather_theme/templates/block/block--weathergov-wfo-promo.html.twig index 926616022..c9271ad08 100644 --- a/web/themes/new_weather_theme/templates/block/block--weathergov-wfo-promo.html.twig +++ b/web/themes/new_weather_theme/templates/block/block--weathergov-wfo-promo.html.twig @@ -1,7 +1,7 @@
-

{{ "Your Local Forecast Office" | t }}

+

{{ "wfo.labels.local-office.01" | t }}

{{ content.name }}

{{ content.about | view }} @@ -14,7 +14,7 @@ {% if content.social is not same as false %}

- {{ "Find us on" | t }} + {{ "wfo.labels.find-us.01" | t }}

    {{ content.social.facebook| view }} diff --git a/web/themes/new_weather_theme/templates/content/node--wfo-promo.html.twig b/web/themes/new_weather_theme/templates/content/node--wfo-promo.html.twig index 12009a0fb..6e733882c 100644 --- a/web/themes/new_weather_theme/templates/content/node--wfo-promo.html.twig +++ b/web/themes/new_weather_theme/templates/content/node--wfo-promo.html.twig @@ -71,7 +71,7 @@
    -

    {{ "Your Local Forecast Office" | t }}

    +

    {{ "wfo.labels.local-office.01" | t }}

    {{ content.field_wfo }}

    {{ content.body }} @@ -89,7 +89,7 @@ {% if hasSocial %}

    - {{ "Find us on" | t }} + {{ "wfo.labels.find-us.01" | t }}

      {{ content.field_facebook_url }} diff --git a/web/themes/new_weather_theme/templates/content/node--wfo-weather-story-upload.html.twig b/web/themes/new_weather_theme/templates/content/node--wfo-weather-story-upload.html.twig index 988ab37a9..e7388ee67 100644 --- a/web/themes/new_weather_theme/templates/content/node--wfo-weather-story-upload.html.twig +++ b/web/themes/new_weather_theme/templates/content/node--wfo-weather-story-upload.html.twig @@ -83,7 +83,7 @@

      {{ elements["#title"] }}

      -

      {{ "Last updated" | t }}: +

      {{ "forecast.current.last-updated.01" | t }}: {{ date }}

      diff --git a/web/themes/new_weather_theme/templates/content/node.html.twig b/web/themes/new_weather_theme/templates/content/node.html.twig index cb6f8bb47..b630db39a 100644 --- a/web/themes/new_weather_theme/templates/content/node.html.twig +++ b/web/themes/new_weather_theme/templates/content/node.html.twig @@ -92,7 +92,7 @@
      {{ author_picture }} - {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %} + {{ "theme.text.submitted-by.01" | t({ "@author_name": author_name, "@date": date }) }} {{ metadata }}
      diff --git a/web/themes/new_weather_theme/templates/field/field--node--field-address.html.twig b/web/themes/new_weather_theme/templates/field/field--node--field-address.html.twig index c6b5dc076..637b8c803 100644 --- a/web/themes/new_weather_theme/templates/field/field--node--field-address.html.twig +++ b/web/themes/new_weather_theme/templates/field/field--node--field-address.html.twig @@ -1,5 +1,5 @@ - {{ "address" | t }}: + {{ "node.fields.labels.field_address.01" | t }}: {% for item in items %} diff --git a/web/themes/new_weather_theme/templates/field/field--node--field-facebook-url.html.twig b/web/themes/new_weather_theme/templates/field/field--node--field-facebook-url.html.twig index 36b624f8d..b5782a20f 100644 --- a/web/themes/new_weather_theme/templates/field/field--node--field-facebook-url.html.twig +++ b/web/themes/new_weather_theme/templates/field/field--node--field-facebook-url.html.twig @@ -4,7 +4,7 @@ - {{ "Facebook" | t }} + {{ "wfo.labels.facebook.01" | t }} {% include '@new_weather_theme/partials/external-link-decoration.html.twig' %} diff --git a/web/themes/new_weather_theme/templates/field/field--node--field-phone-number-opt.html.twig b/web/themes/new_weather_theme/templates/field/field--node--field-phone-number-opt.html.twig index 65023f9fc..40944e84f 100644 --- a/web/themes/new_weather_theme/templates/field/field--node--field-phone-number-opt.html.twig +++ b/web/themes/new_weather_theme/templates/field/field--node--field-phone-number-opt.html.twig @@ -1,6 +1,6 @@
      - {{ "phone" | t }}: + {{ "node.fields.labels.field_phone_number_opt.01" | t }}: {% for item in items %} {{ item.content }} diff --git a/web/themes/new_weather_theme/templates/field/field--node--field-twitter-url.html.twig b/web/themes/new_weather_theme/templates/field/field--node--field-twitter-url.html.twig index cab4c9748..426d71882 100644 --- a/web/themes/new_weather_theme/templates/field/field--node--field-twitter-url.html.twig +++ b/web/themes/new_weather_theme/templates/field/field--node--field-twitter-url.html.twig @@ -4,7 +4,7 @@ - {{ "X (Twitter)" | t }} + {{ "wfo.labels.twitter.01" | t }} {% include '@new_weather_theme/partials/external-link-decoration.html.twig' %} diff --git a/web/themes/new_weather_theme/templates/field/field--node--field-wfo_email.html.twig b/web/themes/new_weather_theme/templates/field/field--node--field-wfo_email.html.twig index 54e8e65e3..9223ada90 100644 --- a/web/themes/new_weather_theme/templates/field/field--node--field-wfo_email.html.twig +++ b/web/themes/new_weather_theme/templates/field/field--node--field-wfo_email.html.twig @@ -1,6 +1,6 @@ @@ -44,10 +44,8 @@ />

      - {{ "Official websites use .gov" | t }}
      - {{ "A .gov - website belongs to an official government organization in the - United States." | t }} + {{ "uswds-banner.gov.description.01" | t }}
      + {{ "uswds-banner.gov.description_html.01" | t }}

      @@ -61,8 +59,8 @@ />

      - {{ "Secure .gov websites use HTTPS" | t }}
      - {{ "A lock" | t }} + {{ "uswds-banner.gov.https.01" | t }}
      + {{ "uswds-banner.lock_html.01" | t }} ( ) - {{ "or https:// - means you've safely connected to the .gov website. Share - sensitive information only on official, secure websites." - | - t - }} + {{ "uswds-banner.gov.safely-connected_html.01" | t }}

      diff --git a/web/themes/new_weather_theme/templates/partials/hourly-charts.html.twig b/web/themes/new_weather_theme/templates/partials/hourly-charts.html.twig index 47af5acf3..8aebe76ae 100644 --- a/web/themes/new_weather_theme/templates/partials/hourly-charts.html.twig +++ b/web/themes/new_weather_theme/templates/partials/hourly-charts.html.twig @@ -10,7 +10,7 @@
      - {{ "Temperature" | t }} {{ "chart" | t }} + {{ "hourly-table.labels.temperature.01" | t }} {{ "chart" | t }}
      {% include "@new_weather_theme/partials/scroll-buttons.html.twig" %} @@ -26,17 +26,17 @@
      - {{ "Temperature" | t }} + {{ "hourly-table.labels.temperature.01" | t }}
      - {{ "Feels like" | t }} + {{ "forecast.current.feels-like.01" | t }}
      - {{ "Chance of precipitation" | t }} {{ "chart" | t }} + {{ "daily-forecast.text.chance-precip.01" | t }} {{ "chart" | t }}
      {% include "@new_weather_theme/partials/scroll-buttons.html.twig" %} @@ -51,7 +51,7 @@
      - {{ "Wind" | t }} {{ "chart" | t }} + {{ "observation-table.labels.wind.01" | t }} {{ "chart" | t }}
      {% include "@new_weather_theme/partials/scroll-buttons.html.twig" %} @@ -66,17 +66,17 @@
      - {{ "Wind speed" | t }} + {{ "hourly-table.labels.wind-speed.01" | t }}
      - {{ "Gusts" | t }} + {{ "observation-table.labels.gusts.01" | t }}
      - {{ "Humidity" | t }} {{ "chart" | t }} + {{ "hourly-table.labels.humidity.01" | t }} {{ "chart" | t }}
      {% include "@new_weather_theme/partials/scroll-buttons.html.twig" %} @@ -91,7 +91,7 @@
      - {{ "Dewpoint" | t }} {{ "chart" | t }} + {{ "hourly-table.labels.dewpoint.01" | t }} {{ "chart" | t }}
      {% include "@new_weather_theme/partials/scroll-buttons.html.twig" %} diff --git a/web/themes/new_weather_theme/templates/partials/hourly-table.html.twig b/web/themes/new_weather_theme/templates/partials/hourly-table.html.twig index 421a1aa8a..bd028389b 100644 --- a/web/themes/new_weather_theme/templates/partials/hourly-table.html.twig +++ b/web/themes/new_weather_theme/templates/partials/hourly-table.html.twig @@ -20,10 +20,10 @@
      0 %} data-has-alerts="true" {% else %} data-has-alerts="false" {% endif %}> - + - + {% for period in hours %} {% for period in hours %} {% endfor %} {% for period in hours %} {% for period in hours %} {% for period in hours %} {% endfor %} @@ -107,7 +107,7 @@ {% for period in hours %} {% endfor %} {% for period in hours %} {% endfor %} {% for period in hours %} {% endfor %} diff --git a/web/themes/new_weather_theme/templates/partials/location-search.html.twig b/web/themes/new_weather_theme/templates/partials/location-search.html.twig index 11b00720d..8283f86dc 100644 --- a/web/themes/new_weather_theme/templates/partials/location-search.html.twig +++ b/web/themes/new_weather_theme/templates/partials/location-search.html.twig @@ -4,11 +4,11 @@
      |
      - +
      diff --git a/web/themes/new_weather_theme/templates/partials/observation-table.html.twig b/web/themes/new_weather_theme/templates/partials/observation-table.html.twig index 5007c967e..eceea437e 100644 --- a/web/themes/new_weather_theme/templates/partials/observation-table.html.twig +++ b/web/themes/new_weather_theme/templates/partials/observation-table.html.twig @@ -3,7 +3,7 @@ {# WIND #}
      {% endif %} {# HUMIDITY #} {# PRESSURE #} diff --git a/web/themes/new_weather_theme/templates/partials/precip-table.html.twig b/web/themes/new_weather_theme/templates/partials/precip-table.html.twig index c31ab9ec1..f0db8d22b 100644 --- a/web/themes/new_weather_theme/templates/partials/precip-table.html.twig +++ b/web/themes/new_weather_theme/templates/partials/precip-table.html.twig @@ -1,6 +1,6 @@
      -
      {{ "Precipitation amounts" |t }}
      +
      {{ "precip-table.labels.amounts.01" |t }}
      @@ -51,7 +51,7 @@
      {{ "Detailed hourly weather data for @place. The rows are weather variables, the columns are hours." | t({ "@place": for }) }}{{ "hourly-table.aria.table-description.01" | t({ "@place": for }) }}
      {{ "Time" | t }}{{ "hourly-table.labels.time.01" | t }}
      - {{"Temperature" | t}} + {{"hourly-table.labels.temperature.01" | t}} @@ -47,14 +47,14 @@ {{ period.temperature.degF }} {% else %} - {{ "N/A" | t }} + {{ "abbreviations.not-applicable.01" | t }} {% endif %}
      - {{"Feels like" | t}} + {{"forecast.current.feels-like.01" | t}} @@ -67,7 +67,7 @@
      - {{"Condition" | t}} + {{"hourly-table.labels.condition.01" | t}} @@ -82,7 +82,7 @@ {% if period.shortForecast | length %}

      {{period.shortForecast}}

      {% else %} - {{ "N/A" | t }} + {{ "abbreviations.not-applicable.01" | t }} {% endif %} @@ -92,14 +92,14 @@
      - {{"Chance of precipitation" | t}} + {{"daily-forecast.text.chance-precip.01" | t}} {% if period.probabilityOfPrecipitation is not same as (null) %}

      {{period.probabilityOfPrecipitation.percent}}%

      {% else %} - {{ "N/A" | t }} + {{ "abbreviations.not-applicable.01" | t }} {% endif %}
      - {{"Wind speed" | t}} + {{"hourly-table.labels.wind-speed.01" | t}} @@ -118,28 +118,28 @@ } %} {% if period.windGust.mph is not same as (null) %} -
      {{ "with gusts up to @gustSpeed mph" | t({ "@gustSpeed": period.windGust.mph }) }}
      +
      {{ "hourly-table.text.gusting.01" | t({ "@gustSpeed": period.windGust.mph }) }}
      {% endif %}
      - {{"Humidity" | t}} + {{"hourly-table.labels.humidity.01" | t}} {% if period.relativeHumidity.percent is not same as (null) %} {{period.relativeHumidity.percent}}% {% else %} - {{ "N/A" | t }} + {{ "abbreviations.not-applicable.01" | t }} {% endif %}
      - {{"Dewpoint" | t}} + {{"hourly-table.labels.dewpoint.01" | t}} @@ -147,7 +147,7 @@ {{period.dewpoint.degF}} {% else %} - {{ "N/A" | t }} + {{ "abbreviations.not-applicable.01" | t }} {% endif %}
      - {{ "Wind" | t }} + {{ "observation-table.labels.wind.01" | t }} {% include '@new_weather_theme/partials/wind.html.twig' with { speed: obs.data.windSpeed, direction: obs.data.windDirection } %} @@ -13,21 +13,21 @@ {% if content.gusts is not same as (null) %}
      - {{ "Gusts" | t }} + {{ "observation-table.labels.gusts.01" | t }} - {{ content.gusts.speed }} {{ "mph" | t }} + {{ content.gusts.speed }} {{ "units.mph.01" | t }}
      - {{ "Humidity" | t }} + {{ "observation-table.labels.humidity.01" | t }} {% if obs.data.relativeHumidity.percent == 0 %} - {{ "N/A" | t}} + {{ "abbreviations.not-applicable.01" | t}} {% else %} {{ obs.data.relativeHumidity.percent }}% {% endif %} @@ -36,11 +36,11 @@ {# DEWPOINT #}
      - {{ "Dewpoint" | t }} + {{ "observation-table.labels.dewpoint.01" | t }} {% if obs.data.dewpoint.degF is same as (null) %} - {{ "N/A" | t}} + {{ "abbreviations.not-applicable.01" | t}} {% else %} {{ obs.data.dewpoint.degF }}°F {% endif %} @@ -49,26 +49,26 @@ {# VISIBILITY #}
      - {{ "Visibility" | t }} + {{ "observation-table.labels.visibility.01" | t }} {% if obs.data.visibility.mi is same as (null) %} - {{ "N/A" | t}} + {{ "abbreviations.not-applicable.01" | t}} {% else %} - {{ obs.data.visibility.mi }} {{ "miles" | t }} + {{ obs.data.visibility.mi }} {{ "units.miles.01" | t }} {% endif %}
      - {{ "Pressure" | t }} + {{ "observation-table.labels.pressure.01" | t }} {% if obs.data.barometricPressure.inHg is same as (null) %} - {{ "N/A" | t}} + {{ "abbreviations.not-applicable.01" | t}} {% else %} - {{ "@mercury_inches in (@mbar mb)" | t({ "@mercury_inches": obs.data.barometricPressure.inHg, "@mbar": obs.data.barometricPressure.mb })}} + {{ "units.mercury-inches.01" | t({ "@mercury_inches": obs.data.barometricPressure.inHg, "@mbar": obs.data.barometricPressure.mb })}} {% endif %}
      - + diff --git a/web/themes/new_weather_theme/templates/partials/quick-forecast-link-item.html.twig b/web/themes/new_weather_theme/templates/partials/quick-forecast-link-item.html.twig index 85a7fc13c..49ad700d2 100644 --- a/web/themes/new_weather_theme/templates/partials/quick-forecast-link-item.html.twig +++ b/web/themes/new_weather_theme/templates/partials/quick-forecast-link-item.html.twig @@ -30,7 +30,7 @@ the content
      - {{ "Condition" | t }} + {{"hourly-table.labels.condition.01" | t}} {{ day.periods[0].data.description }} @@ -61,16 +61,16 @@ the content {% if isNightPeriod %}
      - {{"High" | t}} + {{"daily-forecast.labels.high.01" | t}} - {{ "N/A" | t }} + {{ "abbreviations.not-applicable.01" | t }}
      {% else %}
      - {{"High" | t}} + {{"daily-forecast.labels.high.01" | t}} {{ high }} @@ -83,7 +83,7 @@ the content {% endif %}
      - {{"Low" | t}} + {{"daily-forecast.labels.low.01" | t}} {{ low }} @@ -106,7 +106,7 @@ the content
      - {{pop}}% {{"chance of precipitation" | t}} + {{pop}}% {{"daily-forecast.text.chance-precip.01" | t}}
      diff --git a/web/themes/new_weather_theme/templates/partials/radar.html.twig b/web/themes/new_weather_theme/templates/partials/radar.html.twig index b947b5468..4ab6f88d1 100644 --- a/web/themes/new_weather_theme/templates/partials/radar.html.twig +++ b/web/themes/new_weather_theme/templates/partials/radar.html.twig @@ -1,15 +1,13 @@ {{ attach_library("new_weather_theme/cmi-radar") }}
      -

      {{ "Radar" | t }}

      +

      {{ "radar.labels.radar.01" | t }}

      - {{ "Listed below is a visual representation of radar data for - @place. For more details on specific weather conditions, - view hourly data within the" | t({"@place": place }) }} - {{ "daily tab" | t }}. + {{ "radar.aria.description.01" | t({"@place": place }) }} + {{ "radar.labels.daily-tab.01" | t }}.

      {{ "precipitation amounts for the coming hours" | t }}{{ "precip-table.aria.amounts.01" | t }}
      {{ "Time Period" | t }}