[5.x]: Translations issue when disabling commerce plugin
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading how Craft configures Yii's translation categories and how the Utilities page loads messages when a plugin is disabled. The issue gives a reproduction and a custom module workaround, but does not name the relevant files or a test. Done means Utilities loads without the 'commerce' message source error when Commerce is disabled.
索引モデルが issue の本文から書いたものです。
説明
What happened?
Description
Hello,
I don't know if this is a Craft issue or a Commerce issue, but if you disable Commerce without uninstalling it, you are hit with a translations issue when browsing to Utilities.
Unable to locate message source for category 'commerce'.
Obviously commerce leaves behind commerce related translations that Craft is unable to resolve if the plugin is disabled. However, I was able to fix this, by adding some code into a custom module/plugin.
use yii\i18n\PhpMessageSource;
if (!Craft::$app->getPlugins()->isPluginEnabled('commerce')) {
if (!isset(Craft::$app->getI18n()->translations['commerce'])) {
Craft::$app->getI18n()->translations['commerce'] = [
'class' => PhpMessageSource::class,
'basePath' => '@app/translations',
'forceTranslation' => true,
];
}
}
Should a base 'commerce' translation be initialised in base Craft to cover for this, if commerce is disabled?
Craft CMS version
Craft Pro 5.11.5.1
PHP version
8.5
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- 主要言語
- PHP
- スター
- 3.6k
- フォーク
- 708
- 平均マージ
- 11時間 23分
- マージ済み PR(30日)
- 278
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
craftcms/cms のほかの issue
-
[5.x]: Passkeys registered with webauthn-lib v4 still fail with an uncaught InvalidUserHandleException (HTTP 500) after the #19530 fix対応中かも @i-just が 2 日前に担当しました。 オープンrepo:cms
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
craftcms/cms#20052 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[6.x]: Colored chips: link blue has low contrast on tinted backgrounds対応中かも @brandonkelly が 8 日前に担当しました。 オープンbug repo:cms
craftcms/cms#19984 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug repo:cms
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
craftcms/cms#19980 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[6.x]: Text in some input fields is clipped at the bottom on Windows対応中かも @brianjhanson が 13 日前に担当しました。 オープンbug repo:cms
craftcms/cms#19928 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug repo:cms
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
craftcms/cms#19916 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
needs-triage Technical TODO
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MISP/misp-docker#478 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
glpi-project/glpi#26045 ·
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信