Repository navigation
Conversation
Docker、服务器这类没有图形界面的场合,想让新建的文献库默认译成繁体或别的语言时, 不用先进设置页改。只改默认值:设置里选过的语言照旧优先,config.json 里存了就用存的。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
|
谢谢,这个改动很适合 Docker 部署。我在本地确认了 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
改了什么
config.py里DEFAULTS["target"]从写死的"zh"改成os.environ.get("EASYREAD_TARGET") or "zh",一行。为什么
放在 Docker 或服务器上、给繁体或其他语言的读者用时,希望新文献库一开始就译成
zh-Hant等,而不用先进设置页改一次。和EASYREAD_HOME、EASYREAD_LIBRARY一样走环境变量。只改默认值:
config.json里存过的target照旧优先,设置页选了什么就是什么;没设环境变量时行为完全不变。🤖 Generated with Claude Code