The WhatsApp conversation list shows the status "open" in English on every language

オープン 初心者向け
#262 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript, wordpress

調査の方向性

plugins/whatsapp/frontend/ConversationList.tsx を読み、plugins/importer/frontend/importFields.tsx にある既存の stateLabels() ヘルパーと比較してください。翻訳済みラベルを追加し、フォールバックには生の値を使ってから、issue に記載された ConversationList と locale のテストを実行してください。既知のステータスに翻訳済みラベルが表示され、未知のステータスも表示されたままで、スペイン語で「Open」が「Abierta」と解決されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug help wanted

What happens

Each row in the WhatsApp conversation list shows a status badge. On a Spanish admin the badge still reads "open", while the rest of the row is Spanish, such as "Ayer" for the time.

ConversationList puts the stored value straight into the badge: <Badge>{conversation.status}</Badge>. The server stores the word open for every new conversation. That word is data, so it never passes through __(). It never reaches the plugin's .pot and no translator can see it. The Spanish catalogue only holds the hidden "status" label next to the badge.

WordPress never prints a stored status slug. The Posts screen marks a draft with the label from get_post_states(), so a Spanish site reads "Borrador", not "draft".

What should happen

The badge shows a translated label for each status the server stores. A Spanish admin reads "Abierta". A status the frontend does not know yet still shows its raw value, so the badge never goes blank.

The importer already does this. stateLabels() in plugins/importer/frontend/importFields.tsx maps each stored state to an _x() label, read fresh so the loaded catalogue answers, and falls back to the raw value.

Where

  • plugins/whatsapp/frontend/ConversationList.tsx, the <Badge> in the .alphone-conversation__bottom row
  • a new statusLabels() helper there, with _x('Open', 'conversation status', 'alphone-whatsapp')
  • plugins/whatsapp/languages/alphone-whatsapp.pot, plugins/whatsapp/languages/es-ES.po and plugins/whatsapp/frontend/languages/es-ES.json, refreshed with make translations
  • plugins/whatsapp/frontend/test/ConversationList.test.tsx, a test that the badge reads "Open" and one that an unknown status shows its raw value
  • plugins/whatsapp/frontend/test/locale.test.ts, a test that the Spanish catalogue answers "Abierta" for conversation status\u0004Open, like plugins/importer/frontend/test/declarations.test.ts
主要言語
Go
スター
287
フォーク
64
平均マージ
13時間 36分
マージ済み PR(30日)
64

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

gopherium/AlphOne のほかの issue

gopherium/AlphOne の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。