Skip to content

Conversation

@enoch85
Copy link

@enoch85 enoch85 commented Oct 10, 2025

Fix Swedish translation errors and typos in sv.json

Description

This PR fixes 7 translation errors in the Swedish translation file (sv.json) that were causing JSON parsing errors and displaying incorrect/confusing text to Swedish users.

Fixes included:

  1. utility_meter_unknown_source - Critical JSON parsing error

    • Fixed missing opening brace: helper}{helper}
    • Fixed typo: "Sppok" → "Spook"
    • Fixed garbled text: "plcoka bort kpsterna" → "justera källentiteten"
    • Fixed "källor" (plural) → "källentitet" (singular) to match English version
  2. automation_unknown_area_references

    • Fixed incorrect text: "Inte din homie" (NOT your homie) → "Din polare" (Your buddy)
  3. automation_unknown_device_references

    • Fixed incorrect word usage: "områden" (areas) → "enheter" (devices) in 2 places
  4. automation_unknown_service_references

    • Fixed incorrect word usage: "områden" (areas) → "åtgärder" (actions) in 2 places
  5. lovelace_unknown_entity_references

    • Removed double period: "polare..""polare."
  6. proximity_unknown_tracked_entities

    • Fixed typo: "fäljande" → "följande"
    • Fixed sentence structure: "den hittade fäljande" → "hittade Spook följande"

Motivation and Context

The utility_meter_unknown_source error was causing Home Assistant to log translation parsing errors (reported in issue with users seeing "Error while parsing localized (sv) string"). The other errors caused confusing or incorrect text for Swedish users (e.g., saying "NOT your homie" instead of "your buddy", or referring to "areas" when discussing "devices").

Fixes Home Assistant log error:

Logger: homeassistant.helpers.translation
Error while parsing localized (sv) string component.spook.issues.utility_meter_unknown_source.description

How has this been tested?

  • Validated JSON syntax with JSON linter
  • Compared all changes against English source (en.json) for accuracy
  • Verified all template variables ({helper}, {entity_id}, etc.) are correctly formatted
  • Confirmed Swedish translation accuracy with native speaker review

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project
  • Translation changes match the English source file structure
  • All JSON template variables are properly formatted

Updated Swedish translations for utility meter helper descriptions.
@coderabbitai
Copy link

coderabbitai bot commented Oct 10, 2025

📝 Walkthrough

Walkthrough

Updated Swedish translation strings in custom_components/spook/translations/sv.json, refining phrasing, standardizing terminology (entities/services/helpers/Lovelace/proximity), correcting typos/capitalization, and aligning titles with descriptions.

Changes

Cohort / File(s) Summary of Changes
Swedish translations (single file)
custom_components/spook/translations/sv.json
Reworded and standardized many Swedish strings across issue titles and descriptions; replaced/standardized terms (enheter, åtgärder, hjälpkomponenter/Lovelace/proximity); adjusted narrative voice (Spook-related phrasing and emoji), fixed typos, spacing, and capitalization to align titles with descriptions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

maintenance

Suggested reviewers

  • frenck

Poem

I nibble on keys beneath the moonlight glow,
Tweaking Swedish lines so the messages flow.
Ghosts get named, entities set right,
A hop, a tweak, and the strings feel light.
Thump-thump—translations now polite. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed The description clearly outlines the seven specific translation errors in sv.json, details the fixes applied for each key including utility_meter_unknown_source and automation_unknown_area, and describes the motivation and testing steps, making it directly relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The pull request title "Fix multiple Swedish translation errors and typos in sv.json" directly and accurately summarizes the main change in the changeset. The title is concise, specific, and clearly identifies both what was fixed (Swedish translation errors and typos) and where (sv.json file). It avoids vague terminology and noise, making it immediately clear to someone reviewing the repository history that this is a translation maintenance fix for the Swedish language file.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@enoch85 enoch85 marked this pull request as ready for review October 10, 2025 19:35
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
custom_components/spook/translations/sv.json (1)

245-247: Match title wording with updated description

Beskrivningen använder nu “åtgärder” för att ersätta tjänster, men titeln säger fortfarande “händelser”. Justera titeln så båda använder samma term.

-      "title": "Okända händelser används i: {automation}"
+      "title": "Okända åtgärder används i: {automation}"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b7ea0c and 3648546.

📒 Files selected for processing (1)
  • custom_components/spook/translations/sv.json (4 hunks)

@enoch85 enoch85 changed the title Fix Swedish translations for utility meters Fix multiple Swedish translation errors and typos in sv.json Oct 23, 2025
@enoch85
Copy link
Author

enoch85 commented Oct 27, 2025

@frenck ?

@sonarqubecloud
Copy link

@frenck
Copy link
Owner

frenck commented Oct 27, 2025

@frenck ?

👋 Hey m8. I'm traveling most of this month; which means I have limited availability.

@sonarqubecloud
Copy link

@enoch85
Copy link
Author

enoch85 commented Jan 12, 2026

@frenck Any progress here? :)

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.

2 participants