Skip to content

Commit

Permalink
improvement: add searchpage translations
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstadler committed Dec 2, 2024
1 parent 28371f6 commit aefc275
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
15 changes: 7 additions & 8 deletions app/[locale]/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function FilterMenu(props: { attribute: string }) {
const t = useTranslations("SearchPage");
return (
<>
<div className="text-right text-lg font-medium">
<div className="mt-4 text-right text-lg font-medium">
{
// TODO if count == 0, hide altogether
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -29,14 +29,13 @@ function FilterMenu(props: { attribute: string }) {
showMore: "text-sm pb-4 text-[--color-link]",
}}
showMore={true}
showMoreLimit={100}
showMoreLimit={50}
sortBy={["isRefined", "count", "name"]}
// TODO pass translations
// translations={{
// showMoreButtonText({ isShowingMore }) {
// return t(isShowingMore ? 'show less' : 'show more')
// },
// }}
translations={{
showMoreButtonText({ isShowingMore }) {
return t(isShowingMore ? "show less" : "show more");
},
}}
/>
</>
);
Expand Down
4 changes: 3 additions & 1 deletion messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@
"contains_translators_name": "Übersetzer:in",
"contains_work_category": "Kategorie",
"contains_work_short_title": "Werk",
"language": "Sprache"
"language": "Sprache",
"show less": "weniger anzeigen",
"show more": "mehr anzeigen"
},
"TranslatorsPage": {
"all languages": "alle Sprachen"
Expand Down
4 changes: 3 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@
"contains_translators_name": "translators",
"contains_work_category": "category",
"contains_work_short_title": "works",
"language": "languages"
"language": "languages",
"show less": "show less",
"show more": "show more"
},
"TranslatorsPage": {
"all languages": "all languages"
Expand Down

0 comments on commit aefc275

Please sign in to comment.