Skip to content

Commit

Permalink
Merge pull request #177 from HotoCocoaco/chi-translation
Browse files Browse the repository at this point in the history
Add chs(Simplified Chinese) translation.
  • Loading branch information
CriticalFlaw authored Mar 11, 2023
2 parents d072201 + acd5d86 commit ab0f099
Show file tree
Hide file tree
Showing 3 changed files with 281 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TF2HUD.Editor/Options.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
<RadioButton x:Name="BtnLocalizeIt" Checked="BtnLocalize_OnClick" ToolBar.OverflowMode="Always" Margin="5">
<cf:CountryFlag Code="IT" Width="50" />
</RadioButton>
<RadioButton x:Name="BtnLocalizeChs" Checked="BtnLocalize_OnClick" ToolBar.OverflowMode="Always" Margin="5">
<cf:CountryFlag Code="CN" Width="50" />
</RadioButton>
</WrapPanel>
</GroupBox>
<GroupBox Header="{lex:Loc ui_options}" Grid.Row="1">
Expand Down
2 changes: 2 additions & 0 deletions src/TF2HUD.Editor/Options.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ private void BtnLocalize_OnClick(object sender, RoutedEventArgs e)
LocalizeDictionary.Instance.Culture = new CultureInfo("pt-BR");
else if (BtnLocalizeIt.IsChecked == true)
LocalizeDictionary.Instance.Culture = new CultureInfo("it");
else if (BtnLocalizeChs.IsChecked == true)
LocalizeDictionary.Instance.Culture = new CultureInfo("zh-CN");

// Save language preference to user settings.
Settings.Default.user_language = LocalizeDictionary.Instance.Culture.ToString();
Expand Down
276 changes: 276 additions & 0 deletions src/TF2HUD.Editor/Properties/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="error_app_directory" xml:space="preserve">
<value>要使用此编辑器,必须设置 tf/custom 目录。</value>
</data>
<data name="error_hud_install" xml:space="preserve">
<value>在安装 {0} 时发生了错误。</value>
</data>
<data name="error_hud_missing" xml:space="preserve">
<value>无法找到HUD {0} !</value>
</data>
<data name="error_hud_uninstall" xml:space="preserve">
<value>在卸载 {0} 时发生了错误。</value>
</data>
<data name="error_transparent_vm" xml:space="preserve">
<value>在开关透明视图模型时发生了错误。</value>
</data>
<data name="error_unknown_extension" xml:space="preserve">
<value>无法识别文件扩展名 '{0}'。</value>
</data>
<data name="header_restart_required" xml:space="preserve">
<value>需要重新启动。</value>
</data>
<data name="header_update_none" xml:space="preserve">
<value>没有找到更新。</value>
</data>
<data name="info_add_hud" xml:space="preserve">
<value>是否确定要将文件夹添加到共享HUD列表中?这将在本地添加文件夹,但不会将HUD上传到TF2HUD.Editor的联机数据库。</value>
</data>
<data name="info_background_override" xml:space="preserve">
<value>设置新背景将覆盖当前背景。使用“重新安装”选项返回到默认背景。</value>
</data>
<data name="info_game_restart" xml:space="preserve">
<value>以下更改需要重新启动游戏:</value>
</data>
<data name="info_game_running" xml:space="preserve">
<value>无法继续,因为军团要塞2仍在运行。请关闭游戏,然后重试。</value>
</data>
<data name="info_hud_backup" xml:space="preserve">
<value>找到了现有的 {0} 安装。为避免冲突,已创建备份。</value>
</data>
<data name="info_hud_reset" xml:space="preserve">
<value>是否确实要将所有自定义设置重置为默认值?</value>
</data>
<data name="info_hud_update" xml:space="preserve">
<value>有一个新的HUD模式更新可用。是否要立即重新启动以应用新更改?</value>
</data>
<data name="info_hud_update_none" xml:space="preserve">
<value>您拥有最新的HUD模式版本。请稍后再检查更新。</value>
</data>
<data name="info_path_browser" xml:space="preserve">
<value>选择你的 tf/custom 路径。假如提供了无效路径,则大多数选项将不可用。</value>
</data>
<data name="info_path_invalid" xml:space="preserve">
<value>你选择的路径并没有以 tf/custom 结尾。请检查并重试。</value>
</data>
<data name="info_unsupported_hud_found" xml:space="preserve">
<value>一个不支持的HUD在 tf/custom 中被找到。你想要删除它并继续当前安装吗?</value>
</data>
<data name="status_applied" xml:space="preserve">
<value>{0} 自定义选项应用于 {1}。</value>
</data>
<data name="status_installed" xml:space="preserve">
<value>{0} 已安装!</value>
</data>
<data name="status_installed_not" xml:space="preserve">
<value>{0} 未安装!</value>
</data>
<data name="status_installed_now" xml:space="preserve">
<value>{0} 安装已完成于 {1}。</value>
</data>
<data name="status_pathNotSet" xml:space="preserve">
<value>tf/custom 路径未设置!</value>
</data>
<data name="status_reset" xml:space="preserve">
<value>{0} 自定义选项重置于 {1}。</value>
</data>
<data name="tooltip_addhud" xml:space="preserve">
<value>增加新HUD。</value>
</data>
<data name="tooltip_docs" xml:space="preserve">
<value>阅读文档。</value>
</data>
<data name="tooltip_launch" xml:space="preserve">
<value>启动军团要塞2。</value>
</data>
<data name="tooltip_options" xml:space="preserve">
<value>查看选项菜单。</value>
</data>
<data name="tooltip_path" xml:space="preserve">
<value>更改 tf/custom 路径。</value>
</data>
<data name="tooltip_refresh" xml:space="preserve">
<value>检查模式更新。</value>
</data>
<data name="tooltip_report" xml:space="preserve">
<value>汇报问题。</value>
</data>
<data name="ui_apply" xml:space="preserve">
<value>应用更改</value>
</data>
<data name="ui_author" xml:space="preserve">
<value>创建于:{0}</value>
</data>
<data name="ui_back" xml:space="preserve">
<value>返回</value>
</data>
<data name="ui_browse" xml:space="preserve">
<value>浏览</value>
</data>
<data name="ui_check_updates" xml:space="preserve">
<value>自动检查更新。</value>
</data>
<data name="ui_clear" xml:space="preserve">
<value>清楚</value>
</data>
<data name="ui_customize" xml:space="preserve">
<value>自定义</value>
</data>
<data name="ui_directory" xml:space="preserve">
<value>设置路径到 tf/custom</value>
</data>
<data name="ui_download" xml:space="preserve">
<value>下载:</value>
</data>
<data name="ui_install" xml:space="preserve">
<value>安装</value>
</data>
<data name="ui_options" xml:space="preserve">
<value>选项</value>
</data>
<data name="ui_persist_xhair" xml:space="preserve">
<value>记住准星选择</value>
</data>
<data name="ui_refresh" xml:space="preserve">
<value>检查更新</value>
</data>
<data name="ui_reinstall" xml:space="preserve">
<value>重新安装</value>
</data>
<data name="ui_reset" xml:space="preserve">
<value>重置更改</value>
</data>
<data name="ui_search" xml:space="preserve">
<value>搜索:</value>
</data>
<data name="ui_select" xml:space="preserve">
<value>选择一个HUD</value>
</data>
<data name="ui_switch" xml:space="preserve">
<value>切换HUD</value>
</data>
<data name="ui_title" xml:space="preserve">
<value>TF2 HUD 编辑器</value>
</data>
<data name="ui_uninstall" xml:space="preserve">
<value>卸载</value>
</data>
</root>

0 comments on commit ab0f099

Please sign in to comment.