-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bot): add internationalization support and locale property
- Loading branch information
1 parent
9bb3d15
commit 5387a14
Showing
7 changed files
with
126 additions
and
72 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import pathlib | ||
from importlib.metadata import version | ||
|
||
|
||
APPNAME = "iamai" | ||
LOCALE_DIR = pathlib.Path(__file__).parent / "locale" | ||
|
||
__version__ = version(APPNAME) | ||
__version__ = version(APPNAME) |
This file contains 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 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,32 @@ | ||
# Chinese translations for iamai package | ||
# Copyright (C) 2024 ORGANIZATION | ||
# This file is distributed under the same license as the iamai package. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: iamai\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-03-21 12:00+0800\n" | ||
"PO-Revision-Date: 2024-03-21 12:00+0800\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: zh <[email protected]>\n" | ||
"Language: zh\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: manual\n" | ||
|
||
|
||
msgid "Restarting iamai..." | ||
msgstr "正在重启 iamai..." | ||
|
||
msgid "Running iamai..." | ||
msgstr "正在运行 iamai..." | ||
|
||
msgid "Version: {version}" | ||
msgstr "版本: {version}" | ||
|
||
msgid "Startup adapter {_adapter!r} failed: {error}" | ||
msgstr "启动适配器 {_adapter!r} 失败: {error}" | ||
|
||
msgid "Load adapter \"{adapter_}\" failed:" | ||
msgstr "加载适配器 \"{adapter_}\" 失败:" |
This file contains 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 |
---|---|---|
|
@@ -19,4 +19,5 @@ msgid "hello world" | |
msgstr "你好世界" | ||
|
||
msgid "hello {name}" | ||
msgstr "你好 {name}" | ||
msgstr "你好 {name}" | ||
|
This file contains 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