replace t` with msg` to fix labels not being translated correctly

This commit is contained in:
Athou
2024-08-03 12:59:51 +02:00
parent 6c7e2ea847
commit de80aa6bb3
13 changed files with 69 additions and 40 deletions

View File

@@ -1,4 +1,5 @@
import { Trans, t } from "@lingui/macro"
import { Trans, msg } from "@lingui/macro"
import { useLingui } from "@lingui/react"
import { TextInput } from "@mantine/core"
import { Spotlight, type SpotlightActionData, spotlight } from "@mantine/spotlight"
import { redirectToFeed } from "app/redirect/thunks"
@@ -14,6 +15,8 @@ export interface TreeSearchProps {
export function TreeSearch(props: TreeSearchProps) {
const dispatch = useAppDispatch()
const { _ } = useLingui()
const actions: SpotlightActionData[] = props.feeds
.map(f => ({
id: `${f.id}`,
@@ -31,7 +34,7 @@ export function TreeSearch(props: TreeSearchProps) {
return (
<>
<TextInput
placeholder={t`Search`}
placeholder={_(msg`Search`)}
leftSection={searchIcon}
rightSectionWidth={100}
styles={{
@@ -50,7 +53,7 @@ export function TreeSearch(props: TreeSearchProps) {
shortcut="mod+k"
searchProps={{
leftSection: searchIcon,
placeholder: t`Search`,
placeholder: _(msg`Search`),
}}
nothingFound={<Trans>Nothing found</Trans>}
/>