From c9eaa2df1297ab7e6b545b999a811d5addbb4c4e Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 29 Jun 2024 08:03:36 +0530 Subject: [PATCH 1/4] Fix --- .../components/Collections/CollectionShare/emailShare/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/apps/photos/src/components/Collections/CollectionShare/emailShare/index.tsx b/web/apps/photos/src/components/Collections/CollectionShare/emailShare/index.tsx index e4bce9a93a..9d2444e8aa 100644 --- a/web/apps/photos/src/components/Collections/CollectionShare/emailShare/index.tsx +++ b/web/apps/photos/src/components/Collections/CollectionShare/emailShare/index.tsx @@ -64,7 +64,7 @@ export default function EmailShare({ onClick={openManageEmailShare} label={ collection.sharees.length === 1 - ? t(collection.sharees[0]?.email) + ? collection.sharees[0]?.email : null } endIcon={} From 58127591d05dbb2b41dff570d3e3430a9f1b5fa6 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 29 Jun 2024 08:08:55 +0530 Subject: [PATCH 2/4] Mark as pending translation --- .../components/Upload/UploadTypeSelector.tsx | 13 +++++++------ web/packages/next/i18n.ts | 19 ++++++++++++++++++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx index 027f6bd8c1..5e524fe8b3 100644 --- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx +++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx @@ -1,4 +1,5 @@ import { FocusVisibleButton } from "@/new/photos/components/FocusVisibleButton"; +import { pt } from "@/next/i18n"; import DialogTitleWithCloseButton, { DialogTitleWithCloseButtonSm, dialogCloseHandler, @@ -202,7 +203,6 @@ const TakeoutOptions: React.FC> = ({ onSelect, onClose, }) => { - // TODO(MR): Move these to localized strings when finalized. return ( <> @@ -218,7 +218,7 @@ const TakeoutOptions: React.FC> = ({ disableRipple onClick={() => onSelect("folders")} > - {t("Select folder")} + {pt("Select folder")} > = ({ disableRipple onClick={() => onSelect("zips")} > - {t("Select zips")} + {pt("Select zips")} > = ({ fullWidth disableRipple > - {t("FAQ")} + {pt("FAQ")} - Unzip all zips into the same folder and upload that. Or - upload the zips directly. See FAQ for details. + {pt( + "Unzip all zips into the same folder and upload that. Or upload the zips directly. See FAQ for details.", + )} diff --git a/web/packages/next/i18n.ts b/web/packages/next/i18n.ts index da63bc8c51..046dcd5c11 100644 --- a/web/packages/next/i18n.ts +++ b/web/packages/next/i18n.ts @@ -262,6 +262,21 @@ export const setLocaleInUse = async (locale: SupportedLocale) => { return i18n.changeLanguage(locale); }; +/** + * A no-op marker for strings that, for various reasons, pending addition to the + * translation dataset. + * + * This function does nothing, it just returns back the passed it string + * verbatim. It is only kept as a way for us to keep track of strings which + * we've not yet added to the list of strings that should be translated (e.g. + * perhaps we're awaiting feedback on the copy). + * + * It is the sibling of the {@link t} function provided by i18next. + * + * See also: {@link ut}. + */ +export const pt = (s: string) => s; + /** * A no-op marker for strings that, for various reasons, are not translated. * @@ -270,6 +285,8 @@ export const setLocaleInUse = async (locale: SupportedLocale) => { * not translated (and for some reason, are currently not meant to be), but * still are user visible. * - * It is the sibling of the {@link t} function provided by i18next. + * It is the sibling of the {@link t} function provided by i18next. See also + * + * See also: {@link pt}. */ export const ut = (s: string) => s; From 730ca2119ccf65779ccd414428ea910737ede94c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 29 Jun 2024 08:09:24 +0530 Subject: [PATCH 3/4] Fix typo --- web/apps/photos/src/services/export/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.ts index 38f73a4240..754c3dc980 100644 --- a/web/apps/photos/src/services/export/index.ts +++ b/web/apps/photos/src/services/export/index.ts @@ -1329,7 +1329,7 @@ const readOnDiskFileExportRecordIDs = async ( * * @param allFiles The list of files to export. * - * @param exportRecord The export record containing bookeeping for the export. + * @param exportRecord The export record containing bookkeeping for the export. * * @paramd diskFileRecordIDs (Optional) The export record IDs of files from * amongst {@link allFiles} that already exist on disk. If provided (e.g. when From ee3ddad4d1794c1634678f07a4eec565474cd630 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 29 Jun 2024 08:10:54 +0530 Subject: [PATCH 4/4] Fix --- web/packages/next/i18n.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/packages/next/i18n.ts b/web/packages/next/i18n.ts index 046dcd5c11..cec28add94 100644 --- a/web/packages/next/i18n.ts +++ b/web/packages/next/i18n.ts @@ -285,7 +285,7 @@ export const pt = (s: string) => s; * not translated (and for some reason, are currently not meant to be), but * still are user visible. * - * It is the sibling of the {@link t} function provided by i18next. See also + * It is the sibling of the {@link t} function provided by i18next. * * See also: {@link pt}. */