Skip to content

fix(weather_status): load translations when injecting dashboard widget script#60289

Open
miaulalala wants to merge 1 commit into
masterfrom
fix/weather-status-missing-translations
Open

fix(weather_status): load translations when injecting dashboard widget script#60289
miaulalala wants to merge 1 commit into
masterfrom
fix/weather-status-missing-translations

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

@miaulalala miaulalala commented May 10, 2026

Summary

  • The BeforeTemplateRenderedListener injected the weather-status script into the dashboard page but never called Util::addTranslations('weather_status')
  • This meant all t('weather_status', ...) calls in the weather widget fell back to raw English source strings, breaking localisation for all non-English users
  • Fix: add Util::addTranslations('weather_status') alongside the existing addScript call

Needs backport to stable32.

Fixes #60179

Test plan

  • Set your Nextcloud language to a non-English locale
  • Open the dashboard with the weather status widget active
  • Verify weather widget strings (e.g. "Detect location", "Set custom address", "Favorites") are now translated

AI-Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

…t script

The BeforeTemplateRenderedListener injected the weather-status script into
the dashboard page but never loaded the app's translation strings, causing
all t('weather_status', ...) calls to fall back to raw English source strings.

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@miaulalala miaulalala requested a review from a team as a code owner May 10, 2026 16:17
@miaulalala miaulalala requested review from ArtificialOwl, CarlSchwan, leftybournes and provokateurin and removed request for a team May 10, 2026 16:17
@miaulalala miaulalala self-assigned this May 10, 2026
@miaulalala miaulalala added this to the Nextcloud 34 milestone May 10, 2026
@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable33

@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable32

Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about #60179 (comment)?

Maybe this fix is only needed for older stable branches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dashboard/weather widget is no longer localised (english only)

2 participants