From e782efafdc92872e3f2c0f9a40b405b0f4d54966 Mon Sep 17 00:00:00 2001
From: tang_ge <2697992791@qq.com>
Date: Sat, 6 Aug 2022 22:34:12 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=AD=E8=A8=80=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
稍微加点语言文件内的语言支持
后面的慢慢再加上去吧……
---
Plain Craft Launcher 2/App.config | 2 +-
Plain Craft Launcher 2/FormMain.xaml | 18 ++--
Plain Craft Launcher 2/FormMain.xaml.vb | 4 +-
.../My Project/Resources.Designer.vb | 2 +-
.../My Project/Settings.Designer.vb | 2 +-
.../Pages/PageSetup/PageSetupSystem.xaml | 90 +++++++++----------
.../Pages/PageSetup/PageSetupSystem.xaml.vb | 51 +++++------
.../Resources/Language/en_US.xaml | 71 ++++++++++++++-
.../Resources/Language/zh_CN.xaml | 72 ++++++++++++++-
9 files changed, 220 insertions(+), 92 deletions(-)
diff --git a/Plain Craft Launcher 2/App.config b/Plain Craft Launcher 2/App.config
index 7ea53f51..0cc0c499 100644
--- a/Plain Craft Launcher 2/App.config
+++ b/Plain Craft Launcher 2/App.config
@@ -9,7 +9,7 @@
-
+
diff --git a/Plain Craft Launcher 2/FormMain.xaml b/Plain Craft Launcher 2/FormMain.xaml
index a003ce75..428ad63f 100644
--- a/Plain Craft Launcher 2/FormMain.xaml
+++ b/Plain Craft Launcher 2/FormMain.xaml
@@ -113,15 +113,15 @@
-
-
-
-
-
@@ -162,13 +162,13 @@
-
-
-
-
diff --git a/Plain Craft Launcher 2/FormMain.xaml.vb b/Plain Craft Launcher 2/FormMain.xaml.vb
index a31d532c..ce820bde 100644
--- a/Plain Craft Launcher 2/FormMain.xaml.vb
+++ b/Plain Craft Launcher 2/FormMain.xaml.vb
@@ -348,8 +348,8 @@ Public Class FormMain
DowngradeSub(LastVersion)
End If
''刷新语言
- 'Lang = ReadReg("Lang", "zh_CN")
- 'Application.Current.Resources.MergedDictionaries(1) = New ResourceDictionary With {.Source = New Uri("Resources\Language\" & Lang & ".xaml", UriKind.Relative)}
+ Lang = ReadReg("Lang", "zh_CN")
+ Application.Current.Resources.MergedDictionaries(1) = New ResourceDictionary With {.Source = New Uri("Resources\Language\" & Lang & ".xaml", UriKind.Relative)}
'刷新主题
ThemeCheckAll(False)
Setup.Load("UiLauncherTheme")
diff --git a/Plain Craft Launcher 2/My Project/Resources.Designer.vb b/Plain Craft Launcher 2/My Project/Resources.Designer.vb
index efcc3956..62dee86c 100644
--- a/Plain Craft Launcher 2/My Project/Resources.Designer.vb
+++ b/Plain Craft Launcher 2/My Project/Resources.Designer.vb
@@ -22,7 +22,7 @@ Namespace My.Resources
'''
''' 一个强类型的资源类,用于查找本地化的字符串等。
'''
- _
diff --git a/Plain Craft Launcher 2/My Project/Settings.Designer.vb b/Plain Craft Launcher 2/My Project/Settings.Designer.vb
index 4fa2aee0..c9563eae 100644
--- a/Plain Craft Launcher 2/My Project/Settings.Designer.vb
+++ b/Plain Craft Launcher 2/My Project/Settings.Designer.vb
@@ -14,7 +14,7 @@ Option Explicit On
_
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
diff --git a/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml b/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml
index 496cc362..f5901e76 100644
--- a/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml
+++ b/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml
@@ -7,7 +7,7 @@
-
+
@@ -24,32 +24,32 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
-
+ ToolTip="{DynamicResource LangDownloadModeStyleToolTip}" ToolTipService.ShowDuration="2333333">
+
+
+
+
-
+
-
+ ToolTipService.ShowDuration="2333333" ToolTip="{DynamicResource LangDonwloadMaxThreadNumToolTip}" />
+
-
-
+
+
-
+
@@ -62,14 +62,14 @@
-
-
-
-
-
+
+
+
+
+
-
+
@@ -84,21 +84,21 @@
-
+
-
-
-
-
+
+
+
+
-
+
-
-
-
+
+
+
-
-
+
+
@@ -109,36 +109,36 @@
-
-
+
+
-
- -->
-
+
+
-
+
@@ -147,9 +147,9 @@
-
-
-
+
+
+
diff --git a/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml.vb b/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml.vb
index 22223a0d..529d4c51 100644
--- a/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml.vb
+++ b/Plain Craft Launcher 2/Pages/PageSetup/PageSetupSystem.xaml.vb
@@ -1,31 +1,31 @@
Class PageSetupSystem
#Region "语言"
- 'Private Sub PageSetupUI_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
- ' AniControlEnabled -= 1
-
- ' '读取设置
- ' Select Case Lang
- ' Case "zh_CN"
- ' ComboLang.SelectedIndex = 0
- ' Case "zh_HK"
- ' ComboLang.SelectedIndex = 1
- ' Case "en_US"
- ' ComboLang.SelectedIndex = 2
- ' End Select
- ' CheckDebug.Checked = ReadReg("SystemDebugMode", "False")
-
- ' AniControlEnabled += 1
- 'End Sub
-
- 'Private Sub RefreshLang() Handles ComboLang.SelectionChanged
- ' If IsLoaded Then
- ' If Not ComboLang.IsLoaded Then Exit Sub
- ' Lang = CType(ComboLang.SelectedItem, MyComboBoxItem).Tag
- ' Application.Current.Resources.MergedDictionaries(1) = New ResourceDictionary With {.Source = New Url("Languages\" & Lang & ".xaml", UrlKind.Relative)}
- ' WriteReg("Lang", Lang)
- ' End If
- 'End Sub
+ Private Sub PageSetupUI_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
+ AniControlEnabled -= 1
+
+ '读取设置
+ Select Case Lang
+ Case "zh_CN"
+ ComboLang.SelectedIndex = 0
+ Case "zh_HK"
+ ComboLang.SelectedIndex = 1
+ Case "en_US"
+ ComboLang.SelectedIndex = 2
+ End Select
+ CheckDebug.Checked = ReadReg("SystemDebugMode", "False")
+
+ AniControlEnabled += 1
+ End Sub
+
+ Private Sub RefreshLang() Handles ComboLang.SelectionChanged
+ If IsLoaded Then
+ If Not ComboLang.IsLoaded Then Exit Sub
+ Lang = CType(ComboLang.SelectedItem, MyComboBoxItem).Tag
+ Application.Current.Resources.MergedDictionaries(1) = New ResourceDictionary With {.Source = New Url("Languages\" & Lang & ".xaml", UrlKind.Relative)}
+ WriteReg("Lang", Lang)
+ End If
+ End Sub
#End Region
Private Shadows IsLoaded As Boolean = False
@@ -75,6 +75,7 @@
CheckDebugDelay.Checked = Setup.Get("SystemDebugDelay")
CheckDebugSkipCopy.Checked = Setup.Get("SystemDebugSkipCopy")
+
End Sub
'初始化
diff --git a/Plain Craft Launcher 2/Resources/Language/en_US.xaml b/Plain Craft Launcher 2/Resources/Language/en_US.xaml
index f0714da6..09457e87 100644
--- a/Plain Craft Launcher 2/Resources/Language/en_US.xaml
+++ b/Plain Craft Launcher 2/Resources/Language/en_US.xaml
@@ -2,9 +2,72 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib">
- More
- Download
- Launch
- Setting
+
+ More
+ Download
+ Online
+ Launch
+ Setting
+
+ Back to top
+ Download management
+ Capitulate
+ Close Minecraft
+
+
+ Get version list
+ Use mirror source(Faster, but probably not up to date)
+ Switch to a mirror source when the official source loads slowly(Recommend)
+ Use official sources as much as possible(Keep the version up-to-date, but load very slowly)
+ Mod naming style
+ Decide where the Chinese translation should be placed in the default file name of the downloaded Mod
+ :[遗物] relics-0.1.14
+ At the beginning of the file name:遗物-relics-0.1.14
+ At the end of the file name:relics-0.1.14-遗物
+ Do not add Chinese translated names:relics-0.1.14
+ Maximum number of threads
+ The more threads, the faster the speed-limited files are downloaded, but too many threads can cause serious stutters during download.
In general, 64 threads can guarantee sufficient download speed.
+ Speed limit
+ Destination folder
+ Please go to "Launch → SelectVersion → FolderList" to modify the download destination folder.
Right-click on a folder or game version and you can choose to open the corresponding folder.
+
+
+ Auxiliary function
+ Game update tips
+ Official version update prompt
+ Update tips for beta version
+ Pop-up window prompt when the official version of Minecraft is updated
+ Pop-up prompt when Minecraft beta (snapshot, pre-release) is updated
+ Game language
+ Set to Chinese(Will applicate at the first start)
+
+
+ Language
+
+
+ System
+ Launch update
+ Download automatically when a new version is available
+ Display prompts when a new version is available
+ Prompt is displayed only when there is a major vulnerability update
+ Turn off update prompts
+ Lacunch announcement
+ Display all announcements, including starter function surveys, activities, etc.
+ Show all announcements
+ Show announcements only when there is an important notice
+ Do not show announcements
+ Cache folder
+ The storage location of PCL2 download, skin and other cache files. Leave it blank as the default value, which will take effect after restart.
+ Default
+ Check for updates
+ Clean the cache
+ Debug
+ Animation speed
+ Do not copy existing files when downloading
+ Debug mode
+ Add delay
+ Instead of directly copying existing files during download, you re-download each file.
It is only recommended to turn on when testing the download speed.
+ Displays debugging information and more error messages.
This will lead to a slight decline in starter performance, and it is not recommended to turn it on if there is no special need.
+ Add random delays in each link to slow down the loading speed to test whether some functions are working properly.
This will seriously affect the operation of the starter, if there is no special need, it is not recommended to turn it on.
diff --git a/Plain Craft Launcher 2/Resources/Language/zh_CN.xaml b/Plain Craft Launcher 2/Resources/Language/zh_CN.xaml
index a92d95bc..65ec15db 100644
--- a/Plain Craft Launcher 2/Resources/Language/zh_CN.xaml
+++ b/Plain Craft Launcher 2/Resources/Language/zh_CN.xaml
@@ -2,9 +2,73 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib">
- 更多
- 下载
- 启动
- 设置
+
+ 更多
+ 下载
+ 联机
+ 启动
+ 设置
+
+
+ 返回顶部
+ 下载管理
+ 投降
+ 关闭 Minecraft
+
+
+ 版本列表获取
+ 尽量使用镜像源(加载快,但版本可能不是最新的)
+ 在官方源加载缓慢时改用镜像源(平衡)
+ 尽量使用官方源(保证版本为最新,但加载非常缓慢)
+ Mod 命名风格
+ 决定下载的 Mod 的默认文件名中,中文译名应该放在哪个位置
+ 译名位于文件名开头:[遗物] relics-0.1.14
+ 译名位于文件名开头:遗物-relics-0.1.14
+ 译名位于文件名末尾:relics-0.1.14-遗物
+ 不添加中文译名:relics-0.1.14
+ 最大线程数
+ 线程数越多,限速的文件下载越快,但过高的线程数会造成下载时非常严重的卡顿。
一般而言,64 线程已可以保证足够的下载速度。
+ 速度限制
+ 目标文件夹
+ 请在 启动 → 版本选择 → 文件夹列表 中更改下载目标文件夹。
在某个文件夹或游戏版本上右键,即可选择打开对应文件夹。
+
+
+ 辅助功能
+ 游戏更新提示
+ 正式版更新提示
+ 测试版更新提示
+ 在 Minecraft 正式版更新时弹窗提示
+ 在 Minecraft 测试版(快照、预发布版)更新时弹窗提示
+ 游戏语言
+ 默认设置为中文
+
+
+ 语言
+
+
+ 系统
+ 启动器更新
+ 在有新版本时自动下载
+ 在有新版本时显示提示
+ 仅在有重大漏洞更新时显示提示
+ 关闭更新提示
+ 启动器公告
+ 显示包括启动器功能调查、活动等在内的全部公告
+ 显示所有公告
+ 仅在有重要通知时显示公告
+ 关闭所有公告
+ 缓存文件夹
+ PCL2 的下载、皮肤等缓存文件的存储位置,留空即为默认值,重启后生效
+ 默认
+ 检查更新
+ 清理缓存
+ 调试选项
+ 动画速度
+ 禁止在下载时复制已存在的文件
+ 调试模式
+ 添加延迟
+ 在下载时不直接复制已经存在的文件,而是重新下载每个文件。
只建议在测试下载速度时开启。
+ 显示调试信息与更多错误信息。
这会导致启动器性能略有下降,若无特殊需要不建议开启。
+ 在各个环节添加随机的延迟,拖慢加载速度,以测试部分功能是否正常运行。
这会严重影响启动器运行,若无特殊需要不建议开启。