Skip to content

Commit

Permalink
Merge pull request PCL-Community#52 from Chiloven945/Language
Browse files Browse the repository at this point in the history
Readme Translation Update & Annotation Revision
  • Loading branch information
tangge233 authored Jan 5, 2025
2 parents 677f092 + 9089771 commit 92a9f1f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 34 deletions.
13 changes: 8 additions & 5 deletions Plain Craft Launcher 2/Modules/Modi18n.vb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ Imports System.Windows.Forms

Module Modi18n
''' <summary>
''' 获取语言
''' 获取译文,如果支持可在键值后方加上需要替换原文占位符(<c>{0}, {1}</c>等)的文本。
''' </summary>
''' <remarks>
''' </remarks>
''' <param name="Key">键值</param>
''' <param name="Param">字段中对应要展示的内容</param>
''' <returns></returns>
''' <returns>键值所对应的译文</returns>
Public Function GetLang(Key As String, ParamArray Param As String()) As String
Try
If String.IsNullOrWhiteSpace(Key) Then Throw New Exception("Key 值未提供;No key value provided")
Expand All @@ -28,7 +30,7 @@ Module Modi18n
''' 通过中文得到其它语言,应付一些 i18n 适配较困难的场景
''' </summary>
''' <param name="Word">中文文本</param>
''' <returns></returns>
''' <returns>对应语言的译文</returns>
Public Function GetLangByWord(Word As String) As String
If Lang = "zh_CN" Then Return Word '语言设置为中文时不需要处理,直接返回以节约处理时间
Select Case Word
Expand All @@ -52,7 +54,7 @@ Module Modi18n
''' 获取当前语言的时间表达方式
''' </summary>
''' <param name="Time">时间</param>
''' <returns></returns>
''' <returns>当前地区的时间格式字符串</returns>
Public Function GetLocalTimeFormat(Time As DateTime) As String
Select Case Lang
Case "ja_JP", "ko_KR", "lzh", "zh_CN", "zh_HK", "zh_MARS", "zh_MEME", "zh_TW" '2024/08/16 11:47
Expand Down Expand Up @@ -160,7 +162,8 @@ Module Modi18n
''' </summary>
''' <param name="Count">数量</param>
''' <param name="Key">调用的键名</param>
''' <returns></returns>
''' <param name="Param">字段中对应要展示的内容</param>
''' <returns>对应单复数形式的译文</returns>
Public Function GetLangByNumIsPlural(Count As Int32, Key As String, ParamArray Param As String()) As String
If Count <= 1 Then
Return GetLang(Key, Param)
Expand Down
28 changes: 13 additions & 15 deletions README-en_US.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Repository of Plain Craft Launcher
# Plain Craft Launcher

[简体中文](README.md) | [繁體中文](README-zh_TW.md) | **English**
[简体中文](README.md) | [繁體中文](README-zh_TW.md) | **English**

[![Stars](https://img.shields.io/github/stars/Hex-Dragon/PCL2?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggLjI1YS43NS43NSAwIDAgMSAuNjczLjQxOGwxLjg4MiAzLjgxNSA0LjIxLjYxMmEuNzUuNzUgMCAwIDEgLjQxNiAxLjI3OWwtMy4wNDYgMi45Ny43MTkgNC4xOTJhLjc1MS43NTEgMCAwIDEtMS4wODguNzkxTDggMTIuMzQ3bC0zLjc2NiAxLjk4YS43NS43NSAwIDAgMS0xLjA4OC0uNzlsLjcyLTQuMTk0TC44MTggNi4zNzRhLjc1Ljc1IDAgMCAxIC40MTYtMS4yOGw0LjIxLS42MTFMNy4zMjcuNjY4QS43NS43NSAwIDAgMSA4IC4yNVoiIGZpbGw9IiNlYWM1NGYiLz48L3N2Zz4=&logoSize=auto&label=Stars&labelColor=666666&color=eac54f)](https://github.com/Hex-Dragon/PCL2/)
[![Issues](https://img.shields.io/github/issues/Hex-Dragon/PCL2?style=flat&label=Issues&labelColor=666666&color=1a7f37)](https://github.com/Hex-Dragon/PCL2/issues)
[![BiliBili](https://img.shields.io/badge/News-BiliBili-00A4DB?style=flat&labelColor=444444&logoSize=auto)](https://space.bilibili.com/11343203/dynamic)
[![Afdian](https://img.shields.io/badge/Donate-Afdian-946ce6?style=flat&labelColor=666666&logoSize=auto)](https://afdian.com/@LTCat)
[![Stars](https://img.shields.io/github/stars/Hex-Dragon/PCL2?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggLjI1YS43NS43NSAwIDAgMSAuNjczLjQxOGwxLjg4MiAzLjgxNSA0LjIxLjYxMmEuNzUuNzUgMCAwIDEgLjQxNiAxLjI3OWwtMy4wNDYgMi45Ny43MTkgNC4xOTJhLjc1MS43NTEgMCAwIDEtMS4wODguNzkxTDggMTIuMzQ3bC0zLjc2NiAxLjk4YS43NS43NSAwIDAgMS0xLjA4OC0uNzlsLjcyLTQuMTk0TC44MTggNi4zNzRhLjc1Ljc1IDAgMCAxIC40MTYtMS4yOGw0LjIxLS42MTFMNy4zMjcuNjY4QS43NS43NSAwIDAgMSA4IC4yNVoiIGZpbGw9IiNlYWM1NGYiLz48L3N2Zz4=&logoSize=auto&label=Stars&labelColor=444444&color=eac54f)](https://github.com/Hex-Dragon/PCL2/)
[![Issues](https://img.shields.io/github/issues/Hex-Dragon/PCL2?style=flat&label=Issues&labelColor=444444&color=1F883D)](https://github.com/Hex-Dragon/PCL2/issues)
[![Bilibili](https://img.shields.io/badge/Threads-BiliBili-00A4DB?style=flat&labelColor=444444&logoSize=auto)](https://space.bilibili.com/11343203/dynamic)
[![Afdian](https://img.shields.io/badge/Sponsor-Afdian-946ce6?style=flat&labelColor=444444&logoSize=auto)](https://afdian.com/@LTCat)

This repository provides most of the source code of PCL, including the UI library, animation module, download module, Minecraft launch module, and more!<br/>
The repository isn't updated in real-time. Instead, it is synchronized (manually) with each update.<br/>
Many thanks for the support from the community!
This repository includes most of the source code of PCL, such as the UI library, animation module, download module, Minecraft launch module, and more!
The code is not updated in real-time; it is synchronized once every time PCL releases an update.
A huge thanks to the community for their great support!

<br/>


### Related Content

- [Software Download](https://afdian.com/p/0164034c016c11ebafcb52540025c377):Download the free official release of PCL.
- [PCL Feature Voting](https://github.com/Hex-Dragon/PCL2/discussions/2):Come and participate the vote! The developer will deal the feature with higher votes!
- [Help Center Repository](https://github.com/LTCatt/PCL2Help):The repository of PCL's Help Center
### Related Resources
- [PCL Download](https://afdian.com/p/0164034c016c11ebafcb52540025c377): Download the release version of PCL for free!
- [Feature Voting](https://github.com/Hex-Dragon/PCL2/discussions/2): Join the voting! Developers will prioritize features with higher votes!
- [Help Center Repository](https://github.com/LTCatt/PCL2Help): Repository for PCL's built-in help documentation.
26 changes: 12 additions & 14 deletions README-zh_TW.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Plain Craft Launcher 原始碼庫
# Plain Craft Launcher

[简体中文](README.md) | **繁體中文** | [English](README-en_US.md)

[![Stars](https://img.shields.io/github/stars/Hex-Dragon/PCL2?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggLjI1YS43NS43NSAwIDAgMSAuNjczLjQxOGwxLjg4MiAzLjgxNSA0LjIxLjYxMmEuNzUuNzUgMCAwIDEgLjQxNiAxLjI3OWwtMy4wNDYgMi45Ny43MTkgNC4xOTJhLjc1MS43NTEgMCAwIDEtMS4wODguNzkxTDggMTIuMzQ3bC0zLjc2NiAxLjk4YS43NS43NSAwIDAgMS0xLjA4OC0uNzlsLjcyLTQuMTk0TC44MTggNi4zNzRhLjc1Ljc1IDAgMCAxIC40MTYtMS4yOGw0LjIxLS42MTFMNy4zMjcuNjY4QS43NS43NSAwIDAgMSA4IC4yNVoiIGZpbGw9IiNlYWM1NGYiLz48L3N2Zz4=&logoSize=auto&label=Stars&labelColor=666666&color=eac54f)](https://github.com/Hex-Dragon/PCL2/)
[![Issues](https://img.shields.io/github/issues/Hex-Dragon/PCL2?style=flat&label=Issues&labelColor=666666&color=1a7f37)](https://github.com/Hex-Dragon/PCL2/issues)
[![哔哩哔哩](https://img.shields.io/badge/动态-BiliBili-00A4DB?style=flat&labelColor=444444&logoSize=auto)](https://space.bilibili.com/11343203/dynamic)
[![愛發電](https://img.shields.io/badge/支援-%E6%84%9B%E7%99%BC%E9%9B%BB-946ce6?style=flat&labelColor=666666&logoSize=auto)](https://afdian.com/@LTCat)
[![Stars](https://img.shields.io/github/stars/Hex-Dragon/PCL2?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTggLjI1YS43NS43NSAwIDAgMSAuNjczLjQxOGwxLjg4MiAzLjgxNSA0LjIxLjYxMmEuNzUuNzUgMCAwIDEgLjQxNiAxLjI3OWwtMy4wNDYgMi45Ny43MTkgNC4xOTJhLjc1MS43NTEgMCAwIDEtMS4wODguNzkxTDggMTIuMzQ3bC0zLjc2NiAxLjk4YS43NS43NSAwIDAgMS0xLjA4OC0uNzlsLjcyLTQuMTk0TC44MTggNi4zNzRhLjc1Ljc1IDAgMCAxIC40MTYtMS4yOGw0LjIxLS42MTFMNy4zMjcuNjY4QS43NS43NSAwIDAgMSA4IC4yNVoiIGZpbGw9IiNlYWM1NGYiLz48L3N2Zz4=&logoSize=auto&label=Stars&labelColor=444444&color=eac54f)](https://github.com/Hex-Dragon/PCL2/)
[![Issues](https://img.shields.io/github/issues/Hex-Dragon/PCL2?style=flat&label=Issues&labelColor=444444&color=1F883D)](https://github.com/Hex-Dragon/PCL2/issues)
[![Bilibili](https://img.shields.io/badge/動態-BiliBili-00A4DB?style=flat&labelColor=444444&logoSize=auto)](https://space.bilibili.com/11343203/dynamic)
[![愛發電](https://img.shields.io/badge/贊助-愛發電-946ce6?style=flat&labelColor=444444&logoSize=auto)](https://afdian.com/@LTCat)

這裡提供了 PCL 的大多數原始碼,包括 UI 庫、動畫模組、下載模組、Minecraft 啟動模組等!<br/>
原始碼庫並不是即時更新的,而是在每次 PCL 發布更新時同步一次。<br/>
非常感謝社群的支援
包含 PCL 的大部分原始碼,包括 UI 庫、動畫模組、下載模組、Minecraft 啟動模組等!<br/>
程式碼並不是即時更新的,它會在每次 PCL 發布更新時同步一次。<br/>
非常感謝社群的大力支援

<br/>


## 相關內容

- [程式下載](https://afdian.com/p/0164034c016c11ebafcb52540025c377):下載免費的正式版 PCL。
- [PCL 功能投票](https://github.com/Hex-Dragon/PCL2/discussions/2):來參加投票吧,開發者會優先處理票數較高的帖子!
- [說明文件庫](https://github.com/LTCatt/PCL2Help):PCL 說明文件在 GitHub 上的儲存庫
### 相關資源
- [PCL 下載](https://afdian.com/p/0164034c016c11ebafcb52540025c377):下載可免費使用的正式版 PCL!
- [PCL 功能投票](https://github.com/Hex-Dragon/PCL2/discussions/2):來參加投票吧,開發者會優先處理票數較高的項目!
- [幫助文件庫](https://github.com/LTCatt/PCL2Help):PCL 內建幫助文件的儲存庫

0 comments on commit 92a9f1f

Please sign in to comment.