Skip to content
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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"config": {
"step": {
"switch": {
"data": {
"name": "Naam",
"hide_source": "Maak bron entiteit onsigbaar",
"entity_id": "Bron entiteit"
},
"title": "Omkeer"
},
"binary_sensor": {
"title": "Omkeer",
"data": {
"name": "Naam",
"entity_id": "Bron entiteit",
"hide_source": "Maak bron entiteit onsigbaar"
}
},
"user": {
"description": "Hierdie helper laat jou toe om die gedrag van 'n entiteit om te skakel. Byvoorbeeld, verander oop/toe of aan/af van 'n binere sensor of skakelaar.",
"menu_options": {
"binary_sensor": "Keer 'n binere sensor om",
"switch": "Keer skakelaar om"
},
"title": "Omkeer"
}
}
},
"options": {
"step": {
"binary_sensor": {
"data": {
"hide_source": "Maak bron eniteit onsigbaar",
"name": "Naam",
"entity_id": "Bron entiteit"
},
"title": "Omkeer"
},
"switch": {
"data": {
"entity_id": "Bron entiteit",
"hide_source": "Maak bron eniteit onsigbaar",
"name": "Naam"
},
"title": "Omkeer"
}
}
},
"title": "Omkeer"
}
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
{}
{
"config": {
"step": {
"binary_sensor": {
"data": {
"name": "Nom"
}
Copy link

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

},
"switch": {
"data": {
"name": "Nom"
}
}
}
},
"options": {
"step": {
"binary_sensor": {
"data": {
"name": "Nom"
}
},
"switch": {
"data": {
"name": "Nom"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
{}
{
"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"
}
}
}
}
}
Comment on lines +30 to +39
Copy link

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"config": {
"step": {
"binary_sensor": {
"data": {
"entity_id": "Lähde entiteetti",
"name": "Nimi",
"hide_source": "Piilota lähde entiteetti"
},
"title": "Käännä 👻"
},
"user": {
"description": "Tämän apuohjelman avulla voit kääntää entiteetin käyttäytymisen. Voit esimerkiksi kääntää binääriantureiden ja kytkimien auki/kiinni tai päälle/pois.",
"menu_options": {
"binary_sensor": "Käännä binäärisensori",
"switch": "Käännä kytkin"
},
"title": "Käännä 👻"
},
"switch": {
"data": {
"entity_id": "Lähde entiteetti",
"hide_source": "Piilota lähde entiteetti",
"name": "Nimi"
},
"title": "Käännä 👻"
}
}
},
"options": {
"step": {
"switch": {
"data": {
"hide_source": "Piilota lähde entiteetti",
"name": "Nimi",
"entity_id": "Lähde entiteetti"
},
"title": "Käännä 👻"
},
"binary_sensor": {
"data": {
"entity_id": "Lähde entiteetti",
"hide_source": "Piilota lähde entiteetti",
"name": "Nimi"
},
"title": "Käännä 👻"
}
}
},
"title": "Käännä 👻"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,26 @@
"title": "Balikkan 👻"
}
}
}
},
"options": {
"step": {
"binary_sensor": {
"data": {
"entity_id": "Entitas sumber",
"hide_source": "Sembunyikan entitas sumber",
"name": "Nama"
},
"title": "Kebalikannya 👻"
},
"switch": {
"data": {
"entity_id": "Entitas sumber",
"hide_source": "Sembunyikan entitas sumber",
"name": "Nama"
},
"title": "Kebalikannya 👻"
}
Comment on lines +40 to +47
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

}
},
"title": "Kebalikannya 👻"
}
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
{}
{
"config": {
"step": {
"binary_sensor": {
"data": {
"entity_id": "출처 구성요소",
"hide_source": "출처 구성요소 숨김",
"name": "이름"
},
"title": "반전 👻"
},
"switch": {
"data": {
"name": "이름",
"entity_id": "출처 구성요소",
"hide_source": "출처 구성요소 숨김"
},
"title": "반전 👻"
},
"user": {
"description": "이 도우미는 구성요소의 동작을 반전시키는 데 도움이 됩니다. 예를 들어, 이진 센서 및 스위치의 열림/닫힘 또는 켜짐/꺼짐을 반전시킵니다.",
"menu_options": {
"switch": "스위치 반전",
"binary_sensor": "이진 센서 반전"
},
"title": "반전 👻"
}
}
},
"options": {
"step": {
"binary_sensor": {
"data": {
"hide_source": "출처 구성요소 숨김",
"entity_id": "출처 구성요소",
"name": "이름"
},
"title": "반전 👻"
},
"switch": {
"data": {
"name": "이름",
"entity_id": "출처 구성요소",
"hide_source": "출처 구성요소 숨김"
},
"title": "반전 👻"
}
}
},
"title": "반전 👻"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"config": {
"step": {
"binary_sensor": {
"data": {
"name": "Isem",
"entity_id": "Entita' tal-oriġini",
"hide_source": "Aħbi l-entita' tal-oriġini"
},
"title": "Il-Maqlub 👻"
},
"user": {
"description": "Dan l-assistent iħallik taqleb l-imġieba ta' entita'. Per eżempju, taqleb il-propjetajiet ta' iftaħ/agħlaq jew mixgħul/mitfi ta' sensors binarji, u swiċċijiet.",
"menu_options": {
"binary_sensor": "Aqleb sensor binarju",
"switch": "Aqleb swiċċ"
},
"title": "Maqlub 👻"
},
"switch": {
"data": {
"hide_source": "Aħbi l-entita' tal-oriġini",
"entity_id": "Entita' tal-oriġini",
"name": "Isem"
},
"title": "Aqleb 👻"
}
}
},
"options": {
"step": {
"binary_sensor": {
"data": {
"entity_id": "Entita' tal-oriġini",
"hide_source": "Aħbi l-entita' tal-oriġini",
"name": "Isem"
}
}
}
}
}
Comment on lines +1 to +41
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Missing translations found in Maltese (mt.json) language file

The following translations are missing in the Maltese language file compared to the English version:

  • options.step.binary_sensor.title - Missing title for binary sensor options
  • options.step.switch.data.entity_id - Missing entity ID field in switch options
  • options.step.switch.data.hide_source - Missing hide source field in switch options
  • options.step.switch.data.name - Missing name field in switch options
  • options.step.switch.title - Missing title for switch options
  • title - Missing root-level title
🔗 Analysis chain

Verify translation completeness against other language files

While the structure looks good, let's verify that all necessary translations are present compared to other language files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Compare translation keys with other language files to ensure completeness

# Get a list of all translation files
echo "Checking translation files..."
find custom_components/spook/integrations/spook_inverse/translations -name "*.json" -not -name "mt.json" -exec sh -c '
    echo "\nComparing with $1:"
    # Compare structure with other translation files using jq
    diff <(jq -S "paths" "$1") <(jq -S "paths" "custom_components/spook/integrations/spook_inverse/translations/mt.json")
' sh {} \;

Length of output: 5433


Script:

#!/bin/bash
# Let's try a different approach using jq to compare with en.json (primary language)
echo "Comparing mt.json with en.json structure:"
jq -r 'paths(scalars) | join(".")' custom_components/spook/integrations/spook_inverse/translations/en.json | sort > /tmp/en_paths
jq -r 'paths(scalars) | join(".")' custom_components/spook/integrations/spook_inverse/translations/mt.json | sort > /tmp/mt_paths
diff /tmp/en_paths /tmp/mt_paths

# Also show the actual content of en.json for reference
echo -e "\nContent of en.json for reference:"
cat custom_components/spook/integrations/spook_inverse/translations/en.json

Length of output: 1969

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"switch": {
"data": {
"entity_id": "Kilde entitet",
"entity_id": "Kildeentitet",
"hide_source": "Gjem kilde entitet",
"name": "Navn"
},
Expand All @@ -31,8 +31,8 @@
"step": {
"binary_sensor": {
"data": {
"hide_source": "Gjem kilde entitet",
"entity_id": "Kilde entitet",
"hide_source": "Gjem kildeentitet",
"entity_id": "Kildeentitet",
"name": "Navn"
},
"title": "Reverser 👻"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
"name": "Nome",
"hide_source": "Ocultar entidade de origem"
},
"title": "Invertido"
"title": "Invertido 👻"
},
"switch": {
"data": {
"entity_id": "Entidade de origem",
"name": "Nome",
"hide_source": "Ocultar entidade de origem"
},
"title": "Invertido"
"title": "Invertido 👻"
},
"user": {
"menu_options": {
"binary_sensor": "Inverter um sensor binário",
"switch": "Inverter um interruptor"
},
"title": "Inverso",
"title": "Inverso 👻",
"description": "Esse ajudante permite você inverter o comportamento de uma entidade. Por exemplo, inverter aberto/fechado ou ligado/desligado de sensores binários e interruptores."
}
}
Expand All @@ -43,9 +43,9 @@
"name": "Nome",
"entity_id": "Entidade de origem"
},
"title": "Inverso"
"title": "Inverso 👻"
}
}
},
"title": "Inverso"
"title": "Inverso 👻"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"step": {
"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"
},
"title": "Invertera 👻"
Expand Down
Loading
Loading