-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
resolves #5201 : 日志的i18n #5688
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
Open
united-pooh
wants to merge
43
commits into
AstrBotDevs:master
Choose a base branch
from
united-pooh:feat/i18n
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
resolves #5201 : 日志的i18n #5688
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
ef97957
Add i18n support and related files
tomo-ris 18df281
feat(i18n): update ftl_translate defaults and sync translation files
tomo-ris 8347fcd
refactor(i18n): update error messages to use translation function
tomo-ris af24027
feat(i18n): add Japanese translation and fix variable placeholders
tomo-ris 06268dc
refactor(i18n): remove unused English translation file
tomo-ris 240fcae
feat(i18n): add Chinese (Simplified) translation for error messages
tomo-ris 16201b2
Implement feature X to enhance user experience and optimize performance
tomo-ris c3336d0
refactor(i18n): simplify exception handling and improve code formatting
tomo-ris ce7c3c6
Refactor code structure for improved readability and maintainability
tomo-ris c700250
refactor(i18n): improve code formatting and enhance exception handlin…
tomo-ris 8d17871
feat: integrate translation function for logging messages
tomo-ris dac796e
refactor(i18n): update error messages to use translation function and…
tomo-ris c26eee5
Merge branch 'master' of https://github.com/AstrBotDevs/AstrBot into …
tomo-ris 7c1dbb9
refactor(i18n): replace hardcoded error messages with translation fun…
tomo-ris 3cf55ee
Merge branch 'AstrBotDevs:master' into feat/i18n
united-pooh e70abbd
refactor(i18n): update error messages to use translation function and…
tomo-ris 244fab8
Merge remote-tracking branch 'upstream/master' into feat/i18n
tomo-ris 01bddd8
refactor(i18n): update error messages to use translation function in …
tomo-ris 12a7a03
refactor: code structure for improved readability and maintainability
tomo-ris 07ce12f
Merge branch 'master' into feat/i18n
united-pooh d1788ca
Add pytest_asyncio to dependencies in i18n-check.yml
united-pooh 91e2be6
Merge branch 'master' into feat/i18n
tomo-ris a7b4581
refactor(i18n): remove unused i18n files and update FTL messages
tomo-ris 265360d
Merge remote-tracking branch 'origin/feat/i18n' into feat/i18n
tomo-ris 74d5cb2
i18n:先给按钮注册i18n
Li-shi-ling 0081b9f
rm:删除原本的i18n切换逻辑
Li-shi-ling ff8ec32
add:在平台日志页面添加下拉框
Li-shi-ling 78bfac5
add:添加路由注册
Li-shi-ling 3af3cee
fix:修改t的导入
Li-shi-ling de97421
fix:添加语言修改后的保留功能
Li-shi-ling 09d8b7b
fix:将修改server文件时引入的错误logeer删除,并删除todo
Li-shi-ling 216f5b3
Update pytest command to use python -m
united-pooh 5ee5df8
fix:LangRoute删除不必要的引入,修改错误的日志
Li-shi-ling 4fce6bb
Add PYTHONPATH to I18n usage check workflow
united-pooh 9715f35
Add installation of requirements for I18n check
united-pooh cd5dd0a
Create test_i18n.py
united-pooh ebf9669
chore(i18n): fix missing message IDs and parameter mismatches in i18n…
tomo-ris 5e9692a
fix(dashboard): fix port number being formatted with commas in log ou…
tomo-ris 7a9d9e5
chore(i18n): fix number formatting and WebUI address display
tomo-ris cc048f0
Update astrbot/core/lang.py
united-pooh da63a6d
Merge branch 'master' into feat/i18n
united-pooh d7dd9c5
feat(i18n): persist backend locale and restore on startup
letr007 12d21cb
fix(i18n): validate and normalize persisted locale
letr007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: I18n Usage Check | ||
| env: | ||
| PYTHONPATH: . | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '**.py' | ||
|
|
||
| jobs: | ||
| i18n-check: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install fluent.runtime pytest pytest_asyncio | ||
|
|
||
| - name: Run I18n Check | ||
| run: | | ||
| python -m pytest --tb=line tests/test_i18n.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.