Skip to content

Commit

Permalink
Merge pull request #1 from xcwl520/main
Browse files Browse the repository at this point in the history
Add new translations (Chinese Simplified)
  • Loading branch information
KartoffelChipss authored Aug 7, 2024
2 parents b2d0842 + 2a6b134 commit 6632a17
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public class LanguageManager {
private final JavaPlugin plugin = ServerLinksZ.getInstance();
public static final List<String> defaultLangs = List.of("en-US", "de-DE");
public static final List<String> defaultLangs = List.of("en-US", "de-DE", "zh-CN");

private HashMap<String, String> translationMap;
private FileConfiguration langConfig;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Set the language to any code found in the "lang" folder (don't add the .yml extension)
# You can add your own language files. Use https://github.com/KartoffelChipss/ServerLinksZ/tree/main/src/main/resources/lang/en-US.yml as a template
# | en-US | de-DE |
# | en-US | de-DE | zh-CN |
lang: "en-US"

# Wether to show hints when using commands
Expand All @@ -28,4 +28,4 @@ hints: true
linkCommand: true


# [!!!] You can configure the links in the links.yml file!
# [!!!] You can configure the links in the links.yml file!
14 changes: 14 additions & 0 deletions src/main/resources/lang/zh-CN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
prefix: "&7[<gradient:#00BFFF:#007BFF>&lServerLinksZ</gradient>&7]"
help: "\n &8<b>></b> <#00BFFF><b><gradient:#00BFFF:#007BFF>ServerLinksZ</gradient></b></#00BFFF>\n\n&7您可以使用 <u>/sl</u> 命令添加或移除服务器链接, 但建议对links.yml文件进行编辑 ,文件位于 <i>/plugins/ServerLinksZ/links.yml</i> 下.\n\n <click:OPEN_URL:https://strassburger.org/discord><#00BFFF><u><b>Support Discord</b></u></click>\n"
linkCommand: "&7-> <click:OPEN_URL:%url%><hover:show_text:'&7%url%'><u>%name%</u></hover></click> &r&7<-"
rejoinHint: "<#E9D502>⚠ 为了更新服务器链接列表,请您重新进入服务器"
moreConfigOptionsHint: "<#E9D502>⚠ 有关更多配置选项,请参阅config.yml文件!"
invalidUrlError: "&c无效的URL!"
urlProtocolError: "&cURL应该以 'http://' 或 'https://' 开头!"
versionMsg: "&7你现在正使用 <#00BFFF>%version%&7版本"
noPermissionError: "&c你没有权限使用这个!"
addLinkMsg: "&7成功添加id为<#00BFFF>%id%&7服务器链接!"
removeLinkMsg: "&7成功移除id为<#00BFFF>%id%&7服务器链接!"
linkCommandDisabled: "&clink命令是禁用状态!"
linkCcommandNotAllowed: "&c不允许您通过命令访问此链接!"
linkNotFound: "&c未发现id为%id%&c 的链接!"

0 comments on commit 6632a17

Please sign in to comment.