From 1657c2796bba4697e28229a7e2eb030b9b0c9139 Mon Sep 17 00:00:00 2001 From: yuko fuyutsuki Date: Mon, 15 Aug 2022 16:34:22 +0900 Subject: [PATCH 1/5] Next is 4.1.5 * API version bump to 4.7.0 --- plugin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.yml b/plugin.yml index 7004c54..59ca40f 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,8 +1,8 @@ name: Texter prefix: Texter main: jp\mcbe\fuyutsuki\Texter\Main -version: 4.1.4 -api: 4.6.0 +version: 4.1.5 +api: 4.7.0 softdepend: # aieuo/Mineflow - Mineflow # >= 2.0 From cc5820fda58ef7c518b57fabf0d7120e5f5c3797 Mon Sep 17 00:00:00 2001 From: yuko fuyutsuki Date: Mon, 15 Aug 2022 16:35:07 +0900 Subject: [PATCH 2/5] Fixed broken translate keys * ftname -> ft.name --- resources/language/en_us.ini | 4 ++-- resources/language/es_mx.ini | 4 ++-- resources/language/id_id.ini | 10 +++++----- resources/language/ko_kr.ini | 10 +++++----- resources/language/ru_ru.ini | 4 ++-- resources/language/tr_tr.ini | 10 +++++----- resources/language/vi_vn.ini | 4 ++-- resources/language/zh_cn.ini | 10 +++++----- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/resources/language/en_us.ini b/resources/language/en_us.ini index 4f7dc29..6dfe367 100644 --- a/resources/language/en_us.ini +++ b/resources/language/en_us.ini @@ -33,8 +33,8 @@ command.txt.remove.success=FloatingText: deleted "{%0}" form.close=Close -form.ftname=FloatingText name -form.ftname.unique=FloatingText name(unique) +form.ft.name=FloatingText name +form.ft.name.unique=FloatingText name(unique) form.add.description=Add a FloatingText to the world. form.add.more.ft=Add more FloatingText diff --git a/resources/language/es_mx.ini b/resources/language/es_mx.ini index 8ce30d2..aef36ba 100644 --- a/resources/language/es_mx.ini +++ b/resources/language/es_mx.ini @@ -30,8 +30,8 @@ command.txt.move.success=TextoFloatante: "{%0}" se movió a {%1} command.txt.remove=/txt remove command.txt.remove.success=TextoFloatante:"{%0}" fue eliminado form.close=Cerrar -form.ftname=Nombre del TextoFloatante -form.ftname.unique=Nombre del TextoFloatante(único) +form.ft.name=Nombre del TextoFloatante +form.ft.name.unique=Nombre del TextoFloatante(único) form.add.description=Agrega un TextoFloatante al mundo. form.add.more.ft=Agregar más TextoFloatante form.add.spacing.description=El espaciado entre TextosFloatantes se puede especificar en coordenadas, donde -0.3 de Y es aproximadamente el espaciado de una línea. diff --git a/resources/language/id_id.ini b/resources/language/id_id.ini index b80fc97..9fb93e0 100644 --- a/resources/language/id_id.ini +++ b/resources/language/id_id.ini @@ -30,8 +30,8 @@ command.txt.move.success=FloatingText: memindah {%0} ke {%1} command.txt.remove=/txt r(emove) command.txt.remove.success=FloatingText: dihapus {%0} -form.ftname=Nama FloatingText -form.ftname.unique=Nama FloatingText(buat unik) +form.ft.name=Nama FloatingText +form.ft.name.unique=Nama FloatingText(buat unik) form.title=Title form.text=Text form.add.description=Menambah teks melayang dengan nama, judul, dan teks spesifik ke dunia. @@ -46,8 +46,8 @@ form.list.description.2=nama teks melayang: {%0}\nPilih operasi yang dilakukan u error.on.enable.not.packaged=Mohon gunakan file .phar yang didownload dari PoggitCI (https://poggit.pmmp.io/p/Texter). error.on.enable.not.found.libformapi=Tidak dapat menemukan libFormAPI di folder virions. Mohon download libFormAPI dan install secara benar. -error.ftname.not.specified=Nama teks melayang tidak di pilih -error.ftname.exists=Teks melayang dengan nama: {%0} sudah ada. -error.ftname.not.exists=Teks melayang dengan nama: {%0} tidak ada. +error.ft.name.not.specified=Nama teks melayang tidak di pilih +error.ft.name.exists=Teks melayang dengan nama: {%0} sudah ada. +error.ft.name.not.exists=Teks melayang dengan nama: {%0} tidak ada. error.permission=Anda tidak memiliki izin untuk mengedit teks melayang. error.console=Mohon menjalankannya di dalam game diff --git a/resources/language/ko_kr.ini b/resources/language/ko_kr.ini index 91568a3..d7e8de0 100644 --- a/resources/language/ko_kr.ini +++ b/resources/language/ko_kr.ini @@ -30,8 +30,8 @@ command.txt.move.success=FloatingText: {%0} 을 {%1} 로 이동하였읍니다 command.txt.remove=/txt r(삭제) command.txt.remove.success=FloatingText: {%0} 삭제완료 -form.ftname=홀로그램 이름 -form.ftname.unique=홀로그램 이름(별개) +form.ft.name=홀로그램 이름 +form.ft.name.unique=홀로그램 이름(별개) form.title=타이틀 form.text=텍스트 form.add.description=홀로그램을 원하는 월드에 추가하세요! @@ -46,8 +46,8 @@ form.list.description.2=홀로그램 이름: {%0}\n아래 옵션을 선택하세 error.on.enable.not.packaged=PoggitCI 의 .phar 파일을 사용하세요! (https://poggit.pmmp.io/p/Texter). error.on.enable.not.found.libformapi=libFormAPI을 virions 폴더에서 찾을수 없습니다. libFormAPI 다운후 제대로 설치해주세요 -error.ftname.not.specified=홀로그램 이름을 적어주세요 -error.ftname.exists=홀로그램 이름: {%0} 이 이미 있습니다 -error.ftname.not.exists=홀로그램 이름: {%0} 이 없습니다 +error.ft.name.not.specified=홀로그램 이름을 적어주세요 +error.ft.name.exists=홀로그램 이름: {%0} 이 이미 있습니다 +error.ft.name.not.exists=홀로그램 이름: {%0} 이 없습니다 error.permission=홀로그램사용 허가가 없습니다. 만약 이것이 에러라면 서버의 어드민과 연락해주세요. error.console=게임접속후 사용을 해주세요 diff --git a/resources/language/ru_ru.ini b/resources/language/ru_ru.ini index c3a3367..4b46725 100644 --- a/resources/language/ru_ru.ini +++ b/resources/language/ru_ru.ini @@ -33,8 +33,8 @@ command.txt.remove.success=Летающий текст: удален "{%0}" form.close=Закрыть -form.ftname=Название летающего текста -form.ftname.unique=Уникальное название летающего текста +form.ft.name=Название летающего текста +form.ft.name.unique=Уникальное название летающего текста form.add.description=Добавить летающий текст в мир. form.add.more.ft=Добавить летающий текст diff --git a/resources/language/tr_tr.ini b/resources/language/tr_tr.ini index 77ca31d..a44991c 100644 --- a/resources/language/tr_tr.ini +++ b/resources/language/tr_tr.ini @@ -30,8 +30,8 @@ command.txt.move.success=Uçan Metin: {%0} {%1} klasörüne taşındı command.txt.remove=/txt remove command.txt.remove.success=Uçan Metin: {%0} silindi. -form.ftname=UçanMetin adı -form.ftname.unique=UçanMetin adı (benzersiz) +form.ft.name=UçanMetin adı +form.ft.name.unique=UçanMetin adı (benzersiz) form.title=Başlık form.text=Metin form.add.description=Dünyaya belirtilen ad, başlık, metin ile bir UçanMetin ekleyin. @@ -46,8 +46,8 @@ form.list.description.2=Belirtilen Uçan Metin metni adı: {%0} \nLütfen bunun error.on.enable.not.packaged=Lütfen PoggitCI'den indirilen phar dosyasını kullanın (https://poggit.pmmp.io/p/Texter). error.on.enable.not.found.libformapi=libFormAPI virions klasöründe bulunamadı. Lütfen libFormAPI'yi indirin ve doğru şekilde kurun. -error.ftname.not.specified=Bir UçanMetin adı belirtilmedi -error.ftname.exists=Belirtilen ada sahip bir UçanMetin: {%0} zaten var. -error.ftname.not.exists=Belirtilen ada sahip UçanMetin yok: {%0} mevcut değil. +error.ft.name.not.specified=Bir UçanMetin adı belirtilmedi +error.ft.name.exists=Belirtilen ada sahip bir UçanMetin: {%0} zaten var. +error.ft.name.not.exists=Belirtilen ada sahip UçanMetin yok: {%0} mevcut değil. error.permission=UçanMetin dosyasını düzenlemek için gerekli izniniz yok. error.console=Lütfen oyunun içinden yürütün. diff --git a/resources/language/vi_vn.ini b/resources/language/vi_vn.ini index 865e742..2eca8e6 100644 --- a/resources/language/vi_vn.ini +++ b/resources/language/vi_vn.ini @@ -33,8 +33,8 @@ command.txt.remove.success=FloatingText: đã xóa "{%0}" form.close=Đóng dạng -form.ftname=Tên của chữ nổi -form.ftname.unique=Tên của chữ nổi(duy nhất) +form.ft.name=Tên của chữ nổi +form.ft.name.unique=Tên của chữ nổi(duy nhất) form.add.description=Thêm chữ nổi vào thế giới. form.add.more.ft=Thêm nhiều chữ nổi diff --git a/resources/language/zh_cn.ini b/resources/language/zh_cn.ini index 82f9652..9950125 100644 --- a/resources/language/zh_cn.ini +++ b/resources/language/zh_cn.ini @@ -33,8 +33,8 @@ command.txt.remove.success=FloatingText: 删除 {%0} form.close=关闭 -form.ftname=浮空字名称 -form.ftname.unique=浮空字名称(唯一) +form.ft.name=浮空字名称 +form.ft.name.unique=浮空字名称(唯一) form.add.description=向世界添加具有指定名称、标题和文本的浮空字。 form.add.more.ft=添加更多浮空字 @@ -63,8 +63,8 @@ form.list.description.2=指定浮空字名称名称: {%0}\n请为此选择要做 error.on.enable.not.packaged=请使用从PoggitCI下载的phar文件 (https://poggit.pmmp.io/p/Texter). error.on.enable.not.found.libformapi=无法在病毒粒子文件夹中找到 {%0} 。请下载并正确安装 {%0} 。 -error.ftname.not.specified=没有指定浮点文本名称 -error.ftname.exists=指定名称的浮空字: {%0} 已经存在。 -error.ftname.not.exists=没有指定名称的浮空字: {%0} 不存在。 +error.ft.name.not.specified=没有指定浮点文本名称 +error.ft.name.exists=指定名称的浮空字: {%0} 已经存在。 +error.ft.name.not.exists=没有指定名称的浮空字: {%0} 不存在。 error.permission=您没有编辑浮空字的必要权限。 error.console=请从游戏中运行 From 0882f2b90bb685ed1aa1efdcf0e1518e585a959a Mon Sep 17 00:00:00 2001 From: yuko fuyutsuki Date: Mon, 15 Aug 2022 16:36:25 +0900 Subject: [PATCH 3/5] Operate magic texts are replaced with SendType enum --- .../fuyutsuki/Texter/command/form/AddFloatingTextForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php b/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php index f3560b2..8f21fbf 100644 --- a/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php +++ b/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php @@ -78,7 +78,7 @@ public function __construct(Player $player) { $elements[] = new Toggle(FormLabels::ADD_MORE, $lang->translateString("form.add.more.ft")); parent::__construct( - Main::prefix() . " txt > " . ($this->session->isEdit() ? "edit" : "add"), + Main::prefix() . " txt > " . ($this->session->isEdit() ? SendType::EDIT()->name() : SendType::ADD()->name()), $elements, function(Player $player, CustomFormResponse $response): void { $this->handleSubmit($player, $response); @@ -140,7 +140,7 @@ private function handleSubmit(Player $player, CustomFormResponse $response): voi $floatingTextData->store($floatingText); $floatingTextData->save(); FloatingTextSession::remove(strtolower($player->getName())); - $operate = $this->session->isEdit() ? "edit" : "add"; + $operate = $this->session->isEdit() ? SendType::EDIT()->name() : SendType::ADD()->name(); $message = TextFormat::GREEN . $this->session->lang()->translateString("command.txt.$operate.success", [ $floatingText->name() ]); From 9a0f812caca56cd91421c893c1c344e329c9557d Mon Sep 17 00:00:00 2001 From: yuko fuyutsuki Date: Mon, 15 Aug 2022 16:37:40 +0900 Subject: [PATCH 4/5] Unique identifier unchangeable when making edits, fixed #129 --- .../fuyutsuki/Texter/command/form/AddFloatingTextForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php b/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php index 8f21fbf..d0d6e4b 100644 --- a/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php +++ b/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php @@ -50,7 +50,11 @@ public function __construct(Player $player) { } $elements[] = new Label(Uuid::uuid4()->getBytes(), $lang->translateString("form.add.description")); - $elements[] = new Input(FormLabels::NAME, $inputName, $inputName, $this->session->name()); + if ($this->session->isEdit()) { + $elements[] = new Label(Uuid::uuid4()->getBytes(), "$inputName: {$this->session->name()}"); + }else { + $elements[] = new Input(FormLabels::NAME, $inputName, $inputName, $this->session->name()); + } if (count($this->session->texts()) >= 2) { $spacing = $this->session->spacing()->multiply(10)->add(30, 30, 30); From 603d81b1b6ccaaa09956e3dd6496d192e7f96527 Mon Sep 17 00:00:00 2001 From: yuko fuyutsuki Date: Mon, 15 Aug 2022 16:41:45 +0900 Subject: [PATCH 5/5] Update changelogs for 4.1.5 --- .github/changelogs/4.x/en_us.md | 6 ++++++ .github/changelogs/4.x/ja_jp.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/changelogs/4.x/en_us.md b/.github/changelogs/4.x/en_us.md index 7390ac9..f0cf644 100644 --- a/.github/changelogs/4.x/en_us.md +++ b/.github/changelogs/4.x/en_us.md @@ -2,6 +2,12 @@ ## 4.1.x +### 4.1.5 + +#### :bug: bug fixes + +- Fixed an issue where unique identifiers could be changed when editing floating texts (#129) + ### 4.1.4 #### :globe_with_meridians: More i18n diff --git a/.github/changelogs/4.x/ja_jp.md b/.github/changelogs/4.x/ja_jp.md index eda37d9..1132fb3 100644 --- a/.github/changelogs/4.x/ja_jp.md +++ b/.github/changelogs/4.x/ja_jp.md @@ -2,6 +2,12 @@ ## 4.1.x +### 4.1.5 + +#### :bug: バグ修正 + +- 浮き文字の編集時に一意な識別子を変更できてしまう問題を修正しました (#129) + ### 4.1.4 #### :globe_with_meridians: 国際化