-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix: language code #49
base: master
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThe PR fixes an issue with language code handling by adding logic to extract the correct language code from a compound format '{language_code}_{country_code}:{language_code}'. It also introduces a new Spanish language file. ER diagram for language fileserDiagram
LANG {
string language_code
}
LANG ||--o{ LANGUAGE_FILE : contains
LANGUAGE_FILE {
string file_name
}
note for LANGUAGE_FILE "New Spanish language file added"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @wildmer - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- Use os.path.join() and validate file path to prevent path traversal vulnerabilities (link)
Overall Comments:
- The file path construction could be vulnerable to path traversal attacks. Consider adding validation of the language code or using a secure path joining method.
- The new es.json file appears to be empty. Please ensure it contains the necessary translations.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🔴 Security: 1 blocking issue
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This commit aims to solve this problem #48
Apparently the language code is being received in {language_code}_{country_code}:{language_code}
Summary by Sourcery
Fix the language code parsing issue and add support for Spanish translations.
New Features:
Bug Fixes: