diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.json index a2e2724e03..16338eaccf 100644 --- a/web/packages/base/locales/en-US/translation.json +++ b/web/packages/base/locales/en-US/translation.json @@ -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", diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx index dfa83b543b..0ee68e77cb 100644 --- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx +++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx @@ -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 = ({ person }) => { centerAlign onClick={showSuggestions} > - {pt("Review suggestions")} + {t("review_suggestions")} } @@ -432,7 +431,7 @@ const PersonButton: React.FC = ({ const AddPerson: React.FC = ({ onClick }) => ( - {pt("New person")} + {t("new_person")} + ); @@ -599,11 +598,9 @@ const SuggestionsDialog: React.FC = ({ 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 = ({ {state.showChoices - ? pt("Saved choices") - : pt("Review suggestions")} + ? t("saved_choices") + : t("review_suggestions")} {person.name ?? " "} @@ -662,8 +659,8 @@ const SuggestionsDialog: React.FC = ({ 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 = ({ {state.activity == "fetching" ? ( - {pt("Finding similar faces...")} + {t("people_suggestions_finding")} ) : state.fetchFailed ? ( @@ -702,7 +699,7 @@ const SuggestionsDialog: React.FC = ({ color="text.muted" sx={{ textAlign: "center" }} > - {pt("No more suggestions for now")} + t{"people_suggestions_empty"} ) : ( @@ -776,7 +773,7 @@ const SuggestionOrChoiceList: React.FC = ({ - +