-
-
Notifications
You must be signed in to change notification settings - Fork 33
Remove legacy translation files and scripts; add new PO files for translations #115
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
Reviewer's GuideThis PR upgrades the project’s i18n workflow by removing legacy translation files and scripts, integrating DistUtilsExtra translation build/clean commands, bumping the version, simplifying data file packaging, and updating documentation and helper scripts accordingly. Entity relationship diagram for translation files and packaging changeserDiagram
SETUP {
string name
string version
list data_files
dict cmdclass
}
LOCALE {
string locale_code
string po_file
string mo_file
}
BUILD_MO {
string path
}
SETUP ||--o{ LOCALE : includes
SETUP ||--o{ BUILD_MO : packages
LOCALE ||--o{ BUILD_MO : generates
Class diagram for updated setup.py translation commands integrationclassDiagram
class setup {
+__VERSION__ : str
+PROGRAM_VERSION : str
+datafilelist(installbase, sourcebase)
}
class CreateTranslationCommand {
+run()
}
class UpdateTranslationsCommand {
+run()
}
class build_extra
class build_i18n
class clean_i18n
setup <|-- CreateTranslationCommand
setup <|-- UpdateTranslationsCommand
setup ..> build_extra : uses
setup ..> build_i18n : uses
setup ..> clean_i18n : uses
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 @ericbsd - I've reviewed your changes and they look great!
Blocking issues:
- Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability. (link)
Prompt for AI Agents
Please address the comments from this code review:
## Security Issues
### Issue 1
<location> `setup.py:81` </location>
<issue_to_address>
**security (python.lang.security.audit.dangerous-system-call-audit):** Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.
*Source: opengrep*
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| print(f"Creating new {po_file} for locale '{self.locale}'...") | ||
| os.makedirs(po_dir, exist_ok=True) | ||
| os.system(f'msginit --locale={self.locale} --input={pot_file} --output-file={po_file}') | ||
| os.system(f'msginit --locale={self.locale}.UTF-8 --input={pot_file} --output-file={po_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.
security (python.lang.security.audit.dangerous-system-call-audit): Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.
Source: opengrep
|
Related to ghostbsd/issues#199 |
Summary by Sourcery
Remove legacy translation files and scripts, integrate DistUtilsExtra for internationalization, update translation workflow and configuration, and bump project version to 6.7.
New Features:
Enhancements:
Documentation:
Chores: