Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地化:语言、配置项、时间 #4145

Open
wants to merge 507 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
507 commits
Select commit Hold shift + click to select a range
d4c8a62
feat: 数字格式化本地化
tangge233 Aug 19, 2024
b1e1d02
fix: 补个类型
tangge233 Aug 19, 2024
7a8e6e4
Merge branch 'tangge233:Language' into Language
Chiloven945 Aug 19, 2024
5965b12
lang: 补全 ModMusic
tangge233 Aug 19, 2024
ce3879b
lang: 补全 ModMain
tangge233 Aug 19, 2024
b839f5a
Number & Plural
Chiloven945 Aug 19, 2024
427b35d
Merge branch 'tangge233:Language' into Language
Chiloven945 Aug 19, 2024
6b23063
Merge pull request #28 from Chiloven945/Plural
tangge233 Aug 20, 2024
a334410
Merge branch 'tangge233:Language' into Language
Chiloven945 Aug 20, 2024
ae92d07
Revision 0820
Chiloven945 Aug 20, 2024
a4acfcc
feat: 小改
tangge233 Aug 21, 2024
0e7b736
Merge branch 'Language' into Language
tangge233 Aug 21, 2024
d5811f7
lang: zh_MEME
tangge233 Aug 21, 2024
7dcde5e
Merge branch 'tangge233:Language' into Language
Chiloven945 Aug 21, 2024
f7d3f41
Merge pull request #27 from Chiloven945/Language
tangge233 Aug 21, 2024
12ff82d
lang: zh_MEME
tangge233 Aug 21, 2024
eab2252
Merge branch 'main' into Language
tangge233 Aug 21, 2024
a65f7d4
fix: 不知道哪来的错误
tangge233 Aug 21, 2024
c28b7df
lang: 新功能的翻译
tangge233 Aug 21, 2024
377a1de
fix: Key 对应错误
tangge233 Aug 21, 2024
c290e92
lang: 补漏
tangge233 Aug 21, 2024
8559cd9
lang: 又漏
tangge233 Aug 21, 2024
e4b0400
feat: Wiki 跳转本地化
tangge233 Aug 22, 2024
481f957
Pre-releases → Pre-release
tangge233 Aug 22, 2024
825318a
feat: 语言下拉框加入字体
tangge233 Aug 22, 2024
b8d9d3d
Language Addition
Chiloven945 Aug 22, 2024
04c0f6a
Merge branch 'Language' of https://github.com/Chiloven945/PCL2 into L…
Chiloven945 Aug 22, 2024
cbcdb66
Font Update
Chiloven945 Aug 22, 2024
57ab3c5
Fix Wrong Japanese Font
Chiloven945 Aug 22, 2024
1b3b6b6
Merge pull request #29 from Chiloven945/Language
tangge233 Aug 22, 2024
148eb07
feat: 减少工程量
tangge233 Aug 22, 2024
4837cf0
feat: 补上新增语言的 Wiki 跳转
tangge233 Aug 22, 2024
917e4bf
Merge branch 'Language' into tangge233-language
tangge233 Aug 22, 2024
b65d3b0
lang: es_ES 机翻
tangge233 Aug 23, 2024
cd62ff2
lang: fr_FR 机翻
tangge233 Aug 23, 2024
688ee28
fix: 编译错误
tangge233 Aug 23, 2024
c9fd885
Corriger les traductions incorrectes en français dans 'common'
WForst-Breeze Aug 23, 2024
6c36583
lang: ko_KR 机翻
tangge233 Aug 23, 2024
e16c9ef
Corriger les traductions incorrectes en français dans 'Application'
WForst-Breeze Aug 23, 2024
0ba66ad
Add Russian
Chiloven945 Aug 23, 2024
3286eaf
Merge branch 'Language' of https://github.com/Chiloven945/PCL2 into L…
Chiloven945 Aug 23, 2024
aab0d2a
Language Name Update
Chiloven945 Aug 23, 2024
2b9443b
Merge pull request #31 from Chiloven945/Language
tangge233 Aug 23, 2024
3a13f1f
feat: location and lang
tangge233 Aug 24, 2024
d2f8182
feat: 非 zh 地区需要登录正版后才可正常使用离线登录
tangge233 Aug 24, 2024
8b5d5d6
feat: 预设主页简中提示
tangge233 Aug 24, 2024
c9fad8b
feat: 根据启动器语言切换游戏语言
tangge233 Aug 25, 2024
7535981
feat: 修改离线登录判定
tangge233 Aug 25, 2024
797f806
feat: Wiki 跳转尝试优化
tangge233 Aug 25, 2024
dd98cc1
feat: 未登录微软账号情况下限制离线模式
tangge233 Aug 25, 2024
1d32318
feat: 稍微加强地区检测
tangge233 Aug 25, 2024
169de19
fix: 错误的逻辑
tangge233 Aug 25, 2024
23a154b
feat: 地区检测再强一点
tangge233 Aug 25, 2024
5a72652
Update Plain Craft Launcher 2/Modules/Modi18n.vb
tangge233 Aug 25, 2024
05390e3
fix: 一些问题
tangge233 Aug 25, 2024
6f290be
feat: 检测缓存
tangge233 Aug 25, 2024
d7b0a0c
Fix Missing Space
Chiloven945 Aug 26, 2024
5378191
Update Modi18n.vb
tangge233 Aug 28, 2024
44777d3
Merge pull request #32 from Chiloven945/Language
tangge233 Aug 28, 2024
0bc839f
fix: 函数名称修改
tangge233 Aug 28, 2024
f30cafd
:ok_hand: 更新 allMagicNB 的审核
youzi-2333 Aug 28, 2024
0ae9655
:globe_with_meridians: 添加一部分文言翻译
youzi-2333 Aug 29, 2024
fa1958f
feat: 加强地区判断
tangge233 Aug 29, 2024
5b396f5
feat: 自动切换语言优化
tangge233 Aug 29, 2024
a808126
Apply suggestions from code review
tangge233 Aug 29, 2024
8a3029d
lang: 自定义主页文案错误
tangge233 Aug 29, 2024
57c1638
fix: MyHint 绑定失败
tangge233 Aug 29, 2024
2b576c3
feat: 使用 StaticResource 加载语言资源
tangge233 Aug 29, 2024
2b68a3e
feat: 时间格式修改
tangge233 Aug 29, 2024
02f3ddd
Add Greek
Chiloven945 Aug 29, 2024
768f12d
Use Segoe UI
Chiloven945 Aug 29, 2024
776bada
Fix Wrong Key
Chiloven945 Aug 29, 2024
9e62535
Merge pull request #33 from Chiloven945/Language
tangge233 Aug 30, 2024
0a09236
fix: 提示文案反了
tangge233 Aug 30, 2024
1ef7934
lang: 补文案
tangge233 Aug 30, 2024
6bc210c
Merge branch 'main' into Language
tangge233 Aug 31, 2024
227aa7b
lang: 适配新版本
tangge233 Aug 31, 2024
fa4c122
feat: 日志调整
tangge233 Aug 31, 2024
c5e504b
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
tangge233 Aug 31, 2024
253234f
fix: zh_MEME 文案对应错误
tangge233 Aug 31, 2024
e06640e
Translated using Weblate (Greek)
tangge233 Aug 31, 2024
76b63c1
Translated using Weblate (Spanish)
tangge233 Aug 31, 2024
9067fc4
lang: 文案错误
tangge233 Aug 31, 2024
0b6dc38
Merge branch 'Language' of https://github.com/tangge233/PCL2 into Lan…
tangge233 Aug 31, 2024
5cd47a9
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
96f6d86
Translated using Weblate (Chinese (Traditional Han script))
WTP016-CN Sep 1, 2024
6b29f40
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
a260f6e
Translated using Weblate (English (United States))
tangge233 Sep 1, 2024
852f954
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
d0e02cf
Translated using Weblate (English (United States))
tangge233 Sep 1, 2024
8e2e481
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 1, 2024
e6e0e1f
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
6a5709e
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 1, 2024
b0bfb2e
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
8536287
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
762b12b
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 1, 2024
f2040ba
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
4d59db4
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
9900150
update: 新的框架版本
tangge233 Sep 1, 2024
a9beb8c
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 1, 2024
0088103
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
c51b670
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
feecd11
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
509e5ec
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
5adcae1
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
e8c3241
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
d6f4e84
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
9c846a5
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
d94ab51
update: UA
tangge233 Sep 1, 2024
e632d88
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
b364a26
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
1acf0e3
Translated using Weblate (English (United States))
WTP016-CN Sep 1, 2024
b749eb5
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
83820a5
Translated using Weblate (English (United States))
Chiloven945 Sep 1, 2024
e7857bd
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 2, 2024
cf477c0
Translated using Weblate (English (United States))
Chiloven945 Sep 2, 2024
c3bca94
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 2, 2024
52d8001
Translated using Weblate (English (United States))
Chiloven945 Sep 2, 2024
3b509d3
Translated using Weblate (Russian)
tangge233 Sep 2, 2024
ebd56e8
Translated using Weblate (Japanese)
tangge233 Sep 2, 2024
b60f4ab
Translated using Weblate (French)
tangge233 Sep 2, 2024
a1d79ff
Translated using Weblate (Korean)
tangge233 Sep 2, 2024
fbd5b8a
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
tangge233 Sep 2, 2024
189688d
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 3, 2024
8d5253c
Translated using Weblate (English (United States))
Chiloven945 Sep 3, 2024
5ff44d7
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
tangge233 Sep 2, 2024
34b9373
Fix Font Error
Chiloven945 Sep 3, 2024
866cf12
Merge pull request #34 from Chiloven945/Language
tangge233 Sep 3, 2024
0ae00fc
Merge branch 'main' into Language
tangge233 Sep 5, 2024
32817a8
Translated using Weblate (Chinese (Simplified Han script))
tangge233 Sep 5, 2024
4982566
Translated using Weblate (English (United Kingdom))
tangge233 Sep 5, 2024
b51d2fa
Translated using Weblate (English (United States))
tangge233 Sep 5, 2024
73fcb28
Translated using Weblate (Literary Chinese)
tangge233 Sep 5, 2024
93ee69b
Translated using Weblate (Chinese (Traditional Han script, Hong Kong))
tangge233 Sep 5, 2024
41cb832
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
tangge233 Sep 5, 2024
5ea5e16
Translated using Weblate (Chinese (Traditional Han script))
tangge233 Sep 5, 2024
1c2e6b5
Translated using Weblate (English (United Kingdom))
tangge233 Sep 5, 2024
47f1f3a
Translated using Weblate (English (United States))
tangge233 Sep 5, 2024
50678b9
Merge branch 'new' into new-1
tangge233 Sep 6, 2024
16a197a
Merge pull request #35 from tangge233/new-1
tangge233 Sep 6, 2024
4b12ff6
Merge pull request #36 from tangge233/Language
tangge233 Sep 6, 2024
2b1d8a7
Update README.md
tangge233 Sep 6, 2024
9879a4e
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
Chiloven945 Sep 5, 2024
0a49b16
Modify Language Match Method
Chiloven945 Sep 10, 2024
06814e3
Merge pull request #37 from Chiloven945/Language
tangge233 Sep 10, 2024
089d106
Fix Punctuation Mark
Chiloven945 Sep 11, 2024
d74ae68
Merge pull request #38 from Chiloven945/Language
tangge233 Sep 11, 2024
b1a084e
Translated using Weblate (English (United Kingdom))
Chiloven945 Sep 10, 2024
2871987
Translated using Weblate (English (United States))
Chiloven945 Sep 10, 2024
f4b1f79
Translated using Weblate (Literary Chinese)
Sep 12, 2024
9f04449
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
Chiloven945 Sep 12, 2024
c3b08f7
Merge pull request #30 from WForst-Breeze/French
tangge233 Sep 14, 2024
ff5f7b6
feat: 支持 webp
tangge233 Sep 15, 2024
72b26d7
feat: 自动下载dll支持库
tangge233 Sep 16, 2024
c6b2aa9
feat: 成功的 webp 支持
tangge233 Sep 16, 2024
f564756
fix: CI error
tangge233 Sep 16, 2024
0ee81be
Merge pull request #39 from tangge233/Language
tangge233 Sep 16, 2024
cc395c6
fix: UA
tangge233 Sep 16, 2024
c62631f
fix: 杂七杂八
tangge233 Sep 16, 2024
c225962
feat: KeepAlive
tangge233 Sep 16, 2024
9a08f6b
Weblate
tangge233 Sep 16, 2024
3efc3bc
feat: 还漏翻译
tangge233 Sep 16, 2024
338f94a
Translated using Weblate (Chinese (Simplified Han script))
tangge233 Sep 16, 2024
a78b468
lang: ModCrash 提取
tangge233 Sep 17, 2024
86371ff
lang: 部分机翻
tangge233 Sep 17, 2024
aa26e63
fix: 多余的日志输出
tangge233 Sep 17, 2024
19c6671
:globe_with_meridians: 翻译文言文
youzi-2333 Sep 17, 2024
a5e0be8
Merge branch 'main' into Language
tangge233 Sep 19, 2024
1804b7f
fix: CI error
tangge233 Sep 19, 2024
4245f66
Merge branch 'Hex-Dragon:main' into Language
tangge233 Sep 22, 2024
b357fb3
Merge branch 'new' into Language
tangge233 Sep 22, 2024
26d6093
Revert "Merge branch 'new' into Language"
tangge233 Sep 22, 2024
3ec654d
Merge branch 'main' into Language
tangge233 Sep 24, 2024
302ab0f
fix: build error
tangge233 Sep 24, 2024
5300bc4
lang: 2.8.7
tangge233 Sep 25, 2024
2b1d5cd
lang: 部分机翻
tangge233 Sep 26, 2024
923ada0
Translated using Weblate (Greek)
weblate Sep 25, 2024
f41541c
Translated using Weblate (English (United Kingdom))
weblate Sep 25, 2024
75f9f1b
Translated using Weblate (English (United States))
weblate Sep 25, 2024
40324b6
Translated using Weblate (Spanish)
weblate Sep 25, 2024
d6d714b
Translated using Weblate (French)
weblate Sep 25, 2024
88702d9
Translated using Weblate (Japanese)
weblate Sep 25, 2024
43ad385
Translated using Weblate (Korean)
weblate Sep 25, 2024
51a2802
Translated using Weblate (Literary Chinese)
weblate Sep 25, 2024
6148abe
Translated using Weblate (Russian)
weblate Sep 25, 2024
9832bd4
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
tangge233 Sep 26, 2024
f42f75b
Translated using Weblate (Chinese (Traditional Han script))
weblate Sep 28, 2024
6f3fb36
font: 标题栏没字体
tangge233 Sep 29, 2024
bfa3a57
Merge branch 'Language' of https://github.com/tangge233/PCL2 into Lan…
tangge233 Sep 29, 2024
682f253
lang: 火星文
tangge233 Sep 29, 2024
bb02f04
chore: 改个文件名称
tangge233 Sep 30, 2024
a17c1aa
chore: 代码调整
tangge233 Sep 30, 2024
187ecab
chore: 调整设置项
tangge233 Sep 30, 2024
98782cf
Merge branch 'main' into Language
tangge233 Oct 1, 2024
a4e1786
fix: 符号错误
tangge233 Oct 1, 2024
88bd0fd
Translated using Weblate (Chinese (Traditional Han script, Hong Kong))
weblate Oct 2, 2024
9613299
Translated using Weblate (Literary Chinese)
weblate Oct 2, 2024
d2f1ff4
lang: 2.8.8
tangge233 Oct 2, 2024
29e6e4e
lang: 斯洛伐克语
tangge233 Oct 3, 2024
3a1f83b
Translated using Weblate (Slovak)
weblate Oct 3, 2024
5581c77
chore: 整理字段位置
tangge233 Oct 3, 2024
e3db869
fix: 突然知道怎么写 PropertyChangedEvent 了
tangge233 Oct 3, 2024
ac9f410
Translated using Weblate (Slovak)
weblate Oct 4, 2024
d15552e
Revision 10041140
Chiloven945 Oct 4, 2024
6b71784
Fix: Incorrect Terms
Chiloven945 Oct 4, 2024
4f6dbe7
Fix: Resolve Changes
Chiloven945 Oct 4, 2024
3c8e395
Merge pull request #44 from Chiloven945/Language
tangge233 Oct 4, 2024
357ac3b
Translated using Weblate (Chinese (Simplified Han script) (zh_MEME))
weblate Oct 4, 2024
7e27ce6
Translated using Weblate (Literary Chinese)
weblate Oct 4, 2024
ecb3015
Sync en_US
Chiloven945 Oct 5, 2024
b0c3b28
Fix: 跳出 -> 彈出
Chiloven945 Oct 5, 2024
04c07f1
Translated using Weblate (Chinese (Simplified Han script) (zh_MARS))
weblate Oct 5, 2024
3a4fd3c
Fix: Website Language
Chiloven945 Oct 5, 2024
3e2474a
Revision 10051958
Chiloven945 Oct 5, 2024
381d58e
Merge pull request #45 from Chiloven945/Language
tangge233 Oct 5, 2024
1138150
Translated using Weblate (Chinese (Traditional Han script, Hong Kong))
weblate Oct 5, 2024
8771a53
:twisted_rightwards_arrows: 合并远程更改
youzi-2333 Oct 5, 2024
fa9f6c6
Merge pull request #40 from youzi-3222/tangge233-language
tangge233 Oct 5, 2024
82833b7
lang: sk_SK machine translation
tangge233 Oct 8, 2024
9f02295
fix: build error
tangge233 Oct 8, 2024
45122d0
lang: machine translation lack
tangge233 Oct 9, 2024
9e7cac4
Translated using Weblate (English (United States))
weblate Oct 11, 2024
04cbafb
Merge branch 'Hex-Dragon:main' into Language
tangge233 Oct 13, 2024
f66b2c2
Merge branch 'main' into Language
tangge233 Oct 16, 2024
d44d350
lang: 2.8.9
tangge233 Oct 16, 2024
22f16b7
lang: key 优化
tangge233 Oct 19, 2024
3135282
chore: 文本描述
tangge233 Oct 19, 2024
8ac794a
chore: 描述不够恰当
tangge233 Oct 19, 2024
18f209e
Translated using Weblate (English (United States))
weblate Oct 19, 2024
75aa4a2
lang: 漏
tangge233 Oct 20, 2024
0bbf9d0
Merge branch 'Language' of https://github.com/tangge233/PCL2 into Lan…
tangge233 Oct 20, 2024
3f67152
chore: 文件字段排序
tangge233 Oct 20, 2024
140f7d2
lang: english readme
tangge233 Oct 20, 2024
7b86043
lang: issue template english
tangge233 Oct 20, 2024
d95c02d
Revise readme
3gf8jv4dv Oct 20, 2024
a648332
Revise issue template
3gf8jv4dv Oct 20, 2024
4cbc1cc
oops...
3gf8jv4dv Oct 20, 2024
c42e43a
Merge pull request #46 from 3gf8jv4dv/readme-revise
tangge233 Oct 20, 2024
d94b0f6
Readme Revision
Chiloven945 Oct 20, 2024
b1fb79c
Revise
3gf8jv4dv Oct 21, 2024
866e64f
fix
3gf8jv4dv Oct 21, 2024
8ba9cfc
delete files
3gf8jv4dv Oct 21, 2024
bbcb353
Merge pull request #48 from Chiloven945/Language
tangge233 Oct 21, 2024
f164386
Merge pull request #47 from 3gf8jv4dv/issue-template-revise
tangge233 Oct 21, 2024
aa79dbc
Translated using Weblate (English (United States))
weblate Oct 24, 2024
adfb7a2
Translated using Weblate (English (United States))
weblate Oct 26, 2024
aaad8b9
Translated using Weblate (English (United States))
weblate Nov 1, 2024
db12a09
lang: 小修小补
tangge233 Nov 1, 2024
07d1d20
Merge branch 'Language' of https://github.com/tangge233/PCL2 into Lan…
tangge233 Nov 1, 2024
a522db9
lang: revise en_US
tangge233 Nov 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Plain Craft Launcher 2/Application.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<ResourceDictionary Source="pack://application:,,,/Resources/Language/zh_CN.xaml" />
</ResourceDictionary.MergedDictionaries>

<!--字体-->
<FontFamily x:Key="LaunchFontFamily"/>

<!-- 颜色表 -->
<SolidColorBrush x:Key="ColorBrush1">#343d4a</SolidColorBrush>
<SolidColorBrush x:Key="ColorBrush2">#0b5bcb</SolidColorBrush>
Expand Down Expand Up @@ -118,14 +121,14 @@
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="{DynamicResource ColorBrush1}" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
<Setter Property="FontFamily" Value="Resources/#PCL English, Microsoft YaHei UI" />
<Setter Property="FontFamily" Value="{DynamicResource LaunchFontFamily}" />
</Style>
<Style TargetType="TextBlock" x:Key="BasedOnTextBlock">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="{DynamicResource ColorBrush1}" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
<Setter Property="FontFamily" Value="Resources/#PCL English, Microsoft YaHei UI" />
<Setter Property="FontFamily" Value="{DynamicResource LaunchFontFamily}" />
</Style>

<!-- ToolTip -->
Expand Down Expand Up @@ -266,7 +269,7 @@
<Setter Property="FontSize" Value="13" />
<Setter Property="SelectionBrush" Value="{DynamicResource ColorBrush3}" />
<Setter Property="Foreground" Value="{DynamicResource ColorBrush1}" />
<Setter Property="FontFamily" Value="Resources/#PCL English, Microsoft YaHei UI" />
<Setter Property="FontFamily" Value="{DynamicResource LaunchFontFamily}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="IsUndoEnabled" Value="True" />
Expand All @@ -293,7 +296,7 @@
<!-- 由于未知原因,TextView 会有 2,0 的 Margin -->
</Border>
<Border Margin="{TemplateBinding Padding}" IsHitTestVisible="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" BorderThickness="0">
<TextBlock x:Name="labHint" Foreground="{DynamicResource ColorBrush1}" Opacity="0.25" Margin="7,0,0,0" Padding="{TemplateBinding BorderThickness}" FontSize="{TemplateBinding FontSize}" FontFamily="Resources/#PCL English, Microsoft YaHei UI" />
<TextBlock x:Name="labHint" Foreground="{DynamicResource ColorBrush1}" Opacity="0.25" Margin="7,0,0,0" Padding="{TemplateBinding BorderThickness}" FontSize="{TemplateBinding FontSize}" FontFamily="{DynamicResource LaunchFontFamily}" />
</Border>
<TextBlock Grid.Row="1" x:Name="labWrong" Height="0" Foreground="{TemplateBinding BorderBrush}" Padding="0,4,0,0" />
</Grid>
Expand Down
39 changes: 32 additions & 7 deletions Plain Craft Launcher 2/Application.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ Public Class Application

'开始
Private Sub Application_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup
'刷新语言
Log("[Lang] 选择启动器语言为 " & Lang)
WriteReg("Lang", Lang)
Try
Application.Current.Resources.MergedDictionaries(1) = New ResourceDictionary With {.Source = New Uri("pack://application:,,,/Resources/Language/" & Lang & ".xaml", UriKind.RelativeOrAbsolute)}
Catch ex As Exception
Log("无法找到语言资源:" & Lang & vbCrLf & "Language resource cannot be found:" & Lang, LogLevel.Assert)
End Try

Log("[Location] 当前系统环境是否为中国大陆:" & IsLocationZH())

'依照选择语言切换字体
Dim LaunchFont As FontFamily
Select Case Lang
Case "zh_TW", "zh_HK", "lzh"
LaunchFont = New FontFamily(New Uri("pack://application:,,,/"), "./Resources/#PCL English, Segoe UI, Microsoft JhengHei UI")
Case "ja_JP"
LaunchFont = New FontFamily(New Uri("pack://application:,,,/"), "./Resources/#PCL English, Segoe UI, Yu Gothic UI, Microsoft YaHei UI")
Case "ko_KR"
LaunchFont = New FontFamily(New Uri("pack://application:,,,/"), "./Resources/#PCL English, Segoe UI, Malgun Gothic, Microsoft YaHei UI")
Case Else
LaunchFont = New FontFamily(New Uri("pack://application:,,,/"), "./Resources/#PCL English, Segoe UI, Microsoft YaHei UI")
End Select
SwitchApplicationFont(LaunchFont)

Try
SecretOnApplicationStart()
'检查参数调用
Expand Down Expand Up @@ -57,12 +82,12 @@ Public Class Application
Directory.CreateDirectory(Path & "PCL\Musics")
Try
Directory.CreateDirectory(PathTemp)
If Not CheckPermission(PathTemp) Then Throw New Exception("PCL 没有对 " & PathTemp & " 的访问权限")
If Not CheckPermission(PathTemp) Then Throw New Exception(GetLang("LangApplicationExceptionNoAccessPermission", PathTemp))
Catch ex As Exception
If PathTemp = IO.Path.GetTempPath() & "PCL\" Then
MyMsgBox("PCL 无法访问缓存文件夹,可能导致程序出错或无法正常使用!" & vbCrLf & "错误原因:" & GetExceptionDetail(ex), "缓存文件夹不可用")
MyMsgBox(GetLang("LangApplicationDialogContentCacheFolderUnavailable", GetExceptionDetail(ex)), GetLang("LangApplicationDialogTitleCacheFolderUnavailable"))
Else
MyMsgBox("手动设置的缓存文件夹不可用,PCL 将使用默认缓存文件夹。" & vbCrLf & "错误原因:" & GetExceptionDetail(ex), "缓存文件夹不可用")
MyMsgBox(GetLang("LangApplicationDialogContentCustomCacheFolderUnavailable", GetExceptionDetail(ex)), GetLang("LangApplicationDialogTitleCacheFolderUnavailable"))
Setup.Set("SystemSystemCache", "")
PathTemp = IO.Path.GetTempPath() & "PCL\"
End If
Expand Down Expand Up @@ -106,7 +131,7 @@ Public Class Application
Log($"[Start] 管理员权限:{IsAdmin()}")
'检测压缩包运行
If Path.Contains(IO.Path.GetTempPath()) OrElse Path.Contains("AppData\Local\Temp\") Then
MyMsgBox("PCL 正在临时文件夹运行,设置、游戏存档等很可能无法保存,且部分功能会无法使用或出错。" & vbCrLf & "请将 PCL 从压缩文件中解压,或是更换文件夹后再继续使用!", "环境警告", "我知道了", IsWarn:=True)
MyMsgBox(GetLang("LangApplicationDialogContentRunInTemp"), GetLang("LangApplicationDialogTitleRunInTemp"), GetLang("LangDialogThemeUnlockGameAccept"), IsWarn:=True)
End If
'设置初始化
Setup.Load("SystemDebugMode")
Expand All @@ -131,7 +156,7 @@ Public Class Application
FilePath = PathWithName
Catch
End Try
MsgBox(GetExceptionDetail(ex, True) & vbCrLf & "PCL 所在路径:" & If(String.IsNullOrEmpty(FilePath), "获取失败", FilePath), MsgBoxStyle.Critical, "PCL 初始化错误")
MsgBox(GetExceptionDetail(ex, True) & vbCrLf & "PCL 所在路径:" & If(String.IsNullOrEmpty(FilePath), "获取失败", FilePath), MsgBoxStyle.Critical, GetLang("LangApplicationDialogTitleInitError"))
FormMain.EndProgramForce(Result.Exception)
End Try
End Sub
Expand Down Expand Up @@ -159,11 +184,11 @@ Public Class Application
ExceptionString.Contains(".NET Framework") OrElse ' “自动错误判断” 的结果分析
ExceptionString.Contains("未能加载文件或程序集") Then
OpenWebsite("https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net462-offline-installer")
MsgBox("你的 .NET Framework 版本过低或损坏,请在打开的网页中重新下载并安装 .NET Framework 4.6.2 后重试!", MsgBoxStyle.Information, "运行环境错误")
MsgBox(GetLang("LangApplicationDialogContentNETWarn"), MsgBoxStyle.Information, GetLang("LangApplicationDialogTitleNETWarn"))
FormMain.EndProgramForce(Result.Cancel)
Else
FeedbackInfo()
Log(e.Exception, "程序出现未知错误", LogLevel.Assert, "锟斤拷烫烫烫")
Log(e.Exception, GetLang("LangApplicationDialogContentUnknownError"), LogLevel.Assert, GetLang("LangApplicationDialogTitleUnknownError"))
End If
End Sub

Expand Down
2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/Controls/MyCard.vb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
'控件转换
Select Case Type
Case 5
Dim LoadingPickaxe As New MyLoading With {.Text = "正在获取版本列表", .Margin = New Thickness(5)}
Dim LoadingPickaxe As New MyLoading With {.Text = GetLang("LangSelectGettingVersion"), .Margin = New Thickness(5)}
Dim Loader = New LoaderTask(Of String, List(Of DlForgeVersionEntry))("DlForgeVersion Main", AddressOf DlForgeVersionMain)
LoadingPickaxe.State = Loader
Loader.Start(Stack.Tag)
Expand Down
11 changes: 10 additions & 1 deletion Plain Craft Launcher 2/Controls/MyComboBox.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
'基础
Public Uuid As Integer = GetUuid()
Private TextBox As MyTextBox
Public Property HintText As String = ""
Public Shadows Property HintText As String
Get
Return GetValue(HintTextProperty)
End Get
Set(value As String)
SetValue(HintTextProperty, value)
End Set
End Property
Public Shared ReadOnly HintTextProperty As DependencyProperty = DependencyProperty.Register("HintText", GetType(String), GetType(MyComboBox), New PropertyMetadata(""))

Public Overrides Sub OnApplyTemplate()
MyBase.OnApplyTemplate()
If Not IsEditable Then Exit Sub
Expand Down
2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/Controls/MyHint.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Path IsHitTestVisible="False" Grid.Column="0" x:Name="Path" VerticalAlignment="Center" Fill="#BF0000" Width="14" Stretch="Uniform" Margin="10,0,2,0" Data="F1 M 58.5832,55.4172L 17.4169,55.4171C 15.5619,53.5621 15.5619,50.5546 17.4168,48.6996L 35.201,15.8402C 37.056,13.9852 40.0635,13.9852 41.9185,15.8402L 58.5832,48.6997C 60.4382,50.5546 60.4382,53.5622 58.5832,55.4172 Z M 34.0417,25.7292L 36.0208,41.9584L 39.9791,41.9583L 41.9583,25.7292L 34.0417,25.7292 Z M 38,44.3333C 36.2511,44.3333 34.8333,45.7511 34.8333,47.5C 34.8333,49.2489 36.2511,50.6667 38,50.6667C 39.7489,50.6667 41.1666,49.2489 41.1666,47.5C 41.1666,45.7511 39.7489,44.3333 38,44.3333 Z " />
<TextBlock IsHitTestVisible="False" Grid.Column="1" x:Name="LabText" Margin="0,0.5,0,0" Padding="6,6,8,6" Text="提示文本" VerticalAlignment="Center" Foreground="#BF0000" TextWrapping="Wrap" />
<TextBlock IsHitTestVisible="False" Grid.Column="1" x:Name="LabText" Margin="0,0.5,0,0" Padding="6,6,8,6" Text="{Binding Path=Text,ElementName=PanBack}" VerticalAlignment="Center" Foreground="#BF0000" TextWrapping="Wrap" />
<local:MyIconButton x:Name="BtnClose" SnapsToDevicePixels="True" Visibility="Collapsed" Foreground="#BF0000" Theme="Custom" Margin="0,0,6,0" Grid.Column="2" Height="20" Width="20" VerticalAlignment="Center" Logo="F1 M 26.9166,22.1667L 37.9999,33.25L 49.0832,22.1668L 53.8332,26.9168L 42.7499,38L 53.8332,49.0834L 49.0833,53.8334L 37.9999,42.75L 26.9166,53.8334L 22.1666,49.0833L 33.25,38L 22.1667,26.9167L 26.9166,22.1667 Z"
ToolTip="不再显示" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="29" ToolTipService.HorizontalOffset="2" />
</Grid>
Expand Down
7 changes: 5 additions & 2 deletions Plain Craft Launcher 2/Controls/MyHint.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@

Public Property Text As String
Get
Return LabText.Text
Return GetValue(TextProperty)
End Get
Set(value As String)
LabText.Text = value
SetValue(TextProperty, value)
End Set
End Property

Public Shared ReadOnly TextProperty As DependencyProperty = DependencyProperty.Register("Text", GetType(String), GetType(MyHint), New PropertyMetadata("Tips"))

Public Property CanClose As Boolean
Get
Return BtnClose.Visibility = Visibility.Visible
Expand All @@ -53,6 +55,7 @@
If CanClose AndAlso Setup.Get(RelativeSetup) Then
Visibility = Visibility.Collapsed
End If
LabText.Text = Text
End Sub
Private Sub BtnClose_Click(sender As Object, e As EventArgs) Handles BtnClose.Click
Setup.Set(RelativeSetup, True)
Expand Down
17 changes: 11 additions & 6 deletions Plain Craft Launcher 2/Controls/MyListItem.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,23 @@
Public Shared ReadOnly FontSizeProperty As DependencyProperty = DependencyProperty.Register("FontSize", GetType(Double), GetType(MyListItem), New PropertyMetadata(CType(14, Double)))

'信息
Private _Info As String = ""
Public Property Info As String
Get
Return _Info
Return GetValue(InfoProperty)
End Get
Set(value As String)
If _Info = value Then Exit Property
value = value.Replace(vbCr, "").Replace(vbLf, "")
_Info = value
LabInfo.Text = value
LabInfo.Visibility = If(value = "", Visibility.Collapsed, Visibility.Visible)
SetValue(InfoProperty, value)
OnInfoPropertyChanged()
End Set
End Property
Public Shared ReadOnly InfoProperty As DependencyProperty = DependencyProperty.Register("Info", GetType(String), GetType(MyListItem), New PropertyMetadata(""))

Public Sub OnInfoPropertyChanged()
If LabInfo Is Nothing Then Exit Sub
LabInfo.Text = Info
LabInfo.Visibility = If(String.IsNullOrWhiteSpace(LabInfo.Text), Visibility.Collapsed, Visibility.Visible)
End Sub

'图片
Private _Logo As String = ""
Expand Down Expand Up @@ -663,6 +667,7 @@
Log(ex, "设置帮助 MyListItem 失败", LogLevel.Msgbox)
End Try
End If
OnInfoPropertyChanged()
End Sub
Public Overrides Function ToString() As String
Return Title
Expand Down
2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/Controls/MyLoading.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
</Path>
<Rectangle Width="25" Height="2" Fill="{Binding Foreground, ElementName=PanBack}" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
</Grid>
<TextBlock x:Name="LabText" Text="Loading" HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="{Binding Foreground, ElementName=PanBack}" FontSize="16" Margin="0,10,0,0" Grid.Row="2"/>
<TextBlock x:Name="LabText" Text="{Binding Text,ElementName=PanBack}" HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="{Binding Foreground, ElementName=PanBack}" FontSize="16" Margin="0,10,0,0" Grid.Row="2"/>
</Grid>
13 changes: 7 additions & 6 deletions Plain Craft Launcher 2/Controls/MyLoading.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,19 @@ Public Class MyLoading
End Set
End Property

Private _Text As String = "加载中"
Public Shared ReadOnly TextProperty As DependencyProperty = DependencyProperty.Register("Text", GetType(String), GetType(MyLoading), New PropertyMetadata(GetLang("LangModMyLoadingLoading")))

Public Property Text As String
Get
Return _Text
Return GetValue(TextProperty)
End Get
Set(value As String)
_Text = value
SetValue(TextProperty, value)
RefreshText()
End Set
End Property

Private _TextError As String = "加载失败"
Private _TextError As String = GetLang("LangModMyLoadingLoadFail")
Public Property TextError As String
Get
Return _TextError
Expand All @@ -74,15 +75,15 @@ Public Class MyLoading
If TextErrorInherit AndAlso State.IsLoader Then
Dim Ex As Exception = CType(State, Object).Error
If Ex Is Nothing Then
LabText.Text = "未知错误"
LabText.Text = GetLang("LangModMyLoadingUnknownError")
Else
Do While Ex.InnerException IsNot Nothing
Ex = Ex.InnerException
Loop
LabText.Text = StrTrim(Ex.Message)
If {"远程主机强迫关闭了", "远程方已关闭传输流", "未能解析此远程名称", "由于目标计算机积极拒绝",
"操作已超时", "操作超时", "服务器超时", "连接超时"}.Any(Function(s) LabText.Text.Contains(s)) Then
LabText.Text = "网络环境不佳,请重试或尝试使用 VPN"
LabText.Text = GetLang("LangModMyLoadingBadNetwork")
End If
End If
Else
Expand Down
4 changes: 2 additions & 2 deletions Plain Craft Launcher 2/Controls/MySearchBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:PCL"
mc:Ignorable="d"
mc:Ignorable="d" x:Name="PanBack"
d:DesignHeight="450" d:DesignWidth="800"
Height="40">
<Grid>
<local:MyTextBox HasAnimation="False" x:Name="TextBox" BorderThickness="0" Padding="32,0,40,0" MaxLength="50" FontSize="13.5" UseLayoutRounding="False" SnapsToDevicePixels="False" VerticalContentAlignment="Center" />
<local:MyTextBox HasAnimation="False" x:Name="TextBox" BorderThickness="0" Padding="32,0,40,0" MaxLength="50" FontSize="13.5" UseLayoutRounding="False" SnapsToDevicePixels="False" VerticalContentAlignment="Center" HintText="{Binding HintText,ElementName=PanBack}"/>
<Path Width="14" Margin="14,0,0,0" IsHitTestVisible="False" Height="14" Fill="{DynamicResource ColorBrush1}" Stretch="Uniform" Data="M675.9168 242.816C556.3008 123.2 362.4448 123.2 242.8288 242.816 123.2128 362.432 123.2128 556.288 242.8288 675.904 362.4448 795.52 556.3008 795.52 675.9168 675.904 795.5328 556.288 795.5328 362.432 675.9168 242.816L675.9168 242.816ZM1000.7168 892.48C1030.6048 922.368 1030.6048 970.816 1000.7168 1000.704 970.8288 1030.656 922.3808 1030.656 892.4288 1000.704L730.0608 838.336C728.1408 836.416 727.4368 833.92 725.7728 831.872 546.3168 960.448 295.7568 945.408 134.5408 784.192-44.8512 604.8-44.8512 313.92 134.5408 134.528 313.9328-44.864 604.8128-44.864 784.2048 134.528 945.4208 295.744 960.4608 546.304 831.8848 725.76 833.9328 727.424 836.4288 728.128 838.3488 730.048L1000.7168 892.48Z" HorizontalAlignment="Left" />
<local:MyIconButton x:Name="BtnClear" IsHitTestVisible="False" Opacity="0" Width="24" Margin="0,0,10,0" LogoScale="0.75" Height="24" Logo="F1 M2,0 L0,2 8,10 0,18 2,20 10,12 18,20 20,18 12,10 20,2 18,0 10,8 2,0Z" HorizontalAlignment="Right" Theme="Black" />
</Grid>
Expand Down
6 changes: 4 additions & 2 deletions Plain Craft Launcher 2/Controls/MySearchBox.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
'属性
Public Property HintText() As String
Get
Return TextBox.HintText
Return GetValue(HintTextProperty)
End Get
Set(value As String)
TextBox.HintText = value
SetValue(HintTextProperty, value)
End Set
End Property
Public Shared ReadOnly HintTextProperty As DependencyProperty = DependencyProperty.Register("HintText", GetType(String), GetType(MySearchBox), New PropertyMetadata(""))

Public Property Text() As String
Get
Return TextBox.Text
Expand Down
Loading