Skip to content

Translate for zh_CN #8

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
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build/
build/
*.mo
*.dev.*
.vscode/
4 changes: 3 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
templates_path = ['_templates']
exclude_patterns = []


# multi-language docs
language = 'en'
locale_dirs = ['./locales/']

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
22 changes: 22 additions & 0 deletions source/locales/zh_CN/LC_MESSAGES/global.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C)
# This file is distributed under the same license as the Stacklands Modding
# Wiki package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Stacklands Modding Wiki \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-12 15:19+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <[email protected]>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.12.1\n"

77 changes: 77 additions & 0 deletions source/locales/zh_CN/LC_MESSAGES/guides/awake-ready.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C)
# This file is distributed under the same license as the Stacklands Modding
# Wiki package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Stacklands Modding Wiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-12 15:19+0800\n"
"PO-Revision-Date: 2023-08-12 16:17+0800\n"
"Last-Translator: \n"
"Language-Team: zh_CN <[email protected]>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Generated-By: Babel 2.12.1\n"
"X-Generator: Poedit 3.3.2\n"

#: ../../source/guides/awake-ready.rst:4 e000305ed10743548031c9a060ed47ab
msgid "Awake or Ready?"
msgstr "``Awake`` 还是 ``Ready``?"

#: ../../source/guides/awake-ready.rst:6 8c687c0c98a448628fbdccb66edf253b
msgid ""
"The ``Mod`` class has 2 methods which are called during different parts of "
"the game loading process: ``Awake`` and ``Ready``."
msgstr ""
"``Mod`` 类有两个方法,分别在游戏加载的不同阶段被调用:``Awake`` 和 "
"``Ready``。"

#: ../../source/guides/awake-ready.rst:9 63a310e92ff14567bbb08f9310fba5f4
msgid "**When to use Awake?**"
msgstr "什么时候使用 ``Awake``?"

#: ../../source/guides/awake-ready.rst:11 f54acf540a804cb2b0876c0de16d0870
msgid ""
"Awake is called before any game data is loaded. This is the part where you "
"should create your harmony patches, extend enums, and more. ``ModManager`` "
"is the only available manager at this time, so trying to access other "
"manager classes will result in errors."
msgstr ""
"在加载任何游戏数据之前都会调用 ``Awake``。你应该在这个时候创建兼容补丁、扩"
"展枚举类等。``ModManager`` 是目前唯一可用的管理器,因此尝试访问其他管理器类"
"导致错误。"

#: ../../source/guides/awake-ready.rst:15 a7452f1c3b6440259dabbf5fd751c8f3
msgid "**When to use Ready?**"
msgstr "什么时候使用 ``Ready``?"

#: ../../source/guides/awake-ready.rst:17 bc3573ca3e594f21aebb541bf9d14035
msgid ""
"Ready is called after all game data is loaded. If you want to modify the "
"data of ``WorldManager.CardDataPrefabs`` for example, this is when you "
"should do it."
msgstr ""
"``Ready`` 方法会在所有游戏数据加载完毕后调用。例如,如果您想修改 "
"``WorldManager.CardDataPrefabs`` 的数据,应该在这个时候这样做。"

#: ../../source/guides/awake-ready.rst:20 64491071486a4b73bfe3a299b9b1e516
msgid ":raw-html:`<hr>`"
msgstr ":raw-html:`<hr>`"

#: ../../source/guides/awake-ready.rst:22 689fcc81bdda4da1b722faf8bee37ae6
msgid "``Awake()``"
msgstr "``Awake()``"

#: ../../source/guides/awake-ready.rst:23 432d48c19afd4037acbb847f5f07b677
msgid "Game data gets loaded"
msgstr "游戏数据加载完成"

#: ../../source/guides/awake-ready.rst:24 3e0cbddc998f4b8a8ee4b3e596d0264b
msgid "``Ready()``"
msgstr "``Ready()``"
4,578 changes: 4,578 additions & 0 deletions source/locales/zh_CN/LC_MESSAGES/guides/cards.po

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions source/locales/zh_CN/LC_MESSAGES/guides/config.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C)
# This file is distributed under the same license as the Stacklands Modding
# Wiki package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: Stacklands Modding Wiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-12 15:19+0800\n"
"PO-Revision-Date: 2023-08-12 16:35+0800\n"
"Last-Translator: \n"
"Language-Team: zh_CN <[email protected]>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Generated-By: Babel 2.12.1\n"
"X-Generator: Poedit 3.3.2\n"

#: ../../source/guides/config.rst:2 b76dfd49ec0b48d6820483b7467449cc
msgid "Using the Config system"
msgstr "使用设置系统"

#: ../../source/guides/config.rst:4 887134b397a643189ea14c386698514a
msgid ""
"Stacklands includes a config system that you can use to offer various "
"options to players of your mod. Each Mod has its own config file "
"(``ConfigFile``), which you can access with ``Mod.Config`` (you don't need "
"to create your own!). The ``config.json`` file is stored in the mods folder."
msgstr ""
"Stacklands 包含一个设置系统,你可以用它为你的Mod玩家提供各种选项。每个 Mod 都"
"有自己的配置文件 ( ``ConfigFile`` ),您可以使用 ``Mod.Config`` 访问该文件(您"
"无需创建自己的配置文件!)。``config.json`` 文件保存在 mod 文件夹中。"

#: ../../source/guides/config.rst:9 070ec07da7f4442fa770978f653b9266
msgid "Accessing a config entry"
msgstr "使用设置系统"

#: ../../source/guides/config.rst:11 ad915aa81ef645df946affc366e1a6d3
msgid ""
"Each ``ConfigFile`` stores any number of config entries. You can access an "
"entry with the ``ConfigFile.GetEntry<T>()`` function. If an entry by that "
"name doesn't exist yet, it will be automatically created when accessing it. "
"You can also specify a default value for the entry if it doesn't exist."
msgstr ""
"每个 ``ConfigFile`` 存储任意数量的设置条目。你可以使用 ``ConfigFile."
"GetEntry<T>()`` 方法访问条目。如果该名称的条目不存在,则在访问该条目时会自动"
"创建该条目,或者可以由你指定其的默认值。"

#: ../../source/guides/config.rst:15 00488399debd490aa0b76c3e3514c295
msgid ""
"You can access or set the value of the entry with the ``Value`` and "
"``BoxedValue`` properties, depending on the type you need."
msgstr "根据所需,你可以将设置数值类型设置为 ``Value`` 或 ``BoxedValue``。"

#: ../../source/guides/config.rst:19 75ab11cdb6004c3f8e05b1e71f2df548
msgid "Example for creating config entries"
msgstr "配置项示例"

#: ../../source/guides/config.rst:35 4871acec8c8743e9871088405de60be3
msgid ""
"The accessed config entries are added to the mods options menu, which can be "
"accessed in ``Mod Options > <Mod Name>``, where the previous code will "
"produce the following:"
msgstr ""
"访问的配置条目会被添加到mods选项菜单中,可以通过 ``Mod 选项 > <MO名称> `` 访"
"问,其中上部分代码将会产生以下内容:"

#: ../../source/guides/config.rst:40 39fbe912eeae4712aeafa8bf53fa72ef
msgid "And the mods ``config.json`` will contain:"
msgstr "然后 MOD 的 ``config.json`` 会包含以下内容:"

#: ../../source/guides/config.rst:54 092f6cc995e8472f95033223fdd611f2
msgid "Customizing the UI"
msgstr "定制 UI 界面"

#: ../../source/guides/config.rst:56 b63b1c3341594fa1a3d326c0b8c200c8
msgid "The Mod Options UI can be configured in 2 ways:"
msgstr "MOD 的选项 UI 可以通过以下两种方式配置:"

#: ../../source/guides/config.rst:58 a93a888fa59d4dc89f6b5620f5686207
msgid ""
"Using ``ConfigUI`` (``ConfigEntryBase.UI``) to customize the name and tooltip"
msgstr "使用 ``ConfigUI`` ( ``ConfigEntryBase.UI`` )以定制名称和悬浮提示栏"

#: ../../source/guides/config.rst:59 88d9beb0088c4d8d9cc76f84b4109919
msgid "Hiding the automatically created UI and constructing your own"
msgstr "隐藏自动创建的 UI 并构建你自己的"

#: ../../source/guides/config.rst:62 ae0288be4d1f4f0ca5a08b10fcb36714
msgid "Using ConfigUI"
msgstr "使用 ``ConfigUI``"

#: ../../source/guides/config.rst:64 8ce12da5c929481f955df05a865cf7e6
msgid ""
"You can use the ``ConfigEntryBase.UI`` field to store any arbitrary data "
"about the config entry. Some keys are used by the default Mod Options "
"screen, a list of which can be found below. Mod developers can use the data "
"to create customizable UI for types which are not supported in the base "
"game, such as dropdowns for enums or sliders for selecting number ranges."
msgstr ""
"你可以使用 ``ConfigEntryBase.UI`` 字段以存储有关配置项的任何数据。某些键被默"
"认 Mod 选项窗口使用,其列表在下面可以找到。Mod 开发人员可以使用这些数据为基础"
"游戏中并不支持的数据类型创建自定义的界面,例如枚举类型的下拉菜单或者选择数字"
"范围的滑块。"

#: ../../source/guides/config.rst:69 cfd12f5e48614175b856c3baf0135cfb
msgid ""
"The ``ConfigUI`` class (accessed as ``ConfigEntryBase.UI``) stores data "
"about what to display in the mod options menu for the config entry."
msgstr ""
"``ConfigUI`` 类(使用 ``ConfigEntryBase.UI`` 访问)会存储在配置项的 MOD 选项"
"菜单中显示内容的数据。"

#: ../../source/guides/config.rst:73 2d6a6979ce844206be2f969159a28dd1
msgid "Example use of ExtraData"
msgstr "``ExtraData`` 使用示例"

#: ../../source/guides/config.rst:82 56ef23d61f06470aa8b5a7c4bc2f2188
msgid "The previous code will produce the following:"
msgstr "上面的代码将会得到如下结果:"

#: ../../source/guides/config.rst:88 67bcc4a8ee6b411c83e272780e94c744
msgid "Using OnUI"
msgstr "使用 ``OnUI``"

#: ../../source/guides/config.rst:90 db086235f59441a389f1969fba4ad659
msgid ""
"You can further customize the UI for a config entry with the ``ConfigUI."
"OnUI`` function, which is called when the UI for the config entry is "
"generated upon opening the Mod Options screen."
msgstr ""
"你可以使用 ``ConfigUI.OnUI`` 方法进一步自定义配置项的 UI,该函数在打开 MOD 选"
"项界面并生成配置项时被调用。"

#: ../../source/guides/config.rst:94 5d607d9abef245febe20a776a35e1589
msgid "Example use of ConfigEntry.OnUI"
msgstr "``ConfigEntry.OnUI`` 使用示例"

#: ../../source/guides/config.rst:103 b6e7ce5d0ce645728c2c6dde6d248f1a
msgid ""
"When used alongside enabling the ``ConfigEntry<T>.UI.Hidden`` field, you can "
"fully customize the UI. The following example is taken from the "
"`UnityExplorer mod <https://steamcommunity.com/sharedfiles/filedetails/?"
"id=2966585489>`_, its purpose is to call a function to open a custom options "
"menu."
msgstr ""
"当与 ``ConfigEntry<T>.UI.Hidden`` 字段一同使用时,你可以完全自定义界面。以下"
"示例取自于 `UnityExplorer Mod <https://steamcommunity.com/sharedfiles/"
"filedetails/?id=2966585489>`_,其目的是调用一个函数以打开自定义选项菜单。"
Loading