fix: add rtl compliance for symbols #366 (#406)

This commit is contained in:
Meier Lukas
2024-05-01 12:05:09 +02:00
committed by GitHub
parent efaf721b5a
commit 0278e3a854
5 changed files with 18 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ import {
import type { RouterOutputs } from "@homarr/api";
import { api } from "@homarr/api/server";
import { getScopedI18n } from "@homarr/translation/server";
import { getI18n, getScopedI18n } from "@homarr/translation/server";
import { SearchInput, UserAvatar } from "@homarr/ui";
import { AddGroupMember } from "./_add-group-member";
@@ -33,6 +33,7 @@ export default async function GroupsDetailPage({
params,
searchParams,
}: GroupsDetailPageProps) {
const t = await getI18n();
const tMembers = await getScopedI18n("management.page.group.setting.members");
const group = await api.group.getById({ id: params.id });
@@ -49,7 +50,10 @@ export default async function GroupsDetailPage({
<Title>{tMembers("title")}</Title>
<Group justify="space-between">
<SearchInput
placeholder={`${tMembers("search")}...`}
placeholder={t("common.rtl", {
value: tMembers("search"),
symbol: "...",
})}
defaultValue={searchParams.search}
/>
<AddGroupMember

View File

@@ -53,7 +53,10 @@ export default async function GroupsListPage(props: GroupsListPageProps) {
<Title>{t("group.title")}</Title>
<Group justify="space-between">
<SearchInput
placeholder={`${t("group.search")}...`}
placeholder={t("common.rtl", {
value: t("group.search"),
symbol: "...",
})}
defaultValue={searchParams.search}
/>
<AddGroup />

View File

@@ -100,7 +100,10 @@ export const Spotlight = () => {
store={spotlightStore}
>
<MantineSpotlight.Search
placeholder={t("common.search.placeholder")}
placeholder={t("common.rtl", {
value: t("common.search.placeholder"),
symbol: "...",
})}
leftSection={<IconSearch stroke={1.5} />}
/>

View File

@@ -144,6 +144,7 @@ export default {
},
},
common: {
rtl: "{value}{symbol}",
action: {
backToOverview: "Zurück zur Übersicht",
create: "Erstellen",
@@ -157,7 +158,7 @@ export default {
},
noResults: "Keine Ergebnisse gefunden",
search: {
placeholder: "Suche nach etwas...",
placeholder: "Suche nach etwas",
nothingFound: "Nichts gefunden",
},
},

View File

@@ -337,6 +337,7 @@ export default {
},
},
common: {
rtl: "{value}{symbol}",
action: {
add: "Add",
apply: "Apply",
@@ -383,7 +384,7 @@ export default {
},
},
search: {
placeholder: "Search for anything...",
placeholder: "Search for anything",
nothingFound: "Nothing found",
group: {
all: "All",