Fallback and locale=all reads of a list with q search again in each other locale

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

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

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

評価

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

調査の方向性

src/FluentCMS.Core/Localization/LocaleFallbackReader.csの170~180行目あたりから始め、最初の読み取りでどのようにidsが選択され、他のlocaleの読み取りでどのようにクエリが適用されるかを追ってください。選択されたidsを保持したまま、それらの他のlocaleの読み取りから検索語を消してください。qを指定したfallbackとlocale=allの読み取りのテストを追加してください。テキストが一致しないlocaleも含め、両方の受け入れケースが通れば完了です。

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

説明

area:localization plugin type:bug

Problem

LocaleFallbackReader.ReadAsync (src/FluentCMS.Core/Localization/LocaleFallbackReader.cs, around lines 170-180) reads the other locales of a page with query with { Filter, Sort, Page, Cursor, Select, Populate, Locale, Fallback }, and keeps query.Search. So every fallback or locale=all read of a list with q asks the search index again in each other locale, once per batch, although the ids are already chosen.

  • ?q=merger&locale=de with a de → en fallback, where the entry's en text lacks "merger": the empty de fields are not filled from en.
  • Under locale=all, the locales whose text lacks the word are missing from the entry's map.
  • Each such read is cut at MaxSearchResults again, outside the searchTruncated flag of #3302.

Proposal

Drop the search (Search = null) from the reads of the other locales, since the ids are already chosen by the first read.

Acceptance

  • A fallback read of a list with q fills the fields from the fallback locale whether or not its text matches
  • A locale=all read of a list with q returns every locale of each entry it lists
  • Tests for each

Found in the review of #3468. Bundle 12, with #3376.

主要言語
C#
スター
567
フォーク
107
平均マージ
1時間 19分
マージ済み PR(30日)
353

環境構築

はじめの一歩

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

fluentcms/FluentCMS のほかの issue

fluentcms/FluentCMS の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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