[Function _n] What wrong?
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
調査の方向性
提供された _n() 呼び出しと Theme Check の翻訳警告から始め、checker が _n() の引数をどのように数え、text domain をどのように識別しているかを調べます。WooCommerce のスニペットで警告を再現し、WordPress の _n() リファレンスと比較します。checker が実際の text domain のみを報告し、downloads_remaining を text domain として扱わなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This code of Woocommerce Plugin:
echo apply_filters( 'woocommerce_available_download_count', '<span class="woocommerce-Count count">' . sprintf( _n( '%s download remaining', '%s downloads remaining', $download['downloads_remaining'], 'domain' ), $download['downloads_remaining'] ) . '</span> ', $download );
but Them check is warning:
WARNING: Found a translation function that has an incorrect number of arguments. Function _n, with the arguments '%s download remaining', '%s downloads remaining', downloads_remaining, 'domain'
I see code here:
https://developer.wordpress.org/reference/functions/_n/
And my text domain is domain:
Warning: More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs.
The domains found are domain, downloads_remaining
I only found downloads_remaining in echo apply_filters( 'woocommerce_available_download_count', '<span class="woocommerce-Count count">' . sprintf( _n( '%s download remaining', '%s downloads remaining', $download['downloads_remaining'], 'domain' ), $download['downloads_remaining'] ) . '</span> ', $download );
What wrong?
- 主要言語
- PHP
- スター
- 372
- フォーク
- 114
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WordPress/theme-check のほかの issue
-
Blocklisted file-extension patterns are unanchored, so ordinary filenames fail the check対応中かも @CookieDarb が 35 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
WordPress/theme-check#504 ·
-
Bug: "License" and "License URI" are missing from Theme Info summary when checking the active theme対応中かも @CookieDarb が 130 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
WordPress/theme-check#494 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WordPress/theme-check#492 · コメント 2 件 ·
-
Theme Check flags "wordpress" identifier as REQUIRED — false positive, do not "fix" by renaming対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
WordPress/theme-check#505 · リアクション 1 件 ·
-
Typescript Testsオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WordPress/theme-check#491 ·
WordPress/theme-check の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
backdrop-contrib/commerce#65 ·
-
backend enhancement good first issue php
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Evalogical-Inc/devReady#66 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mollie/PrestaShop#1627 ·
メンテナーはふだん 5 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
FriendsOfFlarum/follow-tags#118 ·