Skip to content

Commit b352d71

Browse files
i18n: 补全翻译 (#22)
* i18n: 翻译当它看起来不像存储库时的提示消息 * i18n: 翻译读取缓存时的调试输出
1 parent 0534a52 commit b352d71

4 files changed

Lines changed: 34 additions & 2 deletions

File tree

PinAction/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private static bool PinActionHash(string path)
142142
// 检查仓库是否是 owner/repo 的格式
143143
if (repo.Split('/').Length != 2)
144144
{
145-
AnsiConsole.MarkupLine($"{Print.MSHead.Warning} {Markup.Escape(repo)} 看起来不像是仓库的格式,跳过 {Markup.Escape($"{repo}@{tag}")}");
145+
AnsiConsole.MarkupLine($"{Print.MSHead.Warning} {string.Format(Strings.NotARepository, Markup.Escape(repo), Markup.Escape($"{repo}@{tag}"))}");
146146
continue;
147147
}
148148

@@ -194,7 +194,7 @@ private static bool PinActionHash(string path)
194194
#if DEBUG
195195
else
196196
{
197-
AnsiConsole.MarkupLine($"{Print.MSHead.Debug} 读取缓存 {Markup.Escape($"{repo}@{hash}")} # {Markup.Escape(tag)}");
197+
AnsiConsole.MarkupLine($"{Print.MSHead.Debug} {Strings.ReadCache} {Markup.Escape($"{repo}@{hash}")} # {Markup.Escape(tag)}");
198198
}
199199
#endif
200200

PinAction/Resources/Strings.Designer.cs

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

PinAction/Resources/Strings.resx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@
177177
<value>License</value>
178178
<comment>许可(证)</comment>
179179
</data>
180+
<data name="NotARepository" xml:space="preserve">
181+
<value>{0} doesn't look like a repository format; skip {1}</value>
182+
<comment>看起来不像存储库的</comment>
183+
</data>
180184
<data name="Package" xml:space="preserve">
181185
<value>Package</value>
182186
<comment>包</comment>
@@ -185,6 +189,10 @@
185189
<value>Pinned</value>
186190
<comment>已固定</comment>
187191
</data>
192+
<data name="ReadCache" xml:space="preserve">
193+
<value>Read Cache</value>
194+
<comment>读取缓存时的调试输出</comment>
195+
</data>
188196
<data name="SkippingAlreadyPinnedHashes" xml:space="preserve">
189197
<value>Skipping {0} because it is already pinned to the full-length hash.</value>
190198
<comment>跳过已固定到全长哈希的 Action 的提示信息</comment>

PinAction/Resources/Strings.zh-CN.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,18 @@
162162
<data name="License" xml:space="preserve">
163163
<value>许可(证)</value>
164164
</data>
165+
<data name="NotARepository" xml:space="preserve">
166+
<value>{0} 看起来不像是仓库的格式,跳过 {1}</value>
167+
</data>
165168
<data name="Package" xml:space="preserve">
166169
<value>包</value>
167170
</data>
168171
<data name="Pinned" xml:space="preserve">
169172
<value>已固定</value>
170173
</data>
174+
<data name="ReadCache" xml:space="preserve">
175+
<value>读取缓存</value>
176+
</data>
171177
<data name="SkippingAlreadyPinnedHashes" xml:space="preserve">
172178
<value>跳过 {0},因为它已经固定到全长哈希值。</value>
173179
</data>

0 commit comments

Comments
 (0)