fix(18.1-06): keep reorder.flat in the localized list schema

- ListSchema.Localize copied only the reorder title and partition, so
  GET .../schema/list answered a flat reorder without flat: true
- closes the deferred item from plan 18.1-04; the README and the lists docs
  already describe the flag on the list schema
This commit is contained in:
Jakub Zych
2026-10-14 20:29:31 +02:00
parent 3cc4a5ff91
commit 0f09586ec0

View File

@@ -615,7 +615,7 @@ func (s *ListSchema) Localize(ctx context.Context, tr *phrasebook.Translator) (*
out.DefaultSort = &sort
}
if s.Reorder != nil {
reorder := ListReorder{Title: translateKey(ctx, tr, s.Reorder.Title)}
reorder := ListReorder{Title: translateKey(ctx, tr, s.Reorder.Title), Flat: s.Reorder.Flat}
if p := s.Reorder.Partition; p != nil {
reorder.Partition = &ListReorderPartition{Column: p.Column, Label: translateKey(ctx, tr, p.Label)}
}