-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
import galician translations #50
Conversation
WalkthroughThis pull request introduces various changes to the Galician localization files, enhancing dialog and vocabulary entries across multiple contexts. New phrases and rules related to error messages, game mechanics, and ethical guidelines for robots have been added. Additionally, two new JSON files for dialogs and vocabulary have been created, consolidating translations and terms used within the application, while a script has been modified for improved file path handling during translation synchronization. Changes
Poem
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: 5
🧹 Outside diff range and nitpick comments (3)
translations/gl-es/dialogs.json (2)
19-21
: Maintain consistent capitalization in error messages.The error message should start with a capital letter to maintain consistency with other dialog entries.
- "non se puido abrir o ficheiro de son" + "Non se puido abrir o ficheiro de son"
22-24
: Consider using a template variable for the number.The number "seis millóns" could be made configurable using a template variable for better maintainability.
- "domino seis millóns de formas de comunicación" + "domino { number_of_languages } formas de comunicación"translations/gl-es/vocabs.json (1)
89-96
: Standardize case in HAL 9000 variationsThe HAL entries mix uppercase "HAL" with lowercase "todos" and other variations. Consider standardizing the case for consistency.
Consider standardizing to:
"/vocab/hal_keyword.voc": [ "HAL 9000 di", "HAL di", - "todos 9000 din", - "todos din", - "como 9000 di", - "como nove mil di", - "berra 9000 di", - "berra nove mil di" + "TODOS 9000 din", + "TODOS din", + "COMO 9000 di", + "COMO nove mil di", + "BERRA 9000 di", + "BERRA nove mil di" ]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (29)
locale/gl-es/dialog/bad_file.dialog
(1 hunks)locale/gl-es/dialog/languages.dialog
(1 hunks)locale/gl-es/dialog/pod.dialog
(1 hunks)locale/gl-es/dialog/rock_paper_scissors_lizard_spock.dialog
(1 hunks)locale/gl-es/dialog/rule0.dialog
(1 hunks)locale/gl-es/dialog/rule1.dialog
(1 hunks)locale/gl-es/dialog/rule2.dialog
(1 hunks)locale/gl-es/dialog/rule3.dialog
(1 hunks)locale/gl-es/dialog/stardate.dialog
(1 hunks)locale/gl-es/vocab/adult_mode_keyword.voc
(1 hunks)locale/gl-es/vocab/arnold_keyword.voc
(1 hunks)locale/gl-es/vocab/bender_keyword.voc
(1 hunks)locale/gl-es/vocab/bill_and_ted_keyword.voc
(1 hunks)locale/gl-es/vocab/conan_keyword.voc
(1 hunks)locale/gl-es/vocab/duke_nukem_keyword.voc
(1 hunks)locale/gl-es/vocab/glados_keyword.voc
(1 hunks)locale/gl-es/vocab/grandma_mode_keyword.voc
(1 hunks)locale/gl-es/vocab/hal_keyword.voc
(1 hunks)locale/gl-es/vocab/languages_you_speak_keyword.voc
(1 hunks)locale/gl-es/vocab/law_keyword.voc
(1 hunks)locale/gl-es/vocab/malibu_stacey_keyword.voc
(1 hunks)locale/gl-es/vocab/pod_bay_doors_keyword.voc
(1 hunks)locale/gl-es/vocab/portal_keyword.voc
(1 hunks)locale/gl-es/vocab/robotics_keyword.voc
(1 hunks)locale/gl-es/vocab/rock_paper_scissors_lizard_spock_keyword.voc
(1 hunks)locale/gl-es/vocab/stardate_keyword.voc
(1 hunks)scripts/sync_translations.py
(4 hunks)translations/gl-es/dialogs.json
(1 hunks)translations/gl-es/vocabs.json
(1 hunks)
✅ Files skipped from review due to trivial changes (18)
- locale/gl-es/vocab/bender_keyword.voc
- locale/gl-es/dialog/languages.dialog
- locale/gl-es/vocab/adult_mode_keyword.voc
- locale/gl-es/dialog/rule0.dialog
- locale/gl-es/dialog/bad_file.dialog
- locale/gl-es/vocab/law_keyword.voc
- locale/gl-es/vocab/conan_keyword.voc
- locale/gl-es/vocab/grandma_mode_keyword.voc
- locale/gl-es/vocab/malibu_stacey_keyword.voc
- locale/gl-es/vocab/bill_and_ted_keyword.voc
- locale/gl-es/vocab/rock_paper_scissors_lizard_spock_keyword.voc
- locale/gl-es/dialog/rule1.dialog
- locale/gl-es/dialog/pod.dialog
- locale/gl-es/dialog/rule2.dialog
- locale/gl-es/vocab/arnold_keyword.voc
- locale/gl-es/dialog/stardate.dialog
- locale/gl-es/vocab/glados_keyword.voc
- locale/gl-es/vocab/portal_keyword.voc
🔇 Additional comments (11)
locale/gl-es/vocab/robotics_keyword.voc (1)
1-2
: LGTM! Well-formatted vocabulary entries
The robotics terms are correctly spelled in Galician with proper accents and follow the one-term-per-line format convention.
locale/gl-es/vocab/languages_you_speak_keyword.voc (1)
1-2
: LGTM! Good phrase variations
The vocabulary entries provide useful variations for asking about languages in Galician. The phrases are grammatically correct and follow the standard format.
locale/gl-es/vocab/duke_nukem_keyword.voc (1)
1-5
: Review necessity of multiple phonetic variations
While having phonetic variations can help with voice recognition, some variations like "newcom", "newcomb", and "newham" seem too distant from the original "Nukem" and might lead to false positives. Consider:
- Keeping only the most common mispronunciations
- Verifying if all these variations are actually used by Galician speakers
Additionally, verify if the "di" suffix is the correct Galician verb form for this context.
Consider reducing to the most common variations:
-duke newcom di
-duke newcomb di
-duke newham di
-duke newum di
+duke newkem di
duke nukem di
✅ Verification successful
Let me check the content of these other vocabulary files to understand the pattern better.
Multiple variations are consistent with other wake word files
Looking at other vocabulary files in the Galician (gl-es) locale, the pattern of including multiple phonetic variations with the "di" suffix is consistent across all wake word files:
- GLaDOS has variations: gladdos/gladis/glados/gladys
- HAL has multiple forms including phonetic spellings
- The "di" suffix is consistently used across all wake word files
The variations in duke_nukem_keyword.voc follow the same pattern as other wake word files in the Galician locale, suggesting this is an intentional design choice for better voice recognition. The multiple spellings, while seemingly distant from the original, align with the project's approach to handling wake words in Galician.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if similar patterns exist in other vocabulary files
echo "Checking for similar patterns in other vocabulary files..."
rg -l "di$" locale/gl-es/vocab/
Length of output: 351
Script:
#!/bin/bash
# Check contents of all files ending with "di"
echo "Contents of vocabulary files with 'di' suffix:"
for file in $(rg -l "di$" locale/gl-es/vocab/); do
echo -e "\n=== $file ==="
cat "$file"
done
Length of output: 1415
locale/gl-es/vocab/pod_bay_doors_keyword.voc (1)
1-2
: LGTM! Valid variations for voice recognition.
Both phrases are correctly formatted and represent natural variations in Galician, which is good for improving voice command recognition.
locale/gl-es/vocab/hal_keyword.voc (2)
7-8
: Clarify the purpose of "todos" (all) entries.
The entries with "todos" (all) seem disconnected from the HAL context. Please verify if these are intentional or if they belong in a different vocabulary file.
Would you like me to help restructure these entries or suggest alternative phrasings?
3-4
: Verify the context of "berra" (shout) entries.
The use of "berra" (shout) with HAL 9000 seems unusual. Consider if these entries align with the intended interaction style.
locale/gl-es/dialog/rock_paper_scissors_lizard_spock.dialog (1)
1-1
: LGTM! Translation is accurate and complete.
The Galician translation correctly captures all game rules and relationships between elements (rock, paper, scissors, lizard, Spock).
locale/gl-es/dialog/rule3.dialog (1)
1-1
: LGTM! Translation accurately preserves Asimov's Three Laws.
The Galician translation maintains the hierarchical relationship between the laws and uses consistent terminology. The capitalization of "Primeira" and "Segunda" when referring to the laws is appropriately maintained.
translations/gl-es/dialogs.json (2)
5-9
: LGTM! Proper template variable usage.
The stardate dialog entries correctly use the template variable { stardate }
and provide good variety in phrasing.
1-31
: Verify dialog file synchronization.
Since some content exists both in individual .dialog files and this JSON file, we should ensure they stay synchronized.
✅ Verification successful
Let me generate additional shell scripts to check the remaining dialog files for completeness:
All dialog files are properly synchronized
Based on the verification results, all dialog files in locale/gl-es/dialog/
are perfectly synchronized with their corresponding entries in translations/gl-es/dialogs.json
. The content matches exactly for all files including:
- rock_paper_scissors_lizard_spock.dialog
- stardate.dialog (all 3 variations)
- pod.dialog
- rule0.dialog, rule1.dialog, rule2.dialog, rule3.dialog
- bad_file.dialog
- languages.dialog
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if dialog content matches between individual files and JSON
# Function to normalize text (remove spaces and newlines)
normalize() {
echo "$1" | tr -d '\n' | tr -d ' '
}
# Check rock_paper_scissors_lizard_spock dialog
json_content=$(jq -r '."\/dialog\/rock_paper_scissors_lizard_spock.dialog"[0]' translations/gl-es/dialogs.json)
file_content=$(cat locale/gl-es/dialog/rock_paper_scissors_lizard_spock.dialog)
if [ "$(normalize "$json_content")" != "$(normalize "$file_content")" ]; then
echo "Mismatch in rock_paper_scissors_lizard_spock.dialog"
fi
# Check rule3 dialog
json_content=$(jq -r '."\/dialog\/rule3.dialog"[0]' translations/gl-es/dialogs.json)
file_content=$(cat locale/gl-es/dialog/rule3.dialog)
if [ "$(normalize "$json_content")" != "$(normalize "$file_content")" ]; then
echo "Mismatch in rule3.dialog"
fi
Length of output: 5347
Script:
#!/bin/bash
# Check remaining dialog files for synchronization
# Check stardate dialog
json_content=$(jq -r '."\/dialog\/stardate.dialog"[]' translations/gl-es/dialogs.json | sort)
file_content=$(cat locale/gl-es/dialog/stardate.dialog | sort)
if [ "$(echo "$json_content" | md5sum)" != "$(echo "$file_content" | md5sum)" ]; then
echo "Mismatch in stardate.dialog"
fi
# Check pod dialog
json_content=$(jq -r '."\/dialog\/pod.dialog"[0]' translations/gl-es/dialogs.json)
file_content=$(cat locale/gl-es/dialog/pod.dialog)
if [ "$(echo "$json_content" | md5sum)" != "$(echo "$file_content" | md5sum)" ]; then
echo "Mismatch in pod.dialog"
fi
# Check rule1, rule2, rule0 dialogs
for rule in rule1 rule2 rule0; do
json_content=$(jq -r ".\"/dialog/${rule}.dialog\"[0]" translations/gl-es/dialogs.json)
file_content=$(cat "locale/gl-es/dialog/${rule}.dialog")
if [ "$(echo "$json_content" | md5sum)" != "$(echo "$file_content" | md5sum)" ]; then
echo "Mismatch in ${rule}.dialog"
fi
done
# Check bad_file and languages dialogs
for dialog in bad_file languages; do
json_content=$(jq -r ".\"/dialog/${dialog}.dialog\"[0]" translations/gl-es/dialogs.json)
file_content=$(cat "locale/gl-es/dialog/${dialog}.dialog")
if [ "$(echo "$json_content" | md5sum)" != "$(echo "$file_content" | md5sum)" ]; then
echo "Mismatch in ${dialog}.dialog"
fi
done
Length of output: 4341
translations/gl-es/vocabs.json (1)
52-54
: Review sensitive content translation
The translation for "adult_mode_keyword" ("faime dano" - "hurt me") might need review for appropriateness in the context of the application.
Let's check the context of this vocabulary usage:
✅ Verification successful
Translation is appropriate within context
The translation "faime dano" for "adult_mode_keyword" is actually appropriate given the full context. This is part of a gaming/entertainment skill that references the classic DOOM difficulty levels ("hurt me plenty" is a medium difficulty setting). The phrase is used to toggle a mode that enables more aggressive or challenging responses, with a counterpart "grandma_mode" for a gentler experience. The implementation shows it's used for playful dialogue responses like "Do you feel lucky, punk?" - a classic movie quote.
- The English and German versions both use "hurt me plenty"
- The Galician translation "faime dano" maintains the same meaning
- The context shows this is used appropriately as part of a gaming reference
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for references to adult_mode to understand its context
rg -l "adult_mode" --type txt --type json
Length of output: 134
Script:
#!/bin/bash
# Let's check the content of these vocabulary files to understand the context
cat translations/en-us/vocabs.json translations/de-de/vocabs.json translations/gl-es/vocabs.json | grep -A 1 "adult_mode_keyword"
Length of output: 323
Script:
#!/bin/bash
# Let's search for more context about where and how this keyword is used
rg "adult_mode" -A 5 -B 5
Length of output: 5262
estrela comer | ||
oito de inicio |
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 translations "estrela comer" and "oito de inicio".
These entries appear to be machine translation errors:
- "estrela comer" (star eat) is not a valid stardate reference
- "oito de inicio" (eight of start) is not a valid stardate reference
These should be removed as they could cause confusion in voice recognition.
día inicial
-estrela comer
-oito de inicio
📝 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.
estrela comer | |
oito de inicio | |
día inicial |
included in #51 |
Summary by CodeRabbit
New Features
Documentation