Skip to content

Commit 6249931

Browse files
committed
[+] AI做的英文和繁中翻译
1 parent a8a89d3 commit 6249931

5 files changed

Lines changed: 147 additions & 22 deletions

File tree

Locale.Designer.cs

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Locale.resx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@
5959
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
6060
</resheader>
6161
<data name="AssertionFailed" xml:space="preserve">
62-
<value>TODO</value>
62+
<value>MuConvert hit an internal error (AssertionFailed). Please report it at https://github.com/MuNet-OSS/MuConvert/issues . ({0})</value>
6363
</data>
6464
<data name="InvalidTouchArea" xml:space="preserve">
65-
<value>TODO</value>
65+
<value>Invalid touch area specifier: {0}</value>
6666
</data>
6767
<data name="InvalidKey" xml:space="preserve">
68-
<value>TODO</value>
68+
<value>Invalid key index (must be 1–8): {0}</value>
6969
</data>
7070
<data name="NoDuration" xml:space="preserve">
71-
<value>TODO</value>
71+
<value>Duration cannot be set on Tap or Touch notes.</value>
7272
</data>
7373
<data name="InvalidSlide" xml:space="preserve">
74-
<value>TODO</value>
74+
<value>Invalid slide definition: {0}</value>
7575
</data>
7676
<data name="MessageAt" xml:space="preserve">
7777
<value>At</value>
@@ -98,21 +98,21 @@
9898
<value>DEBUG:</value>
9999
</data>
100100
<data name="SimaiGrammarFailed" xml:space="preserve">
101-
<value>TODO</value>
101+
<value>Failed to parse simai syntax: </value>
102102
</data>
103103
<data name="AbsoluteStepNotImplemented" xml:space="preserve">
104-
<value>TODO</value>
104+
<value>Absolute step tags are not supported. Use BPM + division notation such as "(120){4}".</value>
105105
</data>
106106
<data name="ExtraModifiersIgnored" xml:space="preserve">
107-
<value>TODO</value>
107+
<value>Unexpected modifier(s): {0}. They have been ignored.</value>
108108
</data>
109109
<data name="InvalidWaitTime" xml:space="preserve">
110-
<value>TODO</value>
110+
<value>For multi-segment slides with per-segment durations, a wait-time fragment (e.g. {0.5##...}) may only appear on the first segment. Invalid wait-time markers were ignored.</value>
111111
</data>
112112
<data name="InstanceMultipleUsage" xml:space="preserve">
113-
<value>TODO</value>
113+
<value>Parser and generator instances are single-use; do not call Parse or Generate more than once. Create a new instance for each chart.</value>
114114
</data>
115115
<data name="InvalidMaidataFile" xml:space="preserve">
116-
<value>TODO</value>
116+
<value>Not a valid maidata file: no '&amp;' field markers were found.</value>
117117
</data>
118118
</root>

Locale.zh-hant.resx

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
4+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
5+
<xsd:element name="root" msdata:IsDataSet="true">
6+
<xsd:complexType>
7+
<xsd:choice maxOccurs="unbounded">
8+
<xsd:element name="metadata">
9+
<xsd:complexType>
10+
<xsd:sequence>
11+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
12+
</xsd:sequence>
13+
<xsd:attribute name="name" use="required" type="xsd:string" />
14+
<xsd:attribute name="type" type="xsd:string" />
15+
<xsd:attribute name="mimetype" type="xsd:string" />
16+
<xsd:attribute ref="xml:space" />
17+
</xsd:complexType>
18+
</xsd:element>
19+
<xsd:element name="assembly">
20+
<xsd:complexType>
21+
<xsd:attribute name="alias" type="xsd:string" />
22+
<xsd:attribute name="name" type="xsd:string" />
23+
</xsd:complexType>
24+
</xsd:element>
25+
<xsd:element name="data">
26+
<xsd:complexType>
27+
<xsd:sequence>
28+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
29+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
30+
</xsd:sequence>
31+
<xsd:attribute name="name" type="xsd:string" use="required" />
32+
<xsd:attribute name="type" type="xsd:string" />
33+
<xsd:attribute name="mimetype" type="xsd:string" />
34+
<xsd:attribute ref="xml:space" />
35+
</xsd:complexType>
36+
</xsd:element>
37+
<xsd:element name="resheader">
38+
<xsd:complexType>
39+
<xsd:sequence>
40+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
41+
</xsd:sequence>
42+
<xsd:attribute name="name" type="xsd:string" use="required" />
43+
</xsd:complexType>
44+
</xsd:element>
45+
</xsd:choice>
46+
</xsd:complexType>
47+
</xsd:element>
48+
</xsd:schema>
49+
<resheader name="resmimetype">
50+
<value>text/microsoft-resx</value>
51+
</resheader>
52+
<resheader name="version">
53+
<value>2.0</value>
54+
</resheader>
55+
<resheader name="reader">
56+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
57+
</resheader>
58+
<resheader name="writer">
59+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
60+
</resheader>
61+
<data name="AssertionFailed" xml:space="preserve">
62+
<value>很抱歉,MuConvert 發生內部錯誤(AssertionFailed)。請至 https://github.com/MuNet-OSS/MuConvert/issues 回報此問題。({0})</value>
63+
</data>
64+
<data name="InvalidKey" xml:space="preserve">
65+
<value>鍵位編號不合法(須為 1–8):{0}</value>
66+
</data>
67+
<data name="InvalidTouchArea" xml:space="preserve">
68+
<value>觸控區標記不合法:{0}</value>
69+
</data>
70+
<data name="NoDuration" xml:space="preserve">
71+
<value>無法為 Tap 或 Touch 設定持續時間</value>
72+
</data>
73+
<data name="InvalidSlide" xml:space="preserve">
74+
<value>星星(Slide)定義不合法:{0}</value>
75+
</data>
76+
<data name="MessageAt" xml:space="preserve">
77+
<value>於</value>
78+
</data>
79+
<data name="MessageLine" xml:space="preserve">
80+
<value>第 {0} 行</value>
81+
</data>
82+
<data name="MessageTime" xml:space="preserve">
83+
<value>第 {0:W} 小節({1:F2} 秒)</value>
84+
</data>
85+
<data name="MessageParsing" xml:space="preserve">
86+
<value>解析 {0} 時</value>
87+
</data>
88+
<data name="Error" xml:space="preserve">
89+
<value>發生錯誤:</value>
90+
</data>
91+
<data name="Warning" xml:space="preserve">
92+
<value>警告:</value>
93+
</data>
94+
<data name="Info" xml:space="preserve">
95+
<value>資訊:</value>
96+
</data>
97+
<data name="Debug" xml:space="preserve">
98+
<value>偵錯:</value>
99+
</data>
100+
<data name="SimaiGrammarFailed" xml:space="preserve">
101+
<value>解析 Simai 語法時失敗!</value>
102+
</data>
103+
<data name="AbsoluteStepNotImplemented" xml:space="preserve">
104+
<value>本程式暫不支援直接指定絕對時間步長的寫法。請改用「(120){4}」這類 BPM 加幾分音符的表示方式。</value>
105+
</data>
106+
<data name="ExtraModifiersIgnored" xml:space="preserve">
107+
<value>不應出現的修飾符:{0}。已忽略。</value>
108+
</data>
109+
<data name="InvalidWaitTime" xml:space="preserve">
110+
<value>對分別指定每段時長的多段星星,類似 {0.5##...} 的等待時間標記應僅可在第一段星星上出現。不合法的等待時間標記已忽略。</value>
111+
</data>
112+
<data name="InstanceMultipleUsage" xml:space="preserve">
113+
<value>Parser/Generator 實例僅能使用一次,不可重複呼叫 Parse 與 Generate。若需轉換多份譜面,請在每次轉換前 new 一個新實例。</value>
114+
</data>
115+
<data name="InvalidMaidataFile" xml:space="preserve">
116+
<value>不合法的 maidata 檔案!輸入的檔案中不含&amp;標記,似乎不是 maidata 檔案。</value>
117+
</data>
118+
</root>

MuConvert.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<DependentUpon>Locale.resx</DependentUpon>
2222
<WithCulture>true</WithCulture>
2323
</EmbeddedResource>
24+
<EmbeddedResource Update="Locale.zh-hant.resx">
25+
<DependentUpon>Locale.resx</DependentUpon>
26+
<WithCulture>true</WithCulture>
27+
</EmbeddedResource>
2428
<Compile Update="Locale.Designer.cs">
2529
<DesignTime>true</DesignTime>
2630
<AutoGen>true</AutoGen>

utils/Utils.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Diagnostics;
2+
using System.Globalization;
23
using System.Reflection;
34

45
namespace MuConvert.utils;
@@ -16,4 +17,6 @@ public static Exception Fail(string msg = "")
1617
}
1718

1819
public static string AppVersion => FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion?[..^33] ?? "unknown";
20+
21+
public static void SetLocale(CultureInfo culture) => Locale.Culture = culture;
1922
}

0 commit comments

Comments
 (0)