Skip to content

Make the "Edit data" chart link translatable - #1246

Merged
gskjold merged 1 commit into
mainfrom
translate-edit-data-link
Aug 27, 2026
Merged

Make the "Edit data" chart link translatable#1246
gskjold merged 1 commit into
mainfrom
translate-edit-data-link

Conversation

@gskjold

@gskjold gskjold commented Aug 27, 2026

Copy link
Copy Markdown
Member

Reported by @zarhan in #1197: there is no Localazy token for Edit data.

The link under the 24 hour and monthly energy plots was hardcoded English in DayPlot.svelte / MonthPlot.svelte, so it never made it into localazy/source/en.json and translators had nothing to translate.

Changes

  • localazy/source/en.json — new dashboard.edit_data token
  • ui/src/lib/DayPlot.svelte, ui/src/lib/MonthPlot.svelte — subscribe to translationsStore and use translations.dashboard?.edit_data ?? 'Edit data', same pattern as Uptime.svelte / Header.svelte
  • ui/dist/index.js — rebuilt (npm run build), as in previous commits touching the UI

After merge the token needs pushing to Localazy (cd localazy && localazy upload ...) before translators can see it.

Verified

cd ui && npm run build succeeds (only the pre-existing a11y warnings), and the built bundle contains the new lookup with its English fallback.

Not included

PricePlot.svelte has the same problem with "Provided by: " — left alone to keep this PR to the reported string.

🤖 Generated with Claude Code

The link under the 24 hour and monthly energy plots was hardcoded
English, so it had no token on Localazy for translators to pick up.

Add dashboard.edit_data to the English source and look it up in
DayPlot/MonthPlot, falling back to "Edit data".

Refs #1197

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔧 PR Build Artifacts

Version: 96192bb

All environments built successfully. Download the zip files:

Artifacts expire after 7 days. View workflow run

@gskjold
gskjold merged commit a324cf6 into main Aug 27, 2026
8 checks passed
@gskjold
gskjold deleted the translate-edit-data-link branch August 27, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant