-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translations update from Hosted Weblate #811
base: main
Are you sure you want to change the base?
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe update introduces structured JSON configurations in multiple translation files for the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- custom_components/spook/integrations/spook_inverse/translations/et.json (1 hunks)
Additional comments not posted (2)
custom_components/spook/integrations/spook_inverse/translations/et.json (2)
2-29
: Theconfig
section is well-structured and complete.The JSON structure for configuring binary sensors and switches is logically organized, with clear and descriptive keys. The localization appears accurate.
30-39
: Theoptions
section is consistent and well-organized.The structure mirrors the
config
section, providing additional configurability for binary sensors. The localization and organization are clear and accurate.
5687c40
to
46fa6b3
Compare
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- custom_components/spook/integrations/spook_inverse/translations/et.json (1 hunks)
- custom_components/spook/integrations/spook_inverse/translations/ko.json (1 hunks)
Additional comments not posted (2)
custom_components/spook/integrations/spook_inverse/translations/ko.json (1)
1-11
: Well-structured JSON configuration for Korean translations.The new JSON structure for binary sensors is correctly localized and enhances the configuration options for Korean-speaking users. The structure is clear and well-organized.
custom_components/spook/integrations/spook_inverse/translations/et.json (1)
1-40
: Comprehensive JSON configuration for Estonian translations.The new JSON structure provides detailed configuration and options for binary sensors and switches, enhancing usability for Estonian-speaking users. The organization and localization are well-executed.
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- custom_components/spook/integrations/spook_inverse/translations/ko.json (1 hunks)
Additional comments not posted (6)
custom_components/spook/integrations/spook_inverse/translations/ko.json (6)
4-11
: Check the translation consistency forbinary_sensor
.Ensure that the translation for "출처 구성요소" (source component) and "출처 구성요소 숨김" (hide source) is consistent across similar contexts.
12-19
: Verify the translation and structure forswitch
.The structure and translations for
switch
should match the intended functionality. Ensure consistency withbinary_sensor
.
20-27
: Ensure correctness ofuser
object translations.The
description
andmenu_options
should accurately reflect the functionality for reversing states. Verify the appropriateness of the translations.
32-39
: Ensure consistency inbinary_sensor
options.The
options
forbinary_sensor
should maintain consistency with theconfig
section. Verify translation accuracy.
40-47
: Verifyswitch
options structure and translations.Ensure that the
switch
options are consistent with theconfig
section and translations are accurate.
50-50
: Verify the appropriateness of thetitle
.Ensure that the title "반전 👻" (Reversal 👻) is suitable for the context and consistent throughout the application.
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- custom_components/spook/integrations/spook_inverse/translations/fi.json (1 hunks)
Files skipped from review due to trivial changes (1)
- custom_components/spook/integrations/spook_inverse/translations/fi.json
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- custom_components/spook/integrations/spook_inverse/translations/fi.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- custom_components/spook/integrations/spook_inverse/translations/fi.json
9eb246f
to
9f762b9
Compare
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- custom_components/spook/integrations/spook_inverse/translations/ca.json (1 hunks)
- custom_components/spook/integrations/spook_inverse/translations/et.json (1 hunks)
- custom_components/spook/integrations/spook_inverse/translations/fi.json (1 hunks)
- custom_components/spook/integrations/spook_inverse/translations/ko.json (1 hunks)
Files skipped from review due to trivial changes (1)
- custom_components/spook/integrations/spook_inverse/translations/fi.json
Additional comments not posted (8)
custom_components/spook/integrations/spook_inverse/translations/ca.json (2)
2-15
: LGTM!The
config
section is correctly structured and the data fields are appropriately named.The code changes are approved.
16-29
: LGTM!The
options
section is correctly structured and the data fields are appropriately named.The code changes are approved.
custom_components/spook/integrations/spook_inverse/translations/et.json (3)
2-29
: LGTM!The
config
section is correctly structured and the data fields are appropriately named.The code changes are approved.
30-39
: LGTM!The
options
section is correctly structured and the data fields are appropriately named.The code changes are approved.
20-27
: LGTM!The
user
section is correctly structured and the descriptions are clear.The code changes are approved.
custom_components/spook/integrations/spook_inverse/translations/ko.json (3)
2-29
: LGTM!The
config
section is correctly structured and the data fields are appropriately named.The code changes are approved.
30-49
: LGTM!The
options
section is correctly structured and the data fields are appropriately named.The code changes are approved.
20-27
: LGTM!The
user
section is correctly structured and the descriptions are clear.The code changes are approved.
9162d58
to
f3762a2
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this 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
Outside diff range and nitpick comments (1)
custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json (1)
20-28
: LGTM: User section with clear explanationsThe user section is well-translated and provides clear explanations for the integration's functionality. The description effectively communicates the purpose of the tool.
Consider adding a space between "二級" and "製" in line 22 to correct a potential typo:
- "binary_sensor": "翻轉二級製傳感器", + "binary_sensor": "翻轉二級 製傳感器",Alternatively, if "二級製" is intentional, please verify its correctness in the context of binary sensors.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json (1 hunks)
- custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json (1 hunks)
Additional comments not posted (8)
custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json (4)
2-19
: LGTM: Consistent and appropriate translations for binary_sensor and switch configurations.The translations for the binary_sensor and switch configurations are consistent and appear to be appropriate for their respective fields. The use of "翻转 👻" (Flip 👻) as the title is creative and aligns with the "Spook" theme of the integration.
20-27
: LGTM: Informative user configuration with clear menu options.The user configuration section provides a clear and informative description of the integration's functionality. The menu options correctly correspond to the available configurations (switch and binary sensor). The translations are appropriate and consistent with the rest of the file.
31-50
: LGTM: Consistent translations in options section.The options section correctly mirrors the structure and translations of the config section for both binary_sensor and switch. This consistency is beneficial for the user experience, as it maintains the same terminology and structure throughout the configuration process.
1-51
: LGTM: Well-structured and consistent Simplified Chinese translations.The translation file for the spook_inverse integration in Simplified Chinese is well-structured, consistent, and comprehensive. It covers all necessary elements for configuration, options, and user interface. The translations appear to be of good quality and maintain a consistent style throughout the file. The use of the ghost emoji (👻) adds a playful touch that aligns well with the "Spook" theme of the integration.
custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json (4)
1-19
: LGTM: Config section for binary_sensor and switchThe config section for both binary_sensor and switch components is well-structured and consistently translated. The use of the ghost emoji (👻) in the title "翻轉 👻" (Flip 👻) adds a nice touch that aligns with the "Spook" theme of the integration.
30-49
: LGTM: Options section maintains consistencyThe options section for both binary_sensor and switch components maintains consistency with the config section. This consistency in structure and translations is beneficial for user experience and understanding.
50-51
: LGTM: Concise and consistent titleThe title "翻轉 👻" (Flip 👻) is concise, consistent with other sections, and effectively conveys the purpose of the integration while maintaining the playful "Spook" theme.
1-51
: Overall: Well-structured and consistent translationsThe
zh_Hant.json
file provides clear and consistent translations for the spook_inverse integration. The structure is well-organized, following JSON best practices, and the translations effectively convey the functionality of the integration. The use of the ghost emoji (👻) adds a playful touch that aligns with the "Spook" theme.There's only one minor suggestion regarding a potential typo in the binary_sensor menu option, which should be verified. Otherwise, this translation file is ready for implementation and will contribute to a positive user experience for Traditional Chinese users.
0312cc6
to
27c9c74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Outside diff range and nitpick comments (5)
custom_components/spook/integrations/spook_inverse/translations/et.json (1)
4-19
: Consider maintaining consistent field ordering across similar componentsThe field ordering differs between the binary_sensor and switch configurations. While this doesn't affect functionality, consistent ordering improves maintainability.
Consider reordering the switch fields to match the binary_sensor order:
"switch": { "data": { - "hide_source": "Peida lähteolem", - "name": "Nimi", - "entity_id": "Lähteolem" + "entity_id": "Lähteolem", + "hide_source": "Peida lähteolem", + "name": "Nimi" }, "title": "Pööra ümber" },custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json (1)
2-29
: Consider using translation references to reduce duplicationThe translation structure for binary_sensor and switch is identical in both config and options sections. Consider using translation references to maintain consistency and reduce duplication.
Example approach:
{ "common": { "entity_fields": { "entity_id": "源实体", "hide_source": "隐藏源实体", "name": "名称" } }, "config": { "step": { "binary_sensor": { "data": "@:common.entity_fields", "title": "翻转 👻" } // ... rest of the config } } }Also applies to: 31-50
custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json (1)
41-46
: Maintain consistent property orderingThe order of properties in the switch section differs from the binary_sensor section. For consistency, consider maintaining the same order (data before title) across all sections.
"switch": { - "title": "翻轉 👻", "data": { "entity_id": "源實體", "hide_source": "隱藏源實體", "name": "名稱" - } + }, + "title": "翻轉 👻" }custom_components/spook/integrations/spook_inverse/translations/ko.json (1)
6-8
: Maintain consistent field order across componentsThe field order in the
data
objects differs between binary_sensor and switch. Consider maintaining the same order for better maintainability:"binary_sensor": { "data": { - "entity_id": "출처 구성요소", - "hide_source": "출처 구성요소 숨김", - "name": "이름" + "name": "이름", + "entity_id": "출처 구성요소", + "hide_source": "출처 구성요소 숨김" } }Also applies to: 14-16
custom_components/spook/integrations/spook_inverse/translations/nb_NO.json (1)
Line range hint
1-50
: Ensure consistent terminology throughout the file.The compound word changes are not consistently applied across all sections:
- Not updated in
config.step.binary_sensor.data
- Not updated in
options.step.switch.data
Apply this diff to maintain consistency:
"config": { "step": { "binary_sensor": { "data": { "name": "Navn", - "entity_id": "Kilde entitet", - "hide_source": "Gjem kilde entitet" + "entity_id": "Kildeentitet", + "hide_source": "Gjem kildeentitet" }, }, "switch": { "data": { "entity_id": "Kildeentitet", - "hide_source": "Gjem kilde entitet", + "hide_source": "Gjem kildeentitet", "name": "Navn" }, }, } }, "options": { "step": { "switch": { "data": { - "entity_id": "Kilde entitet", - "hide_source": "Gjem kilde entitet", + "entity_id": "Kildeentitet", + "hide_source": "Gjem kildeentitet", "name": "Navn" }, } } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (9)
custom_components/spook/integrations/spook_inverse/translations/af.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/ca.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/et.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/fi.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/id.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/ko.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/nb_NO.json
(2 hunks)custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- custom_components/spook/integrations/spook_inverse/translations/af.json
- custom_components/spook/integrations/spook_inverse/translations/fi.json
🔇 Additional comments (8)
custom_components/spook/integrations/spook_inverse/translations/ca.json (1)
1-30
: LGTM! Well-structured translation file.
The JSON structure follows Home Assistant's translation schema correctly with proper nesting for configuration and options.
custom_components/spook/integrations/spook_inverse/translations/et.json (1)
20-27
: LGTM! Clear and well-structured user configuration
The user configuration section provides clear Estonian translations with a comprehensive description and properly aligned menu options.
custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json (1)
1-51
: LGTM: Well-structured translation file
The JSON structure follows Home Assistant's translation file conventions with proper organization of config and options sections.
custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json (1)
1-51
: Verify translation consistency across language files
The translations appear complete and well-structured. Let's verify the consistency of keys and structure across all language files.
✅ Verification successful
Translation structure and emoji usage are consistent
The verification shows that:
- The zh_Hant.json file has all the required translation keys matching the standard structure
- The ghost emoji (👻) is consistently used across all active translation files
- The translation structure follows Home Assistant's schema with all necessary configuration and options paths
- All key hierarchies are properly maintained across translations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for consistency across translation files
# Expected results: All files should have the same structure and keys
# Find all translation files
translation_files=$(fd . custom_components/spook/integrations/spook_inverse/translations/ -e json)
# Check if all files have the same keys structure
for file in $translation_files; do
echo "=== Checking structure of $file ==="
# Extract and sort keys hierarchically
jq -r 'path(..|select(type=="string")) | join(".")' "$file" | sort
done
# Verify emoji consistency
echo "=== Checking emoji usage ==="
rg -l "👻" custom_components/spook/integrations/spook_inverse/translations/
Length of output: 40083
custom_components/spook/integrations/spook_inverse/translations/ko.json (2)
30-49
: Options section structure looks good
The options section correctly mirrors the config section structure, maintaining consistency throughout the file.
1-51
: Verify translation structure consistency across languages
The Korean translations appear correct and well-structured. Let's verify that this structure is consistent across other language files.
✅ Verification successful
Translation structure is consistent with other complete translations
The Korean translation file follows the same structure as other complete translation files in the repository:
- Contains all required top-level keys:
config
,options
, andtitle
- Has the correct
config.step
structure withbinary_sensor
,switch
, anduser
sections - Has the correct
options.step
structure withbinary_sensor
andswitch
sections
The structure matches the reference English translation and other fully translated files like German (de), French (fr), Spanish (es), etc. Some translation files are empty (bg, he, ja, etc.) but this doesn't affect the verification of the Korean translation's structure.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if all translation files follow the same structure
# Expected: All files should have the same JSON structure with different translations
# Find all translation files
translation_files=$(fd . custom_components/spook/integrations/spook_inverse/translations/ -e json)
# Extract and compare structure (removing actual translations, keeping only keys)
for file in $translation_files; do
echo "=== Structure of $file ==="
cat "$file" | jq 'walk(if type == "object" then with_entries(.key) else . end)'
done
Length of output: 19986
Script:
#!/bin/bash
# Let's try a simpler approach to compare structure
# Get the structure of en.json as reference
echo "=== Reference structure (en.json) ==="
cat custom_components/spook/integrations/spook_inverse/translations/en.json | jq 'keys'
echo "=== Checking all files have same top-level keys ==="
for file in custom_components/spook/integrations/spook_inverse/translations/*.json; do
echo "=== $(basename "$file") ==="
cat "$file" | jq 'keys'
# Check config structure
echo "Config structure:"
cat "$file" | jq '.config.step | keys'
# Check options structure
echo "Options structure:"
cat "$file" | jq '.options.step | keys'
done
Length of output: 28949
custom_components/spook/integrations/spook_inverse/translations/nb_NO.json (1)
14-14
: LGTM: Improved Norwegian grammar by removing spaces in compound words.
The changes from "Kilde entitet" to "Kildeentitet" and "Gjem kilde entitet" to "Gjem kildeentitet" align with proper Norwegian compound word formation.
Also applies to: 34-35
custom_components/spook/integrations/spook_inverse/translations/id.json (1)
30-49
: LGTM! Well-structured translation additions
The new options section is well-structured and maintains consistency with the config section. The translations are professionally done and maintain the expected format for the integration.
"step": { | ||
"binary_sensor": { | ||
"data": { | ||
"name": "Nom" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Translation consistency needs attention in Catalan files
The verification reveals inconsistent translation patterns for "name" across Catalan files:
- In
custom_components/spook/integrations/spook_inverse/translations/ca.json
, "name" is consistently translated as "Nom" - However, in
custom_components/spook/translations/ca.json
, "name" fields contain direct entity/feature names in Catalan without using the standard "Nom" translation
This inconsistency should be addressed to maintain a uniform translation approach across the codebase.
🔗 Analysis chain
Verify translation consistency across Catalan files
The translation "Nom" for "Name" is correct in Catalan. Let's verify its consistent usage across other Catalan translation files in the project.
Also applies to: 11-11, 20-20, 25-25
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check consistency of "Nom" translation across Catalan files
# Expected: All Catalan translation files should use "Nom" for name fields
# Find all Catalan translation files and check for "name" translations
fd -e json -x sh -c 'if grep -l "ca\.json$" <<< "{}" >/dev/null; then echo "=== {}:"; jq -r ".. | .name? // empty" "{}"; fi'
Length of output: 3734
Script:
#!/bin/bash
# Let's try a simpler approach to find and check Catalan translation files
# First find all ca.json files
fd "ca.json$"
# Then let's examine their content specifically looking for name translations
fd "ca.json$" -x grep -H "\"name\":" {}
Length of output: 5854
"options": { | ||
"step": { | ||
"binary_sensor": { | ||
"data": { | ||
"entity_id": "Lähteolem", | ||
"hide_source": "Peida lähteolem" | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Missing 'switch' option in Estonian (et) translation file
The Estonian translation file is missing the 'switch' option in its options section, while most other complete translation files include both 'binary_sensor' and 'switch' options. This inconsistency should be addressed.
custom_components/spook/integrations/spook_inverse/translations/et.json
: Add missing 'switch' option section to match other translation files
🔗 Analysis chain
Verify options section completeness across translations
The options section only includes binary_sensor configuration while the config section includes both binary_sensor and switch. Let's verify this is consistent across other language files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if other language files have the same options structure
# Expected: All translation files should have consistent options structure
# Find all translation files in the same directory
find custom_components/spook/integrations/spook_inverse/translations -name "*.json" -exec sh -c '
echo "Checking $1:"
jq -r ".options.step | keys[]" "$1" 2>/dev/null || echo "No options.step found"
echo "---"
' sh {} \;
Length of output: 4536
"description": "此工具帮您翻转一个实体的表现。例如,翻转二进制传感器和开关的开/关状态。", | ||
"menu_options": { | ||
"switch": "翻转开关", | ||
"binary_sensor": "翻转二级制传感器" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in Chinese translation
The term "二级制" should be "二进制" (binary) to maintain consistency with standard Chinese technical terminology.
- "binary_sensor": "翻转二级制传感器"
+ "binary_sensor": "翻转二进制传感器"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"binary_sensor": "翻转二级制传感器" | |
"binary_sensor": "翻转二进制传感器" |
{ | ||
"config": { | ||
"step": { | ||
"binary_sensor": { | ||
"data": { | ||
"entity_id": "源实体", | ||
"hide_source": "隐藏源实体", | ||
"name": "名称" | ||
}, | ||
"title": "翻转 👻" | ||
}, | ||
"switch": { | ||
"data": { | ||
"entity_id": "源实体", | ||
"hide_source": "隐藏源实体", | ||
"name": "名称" | ||
}, | ||
"title": "翻转 👻" | ||
}, | ||
"user": { | ||
"description": "此工具帮您翻转一个实体的表现。例如,翻转二进制传感器和开关的开/关状态。", | ||
"menu_options": { | ||
"switch": "翻转开关", | ||
"binary_sensor": "翻转二级制传感器" | ||
}, | ||
"title": "翻转 👻" | ||
} | ||
} | ||
}, | ||
"title": "翻转 👻", | ||
"options": { | ||
"step": { | ||
"binary_sensor": { | ||
"data": { | ||
"entity_id": "源实体", | ||
"hide_source": "隐藏源实体", | ||
"name": "名称" | ||
}, | ||
"title": "翻转 👻" | ||
}, | ||
"switch": { | ||
"data": { | ||
"entity_id": "源实体", | ||
"hide_source": "隐藏源实体", | ||
"name": "名称" | ||
}, | ||
"title": "翻转 👻" | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Translation structure inconsistencies found across language files
Several inconsistencies in the translation file structures:
- Empty translation files:
sl.json
,uk.json
,ro.json
,th.json
,ja.json
,lb.json
,he.json
,bg.json
- Missing
options
section:ar.json
- Missing
switch
section in options:et.json
- Missing
user
section in config steps:ca.json
The zh_Hans.json file follows the complete structure as seen in en.json (reference), but other language files need to be updated for consistency.
🔗 Analysis chain
Verify translation structure consistency across languages
While this file's translations are internally consistent, we should verify that the structure matches other language files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Compare structure of translation files to ensure consistency
# Expected: All translation files should have the same structure (keys)
# Get the structure of this file (removing actual translations, keeping only keys)
echo "Structure of zh_Hans.json:"
cat "custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json" | jq 'walk(if type == "object" then with_entries(select(.value | type != "string")) else . end)'
# Compare with other translation files
echo -e "\nChecking other translation files:"
fd -e json . "custom_components/spook/integrations/spook_inverse/translations" --exec sh -c 'echo "=== {} ==="; cat {} | jq "walk(if type == \"object\" then with_entries(select(.value | type != \"string\")) else . end)"'
Length of output: 13786
}, | ||
"user": { | ||
"menu_options": { | ||
"binary_sensor": "翻轉二級製傳感器", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect translation for "binary sensor"
The current translation "二級製傳感器" appears to be incorrect. The standard Traditional Chinese translation for "binary sensor" should be "二進制傳感器".
- "binary_sensor": "翻轉二級製傳感器",
+ "binary_sensor": "翻轉二進制傳感器",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"binary_sensor": "翻轉二級製傳感器", | |
"binary_sensor": "翻轉二進制傳感器", |
"switch": { | ||
"data": { | ||
"entity_id": "Entitas sumber", | ||
"hide_source": "Sembunyikan entitas sumber", | ||
"name": "Nama" | ||
}, | ||
"title": "Kebalikannya 👻" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix inconsistent translation of switch title
There's an inconsistency in the switch titles between the config and options sections:
- Config section uses: "Inverse 👻"
- Options section uses: "Kebalikannya 👻"
For consistency, both sections should use the same translation.
Apply this diff to fix the inconsistency:
"switch": {
"data": {
"entity_id": "Entitas sumber",
"hide_source": "Sembunyikan entitas sumber",
"name": "Nama"
},
- "title": "Kebalikannya 👻"
+ "title": "Inverse 👻"
}
Committable suggestion skipped: line range outside the PR's diff.
27c9c74
to
483f518
Compare
Currently translated at 66.6% (14 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/et/
Currently translated at 4.7% (1 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/ko/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/ko/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/fi/
Currently translated at 19.0% (4 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/ca/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/id/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/af/
Currently translated at 19.0% (4 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/zh_Hans/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/zh_Hans/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/zh_Hant/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/nb_NO/
Currently translated at 33.3% (7 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/pt/
Currently translated at 100.0% (21 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/fi/
483f518
to
9879dce
Compare
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
custom_components/spook/integrations/spook_inverse/translations/af.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/ca.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/et.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/fi.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/id.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/ko.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/nb_NO.json
(2 hunks)custom_components/spook/integrations/spook_inverse/translations/pt.json
(2 hunks)custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json
(1 hunks)custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
- custom_components/spook/integrations/spook_inverse/translations/af.json
- custom_components/spook/integrations/spook_inverse/translations/ca.json
- custom_components/spook/integrations/spook_inverse/translations/fi.json
- custom_components/spook/integrations/spook_inverse/translations/pt.json
- custom_components/spook/integrations/spook_inverse/translations/ko.json
- custom_components/spook/integrations/spook_inverse/translations/zh_Hans.json
- custom_components/spook/integrations/spook_inverse/translations/zh_Hant.json
- custom_components/spook/integrations/spook_inverse/translations/nb_NO.json
- custom_components/spook/integrations/spook_inverse/translations/id.json
🔇 Additional comments (2)
custom_components/spook/integrations/spook_inverse/translations/et.json (2)
2-29
: LGTM! Config section is well-structured and complete
The configuration section includes proper Estonian translations for all necessary UI elements, with consistent naming patterns across binary_sensor and switch components.
30-39
:
Missing 'switch' option in Estonian translation file
The options section is missing the 'switch' configuration while it exists in the config section. This inconsistency should be addressed.
Add the missing switch options section:
"options": {
"step": {
"binary_sensor": {
"data": {
"entity_id": "Lähteolem",
"hide_source": "Peida lähteolem"
}
},
+ "switch": {
+ "data": {
+ "entity_id": "Lähteolem",
+ "hide_source": "Peida lähteolem"
+ }
+ }
}
}
{ | ||
"config": { | ||
"step": { | ||
"binary_sensor": { | ||
"data": { | ||
"entity_id": "Lähteolem", | ||
"hide_source": "Peida lähteolem", | ||
"name": "Nimi" | ||
}, | ||
"title": "Pööra ümber" | ||
}, | ||
"switch": { | ||
"data": { | ||
"hide_source": "Peida lähteolem", | ||
"name": "Nimi", | ||
"entity_id": "Lähteolem" | ||
}, | ||
"title": "Pööra ümber" | ||
}, | ||
"user": { | ||
"description": "See abimees võimaldab olemi käitumist ümber pöörata. Näiteks pöörake binaarandurite ja lülitite avatud/suletud või sisse/välja.", | ||
"title": "Pööra ümber", | ||
"menu_options": { | ||
"binary_sensor": "Binaaranduri ümberpööramine", | ||
"switch": "Lüliti ümberpööramine" | ||
} | ||
} | ||
} | ||
}, | ||
"options": { | ||
"step": { | ||
"binary_sensor": { | ||
"data": { | ||
"entity_id": "Lähteolem", | ||
"hide_source": "Peida lähteolem" | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Estonian translation file is incomplete
The Estonian (et.json) translation file is missing several keys that are present in other language files:
- Missing
options.step.binary_sensor.data.name
- Missing
options.step.binary_sensor.title
- Missing
options.step.switch.data.entity_id
- Missing
options.step.switch.data.hide_source
- Missing
options.step.switch.data.name
- Missing
options.step.switch.title
- Missing
title
🔗 Analysis chain
Verify translation consistency across the file
Let's ensure that similar terms are translated consistently throughout the file.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for translation consistency across the file
# Expected: Similar terms should have consistent translations
# Extract and compare translations for similar fields
jq -r '
def get_translations:
[
(.config.step.binary_sensor.data | to_entries[]),
(.config.step.switch.data | to_entries[])
] | sort_by(.key) | group_by(.key) | .[] |
select(length > 1) |
(.[0].key) as $key |
if (map(.value) | unique | length) > 1 then
"Inconsistent translations found for \($key): \(map(.value | tostring) | join(" vs "))"
else
empty
end;
get_translations
' custom_components/spook/integrations/spook_inverse/translations/et.json
# Compare with other language files to verify completeness
for f in custom_components/spook/integrations/spook_inverse/translations/*.json; do
echo "Checking completeness of $(basename $f):"
jq -r 'path(..|select(type=="string")) | join(".")' "$f" | sort | uniq
echo "---"
done
Length of output: 36318
Currently translated at 80.9% (17 of 21 strings) Translation: Spook/Inverse helper Translate-URL: https://hosted.weblate.org/projects/spook/inverse-helper/sv/
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (1)
custom_components/spook/integrations/spook_inverse/translations/sv.json (1)
Line range hint
33-45
: Fix inconsistent translations in options sectionThe translations in the options section still use the old, longer format while the config section uses the new, more concise format. This inconsistency should be fixed.
Apply this diff to maintain consistency:
"binary_sensor": { "data": { - "entity_id": "Källa för entitet", - "hide_source": "Dölj källa för entitet", + "entity_id": "Källenhet", + "hide_source": "Dölj källenhet", "name": "Namn" }, "title": "Invertera 👻" }, "switch": { "data": { - "entity_id": "Källa för entitet", - "hide_source": "Dölj källa för entitet", + "entity_id": "Källenhet", + "hide_source": "Dölj källenhet", "name": "Namn" },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
custom_components/spook/integrations/spook_inverse/translations/sv.json
(1 hunks)
🔇 Additional comments (2)
custom_components/spook/integrations/spook_inverse/translations/sv.json (2)
6-7
: LGTM! Translation changes look accurate
The Swedish translations have been made more concise while maintaining their semantic meaning.
14-15
: LGTM! Consistent translations across components
The translations maintain consistency with the binary_sensor section, which is good practice.
Quality Gate passedIssues Measures |
Translations update from Hosted Weblate for Spook/Inverse helper.
Current translation status: