-
Notifications
You must be signed in to change notification settings - Fork 8
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
added translation keys #709
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes in this pull request involve modifications to the Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 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: 1
🧹 Outside diff range and nitpick comments (2)
plugins/view-mapped/src/view-mapped.ts (2)
40-40
: Consider using distinct translation keys for different progress stages.The same translation key 'viewMapped.updatingTable' is used at two different progress points (10% and 30%). This might be confusing for translators and users. Consider using distinct keys to allow for more specific progress messages.
- await tick(10, 'viewMapped.updatingTable') + await tick(10, 'viewMapped.startingUpdate') - await tick(30, 'viewMapped.updatingTable') + await tick(30, 'viewMapped.processingFields')Also applies to: 62-62
Line range hint
124-131
: Consider enhancing error message handling.While the error is logged internally, the user-facing error message 'viewMapped.error' is very generic. Consider:
- Adding more specific error keys based on the type of error
- Including relevant troubleshooting information in the translation
- throw new Error('viewMapped.error') + // Determine error type and throw appropriate message + const errorKey = error.name === 'ValidationError' + ? 'viewMapped.error.validation' + : 'viewMapped.error.general'; + throw new Error(errorKey)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
plugins/view-mapped/src/view-mapped.ts
(6 hunks)
🔇 Additional comments (1)
plugins/view-mapped/src/view-mapped.ts (1)
119-122
: LGTM! Completion message key is well-structured.
The translation key follows the established pattern and is appropriately placed in the completion handler.
@@ -37,7 +37,7 @@ export function viewMappedPlugin() { | |||
|
|||
try { | |||
// First, we acknowledge the job | |||
await tick(10, 'Updating the table to only view mapped fields') | |||
await tick(10, 'viewMapped.updatingTable') |
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 translation keys detected - action required
The translation keys used in view-mapped.ts are not defined in any of the translation files. Please add the following translation keys:
- viewMapped.updatingTable
- viewMapped.halfway
- viewMapped.almostDone
- viewMapped.complete
- viewMapped.error
🔗 Analysis chain
Verify translation keys are defined in translation files.
Let's ensure all new translation keys are properly defined in the corresponding translation files.
Also applies to: 62-62, 85-85, 105-105, 119-119, 130-130
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for translation key definitions
echo "Searching for translation key definitions..."
keys=(
"viewMapped.updatingTable"
"viewMapped.halfway"
"viewMapped.almostDone"
"viewMapped.complete"
"viewMapped.error"
)
# Look for translation files and check for these keys
fd -e json -e yaml -e yml | while read -r file; do
echo "Checking file: $file"
for key in "${keys[@]}"; do
if rg -q "$key" "$file"; then
echo "✓ Found key: $key"
else
echo "⚠ Missing key: $key"
fi
done
done
Length of output: 65573
Please explain how to summarize this PR for the Changelog:
Added translation keys for localization
Tell code reviewer how and what to test:
Ensure that the correct English translations are still showing once the accompanying PR to the translations file is live.