Skip to content

Fix bootstrap theme search top sort options to match the JSP search UI#3151

Merged
marevol merged 1 commit into
masterfrom
fix/searchtop-sort-labels
Jun 17, 2026
Merged

Fix bootstrap theme search top sort options to match the JSP search UI#3151
marevol merged 1 commit into
masterfrom
fix/searchtop-sort-labels

Conversation

@marevol

@marevol marevol commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

The bootstrap theme's search top Sort dropdown diverged from the classic JSP search UI in two ways. This PR brings it back in line.

1. Duplicate "Score" option

The sort_options list built by UiConfigHandler (/api/v2/ui/config) starts with an empty-value entry labelled Score, followed by the real score.desc entry. renderSortOptions() in search.js rendered the list as-is, so:

  • Score appeared twice, and
  • there was no leading - Sort - placeholder.

renderSortOptions() now drops the leading empty-value entry and prepends a single empty-value placeholder (labels.advance_search_sort_default), mirroring the existing logic in advance.js and searchOptions.jsp.

2. Japanese sort labels out of sync

The Japanese asc/desc labels were missing the parentheses used by the JSP labels and every other locale (e.g. ファイル名昇順 instead of ファイル名 (昇順)) and used different wording for the created / last-modified fields. messages.ja.json is now aligned with fess_label_ja.properties. Other locales already matched and are unchanged.

Changes

  • src/main/webapp/themes/bootstrap/assets/search.jsrenderSortOptions() placeholder + de-duplication
  • src/main/webapp/themes/bootstrap/i18n/messages.ja.json — Japanese sort labels aligned with the JSP theme

Before / After (ja)

Before After
スコア順 (×2, no placeholder) - ソート - / スコア順
ファイル名昇順 ファイル名 (昇順)
作成日時昇順 日付 (昇順)
更新日時昇順 最終更新日時 (昇順)

The bootstrap theme's search top "Sort" dropdown diverged from the classic
JSP search UI:

- "Score" appeared twice. The sort_options list from /api/v2/ui/config starts
  with an empty-value entry labelled "Score", so rendering it as-is produced a
  duplicate Score option with no "- Sort -" placeholder. renderSortOptions()
  now drops the leading empty-value entry and prepends a single empty-value
  placeholder (labels.advance_search_sort_default), matching advance.js and
  searchOptions.jsp.

- Japanese sort labels were out of sync. The asc/desc labels lacked the
  parentheses used by the JSP labels and the other locales (e.g. "ファイル名昇順"
  instead of "ファイル名 (昇順)") and used different wording for created /
  last_modified. Aligned messages.ja.json with fess_label_ja.properties.
@marevol marevol self-assigned this Jun 17, 2026
@marevol marevol added the task label Jun 17, 2026
@marevol marevol added this to the 15.7.0 milestone Jun 17, 2026
@marevol marevol merged commit 15af57b into master Jun 17, 2026
1 check passed
@marevol marevol deleted the fix/searchtop-sort-labels branch June 18, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant