Skip to content

Conversation

@paul-pham-157
Copy link
Contributor

@paul-pham-157 paul-pham-157 commented Apr 10, 2025

Description:

Summary:

This PR aims to set a common locales rule to make it easier to support a new language added in the future

Changes:

  • Replace deprecated function (python>=3.15): locale.getdefaultlocale in unix
  • refactor(Translator): simplify language detection logic
  • added missing translate string in other languages

@yeongpin yeongpin marked this pull request as ready for review April 11, 2025 02:57
@yeongpin yeongpin marked this pull request as draft April 11, 2025 02:57
@paul-pham-157
Copy link
Contributor Author

@yeongpin I saw that you already have commit c42d7d5 on main branch of upstream repository. The commit a6dc618 here is duplicated. I will remove it.

@paul-pham-157
Copy link
Contributor Author

Just work on your branch. I will rebase and resolve myself if there is a conflict between my branch and the main branch ^^

…precated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
Consolidate language detection logic for Windows and Unix systems by using a default layout mapping and simplifying locale extraction. Fallback to English if detection fails. This improves maintainability and reduces redundancy in the code.
Add new translation keys for various languages including zh_cn, pt, bg, ru, zh_tw, tr, nl, es, fr, and de. These changes include new error messages, prompts, and additional UI text to improve user experience and localization. Also, reorder initialization code in main.py for better readability.
@paul-pham-157 paul-pham-157 marked this pull request as ready for review April 13, 2025 06:50
@yeongpin yeongpin merged commit 6180303 into yeongpin:main Apr 13, 2025
@yeongpin
Copy link
Owner

chinese and some language cant detect , i reflect

@paul-pham-157 paul-pham-157 changed the title [WIP] Support more new languages Support more new languages Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants