Skip to content

Fix placeholders in Finnish translation#1166

Merged
frenck merged 1 commit into
frenck:mainfrom
sofkaski:fix_1165
May 28, 2026
Merged

Fix placeholders in Finnish translation#1166
frenck merged 1 commit into
frenck:mainfrom
sofkaski:fix_1165

Conversation

@sofkaski
Copy link
Copy Markdown
Contributor

Returned translated placeholders to English.

Fixes the issue #1165.

Description

Placeholders were incorrectly also translated to Finnish which should not happen.

How has this been tested?

I installed the language file to my system and re-checked logs. No log writings any more.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The Finnish translations file custom_components/spook/translations/fi.json replaces Finnish placeholder tokens with standardized English placeholders across many issue/fix-flow entries and changes issues.user_issue title placeholders from {nimike} to {title}.

Changes

Finnish translation updates

Layer / File(s) Summary
Standardize issue/fix-flow placeholders
custom_components/spook/translations/fi.json
Replace Finnish placeholder tokens with invariant English placeholders across automation, group, integration, lovelace/dashboard, proximity, scene, script, and source-related issue/fix-flow entries (examples: {alueet}{areas}, {laitteet}{devices}, {entiteetit}{entities}, {kerrokset}{floors}, {labels}{labels}, {services}{services}, {edit} remains the link target).
User issue title placeholder update
custom_components/spook/translations/fi.json
Change issues.user_issue.fix_flow.step.confirm.title and issues.user_issue.title placeholders from {nimike} to {title}.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • frenck/spook#940: Similar changes to issues translation entries and placeholders in other locale files.
  • frenck/spook#1073: Related placeholder key standardization across translations.
  • frenck/spook#1265: Updates to translation placeholders in issues templates for multiple locales.

Suggested reviewers

  • frenck

Poem

🐰
I hopped through keys both short and long,
Replaced odd tokens with ones more strong,
Titles now match, placeholders sing,
Finnish file cleaned — let the fix-flows spring! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains that placeholders were incorrectly translated to Finnish and should remain in English, references the fixed issue #1165, and describes testing performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'Fix placeholders in Finnish translation' directly and clearly describes the main change in the PR—correcting placeholder variables in the Finnish translation file from Finnish variable names back to English ones.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@sofkaski
Copy link
Copy Markdown
Contributor Author

I made this as a PR, but I suppose fixes should really come through WebLate. Right? I tried to use it, but it said that it is temporarily closed for maintenance.

Finnish language in the translation should be improved (a lot), but I did not touch to it here.

@sonarqubecloud
Copy link
Copy Markdown

@sofkaski
Copy link
Copy Markdown
Contributor Author

Rebased.

@frenckatron frenckatron added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label May 28, 2026
Returned translated placeholders to English.

Fixes the issue frenck#1165.
@sonarqubecloud
Copy link
Copy Markdown

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.18%. Comparing base (88abfdc) to head (bf02762).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1166      +/-   ##
==========================================
+ Coverage   61.15%   61.18%   +0.03%     
==========================================
  Files         119      119              
  Lines        3035     3035              
  Branches      390      390              
==========================================
+ Hits         1856     1857       +1     
+ Misses       1133     1132       -1     
  Partials       46       46              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frenck frenck changed the title fix: Correct placeholders in Finnish translation Fix placeholders in Finnish translation May 28, 2026
Copy link
Copy Markdown
Contributor

@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: 0

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

225-294: 💤 Low value

Consider making link text language consistent.

The link text in issue descriptions mixes English and Finnish:

  • Automation/dashboard issues use English: [edit the automation], [edit the dashboard]
  • Scene/script issues use Finnish: [muokkaa kohtausta], [muokkaa komentosarjaa]

For a better user experience, consider translating all link text to Finnish consistently, e.g., change [edit the automation] to [muokkaa automaatiota] and [edit the dashboard] to [muokkaa kojelautaa].

Note: This is outside the scope of placeholder standardization and can be addressed separately if desired.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@custom_components/spook/translations/fi.json` around lines 225 - 294, The
link text in several translation entries mixes English and Finnish; update the
link display text to Finnish for consistency by changing English phrases like
"[edit the automation]" and "[edit the dashboard]" to Finnish equivalents (e.g.,
"[muokkaa automaatiota]" and "[muokkaa kojelautaa]") where they appear in keys
such as automation_unknown_area_references,
automation_unknown_device_references, automation_unknown_entity_references,
automation_unknown_floor_references, automation_unknown_label_references,
automation_unknown_service_references, lovelace_unknown_entity_references,
scene_unknown_entity_references, script_unknown_area_references,
script_unknown_device_references, script_unknown_entity_references,
script_unknown_floor_references, script_unknown_label_references so the link
text language is consistent across all descriptions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@custom_components/spook/translations/fi.json`:
- Around line 225-294: The link text in several translation entries mixes
English and Finnish; update the link display text to Finnish for consistency by
changing English phrases like "[edit the automation]" and "[edit the dashboard]"
to Finnish equivalents (e.g., "[muokkaa automaatiota]" and "[muokkaa
kojelautaa]") where they appear in keys such as
automation_unknown_area_references, automation_unknown_device_references,
automation_unknown_entity_references, automation_unknown_floor_references,
automation_unknown_label_references, automation_unknown_service_references,
lovelace_unknown_entity_references, scene_unknown_entity_references,
script_unknown_area_references, script_unknown_device_references,
script_unknown_entity_references, script_unknown_floor_references,
script_unknown_label_references so the link text language is consistent across
all descriptions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a3fd2b3d-4a70-480e-bdfc-95b5fa3fcc97

📥 Commits

Reviewing files that changed from the base of the PR and between be475d6 and bf02762.

📒 Files selected for processing (1)
  • custom_components/spook/translations/fi.json

Copy link
Copy Markdown
Collaborator

@frenckatron frenckatron left a comment

Choose a reason for hiding this comment

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

Reviewed the Finnish placeholder fixes and refreshed the branch against current main.

The changes restore placeholder names to the source-language contract. Placeholder parity with en.json is clean and CI is green.

../Frenckatron
The robot version of Frenck.

                       

Blogging my personal ramblings at frenck.dev

@frenck frenck merged commit d601aee into frenck:main May 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants