From 03b073be468a9d78c40bc75b9071012b2b839d2f Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Sat, 17 Aug 2024 20:05:30 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E6=A8=A1=E7=BB=84=E5=90=8D=E7=A7=B0=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jackhuang/hmcl/ui/versions/ModListPageSkin.java | 9 +++++++++ HMCL/src/main/resources/assets/lang/I18N.properties | 1 + HMCL/src/main/resources/assets/lang/I18N_zh.properties | 1 + .../src/main/resources/assets/lang/I18N_zh_CN.properties | 1 + 4 files changed, 12 insertions(+) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java index acd647a5fd..f2c098bf61 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java @@ -417,6 +417,15 @@ class ModInfoDialog extends JFXDialogLayout { getActions().add(mcmodButton); } + if (StringUtils.isNotBlank(modInfo.getModInfo().getName())) { + JFXHyperlink copyNameButton = new JFXHyperlink(i18n("mods.copyname")); + copyNameButton.setOnAction(e -> { + FXUtils.copyText(modInfo.getModInfo().getName()); + }); + + getActions().add(copyNameButton); + } + JFXButton okButton = new JFXButton(); okButton.getStyleClass().add("dialog-accept"); okButton.setText(i18n("button.ok")); diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index dc1bdd651e..02afe0596f 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -909,6 +909,7 @@ mods.check_updates.source=Source mods.check_updates.target_version=Target Version mods.check_updates.update=Update mods.choose_mod=Choose a mod +mods.copyname=Copy Name mods.curseforge=CurseForge mods.dependency.embedded=built-in pre-mod (already packaged in the mod file by the author, no need to download separately) mods.dependency.optional=optional pre-mod (if the game is missing, but mod functionality may be missing) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index a11eb2474b..f79769c658 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -777,6 +777,7 @@ mods.check_updates.source=來源 mods.check_updates.target_version=目標版本 mods.check_updates.update=更新 mods.choose_mod=選擇模組 +mods.copyname=複製名稱 mods.curseforge=CurseForge mods.dependency.embedded=內置前端模組(作者已經打包在模組檔中,無需額外下載) mods.dependency.optional=可選的前模組(如果缺少遊戲,遊戲可以運行,但模組功能可能缺失) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index ededc00cd6..5f0a38294b 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -776,6 +776,7 @@ mods.check_updates.source=来源 mods.check_updates.target_version=目标版本 mods.check_updates.update=更新 mods.choose_mod=选择模组 +mods.copyname=复制名称 mods.curseforge=CurseForge mods.dependency.embedded=内置的前置模组(已经由作者打包在模组文件中,无需另外下载) mods.dependency.optional=可选的前置模组(若缺失游戏能够正常运行,但模组功能可能缺失) From d1d99993539cdcd211476fc76d13c4c0862704f0 Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Thu, 22 Aug 2024 13:08:38 +0800 Subject: [PATCH 2/7] Update DownloadPage.java --- .../java/org/jackhuang/hmcl/ui/versions/DownloadPage.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java index 3440c928e9..914ce562f4 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java @@ -236,6 +236,13 @@ protected ModDownloadPageSkin(DownloadPage control) { .collect(Collectors.toList())); descriptionPane.getChildren().add(content); + JFXHyperlink copyNameButton = new JFXHyperlink(i18n("mods.copyname")); + copyNameButton.setOnAction(e -> { + FXUtils.copyText(content.getTitle()); + }); + copyNameButton.setMinWidth(Region.USE_PREF_SIZE); + descriptionPane.getChildren().add(copyNameButton); + if (getSkinnable().mod != null) { JFXHyperlink openMcmodButton = new JFXHyperlink(i18n("mods.mcmod")); openMcmodButton.setExternalLink(getSkinnable().translations.getMcmodUrl(getSkinnable().mod)); From 6ac901c4699e1b0beba06660db6cdcfcf1a6721d Mon Sep 17 00:00:00 2001 From: Zkitefly Date: Sat, 28 Sep 2024 07:14:53 +0000 Subject: [PATCH 3/7] Update HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com> --- .../main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java index 914ce562f4..66845338bf 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java @@ -236,7 +236,7 @@ protected ModDownloadPageSkin(DownloadPage control) { .collect(Collectors.toList())); descriptionPane.getChildren().add(content); - JFXHyperlink copyNameButton = new JFXHyperlink(i18n("mods.copyname")); + JFXHyperlink copyNameButton = new JFXHyperlink(i18n("mods.name.copy")); copyNameButton.setOnAction(e -> { FXUtils.copyText(content.getTitle()); }); From 6a2b8ffce56ffe283a2625f30a3afbceda8b8da3 Mon Sep 17 00:00:00 2001 From: Zkitefly Date: Sat, 28 Sep 2024 07:15:01 +0000 Subject: [PATCH 4/7] Update HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com> --- .../java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java index f2c098bf61..a8cfc27657 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java @@ -418,7 +418,7 @@ class ModInfoDialog extends JFXDialogLayout { } if (StringUtils.isNotBlank(modInfo.getModInfo().getName())) { - JFXHyperlink copyNameButton = new JFXHyperlink(i18n("mods.copyname")); + JFXHyperlink copyNameButton = new JFXHyperlink(i18n("mods.name.copy")); copyNameButton.setOnAction(e -> { FXUtils.copyText(modInfo.getModInfo().getName()); }); From 12283a14fb2a98404aa4f2a4e14f090422990786 Mon Sep 17 00:00:00 2001 From: Zkitefly Date: Sat, 28 Sep 2024 07:15:10 +0000 Subject: [PATCH 5/7] Update HMCL/src/main/resources/assets/lang/I18N.properties Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com> --- HMCL/src/main/resources/assets/lang/I18N.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index 02afe0596f..35f6c872fa 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -909,7 +909,7 @@ mods.check_updates.source=Source mods.check_updates.target_version=Target Version mods.check_updates.update=Update mods.choose_mod=Choose a mod -mods.copyname=Copy Name +mods.name.copy=Copy Name mods.curseforge=CurseForge mods.dependency.embedded=built-in pre-mod (already packaged in the mod file by the author, no need to download separately) mods.dependency.optional=optional pre-mod (if the game is missing, but mod functionality may be missing) From 3c838550855bfa43ff32686f79b6a63fc4904433 Mon Sep 17 00:00:00 2001 From: Zkitefly Date: Sat, 28 Sep 2024 07:15:20 +0000 Subject: [PATCH 6/7] Update HMCL/src/main/resources/assets/lang/I18N_zh.properties Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com> --- HMCL/src/main/resources/assets/lang/I18N_zh.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index f79769c658..7d8c0ba86a 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -777,7 +777,7 @@ mods.check_updates.source=來源 mods.check_updates.target_version=目標版本 mods.check_updates.update=更新 mods.choose_mod=選擇模組 -mods.copyname=複製名稱 +mods.name.copy=複製名稱 mods.curseforge=CurseForge mods.dependency.embedded=內置前端模組(作者已經打包在模組檔中,無需額外下載) mods.dependency.optional=可選的前模組(如果缺少遊戲,遊戲可以運行,但模組功能可能缺失) From e29f3ac873925e1858cfb02b8589036ffc3276e4 Mon Sep 17 00:00:00 2001 From: Zkitefly Date: Sat, 28 Sep 2024 07:15:44 +0000 Subject: [PATCH 7/7] Update HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com> --- HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index 5f0a38294b..f0f64df9ea 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -776,7 +776,7 @@ mods.check_updates.source=来源 mods.check_updates.target_version=目标版本 mods.check_updates.update=更新 mods.choose_mod=选择模组 -mods.copyname=复制名称 +mods.name.copy=复制名称 mods.curseforge=CurseForge mods.dependency.embedded=内置的前置模组(已经由作者打包在模组文件中,无需另外下载) mods.dependency.optional=可选的前置模组(若缺失游戏能够正常运行,但模组功能可能缺失)