Move to tr

This commit is contained in:
Manav Rathi
2024-11-05 12:10:07 +05:30
parent 96b9b36c69
commit 5dcd4547d6
2 changed files with 18 additions and 14 deletions

View File

@@ -47,6 +47,7 @@
"close_key": "Close (Esc)",
"enter_file_name": "File name",
"close": "Close",
"yes": "Yes",
"no": "No",
"nothing_here": "Nothing here yet",
"upload": "Upload",
@@ -242,6 +243,12 @@
"ignore_person_confirm_message": "This face grouping will not be shown in the people list",
"ignored": "Ignored",
"show_person": "Show person",
"review_suggestions": "Review suggestions",
"saved_choices": "Saved choices",
"discard_changes": "Discard changes",
"discard_changes_confirm_message": "You have unsaved changes. These will be lost if you close without saving",
"people_suggestions_finding": "Finding similar faces...",
"people_suggestions_empty": "No more suggestions for now",
"INFO": "Info ",
"INFO_OPTION": "Info (I)",
"file_name": "File name",

View File

@@ -10,7 +10,6 @@ import {
type ModalVisibilityProps,
} from "@/base/components/utils/modal";
import { useIsSmallWidth } from "@/base/hooks";
import { pt } from "@/base/i18n";
import log from "@/base/log";
import {
addCGroup,
@@ -154,7 +153,7 @@ const CGroupPersonHeader: React.FC<CGroupPersonHeaderProps> = ({ person }) => {
centerAlign
onClick={showSuggestions}
>
{pt("Review suggestions")}
{t("review_suggestions")}
</OverflowMenuOption>
<OverflowMenuOption
startIcon={<EditIcon />}
@@ -432,7 +431,7 @@ const PersonButton: React.FC<PersonButtonProps> = ({
const AddPerson: React.FC<ButtonishProps> = ({ onClick }) => (
<ItemCard TileComponent={LargeTileButton} onClick={onClick}>
<LargeTileTextOverlay>{pt("New person")}</LargeTileTextOverlay>
<LargeTileTextOverlay>{t("new_person")}</LargeTileTextOverlay>
<LargeTilePlusOverlay>+</LargeTilePlusOverlay>
</ItemCard>
);
@@ -599,11 +598,9 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
const handleClose = () => {
if (hasUnsavedChanges) {
showMiniDialog({
message: pt(
"You have unsaved changes. These will be lost if you close without saving",
),
message: t("discard_changes_confirm_message"),
continue: {
text: pt("Discard changes"),
text: t("discard_changes"),
color: "critical",
action: resetPersonAndClose,
},
@@ -649,8 +646,8 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
<Stack sx={{ gap: "8px" }}>
<DialogTitle sx={{ "&&&": { p: 0 } }}>
{state.showChoices
? pt("Saved choices")
: pt("Review suggestions")}
? t("saved_choices")
: t("review_suggestions")}
</DialogTitle>
<Typography color="text.muted">
{person.name ?? " "}
@@ -662,8 +659,8 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
onClick={() => dispatch({ type: "toggleHistory" })}
aria-label={
!state.showChoices
? pt("Saved suggestions")
: pt("Review suggestions")
? t("saved_choices")
: t("review_suggestions")
}
sx={{
backgroundColor: state.showChoices
@@ -683,7 +680,7 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
{state.activity == "fetching" ? (
<CenteredBox>
<ActivityIndicator>
{pt("Finding similar faces...")}
{t("people_suggestions_finding")}
</ActivityIndicator>
</CenteredBox>
) : state.fetchFailed ? (
@@ -702,7 +699,7 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
color="text.muted"
sx={{ textAlign: "center" }}
>
{pt("No more suggestions for now")}
t{"people_suggestions_empty"}
</Typography>
</CenteredBox>
) : (
@@ -776,7 +773,7 @@ const SuggestionOrChoiceList: React.FC<SuggestionOrChoiceListProps> = ({
<ToggleButton value="no" aria-label={t("no")}>
<ClearIcon />
</ToggleButton>
<ToggleButton value="yes" aria-label={pt("Yes")}>
<ToggleButton value="yes" aria-label={t("yes")}>
<CheckIcon />
</ToggleButton>
</ToggleButtonGroup>