Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use i18n Keys (2) #4464

Merged
merged 8 commits into from
Nov 7, 2024
6 changes: 5 additions & 1 deletion frontend/src/components/modals/LoadingProject.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useTranslation } from "react-i18next";
import LoadingSpinnerOuter from "#/assets/loading-outer.svg?react";
import { cn } from "#/utils/utils";
import ModalBody from "./ModalBody";
import { I18nKey } from "#/i18n/declaration";

interface LoadingSpinnerProps {
size: "small" | "large";
Expand Down Expand Up @@ -28,10 +30,12 @@ interface LoadingProjectModalProps {
}

function LoadingProjectModal({ message }: LoadingProjectModalProps) {
const { t } = useTranslation();

return (
<ModalBody>
<span className="text-xl leading-6 -tracking-[0.01em] font-semibold">
{message || "Loading..."}
{message || "Loading..." || t(I18nKey.LOADING_PROJECT$LOADING)}
</span>
<LoadingSpinner size="large" />
</ModalBody>
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1510,5 +1510,9 @@
"ar": "ููŠ ุงู†ุชุธุงุฑ ุฌุงู‡ุฒูŠุฉ ุงู„ุนู…ูŠู„...",
"fr": "En attente que le client soit prรชt...",
"tr": "ฤฐstemcinin hazฤฑr olmasฤฑ bekleniyor..."
},
"LOADING_PROJECT$LOADING": {
"en": "Loading...",
"es": "Cargando..."
}
}