mirror of
https://github.com/codexu/note-gen.git
synced 2026-04-25 21:05:55 +03:00
[PR #78] [CLOSED] Add i18n support #696
Labels
No labels
bug
duplicate
feature
platform: Android
platform: Linux
platform: Windows
platform: iOS
platform: macOS
priority: high
priority: low
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/note-gen#696
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/codexu/note-gen/pull/78
Author: @acelan
Created: 2/14/2025
Status: ❌ Closed
Base:
dev← Head:i18n📝 Commits (2)
f5c013arefactor: Replace hardcoded string with localizationb3f3b32feat: update UI when language is changed📊 Changes
59 files changed (+1047 additions, -374 deletions)
View changed files
📝
src/app/core/article/custom-toolbar/check.tsx(+4 -14)📝
src/app/core/article/custom-toolbar/continue.tsx(+4 -8)📝
src/app/core/article/custom-toolbar/eraser.tsx(+5 -4)📝
src/app/core/article/custom-toolbar/history.tsx(+7 -6)📝
src/app/core/article/custom-toolbar/mark.tsx(+8 -7)📝
src/app/core/article/custom-toolbar/optimize.tsx(+5 -4)📝
src/app/core/article/custom-toolbar/preview.tsx(+5 -4)📝
src/app/core/article/custom-toolbar/question.tsx(+5 -4)📝
src/app/core/article/custom-toolbar/redo.tsx(+3 -2)📝
src/app/core/article/custom-toolbar/sync.tsx(+7 -11)📝
src/app/core/article/custom-toolbar/toggle.tsx(+4 -2)📝
src/app/core/article/custom-toolbar/translation.tsx(+6 -5)📝
src/app/core/article/custom-toolbar/undo.tsx(+3 -2)📝
src/app/core/article/file/file-item.tsx(+13 -12)📝
src/app/core/article/file/file-toolbar.tsx(+6 -5)📝
src/app/core/article/file/folder-item.tsx(+11 -10)📝
src/app/core/article/md-editor.tsx(+4 -3)📝
src/app/core/image/no-data.tsx(+6 -5)📝
src/app/core/record/chat/chat-clipboard.tsx(+18 -17)📝
src/app/core/record/chat/chat-content.tsx(+2 -1)...and 39 more files
📄 Description
Extract most of the strings and build them into different locale files, en and zh_cn.
It'd be easier to add other language support.
There is one known issue.
In src/locale/index.tsx, the _t() will be called before loadLanguageFromStore() loads the correct currentLang on some pages. So, some string will still be the default lang which is 'en'.
Re-run the app loads and uses the correct language setting.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.