From 58544fc66a135bf54ce781d19ecbf8caf18607df Mon Sep 17 00:00:00 2001 From: fumikito Date: Mon, 29 Dec 2025 23:12:20 +0900 Subject: [PATCH 1/7] =?UTF-8?q?CLAUDE.md=E3=82=92=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md => .claude/CLAUDE.md | 0 package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename CLAUDE.md => .claude/CLAUDE.md (100%) diff --git a/CLAUDE.md b/.claude/CLAUDE.md similarity index 100% rename from CLAUDE.md rename to .claude/CLAUDE.md diff --git a/package.json b/package.json index e3e2839..0800a6d 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "homepage": "https://github.com/hametuha/sharee#readme", "devDependencies": { "@kunoichi/grab-deps": "^3.0.0", - "@wordpress/env": "^10.0.0", + "@wordpress/env": "^10.37.0", "@wordpress/scripts": "^30.0.0", "npm-watch": "^0.13.0", "postcss": "^8.5.0", From b144cc7c2d786b429cd257695c4029d3c44a80db Mon Sep 17 00:00:00 2001 From: fumikito Date: Mon, 29 Dec 2025 23:25:48 +0900 Subject: [PATCH 2/7] Fix billing list script handle name mismatch #13 Co-authored-by: Claude --- .claude/settings.json | 9 +++++++++ app/Hametuha/Sharee/Screen/BillingList.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..4a84ec5 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "mcp__chrome-devtools__list_console_messages" + ], + "deny": [], + "ask": [] + } +} diff --git a/app/Hametuha/Sharee/Screen/BillingList.php b/app/Hametuha/Sharee/Screen/BillingList.php index 9380585..76d57db 100644 --- a/app/Hametuha/Sharee/Screen/BillingList.php +++ b/app/Hametuha/Sharee/Screen/BillingList.php @@ -49,9 +49,9 @@ public function admin_enqueue_script( $page ) { if ( 'users_page_user-billing' !== $page ) { return; } - wp_enqueue_script( 'sharee-billing-helper' ); + wp_enqueue_script( 'sharee-billing-list-helper' ); wp_localize_script( - 'sharee-billing-helper', + 'sharee-billing-list-helper', 'ShareeBilling', [ 'endpoint' => admin_url( 'admin-ajax.php' ), From 7816fa99fea6ed2292f7bbca63c85c13fccf2b00 Mon Sep 17 00:00:00 2001 From: fumikito Date: Tue, 30 Dec 2025 00:24:38 +0900 Subject: [PATCH 3/7] Update Japanese translations Co-authored-by: Claude --- languages/sharee-ja.mo | Bin 6686 -> 7058 bytes languages/sharee-ja.po | 73 ++++++++++++++++++++++------------------- languages/sharee.pot | 58 ++++++++++++++++++-------------- 3 files changed, 73 insertions(+), 58 deletions(-) diff --git a/languages/sharee-ja.mo b/languages/sharee-ja.mo index a066ef0111682ba3782b5cee93e240fe8aa1bc22..467a73a45b921973241804d0506ecd1596866008 100644 GIT binary patch delta 1871 zcmbu;>u-}~7{~FuWoNcIE8AcStFUEAWLw!3nTrI$Fyl}T^N`?yx|X$uF>E_UF*d9L z5lJwsMq@mTxPVSG)Q2=i#*BwWL4Bhpynz|=Y^z`*;RVJQ;{5*PUi<@G)_(5ueO=e{ z^zG*U<;ihh&Z~yMhxy#V=P$2%#+=Fh&tjTq>CeRrsQ#=xV@k0M)vv~UycvtI+4fi3 z`L$Tcc!%{-ywjMZiO{HE;sewHU*dIm3TNZE^#T^q{{u^K8nwQJuN*8#T~LJzsKy#V zC3c7HZ$blS=7OMQJKAhx8u9G9DhL-rIILg!F;?Hm*6efiu{`xU)SI+ z4B$(+7*F6LoI;&bM6@~FZ^~$Jwkby)G#{_WO-Pca2bIB7$X=7S^KarT`k$gQ8nOLv zu!;V6*pAbv3)@+wz&D}-d<>Hh(dePU8uKlxls{Teqc)sD1$f@}FX4^!|3(Gir+mt+ z23KMmDuI2-Gd6>`0JFFR^EgzA1d6G@k46gvavhf87SyA7615?TRXBtTaSZj&{A!&> zJ&Fo8>D^guZAGnHkCoVk3NVRE`12C#-%biA8BjzOoN^adBWIehHD*ns9?1bzhH2YB zYUeYk(td@y;3w?Fvsj0#$Wr4`)Vg@mHd1yXjk@?PRLO==B|eF|_y;@xGb(^{sGsE( zT#6N>uY=cEJFForXFOruZ%q!+*vLc%*J9zEs}XKM9lRNvv=LRA_w4-dsEhu@)mXsk z_1KPDzY7)cQELYE4xPY9a11;2`(MNZ(m^}175AYwj-e{>J*on~q27gys0vl_Kv!TL z_F@pV@3eIsRq9E69xvMQ?PR5Oy{PxkJV%3I%!{bs{X0lC%`hsHFHi?vMm@u6ya(&% zT@5gf8|e3A4Njl}E#!?=pv|ZYS6SPv_o0vb%>y)QF^U9f4x--jBS^C56skh!P?flZ zI{303_wpiW-iNwqA#TB&P$l1wrZ(h{g*$sMglOqQwM&8H{j%EjrO&#Aeb!^l* zrl_U~zZ%u$wyUrbgVp4BwLjAD`dzVRraX_T{~9>NPj@zT5Ya V+c)T@9Otu2=YQmo-Zt-(e*ns)8;1Y@ delta 1484 zcmYMzTS!z<6vpvAlR9}HFJs;@Dzcy=Oa>_mEU`$6N<*oEqKN2nGJ6V(QbNMAFhU{??Em40h8cc)?Q_oBYp*@0-ruw?^f584(eT;J zFO%P(Tahu<;r~r#7$lCt8yJVJHts?XaUVwEfQ{eU>mwM+{1@v_EF_-A6k|eWW5j%d zGECw^0Hd+e8pMUfmoOIVQ42O>7`CAnc!VnOsr3bFL&G-yfhuqo`I-olM6upB3muPGvl3fYMv4N4j4 zfeK_Z=7^0?p%y-e+DQmEVJoVzGU!)z?%+*aa2)CTG>5gV;-=q2t&9p#|dbRgC&y3=kK5~$AqFbo z59&4Z(XUmw8kKmz^@Oz=eazQcTW~jV4;EuI?NVWTQ27FwhgGPKw4<(1q4I}j7;I(` zmCT~J1M@J5s6Q0KjJAae|*L|l^iK>vC<^t;Vy@fQvw4t8wMIBW?ZpZJa!U|~1E-c5T zdjH!QsKOys;u+LJp0s)6tUlBNnYawsAURDLsuL$sI}W1q)Y$o})+SWm$9Mp{(WBQb zg}=Tt5q{6*T=&$vob1R^my;9yz~#)vq`4cW;u0EG#235royz!!Tu3\n" "Language-Team: Hametuha INC. \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-02-12 08:48+0900\n" -"PO-Revision-Date: 2025-02-12 08:48+0900\n" -"Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.5\n" +"X-Generator: Poedit 3.8\n" "X-Poedit-Basepath: ..\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" @@ -39,89 +39,89 @@ msgstr "支払い" msgid "This is your billing information. To get rewarded, please fill up all forms." msgstr "これはあなたの支払い情報です。報酬を受け取れるようフォームに入力してください。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:84 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:82 msgid "Sorry, but no result found." msgstr "申し訳ございません、該当する情報は見つかりませんでした。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:85 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:83 msgid "Bank is not specified." msgstr "銀行が指定されていません。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:136 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:134 #: app/Hametuha/Sharee/Table/BillingListTable.php:62 msgid "Bank Account" msgstr "銀行口座" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:137 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:135 msgid "Bank account is required to be rewarded. Only available for Japan." msgstr "銀行口座は報酬を受け取るために必要です。日本国内のみ利用できます。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:138 -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:236 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:136 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:234 msgid "Save" msgstr "保存" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:165 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:163 msgid "Type and search your bank. Bank code will be automatically input if you found your bank." msgstr "入力して銀行を検索してください。銀行を見つけたのち、銀行コードは自動で入力されます。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:181 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:179 msgid "Once you select a bank, you can search it's branches." msgstr "銀行を選択すると支店を検索することができます。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:193 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:191 #: app/Hametuha/Sharee/Master/Account.php:85 msgctxt "bank_type" msgid "Saving" msgstr "普通" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:194 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:192 #: app/Hametuha/Sharee/Master/Account.php:79 msgctxt "bank_type" msgid "Checking" msgstr "当座" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:195 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:193 #: app/Hametuha/Sharee/Master/Account.php:82 msgctxt "bank_type" msgid "Deposite" msgstr "貯蓄" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:207 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:205 #: app/Hametuha/Sharee/Master/Account.php:60 msgid "Account Name" msgstr "口座名義" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:208 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:206 msgid "Please write your name in Katakana." msgstr "カタカナで名義を記入してください。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:234 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:232 msgid "Billing Information" msgstr "支払い情報" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:235 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:233 msgid "This information is required to send reward to you." msgstr "この情報は支払いを送るために必要です。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:253 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:251 msgid "e.g. John Doe" msgstr "例・山田太郎" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:262 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:260 msgctxt "tax-number-detail" msgid "If you have a valid tax number, please input." msgstr "インボイス制度に対応した登録番号をお持ちの方は入力してください。" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:265 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:263 msgid "e.g. Minami Aoyama 2-11-13, Minatoku Tokyo" msgstr "例・東京都港区南青山2-11-13" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:270 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:268 msgid "e.g. Minami Aoyama Bld. 4F" msgstr "例・南青山ビル4F" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:285 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:283 msgid "Enter address from zip code." msgstr "郵便番号から住所を入力します。" @@ -383,46 +383,53 @@ msgstr "削除済み" msgid "All Status" msgstr "すべてのステータス" -#: app/Hametuha/Sharee/Utilities/TableHelper.php:58 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:57 msgid "Every Year" msgstr "すべての年" #. translators: %04d is year. -#: app/Hametuha/Sharee/Utilities/TableHelper.php:64 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:63 #, php-format msgctxt "year" msgid "%04d" msgstr "%04d年" -#: app/Hametuha/Sharee/Utilities/TableHelper.php:72 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:71 msgid "Every Months" msgstr "すべての月" -#: app/Hametuha/Sharee/Utilities/TableHelper.php:80 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:79 msgid "Filter" msgstr "フィルター" #. Plugin Name of the plugin #: sharee.php msgid "Sharēe" -msgstr "" +msgstr "Sharēe" #. Plugin URI of the plugin #: sharee.php msgid "https://github.com/hametuha/sharee" -msgstr "" +msgstr "https://github.com/hametuha/sharee" #. Description of the plugin #: sharee.php msgid "User reward manager for WordPress" -msgstr "" +msgstr "WordPressのユーザー報酬管理プラグイン" #. Author of the plugin #: sharee.php msgid "Hametuha INC." -msgstr "" +msgstr "株式会社破滅派" #. Author URI of the plugin #: sharee.php msgid "https://hametuha.co.jp" -msgstr "" +msgstr "https://hametuha.co.jp" + +#. translators: %s indicates amount of records, %d is number of records. +#: app/Hametuha/Sharee/Screen/BillingList.php:103 +#, php-format +msgid "%d record is" +msgid_plural "%d records are" +msgstr[0] "%d件が" diff --git a/languages/sharee.pot b/languages/sharee.pot index 3c0e936..398176c 100644 --- a/languages/sharee.pot +++ b/languages/sharee.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-12-02T13:17:20+00:00\n" +"POT-Creation-Date: 2025-12-29T15:16:28+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.12.0\n" "X-Domain: sharee\n" @@ -57,89 +57,89 @@ msgstr "" msgid "This is your billing information. To get rewarded, please fill up all forms." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:84 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:82 msgid "Sorry, but no result found." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:85 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:83 msgid "Bank is not specified." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:136 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:134 #: app/Hametuha/Sharee/Table/BillingListTable.php:62 msgid "Bank Account" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:137 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:135 msgid "Bank account is required to be rewarded. Only available for Japan." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:138 -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:236 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:136 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:234 msgid "Save" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:165 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:163 msgid "Type and search your bank. Bank code will be automatically input if you found your bank." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:181 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:179 msgid "Once you select a bank, you can search it's branches." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:193 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:191 #: app/Hametuha/Sharee/Master/Account.php:85 msgctxt "bank_type" msgid "Saving" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:194 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:192 #: app/Hametuha/Sharee/Master/Account.php:79 msgctxt "bank_type" msgid "Checking" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:195 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:193 #: app/Hametuha/Sharee/Master/Account.php:82 msgctxt "bank_type" msgid "Deposite" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:207 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:205 #: app/Hametuha/Sharee/Master/Account.php:60 msgid "Account Name" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:208 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:206 msgid "Please write your name in Katakana." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:234 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:232 msgid "Billing Information" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:235 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:233 msgid "This information is required to send reward to you." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:253 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:251 msgid "e.g. John Doe" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:262 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:260 msgctxt "tax-number-detail" msgid "If you have a valid tax number, please input." msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:265 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:263 msgid "e.g. Minami Aoyama 2-11-13, Minatoku Tokyo" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:270 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:268 msgid "e.g. Minami Aoyama Bld. 4F" msgstr "" -#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:285 +#: app/Hametuha/Sharee/Hooks/HbAccountScreen.php:283 msgid "Enter address from zip code." msgstr "" @@ -278,6 +278,14 @@ msgstr "" msgid "%s fixed. Reload window." msgstr "" +#. translators: %s indicates amount of records, %d is number of records. +#: app/Hametuha/Sharee/Screen/BillingList.php:103 +#, php-format +msgid "%d record is" +msgid_plural "%d records are" +msgstr[0] "" +msgstr[1] "" + #. translators: %1$s is year, %2$s is month. #: app/Hametuha/Sharee/Screen/BillingList.php:133 #, php-format @@ -401,21 +409,21 @@ msgstr "" msgid "All Status" msgstr "" -#: app/Hametuha/Sharee/Utilities/TableHelper.php:58 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:57 msgid "Every Year" msgstr "" #. translators: %04d is year. -#: app/Hametuha/Sharee/Utilities/TableHelper.php:64 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:63 #, php-format msgctxt "year" msgid "%04d" msgstr "" -#: app/Hametuha/Sharee/Utilities/TableHelper.php:72 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:71 msgid "Every Months" msgstr "" -#: app/Hametuha/Sharee/Utilities/TableHelper.php:80 +#: app/Hametuha/Sharee/Utilities/TableHelper.php:79 msgid "Filter" msgstr "" From 30f9c2b514da593732c76d744c2f613750b8b25d Mon Sep 17 00:00:00 2001 From: fumikito Date: Tue, 30 Dec 2025 00:51:14 +0900 Subject: [PATCH 4/7] Fix admin style handle name to be recognized by build tool #13 Co-authored-by: Claude --- assets/css/admin.css | 8 ++++++-- assets/css/admin.css.map | 2 +- src/scss/admin.scss | 2 +- wp-dependencies.json | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 39efc90..5b4a053 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1,3 +1,7 @@ -.label-default{color:#d3d3d3}.label-warning{color:orange}.label-success{color:green}.sharee-summary-table{margin:20px 0;font-size:12px;border-collapse:collapse}.sharee-summary-table th,.sharee-summary-table td{padding:.5em;border:1px solid #ddd}.sharee-summary-table .number{text-align:right}.sharee-summary-table caption{text-align:left}th.column-deducting,th.column-vat,th.column-tax,th.column-total,td.column-deducting,td.column-vat,td.column-tax,td.column-total{text-align:right} +/*! + * Admin style + * + * @handle sharee-admin-style + */.label-default{color:#d3d3d3}.label-warning{color:orange}.label-success{color:green}.sharee-summary-table{margin:20px 0;font-size:12px;border-collapse:collapse}.sharee-summary-table th,.sharee-summary-table td{padding:.5em;border:1px solid #ddd}.sharee-summary-table .number{text-align:right}.sharee-summary-table caption{text-align:left}th.column-deducting,th.column-vat,th.column-tax,th.column-total,td.column-deducting,td.column-vat,td.column-tax,td.column-total{text-align:right} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY3NzL2FkbWluLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0EsZUFDRSxjQUdGLGVBQ0UsYUFHRixlQUNFLFlBSUYsc0JBQ0UsY0FDQSxlQUNBLHlCQUVBLGtEQUNFLGFBQ0Esc0JBR0YsOEJBQ0UsaUJBR0YsOEJBQ0UsZ0JBTUYsZ0lBSUUiLCJmaWxlIjoiYWRtaW4uY3NzIiwic291cmNlUm9vdCI6IiJ9 */ \ No newline at end of file +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY3NzL2FkbWluLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSxHQUtBLGVBQ0UsY0FHRixlQUNFLGFBR0YsZUFDRSxZQUlGLHNCQUNFLGNBQ0EsZUFDQSx5QkFFQSxrREFDRSxhQUNBLHNCQUdGLDhCQUNFLGlCQUdGLDhCQUNFLGdCQU1GLGdJQUlFIiwiZmlsZSI6ImFkbWluLmNzcyIsInNvdXJjZVJvb3QiOiIifQ== */ \ No newline at end of file diff --git a/assets/css/admin.css.map b/assets/css/admin.css.map index db0e5d5..c92607e 100644 --- a/assets/css/admin.css.map +++ b/assets/css/admin.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../src/scss/admin.scss"],"names":[],"mappings":"AAKA,eACE,cAGF,eACE,aAGF,eACE,YAIF,sBACE,cACA,eACA,yBAEA,kDACE,aACA,sBAGF,8BACE,iBAGF,8BACE,gBAMF,gIAIE","file":"admin.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../src/scss/admin.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA,GAKA,eACE,cAGF,eACE,aAGF,eACE,YAIF,sBACE,cACA,eACA,yBAEA,kDACE,aACA,sBAGF,8BACE,iBAGF,8BACE,gBAMF,gIAIE","file":"admin.css"} \ No newline at end of file diff --git a/src/scss/admin.scss b/src/scss/admin.scss index 4d16077..76a8ba4 100644 --- a/src/scss/admin.scss +++ b/src/scss/admin.scss @@ -1,4 +1,4 @@ -/** +/*! * Admin style * * @handle sharee-admin-style diff --git a/wp-dependencies.json b/wp-dependencies.json index 1cd1706..eb41ea8 100644 --- a/wp-dependencies.json +++ b/wp-dependencies.json @@ -49,7 +49,7 @@ "handle": "sharee-bank-helper", "path": "assets/js/bank-helper.js", "ext": "js", - "hash": "3f195a9eb46a6e12455e87edf9238ade", + "hash": "92c91228ecf4a59902e661491efa629e", "version": "0.0.0", "deps": [ "jquery", @@ -60,10 +60,10 @@ "strategy": "" }, { - "handle": "admin", + "handle": "sharee-admin-style", "path": "assets/css/admin.css", "ext": "css", - "hash": "8baf5c522ad5fb686a1c5d6edf478dfd", + "hash": "eecf00f96856725d6dfc03014008ca32", "version": "0.0.0", "deps": [], "footer": true, From 1e216a4cc1880d053bf1df72bd3c9a8c79bc722d Mon Sep 17 00:00:00 2001 From: fumikito Date: Tue, 30 Dec 2025 00:54:38 +0900 Subject: [PATCH 5/7] Add translate command for AI-assisted translation workflow Co-authored-by: Claude --- .claude/commands/translate.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .claude/commands/translate.md diff --git a/.claude/commands/translate.md b/.claude/commands/translate.md new file mode 100644 index 0000000..12abb13 --- /dev/null +++ b/.claude/commands/translate.md @@ -0,0 +1,25 @@ +# 翻訳ファイル更新コマンド + +このコマンドはWordPressプラグインの翻訳ファイルを更新・翻訳・コンパイルします。 + +## 作業手順 + +1. `composer i18n:update` を実行してpot/poファイルを生成・更新する +2. `languages/sharee-ja.po`を読み込む +3. 未翻訳のエントリ(`msgstr ""`が空のもの)を見つける +4. 各エントリを日本語に翻訳してファイルを更新する +5. `composer i18n:compile` を実行してmo/jsonにコンパイルする + +## 翻訳のルール + +- WordPressプラグインの管理画面で使われる文字列です +- 技術用語は適切な日本語に訳してください +- プレースホルダー(%s, %d, %1$s など)はそのまま維持してください +- HTMLタグがある場合はそのまま維持してください +- 簡潔で分かりやすい日本語を心がけてください + +## 実行 + +上記の手順に従って翻訳作業を行い、完了したら変更内容のサマリーを報告してください。 + +$ARGUMENTS \ No newline at end of file From e59693a60e5bb9679f6b6a4fd3a849533474d94e Mon Sep 17 00:00:00 2001 From: fumikito Date: Tue, 30 Dec 2025 00:55:50 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=E7=BF=BB=E8=A8=B3=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E5=BE=AE=E8=AA=BF=E6=95=B4=E3=80=81WordPress=E3=82=92?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BE=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.json | 17 ++++++++++------- app/Hametuha/Sharee/Screen/BillingList.php | 2 +- composer.json | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 4a84ec5..fcedc7d 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,9 +1,12 @@ { - "permissions": { - "allow": [ - "mcp__chrome-devtools__list_console_messages" - ], - "deny": [], - "ask": [] - } + "permissions": { + "allow": [ + "Bash(volta run npm start:*)", + "mcp__chrome-devtools__list_console_messages", + "Bash(composer i18n:update:*)", + "Bash(composer i18n:compile:*)" + ], + "deny": [], + "ask": [] + } } diff --git a/app/Hametuha/Sharee/Screen/BillingList.php b/app/Hametuha/Sharee/Screen/BillingList.php index 76d57db..4bca48c 100644 --- a/app/Hametuha/Sharee/Screen/BillingList.php +++ b/app/Hametuha/Sharee/Screen/BillingList.php @@ -100,7 +100,7 @@ function ( $key ) { [ 'success' => true, // translators: %s indicates amount of records, %d is number of records. - 'message' => sprintf( __( '%s fixed. Reload window.', 'sharee' ), sprintf( _n( '%d record is', '%d records are', $done ), $done ) ), + 'message' => sprintf( __( '%s fixed. Reload window.', 'sharee' ), sprintf( _n( '%d record is', '%d records are', $done, 'sharee' ), $done ) ), ] ); } catch ( \Exception $e ) { diff --git a/composer.json b/composer.json index c282e1b..d13722b 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "test": "phpunit", "lint": "phpcs --standard=phpcs.ruleset.xml $(find ./app -name '*.php')", "fix": "phpcbf --standard=phpcs.ruleset.xml $(find ./app -name '*.php')", - "i18n:pot": "vendor/bin/wp i18n make-pot ./ languages/sharee.pot --exclude=src --domain=sharee", + "i18n:pot": "vendor/bin/wp i18n make-pot ./ languages/sharee.pot --exclude=src,wordpress --domain=sharee", "i18n:po": "vendor/bin/wp i18n update-po languages/sharee.pot languages", "i18n:mo": "vendor/bin/wp i18n make-mo languages", "i18n:json": "vendor/bin/wp i18n make-json languages languages --no-purge", From df15cb41b1336c0bcb72a2e22be900bef9d1afdd Mon Sep 17 00:00:00 2001 From: fumikito Date: Tue, 30 Dec 2025 02:50:51 +0900 Subject: [PATCH 7/7] Improve release workflow and unify build ignore list - Add .distignore as single source of truth for excluded files - Update build.sh to read from .distignore - Add composer install to release workflow for vendor dependencies - Add /generate-gitattributes command to generate .gitattributes from .distignore Co-authored-by: Claude --- .claude/commands/generate-gitattributes.md | 18 +++++++++ .distignore | 28 ++++++++++++++ .gitattributes | 15 ++++++-- .github/workflows/release.yml | 9 +++++ bin/build.sh | 45 +++++++++++----------- 5 files changed, 90 insertions(+), 25 deletions(-) create mode 100644 .claude/commands/generate-gitattributes.md create mode 100644 .distignore diff --git a/.claude/commands/generate-gitattributes.md b/.claude/commands/generate-gitattributes.md new file mode 100644 index 0000000..3613ec5 --- /dev/null +++ b/.claude/commands/generate-gitattributes.md @@ -0,0 +1,18 @@ +# .gitattributes 生成コマンド + +`.distignore`ファイルから`.gitattributes`を生成します。 + +## 処理内容 + +1. `.distignore`ファイルを読み込む +2. コメント行(#で始まる)と空行を除外 +3. 各行の末尾に` export-ignore`を追加 +4. Composer(Packagist)専用の除外項目を追加: + - `sharee.php`(プラグインのメインファイルはComposerでは不要) +5. `.gitattributes`ファイルに書き出す + +## 実行 + +上記の手順に従って`.gitattributes`を生成し、差分があれば報告してください。 + +$ARGUMENTS diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..02acd2e --- /dev/null +++ b/.distignore @@ -0,0 +1,28 @@ +# Development directories +.git/ +.github/ +.claude/ +bin/ +tests/ +node_modules/ +src/ +wp/ +wordpress/ + +# Development files +.browserslistrc +.editorconfig +.eslintrc +.stylelintrc.json +.gitattributes +.gitignore +.wp-env.json +.phpunit.result.cache +.distignore +CLAUDE.md +composer.lock +gulpfile.js +package.json +package-lock.json +phpunit.xml +phpcs.ruleset.xml diff --git a/.gitattributes b/.gitattributes index e69c6f4..932a178 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,26 @@ -tests/ export-ignore +.git/ export-ignore +.github/ export-ignore +.claude/ export-ignore bin/ export-ignore +tests/ export-ignore node_modules/ export-ignore +src/ export-ignore +wp/ export-ignore +wordpress/ export-ignore .browserslistrc export-ignore .editorconfig export-ignore .eslintrc export-ignore .stylelintrc.json export-ignore -.github/ export-ignore .gitattributes export-ignore .gitignore export-ignore .wp-env.json export-ignore +.phpunit.result.cache export-ignore +.distignore export-ignore CLAUDE.md export-ignore composer.lock export-ignore -sharee.php export-ignore gulpfile.js export-ignore +package.json export-ignore +package-lock.json export-ignore phpunit.xml export-ignore phpcs.ruleset.xml export-ignore +sharee.php export-ignore diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a7eed5..6eff966 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer + + - name: Install dependencies + run: composer install --no-dev --prefer-dist --no-interaction + - name: Build package run: bash bin/build.sh diff --git a/bin/build.sh b/bin/build.sh index e918e18..a0428d5 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -2,25 +2,26 @@ set -e -# Remove development files from release -rm -rf ./.git -rm -rf ./.github -rm -rf ./.claude -rm -rf ./bin -rm -rf ./tests -rm -rf ./vendor -rm -rf ./wp -rm -rf ./node_modules -rm -rf ./src -rm -f ./.gitattributes -rm -f ./.gitignore -rm -f ./.wp-env.json -rm -f ./.eslintrc -rm -f ./.stylelintrc.json -rm -f ./.phpunit.result.cache -rm -f ./composer.lock -rm -f ./package.json -rm -f ./package-lock.json -rm -f ./phpunit.xml -rm -f ./phpcs.ruleset.xml -rm -f ./CLAUDE.md \ No newline at end of file +# Remove development files from release based on .distignore +if [ ! -f .distignore ]; then + echo "Error: .distignore file not found" + exit 1 +fi + +# Read .distignore into array first (to avoid issues when deleting the file itself) +targets=() +while IFS= read -r line || [ -n "$line" ]; do + # Skip comments and empty lines + [[ "$line" =~ ^#.*$ ]] && continue + [[ -z "$line" ]] && continue + # Remove trailing slash for consistency + targets+=("${line%/}") +done < .distignore + +# Remove each entry +for target in "${targets[@]}"; do + if [ -e "$target" ]; then + rm -rf "$target" + echo "Removed: $target" + fi +done