From 776035133dcc85bda242dbb19e860ea8bbd7d9b9 Mon Sep 17 00:00:00 2001 From: sakaguchi Date: Fri, 22 May 2026 18:33:36 +0900 Subject: [PATCH] =?UTF-8?q?fix=20#4284=20=E3=80=90=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E3=82=A4=E3=83=B3=E3=80=91=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=A0=E3=82=B3=E3=83=B3=E3=83=86=E3=83=B3=E3=83=84:?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB=E7=AE=A1=E7=90=86=E3=81=AE?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB=E7=99=BB=E9=8C=B2=E3=83=BB?= =?UTF-8?q?=E7=B7=A8=E9=9B=86=E3=81=A7=E8=AD=98=E5=88=A5=E5=90=8D=E3=81=AB?= =?UTF-8?q?=E5=8D=8A=E8=A7=92=E5=A4=A7=E6=96=87=E5=AD=97=E3=81=8C=E4=BD=BF?= =?UTF-8?q?=E3=81=88=E3=81=AA=E3=81=84=E4=BB=B6=E3=81=AE=E3=83=98=E3=83=AB?= =?UTF-8?q?=E3=83=97=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-compose.yml.default | 2 +- plugins/baser-core/resources/locales/baser_core.pot | 7 ++----- .../baser-core/resources/locales/en/baser_core.po | 12 +++--------- .../Admin/element/CustomTables/form.php | 2 +- .../src/Model/Table/CustomTablesTable.php | 2 +- .../Admin/Api/CustomTablesControllerTest.php | 4 ++-- .../TestCase/Model/Table/CustomTablesTableTest.php | 2 +- .../TestCase/Service/CustomTablesServiceTest.php | 4 ++-- 8 files changed, 13 insertions(+), 22 deletions(-) diff --git a/docker/docker-compose.yml.default b/docker/docker-compose.yml.default index 475cabbe0e..f618063e37 100644 --- a/docker/docker-compose.yml.default +++ b/docker/docker-compose.yml.default @@ -35,7 +35,7 @@ services: bc-smtp: container_name: bc-smtp - image: schickling/mailcatcher + image: sj26/mailcatcher:latest ports: - "1080:1080" - "1025:1025" diff --git a/plugins/baser-core/resources/locales/baser_core.pot b/plugins/baser-core/resources/locales/baser_core.pot index f616a79745..a0774a65e1 100644 --- a/plugins/baser-core/resources/locales/baser_core.pot +++ b/plugins/baser-core/resources/locales/baser_core.pot @@ -7529,6 +7529,7 @@ msgstr "" #: ./plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomFields/form.php:60 #: ./plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomLinks/form.php:118 +#: ./plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php:87 msgid "半角小文字英数字とアンダースコア( _ )のみ利用可能です。" msgstr "" @@ -7844,10 +7845,6 @@ msgstr "" msgid "識別名" msgstr "" -#: ./plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php:87 -msgid "半角英数字とアンダースコアのみ利用できます。" -msgstr "" - #: ./plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php:106 msgid "表示名称フィールド" msgstr "" @@ -10529,7 +10526,7 @@ msgid "識別名を入力してください。" msgstr "" #: ./plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php:101 -msgid "識別名は半角英数字とアンダースコアのみで入力してください。" +msgid "識別名は半角英数小文字とアンダースコアのみで入力してください。" msgstr "" #: ./plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php:106 diff --git a/plugins/baser-core/resources/locales/en/baser_core.po b/plugins/baser-core/resources/locales/en/baser_core.po index f79065315a..f851a03e4c 100755 --- a/plugins/baser-core/resources/locales/en/baser_core.po +++ b/plugins/baser-core/resources/locales/en/baser_core.po @@ -8684,6 +8684,7 @@ msgstr "Field Name" #: plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomFields/form.php:60 #: plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomLinks/form.php:118 +#: plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php:87 msgid "半角小文字英数字とアンダースコア( _ )のみ利用可能です。" msgstr "" "Only half-width alphanumeric characters and underscores (_ ) are allowed." @@ -9088,13 +9089,6 @@ msgstr "" msgid "識別名" msgstr "Distinguished Name" -#: plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php:87 -#, fuzzy -#| msgid "半角小文字英数字とアンダースコア( _ )のみ利用可能です。" -msgid "半角英数字とアンダースコアのみ利用できます。" -msgstr "" -"Only half-width alphanumeric characters and underscores (_ ) are allowed." - #: plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php:106 msgid "表示名称フィールド" msgstr "Display Name Field" @@ -12312,9 +12306,9 @@ msgid "識別名を入力してください。" msgstr "Please enter a distinguished name." #: plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php:101 -msgid "識別名は半角英数字とアンダースコアのみで入力してください。" +msgid "識別名は半角英数小文字とアンダースコアのみで入力してください。" msgstr "" -"Please enter the distinguished name only with single-byte alphanumeric " +"Please enter the distinguished name only with single-byte lowercase alphanumeric " "characters and underscores." #: plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php:106 diff --git a/plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php b/plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php index e2ba768372..bf077b4517 100644 --- a/plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php +++ b/plugins/bc-admin-third/templates/plugin/BcCustomContent/Admin/element/CustomTables/form.php @@ -84,7 +84,7 @@ BcAdminForm->control('name', ['type' => 'text', 'size' => 40, 'maxlength' => 255]) ?>
- +
BcAdminForm->error('name') ?> diff --git a/plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php b/plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php index d168f8df98..c87272b02a 100644 --- a/plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php +++ b/plugins/bc-custom-content/src/Model/Table/CustomTablesTable.php @@ -98,7 +98,7 @@ public function validationDefault(Validator $validator): Validator ->scalar('name') ->maxLength('name', 255, __d('baser_core', '255文字以内で入力してください。')) ->notEmptyString('name', __d('baser_core', '識別名を入力してください。')) - ->regex('name', '/^[a-z0-9_]+$/', __d('baser_core', '識別名は半角英数字とアンダースコアのみで入力してください。')) + ->regex('name', '/^[a-z0-9_]+$/', __d('baser_core', '識別名は半角英数小文字とアンダースコアのみで入力してください。')) ->add('name', [ 'validateUnique' => [ 'rule' => ['validateUnique'], diff --git a/plugins/bc-custom-content/tests/TestCase/Controller/Admin/Api/CustomTablesControllerTest.php b/plugins/bc-custom-content/tests/TestCase/Controller/Admin/Api/CustomTablesControllerTest.php index 6863c7f60c..3b46d4ee5a 100644 --- a/plugins/bc-custom-content/tests/TestCase/Controller/Admin/Api/CustomTablesControllerTest.php +++ b/plugins/bc-custom-content/tests/TestCase/Controller/Admin/Api/CustomTablesControllerTest.php @@ -174,7 +174,7 @@ public function test_add() $result = json_decode((string)$this->_response->getBody()); $this->assertEquals('入力エラーです。内容を修正してください。', $result->message); $this->assertEquals( - '識別名は半角英数字とアンダースコアのみで入力してください。', + '識別名は半角英数小文字とアンダースコアのみで入力してください。', $result->errors->name->regex); } @@ -219,7 +219,7 @@ public function test_edit() $result = json_decode((string)$this->_response->getBody()); $this->assertEquals('入力エラーです。内容を修正してください。', $result->message); $this->assertEquals( - '識別名は半角英数字とアンダースコアのみで入力してください。', + '識別名は半角英数小文字とアンダースコアのみで入力してください。', $result->errors->name->regex); //不要なテーブルを削除 diff --git a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomTablesTableTest.php b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomTablesTableTest.php index 4595152ea1..aa2ef6baa3 100644 --- a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomTablesTableTest.php +++ b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomTablesTableTest.php @@ -97,7 +97,7 @@ public function test_validationDefault() $errors = $validator->validate([ 'name' => 'あ', ]); - $this->assertEquals('識別名は半角英数字とアンダースコアのみで入力してください。', current($errors['name'])); + $this->assertEquals('識別名は半角英数小文字とアンダースコアのみで入力してください。', current($errors['name'])); //正常系実行 $errors = $validator->validate([ 'name' => 'test', diff --git a/plugins/bc-custom-content/tests/TestCase/Service/CustomTablesServiceTest.php b/plugins/bc-custom-content/tests/TestCase/Service/CustomTablesServiceTest.php index 498e807f11..05faa0eb24 100644 --- a/plugins/bc-custom-content/tests/TestCase/Service/CustomTablesServiceTest.php +++ b/plugins/bc-custom-content/tests/TestCase/Service/CustomTablesServiceTest.php @@ -298,7 +298,7 @@ public function test_create() 'name' => 'お問い合わせタイトル', ]; $this->expectException(PersistenceFailedException::class); - $this->expectExceptionMessage('Entity save failure. Found the following errors (name.regex: "識別名は半角英数字とアンダースコアのみで入力してください。")'); + $this->expectExceptionMessage('Entity save failure. Found the following errors (name.regex: "識別名は半角英数小文字とアンダースコアのみで入力してください。")'); $this->CustomTablesService->create($data); } @@ -363,7 +363,7 @@ public function test_update() //エラーする時をテスト $this->expectException(PersistenceFailedException::class); - $this->expectExceptionMessage('Entity save failure. Found the following errors (name.regex: "識別名は半角英数字とアンダースコアのみで入力してください。")'); + $this->expectExceptionMessage('Entity save failure. Found the following errors (name.regex: "識別名は半角英数小文字とアンダースコアのみで入力してください。")'); $this->CustomTablesService->update($this->CustomTablesService->get(1), ['name' => 'あああああ']); }