[web] Minor localization fixes (#2317)
This commit is contained in:
@@ -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={<ChevronRight />}
|
||||
|
||||
@@ -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<Omit<OptionsProps, "intent">> = ({
|
||||
onSelect,
|
||||
onClose,
|
||||
}) => {
|
||||
// TODO(MR): Move these to localized strings when finalized.
|
||||
return (
|
||||
<>
|
||||
<DialogTitleWithCloseButtonSm onClose={onClose}>
|
||||
@@ -218,7 +218,7 @@ const TakeoutOptions: React.FC<Omit<OptionsProps, "intent">> = ({
|
||||
disableRipple
|
||||
onClick={() => onSelect("folders")}
|
||||
>
|
||||
{t("Select folder")}
|
||||
{pt("Select folder")}
|
||||
</FocusVisibleButton>
|
||||
<FocusVisibleButton
|
||||
color="secondary"
|
||||
@@ -226,7 +226,7 @@ const TakeoutOptions: React.FC<Omit<OptionsProps, "intent">> = ({
|
||||
disableRipple
|
||||
onClick={() => onSelect("zips")}
|
||||
>
|
||||
{t("Select zips")}
|
||||
{pt("Select zips")}
|
||||
</FocusVisibleButton>
|
||||
<Link
|
||||
href="https://help.ente.io/photos/migration/from-google-photos/"
|
||||
@@ -238,14 +238,15 @@ const TakeoutOptions: React.FC<Omit<OptionsProps, "intent">> = ({
|
||||
fullWidth
|
||||
disableRipple
|
||||
>
|
||||
{t("FAQ")}
|
||||
{pt("FAQ")}
|
||||
</FocusVisibleButton>
|
||||
</Link>
|
||||
</Stack>
|
||||
|
||||
<Typography variant="small" color="text.muted" pb={1}>
|
||||
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.",
|
||||
)}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Box>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
@@ -271,5 +286,7 @@ export const setLocaleInUse = async (locale: SupportedLocale) => {
|
||||
* still are user visible.
|
||||
*
|
||||
* It is the sibling of the {@link t} function provided by i18next.
|
||||
*
|
||||
* See also: {@link pt}.
|
||||
*/
|
||||
export const ut = (s: string) => s;
|
||||
|
||||
Reference in New Issue
Block a user