-
Notifications
You must be signed in to change notification settings - Fork 19
lang: add translation for Brazilian Portuguese (pt-BR) #183
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
Conversation
Added a new translation file for Brazilian Portuguese (pt-BR). This includes translations for OAuth error messages, button labels, and other related text. It improves localization support for users in Brazil.
WalkthroughA new Brazilian Portuguese language file for the Shield OAuth project has been added to the repository. This file provides localized translations for error messages, user interface strings, and OAuth-related labels specific to the Brazilian Portuguese (pt-BR) locale. The file is structured with strict typing and contains comprehensive translations for various OAuth authentication scenarios, including error handling and login prompts for services like GitHub and Google. Changes
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 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: 1
🧹 Outside diff range and nitpick comments (1)
src/Language/pt-BR/ShieldOAuthLang.php (1)
1-44: Overall excellent addition of Brazilian Portuguese translations.The translation file is well-structured, comprehensive, and maintains a professional tone throughout. It covers all essential OAuth scenarios and follows consistent formatting.
A few recommendations for long-term maintenance:
- Consider adding comments for translators about the usage of the {0} placeholder
- Document the status of Yahoo OAuth support in the project documentation
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Language/pt-BR/ShieldOAuthLang.php(1 hunks)
🔇 Additional comments (4)
src/Language/pt-BR/ShieldOAuthLang.php (4)
1-13: LGTM! File header follows best practices.
The file header is well-structured with proper PHP opening tag, strict typing declaration, and complete copyright information.
14-15: LGTM! Language array structure is correct.
The file follows the standard PHP language file structure with a clear comment and proper array return.
25-28: LGTM! UI labels are clear and consistent.
The translations for UI elements are concise and maintain proper Brazilian Portuguese language conventions.
30-44: Verify the status of Yahoo OAuth support.
The file includes commented-out Yahoo OAuth translations. Let's verify if this is consistent with other language files and if Yahoo support is planned.
✅ Verification successful
Let me check the OAuth configuration to get a complete picture of Yahoo support status.
Yahoo OAuth support is consistently commented out across the codebase
The verification shows that Yahoo OAuth support is intentionally commented out across all components:
- All language files (en, pt-BR, id, fr, fa) have Yahoo translations commented out
- The OAuth configuration file has Yahoo provider settings commented out in
oauthConfigsarray - This consistent pattern indicates Yahoo OAuth is not currently supported but may be planned for future implementation
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check Yahoo OAuth support status across language files
# Expected: Consistent handling of Yahoo section across all language files
# Search for Yahoo-related configurations in the codebase
echo "Checking Yahoo OAuth status:"
rg -l "Yahoo" --type php
# Check if Yahoo section is commented out in other language files
echo "\nYahoo section status in language files:"
fd ShieldOAuthLang.php src/Language -x grep -A 3 "Yahoo" {}
Length of output: 1231
Script:
#!/bin/bash
# Check OAuth configuration for Yahoo support
echo "Checking OAuth configuration:"
cat src/Config/ShieldOAuthConfig.php
# Check for any Yahoo-related functionality in the codebase
echo "\nChecking for Yahoo OAuth implementation:"
rg "Yahoo" -B 2 -A 2 --type php
Length of output: 6941
| // Errors List | ||
| 'unknown' => 'Erro desconhecido!', | ||
| 'Callback' => [ | ||
| 'oauth_class_not_set' => 'Ocorreu um erro, parece que a classe OAuth não está configurada.', | ||
| 'anti_forgery' => 'Sua solicitação foi detectada como falsa. Pedimos desculpas!', | ||
| 'account_not_found' => 'Não há nenhuma conta registrada com o e-mail "{0}".', | ||
| 'access_denied' => 'Autenticação cancelada! Você recusou as permissões de {0}.', | ||
| ], |
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 error messages in pt-BR translation file
The comparison reveals that the pt-BR translation file is missing three error messages that are present in other language files:
Githubgithubnot_allow
🔗 Analysis chain
Verify completeness of error messages against other language files.
The error messages are well-translated and maintain a professional tone. Let's verify that all error messages from other language files are covered.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Compare error messages with other language files
# Expected: All language files should have the same set of error keys
# Find all language files
echo "Comparing error message keys across language files:"
for lang_file in $(fd ShieldOAuthLang.php src/Language); do
echo "\nKeys in $lang_file:"
# Extract keys from the Errors List and Callback sections
awk '/Errors List/,/\],/' "$lang_file" | grep "=>" | cut -d"'" -f2
done
Length of output: 1970
datamweb
left a comment
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.
@tardisblink Thanks!
LGTM!
Added a new translation file for Brazilian Portuguese (pt-BR). This includes translations for OAuth error messages, button labels, and other related text. It improves localization support for users in Brazil.
Summary by CodeRabbit
New Features
Chores