Chinese Translation

added Chinese Translation for installer https://github.com/SpotX-CLI/SpotX-Win/issues/189

Co-Authored-By: lumineyuri <110418934+lumineyuri@users.noreply.github.com>
This commit is contained in:
amd64fox
2022-10-24 17:29:13 +03:00
parent 49ac47edd4
commit b7f18e25d5
2 changed files with 77 additions and 2 deletions
+10 -2
View File
@@ -107,7 +107,7 @@ function Format-LanguageCode {
begin { begin {
$supportLanguages = @( $supportLanguages = @(
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu' 'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu', 'zh'
) )
} }
@@ -174,6 +174,10 @@ function Format-LanguageCode {
$returnCode = 'hu' $returnCode = 'hu'
break break
} }
'^zh' {
$returnCode = 'zh'
break
}
Default { Default {
$returnCode = $PSUICulture.Remove(2) $returnCode = $PSUICulture.Remove(2)
break break
@@ -272,6 +276,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
$langStrings = CallLang -clg "hu" $langStrings = CallLang -clg "hu"
break break
} }
'zh' {
$langStrings = CallLang -clg "zh"
break
}
Default { Default {
# Default to English if unable to find a match. # Default to English if unable to find a match.
$langStrings = CallLang -clg "en" $langStrings = CallLang -clg "en"
@@ -292,7 +300,7 @@ $lang = Set-ScriptLanguageStrings -LanguageCode $langCode
# Set variable 'ru'. # Set variable 'ru'.
if ($langCode -eq 'ru') { $ru = $true } if ($langCode -eq 'ru') { $ru = $true }
# Set variable 'add translation line'. # Set variable 'add translation line'.
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu)') { $line = $true } if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu|zh)') { $line = $true }
# Automatic length of stars # Automatic length of stars
$au = ($lang).Author.Length + ($lang).Author2.Length $au = ($lang).Author.Length + ($lang).Author2.Length
+67
View File
@@ -0,0 +1,67 @@
[PSCustomObject]@{
Author = "补丁作者:"
Author2 = "@Amd64fox"
TranslationBy = "翻译作者:"
TranslationBy2 = "@lumineyuri"
Incorrect = "糟糕,不正确的参数,"
Incorrect2 = "请重新输入 "
Download = "下载错误"
Download2 = "将在五秒后重试"
Download3 = "再次出错"
Download4 = "检查您的网络设置后再次尝试安装"
Download5 = "下载 Spotify"
Download6 = "Curl 错误"
StopScrpit = "脚本已停止"
MsSpoti = "检测到 Spotify 是微软商店版本,该版本不受到支持"
MsSpoti2 = "卸载微软商店的 Spotify [Y/N]"
MsSpoti3 = "自动卸载 Spotify 的微软商店版本..."
MsSpoti4 = "正在卸载 Spotify 的微软商店版本..."
Prem = "针对 Premium 账户的修改..."
OldV = "发现过时的 Spotify 版本"
OldV2 = "您的 Spotify {0} 版本已过时, 建议更新到 {1}"
OldV3 = "需要更新吗 ? [Y/N]"
AutoUpd = "自动更新到推荐版本"
DelOrOver = "是否要卸载当前版本 {0} 或者覆盖安装? Y [卸载] / N [覆盖安装]"
DelOld = "卸载旧的 Spotify..."
NewV = "检测到 Spotify 版本不受到支持"
NewV2 = "您的 Spotify {0} 版本没有经过测试, 目前的推荐的版本是 {1}"
NewV3 = "您想要继续使用 {0} 版本吗 (可能会出现错误) ? [Y/N]"
Recom = "您想安装推荐的 {0} 版本吗 ? [Y/N]"
DelNew = "卸载未经测试的 Spotify 版本..."
DownSpoti = "下载并安装 Spotify"
DownSpoti2 = "请稍等..."
PodcatsOff = "关闭播客"
PodcastsOn = "开启播客"
PodcatsSelect = "您想关闭主页上的播客、剧集和有声读物吗? [Y/N]"
DowngradeNote = "推荐阻止 Spotify 降级"
UpdBlock = "阻止 Spotify 更新"
UpdUnblock = "不阻止 Spotify 更新"
UpdSelect = "您想要阻止 Spotify 更新吗? [Y/N]"
CacheOn = "清理缓存已启用 ({0})"
CacheOff = "未启用清理缓存"
CacheSelect = "您想要设置自动清除缓存吗? [Y/N]"
CacheDays = "超过 XX 天的缓存将被清除 "
CacheDays2 = "输入从 1 到 100 之内的天数"
NoVariable = "没有找到变量"
NoVariable2 = "在 xpui.js 中"
NoVariable3 = "在 licenses.html 中"
NoVariable4 = "在 html 中"
NoVariable5 = "在 home-v2.js 中"
NoVariable6 = "在 xpui-desktop-modals.js 中"
ModSpoti = "修补 Spotify..."
Error = "错误"
FileLocBroken = "Spotify 文件已损坏,请卸载客户端并重新运行脚本"
Spicetify = "检测到 Spicetify"
NoRestore = "SpotX 已经安装, 但是找不到文件 xpui.js.bak 和 xpui.css.bak . `n请重新安装 Spotify 客户端后再次运行 install.bat"
ExpSpotify = "启用 Spotify 的实验性功能"
ExpStandart = "SpotX 的实验性功能未被启用"
NoRestore2 = "SpotX 已经安装, 但是找不到文件 xpui.bak . `n请重新安装 Spotify 客户端后再次运行 install.bat"
UpdateBlocked = "Spotify 的更新已经被阻止了"
UpdateError = "阻止更新失败"
NoSpotifyExe = "未找到 Spotify.exe"
InstallComplete = "安装完成"
HostInfo = "在 hosts 文件中发现的不需要的 URL"
HostBak = "备份原始 hosts 文件为 hosts.bak..."
HostDel = "试图从原始 hosts 文件中删除不需要的 URL..."
HostError = "在编辑 hosts 文件时发生了错误,请手动编辑或以管理员身份重新运行该脚本。"
}