AkariBot-I18N
小可使用的本地化组件。
运行时存储
load_locale_file() 会把 JSON 语言文件编译为版本化 SQLite 快照。多个进程使用同一组语言目录时会共享快照文件,并在其他进程发布新版本后自动刷新只读连接。
快照默认保存在当前用户的临时目录。可通过 AKARI_BOT_I18N_CACHE_DIR 指定本机缓存目录;所有 worker 必须使用相同配置。Locale.data 和模块级 locale_data 现在是只读映射。
加载和使用也可以完全分离。只有 loader 需要访问 JSON:
build_locale_snapshot(["zh_cn", "en_us"], locale_paths, "akari-bot")
其他 worker 只连接同一命名空间,不需要调用 load_locale_file() 或访问语言目录:
connect_locale_snapshot("akari-bot")
命名空间连接会自动跟随 loader 后续发布的新 generation。reader 调用 Locale.reload() 时也只会强制重连 manifest,不会读取 JSON。原有 load_locale_file() 保留为“构建并连接”的兼容入口。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akari_bot_i18n-0.1.1.tar.gz.
File metadata
- Download URL: akari_bot_i18n-0.1.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c290ad9766c0b67eea5fc8a12c57f20106f26202d04bc2788e13e575a791994d
|
|
| MD5 |
c7c18bcb2fdf09c672e28357b96517b6
|
|
| BLAKE2b-256 |
86e65dc2448a88a76d1a39d65abac407dd050cfbf964a7178a0525277e678f20
|
Provenance
The following attestation bundles were made for akari_bot_i18n-0.1.1.tar.gz:
Publisher:
python-publish.yml on Teahouse-Studios/akari-bot-i18n
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akari_bot_i18n-0.1.1.tar.gz -
Subject digest:
c290ad9766c0b67eea5fc8a12c57f20106f26202d04bc2788e13e575a791994d - Sigstore transparency entry: 2474426956
- Sigstore integration time:
-
Permalink:
Teahouse-Studios/akari-bot-i18n@6bffd1a7541ec235a910fe2ae995f743d038a02a -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/Teahouse-Studios
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6bffd1a7541ec235a910fe2ae995f743d038a02a -
Trigger Event:
release
-
Statement type:
File details
Details for the file akari_bot_i18n-0.1.1-py3-none-any.whl.
File metadata
- Download URL: akari_bot_i18n-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c29b81fec029eb597d7487db59ffcf4b758c6ff50de3cb4a0cb1b17ecfc5876
|
|
| MD5 |
c503e7c1476c5ae7d8c3e174a47feb03
|
|
| BLAKE2b-256 |
2df9a946005a581da6d2c6e3e4ee88b89f49c9c839affa1199534eb872906fdf
|
Provenance
The following attestation bundles were made for akari_bot_i18n-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on Teahouse-Studios/akari-bot-i18n
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akari_bot_i18n-0.1.1-py3-none-any.whl -
Subject digest:
5c29b81fec029eb597d7487db59ffcf4b758c6ff50de3cb4a0cb1b17ecfc5876 - Sigstore transparency entry: 2474427370
- Sigstore integration time:
-
Permalink:
Teahouse-Studios/akari-bot-i18n@6bffd1a7541ec235a910fe2ae995f743d038a02a -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/Teahouse-Studios
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6bffd1a7541ec235a910fe2ae995f743d038a02a -
Trigger Event:
release
-
Statement type: