@openrails/contentkit-ui 0.87.0-rc.1 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -11
- package/dist/client/beacons.js +5 -1
- package/dist/client/beacons.js.map +1 -1
- package/dist/client/contents.d.ts +8 -6
- package/dist/client/contents.js +10 -7
- package/dist/client/contents.js.map +1 -1
- package/dist/client/errors.d.ts +15 -3
- package/dist/client/errors.js +40 -14
- package/dist/client/errors.js.map +1 -1
- package/dist/client/generated/routes.d.ts +1 -1
- package/dist/client/generated/routes.js +1 -1
- package/dist/client/generated/routes.js.map +1 -1
- package/dist/client/generated/wire.d.ts +11 -3
- package/dist/client/generated/wire.js.map +1 -1
- package/dist/client/http.js +27 -27
- package/dist/client/http.js.map +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/media/client.d.ts +10 -4
- package/dist/client/media/client.js +33 -7
- package/dist/client/media/client.js.map +1 -1
- package/dist/client/media/rules.d.ts +1 -1
- package/dist/client/media/rules.js +6 -6
- package/dist/client/media/rules.js.map +1 -1
- package/dist/client/media/transport.d.ts +1 -1
- package/dist/client/media/transport.js +16 -16
- package/dist/client/media/transport.js.map +1 -1
- package/dist/client/public.d.ts +2 -2
- package/dist/client/public.js +2 -2
- package/dist/client/public.js.map +1 -1
- package/dist/client.js +25 -25
- package/dist/components/admin/content-manager.js +233 -232
- package/dist/components/admin/content-manager.js.map +1 -1
- package/dist/components/content/editors.d.ts +8 -0
- package/dist/components/content/editors.js +299 -229
- package/dist/components/content/editors.js.map +1 -1
- package/dist/components/content/index.d.ts +1 -1
- package/dist/components/content/paywall.js +61 -61
- package/dist/components/content/paywall.js.map +1 -1
- package/dist/i18n/messages.js +49 -46
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/locales/de.js +2 -1
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +1 -0
- package/dist/locales/en.js +2 -1
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +2 -1
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +2 -1
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +2 -1
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +2 -1
- package/dist/locales/zh.js.map +1 -1
- package/dist/react/contents.d.ts +13 -5
- package/dist/react/contents.js +163 -149
- package/dist/react/contents.js.map +1 -1
- package/dist/react/detail.d.ts +7 -1
- package/dist/react/detail.js +9 -6
- package/dist/react/detail.js.map +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/public.js +17 -16
- package/dist/react/public.js.map +1 -1
- package/dist/react.js +8 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paywall.js","names":[],"sources":["../../../src/components/content/paywall.tsx"],"sourcesContent":["import { LockIcon } from \"@hugeicons/core-free-icons\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { cn } from \"cn\";\nimport { useCallback, useContext, useMemo, type ReactNode } from \"react\";\nimport type { ContentKitUiAppearance } from \"../../appearance.js\";\nimport type { ContentKitClient } from \"../../client/client.js\";\nimport type { Decision, Sale, Terms, Version } from \"../../client/generated/wire.js\";\nimport { useLanguageName, useMessages } from \"../../i18n/context.js\";\nimport type { Translator } from \"../../i18n/messages.js\";\nimport { ContentKitContext, useContentKitClient, type ContentKitErrorHandler } from \"../../react/context.js\";\nimport { findVersion } from \"../../react/detail.js\";\nimport { useVersionParam } from \"../../react/location.js\";\nimport { useKinds } from \"../../react/groups.js\";\nimport { ContentKitUiRoot } from \"../../scope.js\";\nimport { Button } from \"#ckui/ui/button\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"#ckui/ui/select\";\nimport { contentError, ErrorLine, formatDate, useAction } from \"../social/parts.js\";\nimport { labelOf, type Labels } from \"../groups/parts.js\";\nimport type { PlayerMenuItem } from \"../video-player.js\";\n\n/** An offer's price and period in words: \"$2.99\", \"$4.99 / 30 days\", \"$1.99 for 48 hours\". */\nexport function priceLabel(m: Translator, terms: Terms): string {\n let price: string;\n try {\n price = new Intl.NumberFormat(m.language, { style: \"currency\", currency: terms.currency }).format(Number(terms.amount));\n } catch {\n price = `${terms.amount} ${terms.currency}`;\n }\n const period = (hours: number) => (hours % 24 === 0 ? m.plural(\"paywall.days\", hours / 24) : m.plural(\"paywall.hours\", hours));\n if (terms.renew_hours) return m.t(\"paywall.renews\", { price, period: period(terms.renew_hours) });\n if (terms.access_hours) return m.t(\"paywall.rents\", { price, period: period(terms.access_hours) });\n return price;\n}\n\nexport interface PaywallProps {\n /** The locked version's (or card's) decision. */\n decision: Decision;\n /**\n * Starts a purchase: the host creates the order through billing-ui\n * (createOrder with offer.price_id) and shows OrderCheckout; for a tier\n * (no offer), its subscription page. A free group offer joins here instead.\n */\n onCheckout: (o: { key: string; offer?: Sale }) => void;\n /** Tiers' names and prices from the host's catalog, by tier key. */\n tiers?: Readonly<Record<string, { label?: string; price?: string }>>;\n /** Asks a signed-out reader to sign in (they may hold it already); default the provider's. */\n onSignIn?: () => void;\n labels?: Labels;\n /** Below the offers: the host's own. */\n children?: ReactNode;\n client?: ContentKitClient;\n onError?: ContentKitErrorHandler;\n className?: string;\n appearance?: ContentKitUiAppearance;\n}\n\n/** Why content is locked and how to open it: its offers, the tiers that include it, previews and when it turns free. */\nexport function Paywall({ decision, onCheckout, tiers, onSignIn, labels, children, client: own, onError, className, appearance }: PaywallProps) {\n const m = useMessages();\n const { t } = m;\n const ctx = useContext(ContentKitContext);\n const client = useContentKitClient(own);\n const { kinds } = useKinds({ client: own });\n const join = useAction(\"membership.join\", onError);\n if (decision.allowed) return null;\n const signIn = onSignIn ?? ctx?.onSignIn;\n const offers = decision.offers ?? [];\n const sold = new Set(offers.map((o) => o.key));\n const siteTiers = kinds?.tiers ?? Object.keys(tiers ?? {});\n const tierKeys = (decision.sell ?? []).filter((k) => !sold.has(k) && (siteTiers.includes(k) || !!tiers?.[k]));\n const required = decision.requires;\n // A required key nothing here offers gets its own button; the others wait for it.\n const requires = required && !offers.some((o) => o.key === required) ? required : undefined;\n const waits = (key: string) => !!required && key !== required;\n const preview = decision.preview;\n return (\n <ContentKitUiRoot appearance={appearance} className={cn(\"grid gap-3 rounded-lg border border-border p-4 text-sm\", className)} data-ckui=\"paywall\">\n <p className=\"flex items-center gap-2 font-medium\">\n <HugeiconsIcon icon={LockIcon} strokeWidth={2} className=\"size-4\" aria-hidden />\n {decision.unknown ? t(\"paywall.unknown\") : required ? t(\"paywall.requiresFirst\") : t(\"paywall.locked\")}\n </p>\n {preview?.pages ? <p className=\"text-muted-foreground\">{m.plural(\"paywall.previewPages\", preview.pages)}</p> : null}\n {preview?.segments ? <p className=\"text-muted-foreground\">{m.plural(\"paywall.previewSegments\", preview.segments)}</p> : null}\n {decision.free_after && <p className=\"text-muted-foreground\">{t(\"paywall.freeFrom\", { date: formatDate(m, decision.free_after, false) })}</p>}\n {!decision.unknown && (\n <div className=\"flex flex-wrap gap-2\" data-ckui=\"paywall-offers\">\n {requires && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => onCheckout({ key: requires })}>\n {t(\"paywall.joinFirst\")}\n </Button>\n )}\n {offers.map((o) =>\n o.target.kind === \"group\" && Number(o.terms.amount) === 0 ? (\n <Button\n key={o.key}\n size=\"sm\"\n disabled={waits(o.key) || join.pending}\n onClick={() => (ctx?.viewer === null && signIn ? signIn() : void join.run(() => client.offers.join(o.target.id)))}\n data-ckui=\"paywall-offer\"\n data-target=\"group\"\n data-free=\"\"\n >\n {t(\"paywall.joinFirst\")}\n </Button>\n ) : (\n <Button key={o.key} size=\"sm\" disabled={waits(o.key)} onClick={() => onCheckout({ key: o.key, offer: o })} data-ckui=\"paywall-offer\" data-target={o.target.kind}>\n {t(o.target.kind === \"group\" ? \"paywall.joinFor\" : o.target.kind === \"version\" ? \"paywall.unlockVersionFor\" : \"paywall.unlockFor\", { price: priceLabel(m, o.terms) })}\n </Button>\n ),\n )}\n {tierKeys.map((k) => (\n <Button key={k} size=\"sm\" variant={offers.length ? \"outline\" : \"default\"} onClick={() => onCheckout({ key: k })} data-ckui=\"paywall-tier\" data-tier={k}>\n {t(\"paywall.subscribe\", { tier: tiers?.[k]?.label ?? labelOf(labels, k) })}\n {tiers?.[k]?.price && <span className=\"ms-1 opacity-80\">{tiers[k]!.price}</span>}\n </Button>\n ))}\n </div>\n )}\n {join.error && <ErrorLine>{contentError(m, join.error)}</ErrorLine>}\n {ctx?.viewer === null && signIn && (\n <p className=\"text-muted-foreground\">\n {t(\"paywall.haveIt\")}{\" \"}\n <button type=\"button\" className=\"font-medium text-foreground underline-offset-4 hover:underline\" onClick={signIn}>\n {t(\"paywall.signIn\")}\n </button>\n </p>\n )}\n {children}\n </ContentKitUiRoot>\n );\n}\n\nexport interface VersionPickerProps {\n /** The content's live versions (useContentDetail().versions). */\n versions: readonly Version[];\n /** The version shown, by code or id; default the page's ?v=, else the reader's language's default. */\n value?: string | null;\n /** Receives the chosen version; default writes its code to the page's ?v=. */\n onChange?: (version: Version) => void;\n labels?: Labels;\n className?: string;\n appearance?: ContentKitUiAppearance;\n}\n\n/** A version's name: its label, else its traits, else its languages. */\nfunction versionName(v: Version, languageName: (l: string) => string, labels?: Labels): string {\n return v.label || (v.traits.length ? v.traits.map((x) => labelOf(labels, x)).join(\" · \") : v.languages.map(languageName).join(\", \"));\n}\n\nconst primary = (v: Version) => v.languages[0] ?? \"\";\n\n/**\n * The shown version (value, else the page's ?v=, else the reader's\n * language's default), the versions' languages, the shown language's\n * variants, and the change handler (default: write ?v=).\n */\nfunction useChoices(versions: readonly Version[], value: string | null | undefined, onChange: ((v: Version) => void) | undefined) {\n const [param, setParam] = useVersionParam();\n const reader = useContext(ContentKitContext)?.language;\n const selected = value === undefined ? param : value;\n const change = useCallback((v: Version) => (onChange ? onChange(v) : setParam(v.code)), [onChange, setParam]);\n return useMemo(() => {\n const current = findVersion(versions, selected) ?? (reader ? versions.find((v) => v.languages.includes(reader)) : undefined) ?? versions[0];\n const language = current ? primary(current) : \"\";\n return { current, language, languages: [...new Set(versions.map(primary))], variants: versions.filter((v) => primary(v) === language), change };\n }, [versions, selected, reader, change]);\n}\n\n/**\n * Chooses among a content's versions: a language first when they differ in\n * language, then its variants (traits, labels). The choice is the page's ?v=\n * unless value and onChange say otherwise.\n */\nexport function VersionPicker({ versions, value, onChange, labels, className, appearance }: VersionPickerProps) {\n const { t } = useMessages();\n const languageName = useLanguageName();\n const { current, language, languages, variants, change } = useChoices(versions, value, onChange);\n if (versions.length < 2 || !current) return null;\n return (\n <ContentKitUiRoot appearance={appearance} className={cn(\"flex flex-wrap items-center gap-2 text-sm\", className)} data-ckui=\"version-picker\">\n {languages.length > 1 && (\n <Select\n value={language}\n onValueChange={(l) => {\n const v = versions.find((x) => primary(x) === l);\n if (v) change(v);\n }}\n >\n <SelectTrigger size=\"sm\" aria-label={t(\"versions.language\")}>\n <SelectValue>{(l: string) => languageName(l)}</SelectValue>\n </SelectTrigger>\n <SelectContent>\n {languages.map((l) => (\n <SelectItem key={l} value={l}>\n {languageName(l)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n )}\n {variants.length > 1 && (\n <div role=\"radiogroup\" aria-label={t(\"versions.version\")} className=\"flex flex-wrap gap-1\">\n {variants.map((v) => (\n <Button\n key={v.id}\n size=\"sm\"\n role=\"radio\"\n aria-checked={v.id === current.id}\n variant={v.id === current.id ? \"default\" : \"outline\"}\n onClick={() => change(v)}\n data-ckui=\"version-option\"\n data-locked={v.decision.allowed ? undefined : \"\"}\n >\n {!v.decision.allowed && <HugeiconsIcon icon={LockIcon} strokeWidth={2} className=\"size-3.5\" aria-label={t(\"versions.locked\")} />}\n {versionName(v, languageName, labels)}\n </Button>\n ))}\n </div>\n )}\n </ContentKitUiRoot>\n );\n}\n\nexport interface VersionMenuOptions {\n /** The version shown, by code or id; default the page's ?v=, else the reader's language's default. */\n value?: string | null;\n /** Receives the chosen version; default writes its code to the page's ?v=. */\n onChange?: (version: Version) => void;\n labels?: Labels;\n}\n\n/** VersionPicker as VideoPlayer settings entries (menuItems), for a watch page. */\nexport function useVersionMenuItems(versions: readonly Version[], o: VersionMenuOptions = {}): PlayerMenuItem[] {\n const { t } = useMessages();\n const languageName = useLanguageName();\n const { current, language, languages, variants, change } = useChoices(versions, o.value, o.onChange);\n const { labels } = o;\n return useMemo(() => {\n if (versions.length < 2 || !current) return [];\n const out: PlayerMenuItem[] = [];\n if (languages.length > 1)\n out.push({\n label: t(\"versions.language\"),\n value: language,\n options: languages.map((l) => ({ value: l, label: languageName(l) })),\n onChange: (l) => {\n const v = versions.find((x) => primary(x) === l);\n if (v) change(v);\n },\n });\n if (variants.length > 1)\n out.push({\n label: t(\"versions.version\"),\n value: current.id,\n options: variants.map((v) => {\n const name = versionName(v, languageName, labels);\n return { value: v.id, label: v.decision.allowed ? name : t(\"versions.lockedOption\", { name }) };\n }),\n onChange: (id) => {\n const v = versions.find((x) => x.id === id);\n if (v) change(v);\n },\n });\n return out;\n }, [versions, current, language, languages, variants, change, labels, t, languageName]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,SAAgB,EAAW,GAAe,GAAsB;CAC9D,IAAI;CACJ,IAAI;EACF,IAAQ,IAAI,KAAK,aAAa,EAAE,UAAU;GAAE,OAAO;GAAY,UAAU,EAAM;EAAS,CAAC,CAAC,CAAC,OAAO,OAAO,EAAM,MAAM,CAAC;CACxH,QAAQ;EACN,IAAQ,GAAG,EAAM,OAAO,GAAG,EAAM;CACnC;CACA,IAAM,KAAU,MAAmB,IAAQ,MAAO,IAAI,EAAE,OAAO,gBAAgB,IAAQ,EAAE,IAAI,EAAE,OAAO,iBAAiB,CAAK;CAG5H,OAFI,EAAM,cAAoB,EAAE,EAAE,kBAAkB;EAAE;EAAO,QAAQ,EAAO,EAAM,WAAW;CAAE,CAAC,IAC5F,EAAM,eAAqB,EAAE,EAAE,iBAAiB;EAAE;EAAO,QAAQ,EAAO,EAAM,YAA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AO,CAAC;GACjB;EACF,CAAC,GACI;CACT,GAAG;EAAC;EAAU;EAAS;EAAU;EAAW;EAAU;EAAQ;EAAQ;EAAG;CAAY,CAAC;AACxF"}
|
|
1
|
+
{"version":3,"file":"paywall.js","names":[],"sources":["../../../src/components/content/paywall.tsx"],"sourcesContent":["import { LockIcon } from \"@hugeicons/core-free-icons\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { cn } from \"cn\";\nimport { useCallback, useContext, useMemo, type ReactNode } from \"react\";\nimport type { ContentKitUiAppearance } from \"../../appearance.js\";\nimport type { ContentKitClient } from \"../../client/client.js\";\nimport type { Decision, Sale, Terms, Version } from \"../../client/generated/wire.js\";\nimport { useLanguageName, useMessages } from \"../../i18n/context.js\";\nimport type { Translator } from \"../../i18n/messages.js\";\nimport { ContentKitContext, useContentKitClient, type ContentKitErrorHandler } from \"../../react/context.js\";\nimport { editionOf, findVersion } from \"../../react/detail.js\";\nimport { useVersionParam } from \"../../react/location.js\";\nimport { useKinds } from \"../../react/groups.js\";\nimport { ContentKitUiRoot } from \"../../scope.js\";\nimport { Button } from \"#ckui/ui/button\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"#ckui/ui/select\";\nimport { contentError, ErrorLine, formatDate, useAction } from \"../social/parts.js\";\nimport { labelOf, type Labels } from \"../groups/parts.js\";\nimport type { PlayerMenuItem } from \"../video-player.js\";\n\n/** An offer's price and period in words: \"$2.99\", \"$4.99 / 30 days\", \"$1.99 for 48 hours\". */\nexport function priceLabel(m: Translator, terms: Terms): string {\n let price: string;\n try {\n price = new Intl.NumberFormat(m.language, { style: \"currency\", currency: terms.currency }).format(Number(terms.amount));\n } catch {\n price = `${terms.amount} ${terms.currency}`;\n }\n const period = (hours: number) => (hours % 24 === 0 ? m.plural(\"paywall.days\", hours / 24) : m.plural(\"paywall.hours\", hours));\n if (terms.renew_hours) return m.t(\"paywall.renews\", { price, period: period(terms.renew_hours) });\n if (terms.access_hours) return m.t(\"paywall.rents\", { price, period: period(terms.access_hours) });\n return price;\n}\n\nexport interface PaywallProps {\n /** The locked version's (or card's) decision. */\n decision: Decision;\n /**\n * Starts a purchase: the host creates the order through billing-ui\n * (createOrder with offer.price_id) and shows OrderCheckout; for a tier\n * (no offer), its subscription page. A free group offer joins here instead.\n */\n onCheckout: (o: { key: string; offer?: Sale }) => void;\n /** Tiers' names and prices from the host's catalog, by tier key. */\n tiers?: Readonly<Record<string, { label?: string; price?: string }>>;\n /** Asks a signed-out reader to sign in (they may hold it already); default the provider's. */\n onSignIn?: () => void;\n labels?: Labels;\n /** Below the offers: the host's own. */\n children?: ReactNode;\n client?: ContentKitClient;\n onError?: ContentKitErrorHandler;\n className?: string;\n appearance?: ContentKitUiAppearance;\n}\n\n/** Why content is locked and how to open it: its offers, the tiers that include it, previews and when it turns free. */\nexport function Paywall({ decision, onCheckout, tiers, onSignIn, labels, children, client: own, onError, className, appearance }: PaywallProps) {\n const m = useMessages();\n const { t } = m;\n const ctx = useContext(ContentKitContext);\n const client = useContentKitClient(own);\n const { kinds } = useKinds({ client: own });\n const join = useAction(\"membership.join\", onError);\n if (decision.allowed) return null;\n const signIn = onSignIn ?? ctx?.onSignIn;\n const offers = decision.offers ?? [];\n const sold = new Set(offers.map((o) => o.key));\n const siteTiers = kinds?.tiers ?? Object.keys(tiers ?? {});\n const tierKeys = (decision.sell ?? []).filter((k) => !sold.has(k) && (siteTiers.includes(k) || !!tiers?.[k]));\n const required = decision.requires;\n // A required key nothing here offers gets its own button; the others wait for it.\n const requires = required && !offers.some((o) => o.key === required) ? required : undefined;\n const waits = (key: string) => !!required && key !== required;\n const preview = decision.preview;\n return (\n <ContentKitUiRoot appearance={appearance} className={cn(\"grid gap-3 rounded-lg border border-border p-4 text-sm\", className)} data-ckui=\"paywall\">\n <p className=\"flex items-center gap-2 font-medium\">\n <HugeiconsIcon icon={LockIcon} strokeWidth={2} className=\"size-4\" aria-hidden />\n {decision.unknown ? t(\"paywall.unknown\") : required ? t(\"paywall.requiresFirst\") : t(\"paywall.locked\")}\n </p>\n {preview?.pages ? <p className=\"text-muted-foreground\">{m.plural(\"paywall.previewPages\", preview.pages)}</p> : null}\n {preview?.segments ? <p className=\"text-muted-foreground\">{m.plural(\"paywall.previewSegments\", preview.segments)}</p> : null}\n {decision.free_after && <p className=\"text-muted-foreground\">{t(\"paywall.freeFrom\", { date: formatDate(m, decision.free_after, false) })}</p>}\n {!decision.unknown && (\n <div className=\"flex flex-wrap gap-2\" data-ckui=\"paywall-offers\">\n {requires && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => onCheckout({ key: requires })}>\n {t(\"paywall.joinFirst\")}\n </Button>\n )}\n {offers.map((o) =>\n o.target.kind === \"group\" && Number(o.terms.amount) === 0 ? (\n <Button\n key={o.key}\n size=\"sm\"\n disabled={waits(o.key) || join.pending}\n onClick={() => (ctx?.viewer === null && signIn ? signIn() : void join.run(() => client.offers.join(o.target.id)))}\n data-ckui=\"paywall-offer\"\n data-target=\"group\"\n data-free=\"\"\n >\n {t(\"paywall.joinFirst\")}\n </Button>\n ) : (\n <Button key={o.key} size=\"sm\" disabled={waits(o.key)} onClick={() => onCheckout({ key: o.key, offer: o })} data-ckui=\"paywall-offer\" data-target={o.target.kind}>\n {t(o.target.kind === \"group\" ? \"paywall.joinFor\" : o.target.kind === \"version\" ? \"paywall.unlockVersionFor\" : \"paywall.unlockFor\", { price: priceLabel(m, o.terms) })}\n </Button>\n ),\n )}\n {tierKeys.map((k) => (\n <Button key={k} size=\"sm\" variant={offers.length ? \"outline\" : \"default\"} onClick={() => onCheckout({ key: k })} data-ckui=\"paywall-tier\" data-tier={k}>\n {t(\"paywall.subscribe\", { tier: tiers?.[k]?.label ?? labelOf(labels, k) })}\n {tiers?.[k]?.price && <span className=\"ms-1 opacity-80\">{tiers[k]!.price}</span>}\n </Button>\n ))}\n </div>\n )}\n {join.error && <ErrorLine>{contentError(m, join.error)}</ErrorLine>}\n {ctx?.viewer === null && signIn && (\n <p className=\"text-muted-foreground\">\n {t(\"paywall.haveIt\")}{\" \"}\n <button type=\"button\" className=\"font-medium text-foreground underline-offset-4 hover:underline\" onClick={signIn}>\n {t(\"paywall.signIn\")}\n </button>\n </p>\n )}\n {children}\n </ContentKitUiRoot>\n );\n}\n\nexport interface VersionPickerProps {\n /** The content's live versions (useContentDetail().versions). */\n versions: readonly Version[];\n /** The version shown, by code or id; default the page's ?v=, else the reader's language's default. */\n value?: string | null;\n /** Receives the chosen version; default writes its code to the page's ?v=. */\n onChange?: (version: Version) => void;\n labels?: Labels;\n className?: string;\n appearance?: ContentKitUiAppearance;\n}\n\n/** A version's name: its label, else its traits, else its languages. */\nfunction versionName(v: Version, languageName: (l: string) => string, labels?: Labels): string {\n return v.label || (v.traits.length ? v.traits.map((x) => labelOf(labels, x)).join(\" · \") : v.languages.map(languageName).join(\", \"));\n}\n\nconst primary = (v: Version) => v.languages[0] ?? \"\";\n\n/**\n * The shown version (value, else the page's ?v=, else the reader's\n * language's default), the versions' languages, the shown language's\n * variants, and the change handler (default: write ?v=).\n */\nfunction useChoices(versions: readonly Version[], value: string | null | undefined, onChange: ((v: Version) => void) | undefined) {\n const [param, setParam] = useVersionParam();\n const reader = useContext(ContentKitContext)?.language;\n const selected = value === undefined ? param : value;\n const change = useCallback((v: Version) => (onChange ? onChange(v) : setParam(v.code)), [onChange, setParam]);\n return useMemo(() => {\n const sorted = [...versions].sort((a, b) => a.position - b.position);\n const current = findVersion(versions, selected) ?? editionOf(sorted, reader ?? undefined);\n const language = current ? primary(current) : \"\";\n return { current, language, languages: [...new Set(sorted.map(primary))], variants: sorted.filter((v) => primary(v) === language), change };\n }, [versions, selected, reader, change]);\n}\n\n/**\n * Chooses among a content's versions: a language first when they differ in\n * language, then its variants (traits, labels). The choice is the page's ?v=\n * unless value and onChange say otherwise.\n */\nexport function VersionPicker({ versions, value, onChange, labels, className, appearance }: VersionPickerProps) {\n const { t } = useMessages();\n const languageName = useLanguageName();\n const { current, language, languages, variants, change } = useChoices(versions, value, onChange);\n if (versions.length < 2 || !current) return null;\n return (\n <ContentKitUiRoot appearance={appearance} className={cn(\"flex flex-wrap items-center gap-2 text-sm\", className)} data-ckui=\"version-picker\">\n {languages.length > 1 && (\n <Select\n value={language}\n onValueChange={(l) => {\n const v = [...versions].sort((a, b) => a.position - b.position).find((x) => primary(x) === l);\n if (v) change(v);\n }}\n >\n <SelectTrigger size=\"sm\" aria-label={t(\"versions.language\")}>\n <SelectValue>{(l: string) => languageName(l)}</SelectValue>\n </SelectTrigger>\n <SelectContent>\n {languages.map((l) => (\n <SelectItem key={l} value={l}>\n {languageName(l)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n )}\n {variants.length > 1 && (\n <div role=\"radiogroup\" aria-label={t(\"versions.version\")} className=\"flex flex-wrap gap-1\">\n {variants.map((v) => (\n <Button\n key={v.id}\n size=\"sm\"\n role=\"radio\"\n aria-checked={v.id === current.id}\n variant={v.id === current.id ? \"default\" : \"outline\"}\n onClick={() => change(v)}\n data-ckui=\"version-option\"\n data-locked={v.decision.allowed ? undefined : \"\"}\n >\n {!v.decision.allowed && <HugeiconsIcon icon={LockIcon} strokeWidth={2} className=\"size-3.5\" aria-label={t(\"versions.locked\")} />}\n {versionName(v, languageName, labels)}\n </Button>\n ))}\n </div>\n )}\n </ContentKitUiRoot>\n );\n}\n\nexport interface VersionMenuOptions {\n /** The version shown, by code or id; default the page's ?v=, else the reader's language's default. */\n value?: string | null;\n /** Receives the chosen version; default writes its code to the page's ?v=. */\n onChange?: (version: Version) => void;\n labels?: Labels;\n}\n\n/** VersionPicker as VideoPlayer settings entries (menuItems), for a watch page. */\nexport function useVersionMenuItems(versions: readonly Version[], o: VersionMenuOptions = {}): PlayerMenuItem[] {\n const { t } = useMessages();\n const languageName = useLanguageName();\n const { current, language, languages, variants, change } = useChoices(versions, o.value, o.onChange);\n const { labels } = o;\n return useMemo(() => {\n if (versions.length < 2 || !current) return [];\n const out: PlayerMenuItem[] = [];\n if (languages.length > 1)\n out.push({\n label: t(\"versions.language\"),\n value: language,\n options: languages.map((l) => ({ value: l, label: languageName(l) })),\n onChange: (l) => {\n const v = versions.find((x) => primary(x) === l);\n if (v) change(v);\n },\n });\n if (variants.length > 1)\n out.push({\n label: t(\"versions.version\"),\n value: current.id,\n options: variants.map((v) => {\n const name = versionName(v, languageName, labels);\n return { value: v.id, label: v.decision.allowed ? name : t(\"versions.lockedOption\", { name }) };\n }),\n onChange: (id) => {\n const v = versions.find((x) => x.id === id);\n if (v) change(v);\n },\n });\n return out;\n }, [versions, current, language, languages, variants, change, labels, t, languageName]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,SAAgB,EAAW,GAAe,GAAsB;CAC9D,IAAI;CACJ,IAAI;EACF,IAAQ,IAAI,KAAK,aAAa,EAAE,UAAU;GAAE,OAAO;GAAY,UAAU,EAAM;EAAS,CAAC,CAAC,CAAC,OAAO,OAAO,EAAM,MAAM,CAAC;CACxH,QAAQ;EACN,IAAQ,GAAG,EAAM,OAAO,GAAG,EAAM;CACnC;CACA,IAAM,KAAU,MAAmB,IAAQ,MAAO,IAAI,EAAE,OAAO,gBAAgB,IAAQ,EAAE,IAAI,EAAE,OAAO,iBAAiB,CAAK;CAG5H,OAFI,EAAM,cAAoB,EAAE,EAAE,kBAAkB;EAAE;EAAO,QAAQ,EAAO,EAAM,WAAW;CAAE,CAAC,IAC5F,EAAM,eAAqB,EAAE,EAAE,iBAAiB;EAAE;EAAO,QAAQ,EAAO,EAAM,YAAY;CAAE,CAAC,IAC1F;AACT;AAyBA,SAAgB,EAAQ,EAAE,aAAU,eAAY,UAAO,aAAU,WAAQ,aAAU,QAAQ,GAAK,YAAS,cAAW,iBAA4B;CAC9I,IAAM,IAAI,EAAY,GAChB,EAAE,SAAM,GACR,IAAM,EAAW,CAAiB,GAClC,IAAS,EAAoB,CAAG,GAChC,EAAE,aAAU,EAAS,EAAE,QAAQ,EAAI,CAAC,GACpC,IAAO,EAAU,mBAAmB,CAAO;CACjD,IAA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} from "../locales/en.js";
|
|
2
|
-
import {
|
|
2
|
+
import { transportFailure as t } from "../client/errors.js";
|
|
3
|
+
import { ratioLabel as n } from "../client/media/rules.js";
|
|
3
4
|
//#region src/i18n/messages.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
5
|
+
var r = e;
|
|
6
|
+
function i(e) {
|
|
6
7
|
return e;
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
+
function a(e, t) {
|
|
9
10
|
let n = { ...e };
|
|
10
11
|
for (let [e, r] of Object.entries(t)) {
|
|
11
12
|
if (r == null) continue;
|
|
12
13
|
let t = n[e];
|
|
13
|
-
typeof r == "string" ? r !== "" && (n[e] = r) : n[e] =
|
|
14
|
+
typeof r == "string" ? r !== "" && (n[e] = r) : n[e] = a(typeof t == "object" ? t : {}, r);
|
|
14
15
|
}
|
|
15
16
|
return n;
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function o(t) {
|
|
18
19
|
let n = t ? Array.isArray(t) ? t : [t] : [], r = e;
|
|
19
|
-
for (let e of n) r =
|
|
20
|
+
for (let e of n) r = a(r, e);
|
|
20
21
|
return r;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function s(e, t) {
|
|
23
24
|
return t ? e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e) : e;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function c(e, t) {
|
|
26
27
|
let n = e;
|
|
27
28
|
for (let e of t.split(".")) {
|
|
28
29
|
if (!n || typeof n != "object") return;
|
|
@@ -30,65 +31,67 @@ function s(e, t) {
|
|
|
30
31
|
}
|
|
31
32
|
return typeof n == "string" ? n : void 0;
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
let
|
|
35
|
-
let i =
|
|
34
|
+
function l(e, r, i) {
|
|
35
|
+
let a = (t, n) => {
|
|
36
|
+
let i = r?.(t, n);
|
|
36
37
|
if (i && i !== t) return i;
|
|
37
|
-
let a =
|
|
38
|
-
return a === void 0 ? void 0 :
|
|
39
|
-
},
|
|
38
|
+
let a = c(e, t);
|
|
39
|
+
return a === void 0 ? void 0 : s(a, n);
|
|
40
|
+
}, o;
|
|
40
41
|
return {
|
|
41
42
|
messages: e,
|
|
42
|
-
language:
|
|
43
|
-
t: (e, t) =>
|
|
43
|
+
language: i,
|
|
44
|
+
t: (e, t) => a(e, t) ?? e,
|
|
44
45
|
plural(e, t, n) {
|
|
45
|
-
|
|
46
|
-
let
|
|
46
|
+
o ??= new Intl.PluralRules(i);
|
|
47
|
+
let r = {
|
|
47
48
|
...n,
|
|
48
49
|
count: t
|
|
49
50
|
};
|
|
50
|
-
return
|
|
51
|
+
return a(`${e}_${o.select(t)}`, r) ?? a(`${e}_other`, r) ?? e;
|
|
51
52
|
},
|
|
52
|
-
error(
|
|
53
|
-
if (typeof
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
53
|
+
error(r) {
|
|
54
|
+
if (typeof r == "string") return a(`errors.${r}`, { seconds: 60 }) ?? e.errors.generic;
|
|
55
|
+
let i = r ?? {}, o = t(r) ?? (typeof i.code == "string" ? i.code : void 0), s = typeof i.message == "string" && i.message ? f(i.message) : void 0;
|
|
56
|
+
if (i.unknownCode && s) return s;
|
|
57
|
+
let c = i.details ?? {}, l = {
|
|
58
|
+
seconds: i.retryAfter ?? 60,
|
|
59
|
+
width: c.width ?? "",
|
|
60
|
+
height: c.height ?? "",
|
|
61
|
+
min: c.min_width ?? "",
|
|
62
|
+
megapixels: c.max_pixels ? Math.round(c.max_pixels / 1e6) : "",
|
|
63
|
+
format: u(c.type),
|
|
64
|
+
allowed: (c.allowed ?? []).map(u).join(", "),
|
|
65
|
+
size: c.size ? d(c.size) : "",
|
|
66
|
+
max: c.max_bytes ? d(c.max_bytes) : "",
|
|
67
|
+
frames: c.frames ?? "",
|
|
68
|
+
maxFrames: c.max_frames ?? "",
|
|
69
|
+
maxSeconds: c.max_seconds ?? "",
|
|
70
|
+
duration: c.seconds ?? "",
|
|
71
|
+
shape: c.width && c.height ? n(c.width / c.height) : "",
|
|
72
|
+
minAspect: c.min_aspect ? n(c.min_aspect) : "",
|
|
73
|
+
maxAspect: c.max_aspect ? n(c.max_aspect) : "",
|
|
74
|
+
maxFiles: c.max ?? "",
|
|
75
|
+
maxChars: c.max ?? ""
|
|
73
76
|
};
|
|
74
|
-
return
|
|
77
|
+
return o === "invalid_request" && s ? s : o === "type_not_allowed" && c.allowed?.length ? `${a("errors.type_not_allowed", l)} ${a("errors.allowedTypes", l)}` : o === "comment_too_long" && c.max ? a("errors.commentTooLongBy", l) ?? e.errors.comment_too_long : o === "too_large" && c.max_bytes ? a("errors.tooLargeBy", l) ?? e.errors.too_large : o === "image_too_large" && (c.frames ?? 0) > 1 ? a("errors.animationTooLarge", l) ?? e.errors.image_too_large : o === "animation_too_long" && (c.max_frames || c.max_seconds) ? a(c.max_frames ? "errors.animationFrames" : "errors.animationSeconds", l) ?? e.errors.generic : o === "video_too_long" && c.max_seconds ? a("errors.videoTooLongBy", l) ?? e.errors.video_too_long : o === "video_too_large" && c.max_pixels ? a("errors.videoTooLargeBy", l) ?? e.errors.video_too_large : o === "video_aspect_unsupported" && c.width && c.height && c.min_aspect && c.max_aspect ? a("errors.videoAspectBy", l) ?? e.errors.video_aspect_unsupported : o === "too_many_files" && c.max ? a("errors.tooManyFilesBy", l) ?? e.errors.too_many_files : o && a(`errors.${o}`, l) || (s && (i.refusal ?? (i.status !== void 0 && i.status >= 400 && i.status < 500)) ? s : e.errors.generic);
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
|
-
function
|
|
81
|
+
function u(e) {
|
|
79
82
|
if (!e) return "";
|
|
80
83
|
let t = e.split("/")[1] ?? e;
|
|
81
84
|
return (t.split("+")[0] ?? t).replace(/^x-/, "").toUpperCase().replace(/^JPG$/, "JPEG").replace(/^WEBP$/, "WebP");
|
|
82
85
|
}
|
|
83
|
-
function
|
|
86
|
+
function d(e) {
|
|
84
87
|
let t = e / 1048576;
|
|
85
88
|
return t >= 1024 ? `${+(t / 1024).toFixed(1)} GB` : `${+t.toFixed(+(t < 10))} MB`;
|
|
86
89
|
}
|
|
87
|
-
function
|
|
90
|
+
function f(e) {
|
|
88
91
|
let t = e.replace(/^media(\/\w+)?: /, "");
|
|
89
92
|
return t.charAt(0).toUpperCase() + t.slice(1) + (/[.!?]$/.test(t) ? "" : ".");
|
|
90
93
|
}
|
|
91
94
|
//#endregion
|
|
92
|
-
export {
|
|
95
|
+
export { l as createTranslator, r as defaultMessages, i as defineMessages, u as formatName, s as interpolate, d as megabytes, o as resolveMessages };
|
|
93
96
|
|
|
94
97
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","names":[],"sources":["../../src/i18n/messages.ts"],"sourcesContent":["import { en } from \"../locales/en.js\";\nimport type { ErrorDetails } from \"../client/generated/wire.js\";\nimport { ratioLabel } from \"../client/media/rules.js\";\n\n\ntype Widen<T> = { [K in keyof T]: T[K] extends string ? string : Widen<T[K]> };\ntype DeepPartial<T> = { [K in keyof T]?: T[K] extends string ? string : DeepPartial<T[K]> };\ntype Paths<T, P extends string = \"\"> = {\n [K in keyof T & string]: T[K] extends string ? `${P}${K}` : Paths<T[K], `${P}${K}.`>;\n}[keyof T & string];\n\n/** The complete message tree; English is the reference shape. */\nexport type ContentKitUiMessages = Widen<typeof en>;\n/** A locale bundle or host override: any subset of the tree. */\nexport type ContentKitUiMessageBundle = DeepPartial<ContentKitUiMessages>;\n/** Dotted key of any message, e.g. `crop.title`. */\nexport type MessageKey = Paths<ContentKitUiMessages>;\nexport type MessageVars = Record<string, string | number>;\n/** Host translation hook; return nothing (or the key) to use ours. */\nexport type ContentKitUiTranslate = (key: string, vars?: MessageVars) => string | null | undefined;\n\nexport const defaultMessages: ContentKitUiMessages = en;\n\nexport function defineMessages(bundle: ContentKitUiMessageBundle): ContentKitUiMessageBundle {\n return bundle;\n}\n\ntype Tree = { [key: string]: string | Tree };\n\nfunction mergeInto(target: Tree, source: Tree): Tree {\n const out: Tree = { ...target };\n for (const [key, value] of Object.entries(source)) {\n if (value === undefined || value === null) continue;\n const current = out[key];\n if (typeof value === \"string\") {\n if (value !== \"\") out[key] = value;\n } else out[key] = mergeInto(typeof current === \"object\" ? current : {}, value);\n }\n return out;\n}\n\n/** Layers bundles over English; later bundles win, missing keys fall back. */\nexport function resolveMessages(bundles?: ContentKitUiMessageBundle | readonly ContentKitUiMessageBundle[]): ContentKitUiMessages {\n const list = bundles ? (Array.isArray(bundles) ? bundles : [bundles]) : [];\n let tree = en as unknown as Tree;\n for (const b of list) tree = mergeInto(tree, b as Tree);\n return tree as unknown as ContentKitUiMessages;\n}\n\nexport function interpolate(template: string, vars?: MessageVars): string {\n if (!vars) return template;\n return template.replace(/\\{(\\w+)\\}/g, (m, name: string) => (name in vars ? String(vars[name]) : m));\n}\n\nfunction lookup(messages: ContentKitUiMessages, key: string): string | undefined {\n let node: unknown = messages;\n for (const part of key.split(\".\")) {\n if (!node || typeof node !== \"object\") return undefined;\n node = (node as Tree)[part];\n }\n return typeof node === \"string\" ? node : undefined;\n}\n\nexport interface Translator {\n messages: ContentKitUiMessages;\n /** The UI's BCP 47 language (dates, plurals); undefined: the browser's. */\n language?: string;\n t(key: MessageKey, vars?: MessageVars): string;\n /** key_one or key_other by count (as the language's plural rules pick), with {count}. */\n plural(key: string, count: number, vars?: MessageVars): string;\n /** Message for a ContentKitError (or its code). */\n error(error: unknown): string;\n}\n\nexport function createTranslator(messages: ContentKitUiMessages, hostT?: ContentKitUiTranslate, language?: string): Translator {\n const translate = (key: string, vars?: MessageVars) => {\n const hosted = hostT?.(key, vars);\n if (hosted && hosted !== key) return hosted;\n const own = lookup(messages, key);\n return own === undefined ? undefined : interpolate(own, vars);\n };\n let rules: Intl.PluralRules | undefined;\n return {\n messages,\n language,\n t: (key, vars) => translate(key, vars) ?? key,\n plural(key, count, vars) {\n rules ??= new Intl.PluralRules(language);\n const all = { ...vars, count };\n return translate(`${key}_${rules.select(count)}`, all) ?? translate(`${key}_other`, all) ?? key;\n },\n error(error) {\n if (typeof error === \"string\") return translate(`errors.${error}`, { seconds: 60 }) ?? messages.errors.generic;\n const e = (error ?? {}) as { code?: unknown; message?: unknown; status?: number; retryAfter?: number; details?: ErrorDetails; refusal?: boolean };\n const code = typeof e.code === \"string\" ? e.code : undefined;\n const server = typeof e.message === \"string\" && e.message ? sentence(e.message) : undefined;\n const d = e.details ?? {};\n const vars: MessageVars = {\n seconds: e.retryAfter ?? 60,\n width: d.width ?? \"\",\n height: d.height ?? \"\",\n min: d.min_width ?? \"\",\n megapixels: d.max_pixels ? Math.round(d.max_pixels / 1e6) : \"\",\n format: formatName(d.type),\n allowed: (d.allowed ?? []).map(formatName).join(\", \"),\n size: d.size ? megabytes(d.size) : \"\",\n max: d.max_bytes ? megabytes(d.max_bytes) : \"\",\n frames: d.frames ?? \"\",\n maxFrames: d.max_frames ?? \"\",\n maxSeconds: d.max_seconds ?? \"\",\n duration: d.seconds ?? \"\",\n shape: d.width && d.height ? ratioLabel(d.width / d.height) : \"\",\n minAspect: d.min_aspect ? ratioLabel(d.min_aspect) : \"\",\n maxAspect: d.max_aspect ? ratioLabel(d.max_aspect) : \"\",\n maxFiles: d.max ?? \"\",\n maxChars: d.max ?? \"\",\n };\n // A refusal the server words itself states its rule; show it rather than a vaguer line.\n if (code === \"invalid_request\" && server) return server;\n if (code === \"type_not_allowed\" && d.allowed?.length) return `${translate(\"errors.type_not_allowed\", vars)} ${translate(\"errors.allowedTypes\", vars)}`;\n if (code === \"comment_too_long\" && d.max) return translate(\"errors.commentTooLongBy\", vars) ?? messages.errors.comment_too_long;\n if (code === \"too_large\" && d.max_bytes) return translate(\"errors.tooLargeBy\", vars) ?? messages.errors.too_large;\n if (code === \"image_too_large\" && (d.frames ?? 0) > 1) return translate(\"errors.animationTooLarge\", vars) ?? messages.errors.image_too_large;\n if (code === \"animation_too_long\" && (d.max_frames || d.max_seconds)) return translate(d.max_frames ? \"errors.animationFrames\" : \"errors.animationSeconds\", vars) ?? messages.errors.generic;\n if (code === \"video_too_long\" && d.max_seconds) return translate(\"errors.videoTooLongBy\", vars) ?? messages.errors.video_too_long;\n if (code === \"video_too_large\" && d.max_pixels) return translate(\"errors.videoTooLargeBy\", vars) ?? messages.errors.video_too_large;\n if (code === \"video_aspect_unsupported\" && d.width && d.height && d.min_aspect && d.max_aspect) return translate(\"errors.videoAspectBy\", vars) ?? messages.errors.video_aspect_unsupported;\n if (code === \"too_many_files\" && d.max) return translate(\"errors.tooManyFilesBy\", vars) ?? messages.errors.too_many_files;\n const own = code && translate(`errors.${code}`, vars);\n if (own) return own;\n // An unknown refusal (4xx) says what is wrong; faults get the generic line.\n if (server && (e.refusal ?? (e.status !== undefined && e.status >= 400 && e.status < 500))) return server;\n return messages.errors.generic;\n },\n };\n}\n\n/** \"image/avif\" → \"AVIF\". */\nexport function formatName(type?: string): string {\n if (!type) return \"\";\n const sub = type.split(\"/\")[1] ?? type;\n return (sub.split(\"+\")[0] ?? sub).replace(/^x-/, \"\").toUpperCase().replace(/^JPG$/, \"JPEG\").replace(/^WEBP$/, \"WebP\");\n}\n\n/** A byte size as the messages state it: \"2.5 MB\", \"25 MB\", \"20 GB\". */\nexport function megabytes(n: number): string {\n const mb = n / (1024 * 1024);\n return mb >= 1024 ? `${+(mb / 1024).toFixed(1)} GB` : `${+mb.toFixed(mb < 10 ? 1 : 0)} MB`;\n}\n\nfunction sentence(s: string): string {\n const t = s.replace(/^media(\\/\\w+)?: /, \"\");\n return t.charAt(0).toUpperCase() + t.slice(1) + (/[.!?]$/.test(t) ? \"\" : \".\");\n}\n"],"m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AAM,CAAC,CAAC,QAAQ,UAAU,MAAM;AACtH;AAGA,SAAgB,EAAU,GAAmB;CAC3C,IAAM,IAAK,IAAK;CAChB,OAAO,KAAM,OAAO,GAAG,EAAE,IAAK,KAAA,CAAM,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,EAAG,QAAQ,MAAK,GAAU,EAAE;AACxF;AAEA,SAAS,EAAS,GAAmB;CACnC,IAAM,IAAI,EAAE,QAAQ,oBAAoB,EAAE;CAC1C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,MAAM,CAAC,KAAK,SAAS,KAAK,CAAC,IAAI,KAAK;AAC3E"}
|
|
1
|
+
{"version":3,"file":"messages.js","names":[],"sources":["../../src/i18n/messages.ts"],"sourcesContent":["import { en } from \"../locales/en.js\";\nimport type { ErrorDetails } from \"../client/generated/wire.js\";\nimport { ratioLabel } from \"../client/media/rules.js\";\nimport { transportFailure } from \"../client/errors.js\";\n\n\ntype Widen<T> = { [K in keyof T]: T[K] extends string ? string : Widen<T[K]> };\ntype DeepPartial<T> = { [K in keyof T]?: T[K] extends string ? string : DeepPartial<T[K]> };\ntype Paths<T, P extends string = \"\"> = {\n [K in keyof T & string]: T[K] extends string ? `${P}${K}` : Paths<T[K], `${P}${K}.`>;\n}[keyof T & string];\n\n/** The complete message tree; English is the reference shape. */\nexport type ContentKitUiMessages = Widen<typeof en>;\n/** A locale bundle or host override: any subset of the tree. */\nexport type ContentKitUiMessageBundle = DeepPartial<ContentKitUiMessages>;\n/** Dotted key of any message, e.g. `crop.title`. */\nexport type MessageKey = Paths<ContentKitUiMessages>;\nexport type MessageVars = Record<string, string | number>;\n/** Host translation hook; return nothing (or the key) to use ours. */\nexport type ContentKitUiTranslate = (key: string, vars?: MessageVars) => string | null | undefined;\n\nexport const defaultMessages: ContentKitUiMessages = en;\n\nexport function defineMessages(bundle: ContentKitUiMessageBundle): ContentKitUiMessageBundle {\n return bundle;\n}\n\ntype Tree = { [key: string]: string | Tree };\n\nfunction mergeInto(target: Tree, source: Tree): Tree {\n const out: Tree = { ...target };\n for (const [key, value] of Object.entries(source)) {\n if (value === undefined || value === null) continue;\n const current = out[key];\n if (typeof value === \"string\") {\n if (value !== \"\") out[key] = value;\n } else out[key] = mergeInto(typeof current === \"object\" ? current : {}, value);\n }\n return out;\n}\n\n/** Layers bundles over English; later bundles win, missing keys fall back. */\nexport function resolveMessages(bundles?: ContentKitUiMessageBundle | readonly ContentKitUiMessageBundle[]): ContentKitUiMessages {\n const list = bundles ? (Array.isArray(bundles) ? bundles : [bundles]) : [];\n let tree = en as unknown as Tree;\n for (const b of list) tree = mergeInto(tree, b as Tree);\n return tree as unknown as ContentKitUiMessages;\n}\n\nexport function interpolate(template: string, vars?: MessageVars): string {\n if (!vars) return template;\n return template.replace(/\\{(\\w+)\\}/g, (m, name: string) => (name in vars ? String(vars[name]) : m));\n}\n\nfunction lookup(messages: ContentKitUiMessages, key: string): string | undefined {\n let node: unknown = messages;\n for (const part of key.split(\".\")) {\n if (!node || typeof node !== \"object\") return undefined;\n node = (node as Tree)[part];\n }\n return typeof node === \"string\" ? node : undefined;\n}\n\nexport interface Translator {\n messages: ContentKitUiMessages;\n /** The UI's BCP 47 language (dates, plurals); undefined: the browser's. */\n language?: string;\n t(key: MessageKey, vars?: MessageVars): string;\n /** key_one or key_other by count (as the language's plural rules pick), with {count}. */\n plural(key: string, count: number, vars?: MessageVars): string;\n /** Message for a ContentKitError (or its code). */\n error(error: unknown): string;\n}\n\nexport function createTranslator(messages: ContentKitUiMessages, hostT?: ContentKitUiTranslate, language?: string): Translator {\n const translate = (key: string, vars?: MessageVars) => {\n const hosted = hostT?.(key, vars);\n if (hosted && hosted !== key) return hosted;\n const own = lookup(messages, key);\n return own === undefined ? undefined : interpolate(own, vars);\n };\n let rules: Intl.PluralRules | undefined;\n return {\n messages,\n language,\n t: (key, vars) => translate(key, vars) ?? key,\n plural(key, count, vars) {\n rules ??= new Intl.PluralRules(language);\n const all = { ...vars, count };\n return translate(`${key}_${rules.select(count)}`, all) ?? translate(`${key}_other`, all) ?? key;\n },\n error(error) {\n if (typeof error === \"string\") return translate(`errors.${error}`, { seconds: 60 }) ?? messages.errors.generic;\n const e = (error ?? {}) as { code?: unknown; message?: unknown; status?: number; retryAfter?: number; details?: ErrorDetails; refusal?: boolean; unknownCode?: string };\n const code = transportFailure(error) ?? (typeof e.code === \"string\" ? e.code : undefined);\n const server = typeof e.message === \"string\" && e.message ? sentence(e.message) : undefined;\n // A code from a newer server: its own wording beats our line for the status.\n if (e.unknownCode && server) return server;\n const d = e.details ?? {};\n const vars: MessageVars = {\n seconds: e.retryAfter ?? 60,\n width: d.width ?? \"\",\n height: d.height ?? \"\",\n min: d.min_width ?? \"\",\n megapixels: d.max_pixels ? Math.round(d.max_pixels / 1e6) : \"\",\n format: formatName(d.type),\n allowed: (d.allowed ?? []).map(formatName).join(\", \"),\n size: d.size ? megabytes(d.size) : \"\",\n max: d.max_bytes ? megabytes(d.max_bytes) : \"\",\n frames: d.frames ?? \"\",\n maxFrames: d.max_frames ?? \"\",\n maxSeconds: d.max_seconds ?? \"\",\n duration: d.seconds ?? \"\",\n shape: d.width && d.height ? ratioLabel(d.width / d.height) : \"\",\n minAspect: d.min_aspect ? ratioLabel(d.min_aspect) : \"\",\n maxAspect: d.max_aspect ? ratioLabel(d.max_aspect) : \"\",\n maxFiles: d.max ?? \"\",\n maxChars: d.max ?? \"\",\n };\n // A refusal the server words itself states its rule; show it rather than a vaguer line.\n if (code === \"invalid_request\" && server) return server;\n if (code === \"type_not_allowed\" && d.allowed?.length) return `${translate(\"errors.type_not_allowed\", vars)} ${translate(\"errors.allowedTypes\", vars)}`;\n if (code === \"comment_too_long\" && d.max) return translate(\"errors.commentTooLongBy\", vars) ?? messages.errors.comment_too_long;\n if (code === \"too_large\" && d.max_bytes) return translate(\"errors.tooLargeBy\", vars) ?? messages.errors.too_large;\n if (code === \"image_too_large\" && (d.frames ?? 0) > 1) return translate(\"errors.animationTooLarge\", vars) ?? messages.errors.image_too_large;\n if (code === \"animation_too_long\" && (d.max_frames || d.max_seconds)) return translate(d.max_frames ? \"errors.animationFrames\" : \"errors.animationSeconds\", vars) ?? messages.errors.generic;\n if (code === \"video_too_long\" && d.max_seconds) return translate(\"errors.videoTooLongBy\", vars) ?? messages.errors.video_too_long;\n if (code === \"video_too_large\" && d.max_pixels) return translate(\"errors.videoTooLargeBy\", vars) ?? messages.errors.video_too_large;\n if (code === \"video_aspect_unsupported\" && d.width && d.height && d.min_aspect && d.max_aspect) return translate(\"errors.videoAspectBy\", vars) ?? messages.errors.video_aspect_unsupported;\n if (code === \"too_many_files\" && d.max) return translate(\"errors.tooManyFilesBy\", vars) ?? messages.errors.too_many_files;\n const own = code && translate(`errors.${code}`, vars);\n if (own) return own;\n // An unknown refusal (4xx) says what is wrong; faults get the generic line.\n if (server && (e.refusal ?? (e.status !== undefined && e.status >= 400 && e.status < 500))) return server;\n return messages.errors.generic;\n },\n };\n}\n\n/** \"image/avif\" → \"AVIF\". */\nexport function formatName(type?: string): string {\n if (!type) return \"\";\n const sub = type.split(\"/\")[1] ?? type;\n return (sub.split(\"+\")[0] ?? sub).replace(/^x-/, \"\").toUpperCase().replace(/^JPG$/, \"JPEG\").replace(/^WEBP$/, \"WebP\");\n}\n\n/** A byte size as the messages state it: \"2.5 MB\", \"25 MB\", \"20 GB\". */\nexport function megabytes(n: number): string {\n const mb = n / (1024 * 1024);\n return mb >= 1024 ? `${+(mb / 1024).toFixed(1)} GB` : `${+mb.toFixed(mb < 10 ? 1 : 0)} MB`;\n}\n\nfunction sentence(s: string): string {\n const t = s.replace(/^media(\\/\\w+)?: /, \"\");\n return t.charAt(0).toUpperCase() + t.slice(1) + (/[.!?]$/.test(t) ? \"\" : \".\");\n}\n"],"mappings":";;;;AAsBA,IAAa,IAAwC;AAErD,SAAgB,EAAe,GAA8D;CAC3F,OAAO;AACT;AAIA,SAAS,EAAU,GAAc,GAAoB;CACnD,IAAM,IAAY,EAAE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B;CAC3C,IAAM,IAAK,IAAK;CAChB,OAAO,KAAM,OAAO,GAAG,EAAE,IAAK,KAAA,CAAM,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,EAAG,QAAQ,MAAK,GAAU,EAAE;AACxF;AAEA,SAAS,EAAS,GAAmB;CACnC,IAAM,IAAI,EAAE,QAAQ,oBAAoB,EAAE;CAC1C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,MAAM,CAAC,KAAK,SAAS,KAAK,CAAC,IAAI,KAAK;AAC3E"}
|
package/dist/index.js
CHANGED
|
@@ -55,14 +55,14 @@ import { ContentFilterSettings as De, ReleaseDateIndex as Oe } from "./component
|
|
|
55
55
|
import { ContentListing as ke, sortLabel as Ae } from "./components/content/listing.js";
|
|
56
56
|
import { ReaderManifestEditor as je } from "./components/admin/reader-manifest.js";
|
|
57
57
|
import { MediaItemPanel as Me, VideoMediaEditor as Ne, videoPaths as Pe } from "./components/admin/media-item-panel.js";
|
|
58
|
-
import { AccessEditor as Fe, ContentDetailsEditor as Ie, ContentSections as Le, SegmentsEditor as Re,
|
|
59
|
-
import { ReaderStats as
|
|
60
|
-
import { VersionDownloadButton as
|
|
61
|
-
import { UserCommentStanding as
|
|
62
|
-
import { PollManager as
|
|
63
|
-
import { ContentEditor as
|
|
64
|
-
import { GroupManager as
|
|
65
|
-
import { StatsDashboard as
|
|
66
|
-
import { UploadQueue as
|
|
67
|
-
import { NotificationBell as
|
|
68
|
-
export { Fe as AccessEditor, O as AvatarUpload, z as BanNotice, q as BannedWords, xe as CardGrid, B as CommentBanDialog, V as CommentBans, Y as CommentModeration, H as Comments, _e as ContentCard, Ie as ContentDetailsEditor,
|
|
58
|
+
import { AccessEditor as Fe, ContentDetailsEditor as Ie, ContentSections as Le, SegmentsEditor as Re, VersionCover as ze, VersionsEditor as Be, versionLabel as Ve } from "./components/content/editors.js";
|
|
59
|
+
import { ReaderStats as He } from "./components/content/reader-stats.js";
|
|
60
|
+
import { VersionDownloadButton as Ue } from "./components/content/download-button.js";
|
|
61
|
+
import { UserCommentStanding as We, useUserCommentStandingAccess as Ge } from "./components/admin/user-comment-standing.js";
|
|
62
|
+
import { PollManager as Ke, pollState as qe, usePollManagerAccess as Je } from "./components/admin/poll-manager.js";
|
|
63
|
+
import { ContentEditor as Ye, ContentManager as Xe, contentStatus as Ze, useContentManagerAccess as Qe } from "./components/admin/content-manager.js";
|
|
64
|
+
import { GroupManager as $e, useGroupManagerAccess as et } from "./components/admin/group-manager.js";
|
|
65
|
+
import { StatsDashboard as tt } from "./components/admin/stats-dashboard.js";
|
|
66
|
+
import { UploadQueue as nt } from "./components/admin/upload-queue.js";
|
|
67
|
+
import { NotificationBell as rt, NotificationInbox as it } from "./components/notifications.js";
|
|
68
|
+
export { Fe as AccessEditor, O as AvatarUpload, z as BanNotice, q as BannedWords, xe as CardGrid, B as CommentBanDialog, V as CommentBans, Y as CommentModeration, H as Comments, _e as ContentCard, Ie as ContentDetailsEditor, Ye as ContentEditor, De as ContentFilterSettings, Se as ContentGrid, Ce as ContentHistory, l as ContentKitUiProvider, c as ContentKitUiRoot, ke as ContentListing, Xe as ContentManager, we as ContentRail, Le as ContentSections, k as CoverUpload, e as DensityContext, u as EncodeProgress, U as FavoriteButton, Z as GroupAvatar, ue as GroupBanner, Q as GroupCover, ne as GroupDirectory, pe as GroupEditor, re as GroupHeader, de as GroupImageEditor, $ as GroupLink, $e as GroupManager, he as GroupMembers, me as GroupMergeDialog, ee as GroupPicker, N as HoverPreview, J as IPBans, p as ImageCropDialog, P as LazyMount, j as MediaFolderEditor, E as MediaGallery, Me as MediaItemPanel, F as MediaReadinessNotice, fe as MembershipBox, ge as MembershipEditor, I as NoAccess, rt as NotificationBell, it as NotificationInbox, le as OfferFields, ve as OwnerChip, L as Pager, ae as Paywall, G as Poll, K as PollEditor, Ke as PollManager, ye as PostCard, W as ReactionButtons, je as ReaderManifestEditor, He as ReaderStats, Oe as ReleaseDateIndex, t as RenditionImg, Ee as SearchBox, Te as SearchResults, Re as SegmentsEditor, h as SlotEditError, g as SlotEditMenu, _ as SlotEditor, m as SlotImage, A as SortableList, C as SpriteFrame, tt as StatsDashboard, nt as UploadQueue, We as UserCommentStanding, ze as VersionCover, Ue as VersionDownloadButton, oe as VersionPicker, Be as VersionsEditor, Ne as VideoMediaEditor, D as VideoMiniPlayer, w as VideoPlayer, y as VideoPoster, b as VideoPosterPicker, Ze as contentStatus, r as createTranslator, i as defaultMessages, a as defineMessages, M as describeRules, d as encodeLabel, ie as formatAttribute, f as formatRemaining, x as formatTime, te as labelOf, be as lockLabel, S as playerButtonClass, qe as pollState, se as priceLabel, T as qualityLabel, o as resolveMessages, Ae as sortLabel, X as useCommentModerationAccess, R as useConfirm, Qe as useContentManagerAccess, et as useGroupManagerAccess, s as useMessages, Je as usePollManagerAccess, n as useRendition, v as useSlotEditor, Ge as useUserCommentStandingAccess, ce as useVersionMenuItems, Ve as versionLabel, Pe as videoPaths };
|
package/dist/locales/de.js
CHANGED
|
@@ -236,7 +236,8 @@ var a = {
|
|
|
236
236
|
download_unavailable: "Das ist gerade nicht zum Herunterladen verfügbar.",
|
|
237
237
|
no_download: "Hier gibt es noch nichts herunterzuladen.",
|
|
238
238
|
generic: "Auf unserer Seite ist etwas schiefgelaufen. Bitte versuche es erneut.",
|
|
239
|
-
network: "
|
|
239
|
+
network: "Der Server ist nicht erreichbar. Prüfe deine Verbindung und versuche es erneut.",
|
|
240
|
+
server_unavailable: "Der Server antwortet gerade nicht. Bitte versuche es gleich noch einmal.",
|
|
240
241
|
storage: "Der Upload wurde unterbrochen. Bitte versuche es erneut.",
|
|
241
242
|
decode: "Diese Datei lässt sich nicht als Bild öffnen.",
|
|
242
243
|
invalid_request: "Das Bild konnte nicht gespeichert werden.",
|
package/dist/locales/de.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.js","names":[],"sources":["../../src/locales/de.ts"],"sourcesContent":["import type { ContentKitUiMessageBundle } from \"../i18n/messages.js\";\nimport { admin } from \"./admin/de.js\";\nimport { social } from \"./social/de.js\";\nimport { groups } from \"./groups/de.js\";\nimport { discovery } from \"./discovery/de.js\";\nimport { content } from \"./content/de.js\";\n\nexport const de: ContentKitUiMessageBundle = {\n ...social,\n ...admin,\n ...groups,\n ...discovery,\n ...content,\n common: {\n cancel: \"Abbrechen\",\n close: \"Schließen\",\n save: \"Speichern\",\n saving: \"Wird gespeichert…\",\n retry: \"Erneut versuchen\",\n change: \"Ändern\",\n upload: \"Hochladen\",\n editCrop: \"Zuschnitt bearbeiten\",\n remove: \"Entfernen\",\n rename: \"Umbenennen\",\n replace: \"Ersetzen\",\n },\n crop: {\n title: \"Bild zuschneiden\",\n avatarTitle: \"Avatar zuschneiden\",\n coverTitle: \"Titelbild zuschneiden\",\n description: \"Ziehen zum Verschieben. Scrollen, zwei Finger oder den Regler zum Zoomen verwenden.\",\n area: \"Zuschnittbereich. Pfeiltasten verschieben das Bild, + und − zoomen, R dreht.\",\n zoom: \"Zoom\",\n zoomIn: \"Vergrößern\",\n zoomOut: \"Verkleinern\",\n rotateLeft: \"Nach links drehen\",\n rotateRight: \"Nach rechts drehen\",\n reset: \"Zurücksetzen\",\n undersized: \"Dieser Zuschnitt ist {width} px breit; ab {target} px wirkt er auf hochauflösenden Bildschirmen scharf.\",\n tooSmall: \"Dieses Bild ist höchstens {width} px breit; es muss mindestens {min} px breit sein. Verwende ein größeres Bild.\",\n shape: \"Format\",\n original: \"Original\",\n preview: \"Vorschau des Ergebnisses\",\n size: \"{width} × {height} px\",\n },\n sortable: {\n handle: \"{name} verschieben\",\n instructions: \"Zum Umsortieren Leertaste oder Eingabe drücken, mit den Pfeiltasten verschieben und mit Leertaste oder Eingabe ablegen. Escape bricht ab.\",\n pickedUp: \"{name} aufgenommen, Position {position} von {total}.\",\n over: \"{name} wird an Position {position} von {total} verschoben.\",\n dropped: \"{name} an Position {position} von {total} abgelegt.\",\n droppedAway: \"{name} abgelegt.\",\n canceled: \"Verschieben von {name} abgebrochen.\",\n },\n folder: {\n label: \"Medien\",\n drop: \"Dateien hierher ziehen oder klicken, um sie auszuwählen\",\n add: \"Dateien hinzufügen\",\n commit: \"{count} hinzufügen\",\n commitAgain: \"Erneut hinzufügen\",\n adding: \"Wird hinzugefügt…\",\n queued: \"Wartet\",\n uploaded: \"Hochgeladen\",\n notAdded: \"Hochgeladen, noch nicht hinzugefügt\",\n processing: \"Wird verarbeitet…\",\n processingPercent: \"Wird verarbeitet: {percent} %\",\n edited: \"Bearbeitet\",\n failed: \"Nicht verarbeitet\",\n failedVideo: \"Nicht abspielbar\",\n crop: \"Zuschneiden und drehen\",\n select: \"{name} auswählen\",\n selected: \"{count} ausgewählt\",\n removeSelected: \"Auswahl entfernen\",\n clearSelection: \"Auswahl aufheben\",\n confirmRemove: \"{count} Dateien entfernen? Das lässt sich nicht rückgängig machen.\",\n renameLabel: \"Neuer Name für {name}\",\n paused: \"Uploads angehalten\",\n resume: \"Fortsetzen\",\n dismiss: \"Schließen\",\n limitSize: \"{what} bis {size}\",\n limitMax: \"höchstens {max}\",\n limitAspect: \"Videoformate von {min} bis {max}\",\n kinds: {\n image: \"Bilder\",\n video: \"Videos\",\n audio: \"Audio\",\n subtitle: \"Untertitel\",\n file: \"Dateien\",\n },\n },\n readiness: {\n processing: \"Medien werden verarbeitet\",\n processingHint: \"Es wird automatisch veröffentlicht, sobald alle Dateien verarbeitet sind.\",\n failedOne: \"{name} konnte nicht verarbeitet werden\",\n failedMany: \"{count} Dateien konnten nicht verarbeitet werden: {names}\",\n failedHint: \"Entferne sie, dann wird es automatisch veröffentlicht.\",\n },\n avatar: {\n label: \"Avatar\",\n empty: \"Kein Avatar\",\n hint: \"Quadratisches Bild, mindestens {size} px.\",\n },\n cover: {\n label: \"Titelbild\",\n empty: \"Kein Titelbild\",\n hint: \"Breites Bild, mindestens {width} × {height} px.\",\n drop: \"Bild hierher ziehen\",\n },\n poster: {\n title: \"Cover festlegen\",\n description: \"Wähle ein Bild aus dem Video oder lade eines hoch. Das Cover behält das Format des Videos.\",\n frame: \"Videobild\",\n upload: \"Bild hochladen\",\n time: \"Zeit\",\n previousFrame: \"Vorheriges Bild\",\n nextFrame: \"Nächstes Bild\",\n jumpTo: \"Zu {time} springen\",\n useFrame: \"Dieses Bild verwenden\",\n crop: \"Zuschneiden…\",\n cropTitle: \"Cover zuschneiden\",\n auto: \"Automatisch\",\n autoHint: \"Bis du eines wählst, wird ein automatisches Bild verwendet.\",\n drop: \"Bild hier ablegen oder klicken, um eines auszuwählen\",\n processing: \"Das Video wird noch verarbeitet. Ein Cover kannst du festlegen, sobald es kodiert ist.\",\n rendering: \"Cover wird erstellt…\",\n },\n progress: {\n decoding: \"Bild wird geöffnet…\",\n hashing: \"Wird vorbereitet…\",\n uploading: \"Wird hochgeladen… {percent} %\",\n completing: \"Upload wird abgeschlossen…\",\n rendering: \"Größen werden erstellt…\",\n },\n encode: {\n processing: \"Video wird verarbeitet\",\n queued: \"Wartet auf Verarbeitung\",\n queuedPosition: \"In der Warteschlange · Platz {position}\",\n stalled: \"Verarbeitung pausiert, warte auf den Server…\",\n segments: \"Segment {done} / {total}\",\n higherQualities: \"Höhere Qualitäten\",\n remainingSeconds: \"noch ca. {seconds} s\",\n remainingMinutes: \"noch ca. {minutes} Min.\",\n remainingHours: \"noch ca. {hours} Std. {minutes} Min.\",\n almostDone: \"fast fertig\",\n estimating: \"wird geschätzt…\",\n phase: {\n queued: \"In der Warteschlange\",\n downloading: \"Vorbereiten\",\n probing: \"Analysieren\",\n encoding: \"Kodieren\",\n muxing: \"Verpacken\",\n uploading: \"Speichern\",\n publishing: \"Veröffentlichen\",\n images: \"Cover wird erstellt\",\n },\n },\n gallery: {\n label: \"Medien\",\n view: \"Ansicht\",\n carousel: \"Karussell\",\n grid: \"Raster\",\n counter: \"{current} / {total}\",\n slide: \"{current} von {total}\",\n previous: \"Zurück\",\n next: \"Weiter\",\n goTo: \"Zu Element {index}\",\n open: \"Element {index} von {total} öffnen\",\n lightbox: \"Medienansicht\",\n locked: \"Der Rest ist gesperrt\",\n processingImage: \"Bild wird verarbeitet…\",\n image: \"Bild {index}\",\n video: \"Video {index}\",\n audio: \"Audio {index}\",\n processingAudio: \"Audio wird verarbeitet…\",\n download: \"Herunterladen\",\n failedAudio: \"Dieses Audio konnte nicht verarbeitet werden.\",\n failedImage: \"Dieses Bild konnte nicht verarbeitet werden.\",\n },\n player: {\n play: \"Video abspielen\",\n loading: \"Video wird geladen…\",\n retry: \"Erneut versuchen\",\n code: \"Code {code}\",\n quality: \"Qualität\",\n auto: \"Automatisch\",\n autoCurrent: \"Automatisch ({quality})\",\n label: \"Videoplayer\",\n resume: \"Abspielen\",\n pause: \"Pause\",\n replay: \"Noch einmal abspielen\",\n seek: \"Suchen\",\n time: \"{current} von {duration}\",\n seekBack: \"{seconds} Sekunden zurück\",\n seekForward: \"{seconds} Sekunden vor\",\n seconds: \"{seconds} Sekunden\",\n mute: \"Stummschalten\",\n unmute: \"Ton an\",\n volume: \"Lautstärke\",\n settings: \"Einstellungen\",\n speed: \"Geschwindigkeit\",\n normal: \"Normal\",\n audio: \"Audio\",\n subtitles: \"Untertitel\",\n subtitlesOff: \"Aus\",\n forced: \"{label} (erzwungen)\",\n track: \"Spur {number}\",\n fullscreen: \"Vollbild\",\n exitFullscreen: \"Vollbild beenden\",\n pip: \"Bild-im-Bild\",\n exitPip: \"Bild-im-Bild beenden\",\n theater: \"Kinomodus\",\n miniPlayer: \"Miniplayer\",\n expand: \"Vergrößern\",\n close: \"Schließen\",\n failed: \"Dieses Video konnte nicht verarbeitet werden.\",\n errors: {\n network: \"Der Videoserver ist nicht erreichbar.\",\n access: \"Du hast keinen Zugriff mehr auf dieses Video.\",\n not_found: \"Dieses Video ist nicht verfügbar.\",\n rate_limited: \"Zu viele Anfragen. Versuche es gleich noch einmal.\",\n unsupported: \"Dieses Video kann in diesem Browser nicht abgespielt werden.\",\n stalled: \"Die Wiedergabe hängt. Prüfe deine Verbindung und versuche es erneut.\",\n unknown: \"Dieses Video kann gerade nicht abgespielt werden.\",\n },\n },\n versionDownload: {\n unavailable: \"Das ist gerade nicht zum Herunterladen verfügbar.\",\n availableIn_one: \"In {count} Tag zum Herunterladen verfügbar\",\n availableIn_other: \"In {count} Tagen zum Herunterladen verfügbar\",\n label: \"Herunterladen\",\n preparing: \"Download wird vorbereitet…\",\n locked: \"Schalte das frei, um es herunterzuladen.\",\n limited: \"Download-Limit erreicht. Versuche es in {minutes} Min. erneut.\",\n failed: \"Der Download konnte nicht starten. Bitte versuche es erneut.\",\n },\n errors: {\n download_unavailable: \"Das ist gerade nicht zum Herunterladen verfügbar.\",\n no_download: \"Hier gibt es noch nichts herunterzuladen.\",\n generic: \"Auf unserer Seite ist etwas schiefgelaufen. Bitte versuche es erneut.\",\n network: \"Verbindung unterbrochen. Prüfe dein Netzwerk und versuche es erneut.\",\n storage: \"Der Upload wurde unterbrochen. Bitte versuche es erneut.\",\n decode: \"Diese Datei lässt sich nicht als Bild öffnen.\",\n invalid_request: \"Das Bild konnte nicht gespeichert werden.\",\n unauthorized: \"Deine Sitzung ist abgelaufen. Melde dich erneut an.\",\n forbidden: \"Du darfst dieses Bild nicht ändern.\",\n not_found: \"Dieser Eintrag existiert nicht mehr.\",\n conflict: \"Das wurde anderswo geändert. Lade neu und versuche es erneut.\",\n incomplete: \"Der Upload wurde nicht abgeschlossen. Bitte versuche es erneut.\",\n not_uploaded: \"Der Upload ist abgelaufen. Bitte wähle das Bild erneut.\",\n too_large: \"Diese Datei ist zu groß.\",\n quota_exceeded: \"Du hast dein Speicherlimit erreicht.\",\n type_not_allowed: \"Dieser Dateityp wird hier nicht unterstützt.\",\n checksum_mismatch: \"Die Datei hat sich während des Uploads geändert. Bitte versuche es erneut.\",\n rate_limited: \"Zu viele Uploads. Versuche es in {seconds} s erneut.\",\n unavailable: \"Der Medienspeicher ist nicht erreichbar. Bitte versuche es gleich noch einmal.\",\n upgrade_required: \"Dieses Element wird gerade aktualisiert. Bitte versuche es später noch einmal.\",\n internal_error: \"Auf unserer Seite ist etwas schiefgelaufen. Bitte versuche es erneut.\",\n allowedTypes: \"Verwende {allowed}.\",\n tooLargeBy: \"Diese Datei ist {size} groß; das Limit liegt bei {max}.\",\n image_too_small: \"Dieses Bild ist nach dem Zuschneiden {width} px breit; es muss mindestens {min} px breit sein. Wähle einen größeren Bereich oder ein größeres Bild.\",\n image_too_large: \"Dieses Bild hat {width}×{height} px; erlaubt sind höchstens {megapixels} Megapixel.\",\n image_unreadable: \"Diese Datei ist kein gültiges {format}-Bild.\",\n render_timeout: \"Der Server rendert noch. Es erscheint, sobald es fertig ist; schau gleich noch einmal nach.\",\n animation_not_allowed: \"Animierte Bilder sind hier nicht erlaubt. Bitte lade ein nicht animiertes Bild hoch.\",\n animation_unsupported: \"Animierte {format}-Bilder werden nicht unterstützt. Verwende ein animiertes WebP oder GIF.\",\n animationFrames: \"Animationen dürfen höchstens {maxFrames} Bilder haben; diese hat {frames}.\",\n animationSeconds: \"Animationen dürfen höchstens {maxSeconds} Sekunden laufen.\",\n animationTooLarge: \"Diese Animation ist zu groß: {frames} Bilder mit {width}×{height} px. Verwende weniger Bilder oder eine kleinere Größe.\",\n too_many_files: \"Dieses Element enthält bereits so viele Dateien wie erlaubt. Entferne zuerst einige.\",\n animation_too_long: \"Diese Animation läuft zu lange.\",\n video_too_long: \"Diese Datei läuft länger als hier erlaubt.\",\n video_too_large: \"Die Bildgröße dieses Videos ist größer als hier erlaubt.\",\n videoTooLongBy: \"Diese Datei läuft {duration} s; hier sind höchstens {maxSeconds} s erlaubt.\",\n videoTooLargeBy: \"Dieses Video hat {width}×{height} px; Videos dürfen höchstens {megapixels} Megapixel haben.\",\n video_over_budget: \"Die Verarbeitung dieses Videos würde zu lange dauern. Verwende ein kürzeres oder kleineres Video.\",\n video_aspect_unsupported: \"Dieses Video ist zu breit oder zu hoch, um hier verwendet zu werden.\",\n videoAspectBy: \"Dieses Video hat das Format {shape}; Videos müssen hier zwischen {minAspect} und {maxAspect} liegen.\",\n tooManyFilesBy: \"Dieses Element fasst höchstens {maxFiles} dieser Dateien. Entferne zuerst einige.\",\n aborted: \"Abgebrochen.\",\n resume_mismatch: \"Der gespeicherte Upload gehört zu einer anderen Datei. Bitte wähle die Datei erneut.\",\n moderation_rejected: \"Dies wurde von der Moderation abgelehnt.\",\n comment_banned: \"Du kannst hier nicht kommentieren.\",\n comments_closed: \"Die Kommentare sind hier geschlossen.\",\n comments_locked: \"Schalte das frei, um Kommentare zu sehen und zu schreiben.\",\n not_joinable: \"Dieser Gruppe kann man gerade nicht beitreten.\",\n limit_reached: \"Du hast bereits so viele davon, wie erlaubt sind.\",\n comment_too_long: \"Dieser Kommentar ist zu lang.\",\n commentTooLongBy: \"Ein Kommentar hat höchstens {maxChars} Zeichen.\",\n not_configured: \"Diese Funktion ist auf dieser Website nicht verfügbar.\",\n tenant_mismatch: \"Bei uns ist etwas schiefgelaufen. Bitte versuche es erneut.\",\n gone: \"Dieser Inhalt ist nicht mehr verfügbar.\",\n },\n};\n"],"mappings":";;;;;;AAOA,IAAa,IAAgC;CAC3C,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,QAAQ;EACN,QAAQ;EACR,OAAO;EACP,MAAM;EACN,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,SAAS;CACX;CACA,MAAM;EACJ,OAAO;EACP,aAAa;EACb,YAAY;EACZ,aAAa;EACb,MAAM;EACN,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,aAAa;EACb,OAAO;EACP,YAAY;EACZ,UAAU;EACV,OAAO;EACP,UAAU;EACV,SAAS;EACT,MAAM;CACR;CACA,UAAU;EACR,QAAQ;EACR,cAAc;EACd,UAAU;EACV,MAAM;EACN,SAAS;EACT,aAAa;EACb,UAAU;CACZ;CACA,QAAQ;EACN,OAAO;EACP,MAAM;EACN,KAAK;EACL,QAA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0B;EAC1B,eAAe;EACf,gBAAgB;EAChB,SAAS;EACT,iBAAiB;EACjB,qBAAqB;EACrB,gBAAgB;EAChB,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;AACF"}
|
|
1
|
+
{"version":3,"file":"de.js","names":[],"sources":["../../src/locales/de.ts"],"sourcesContent":["import type { ContentKitUiMessageBundle } from \"../i18n/messages.js\";\nimport { admin } from \"./admin/de.js\";\nimport { social } from \"./social/de.js\";\nimport { groups } from \"./groups/de.js\";\nimport { discovery } from \"./discovery/de.js\";\nimport { content } from \"./content/de.js\";\n\nexport const de: ContentKitUiMessageBundle = {\n ...social,\n ...admin,\n ...groups,\n ...discovery,\n ...content,\n common: {\n cancel: \"Abbrechen\",\n close: \"Schließen\",\n save: \"Speichern\",\n saving: \"Wird gespeichert…\",\n retry: \"Erneut versuchen\",\n change: \"Ändern\",\n upload: \"Hochladen\",\n editCrop: \"Zuschnitt bearbeiten\",\n remove: \"Entfernen\",\n rename: \"Umbenennen\",\n replace: \"Ersetzen\",\n },\n crop: {\n title: \"Bild zuschneiden\",\n avatarTitle: \"Avatar zuschneiden\",\n coverTitle: \"Titelbild zuschneiden\",\n description: \"Ziehen zum Verschieben. Scrollen, zwei Finger oder den Regler zum Zoomen verwenden.\",\n area: \"Zuschnittbereich. Pfeiltasten verschieben das Bild, + und − zoomen, R dreht.\",\n zoom: \"Zoom\",\n zoomIn: \"Vergrößern\",\n zoomOut: \"Verkleinern\",\n rotateLeft: \"Nach links drehen\",\n rotateRight: \"Nach rechts drehen\",\n reset: \"Zurücksetzen\",\n undersized: \"Dieser Zuschnitt ist {width} px breit; ab {target} px wirkt er auf hochauflösenden Bildschirmen scharf.\",\n tooSmall: \"Dieses Bild ist höchstens {width} px breit; es muss mindestens {min} px breit sein. Verwende ein größeres Bild.\",\n shape: \"Format\",\n original: \"Original\",\n preview: \"Vorschau des Ergebnisses\",\n size: \"{width} × {height} px\",\n },\n sortable: {\n handle: \"{name} verschieben\",\n instructions: \"Zum Umsortieren Leertaste oder Eingabe drücken, mit den Pfeiltasten verschieben und mit Leertaste oder Eingabe ablegen. Escape bricht ab.\",\n pickedUp: \"{name} aufgenommen, Position {position} von {total}.\",\n over: \"{name} wird an Position {position} von {total} verschoben.\",\n dropped: \"{name} an Position {position} von {total} abgelegt.\",\n droppedAway: \"{name} abgelegt.\",\n canceled: \"Verschieben von {name} abgebrochen.\",\n },\n folder: {\n label: \"Medien\",\n drop: \"Dateien hierher ziehen oder klicken, um sie auszuwählen\",\n add: \"Dateien hinzufügen\",\n commit: \"{count} hinzufügen\",\n commitAgain: \"Erneut hinzufügen\",\n adding: \"Wird hinzugefügt…\",\n queued: \"Wartet\",\n uploaded: \"Hochgeladen\",\n notAdded: \"Hochgeladen, noch nicht hinzugefügt\",\n processing: \"Wird verarbeitet…\",\n processingPercent: \"Wird verarbeitet: {percent} %\",\n edited: \"Bearbeitet\",\n failed: \"Nicht verarbeitet\",\n failedVideo: \"Nicht abspielbar\",\n crop: \"Zuschneiden und drehen\",\n select: \"{name} auswählen\",\n selected: \"{count} ausgewählt\",\n removeSelected: \"Auswahl entfernen\",\n clearSelection: \"Auswahl aufheben\",\n confirmRemove: \"{count} Dateien entfernen? Das lässt sich nicht rückgängig machen.\",\n renameLabel: \"Neuer Name für {name}\",\n paused: \"Uploads angehalten\",\n resume: \"Fortsetzen\",\n dismiss: \"Schließen\",\n limitSize: \"{what} bis {size}\",\n limitMax: \"höchstens {max}\",\n limitAspect: \"Videoformate von {min} bis {max}\",\n kinds: {\n image: \"Bilder\",\n video: \"Videos\",\n audio: \"Audio\",\n subtitle: \"Untertitel\",\n file: \"Dateien\",\n },\n },\n readiness: {\n processing: \"Medien werden verarbeitet\",\n processingHint: \"Es wird automatisch veröffentlicht, sobald alle Dateien verarbeitet sind.\",\n failedOne: \"{name} konnte nicht verarbeitet werden\",\n failedMany: \"{count} Dateien konnten nicht verarbeitet werden: {names}\",\n failedHint: \"Entferne sie, dann wird es automatisch veröffentlicht.\",\n },\n avatar: {\n label: \"Avatar\",\n empty: \"Kein Avatar\",\n hint: \"Quadratisches Bild, mindestens {size} px.\",\n },\n cover: {\n label: \"Titelbild\",\n empty: \"Kein Titelbild\",\n hint: \"Breites Bild, mindestens {width} × {height} px.\",\n drop: \"Bild hierher ziehen\",\n },\n poster: {\n title: \"Cover festlegen\",\n description: \"Wähle ein Bild aus dem Video oder lade eines hoch. Das Cover behält das Format des Videos.\",\n frame: \"Videobild\",\n upload: \"Bild hochladen\",\n time: \"Zeit\",\n previousFrame: \"Vorheriges Bild\",\n nextFrame: \"Nächstes Bild\",\n jumpTo: \"Zu {time} springen\",\n useFrame: \"Dieses Bild verwenden\",\n crop: \"Zuschneiden…\",\n cropTitle: \"Cover zuschneiden\",\n auto: \"Automatisch\",\n autoHint: \"Bis du eines wählst, wird ein automatisches Bild verwendet.\",\n drop: \"Bild hier ablegen oder klicken, um eines auszuwählen\",\n processing: \"Das Video wird noch verarbeitet. Ein Cover kannst du festlegen, sobald es kodiert ist.\",\n rendering: \"Cover wird erstellt…\",\n },\n progress: {\n decoding: \"Bild wird geöffnet…\",\n hashing: \"Wird vorbereitet…\",\n uploading: \"Wird hochgeladen… {percent} %\",\n completing: \"Upload wird abgeschlossen…\",\n rendering: \"Größen werden erstellt…\",\n },\n encode: {\n processing: \"Video wird verarbeitet\",\n queued: \"Wartet auf Verarbeitung\",\n queuedPosition: \"In der Warteschlange · Platz {position}\",\n stalled: \"Verarbeitung pausiert, warte auf den Server…\",\n segments: \"Segment {done} / {total}\",\n higherQualities: \"Höhere Qualitäten\",\n remainingSeconds: \"noch ca. {seconds} s\",\n remainingMinutes: \"noch ca. {minutes} Min.\",\n remainingHours: \"noch ca. {hours} Std. {minutes} Min.\",\n almostDone: \"fast fertig\",\n estimating: \"wird geschätzt…\",\n phase: {\n queued: \"In der Warteschlange\",\n downloading: \"Vorbereiten\",\n probing: \"Analysieren\",\n encoding: \"Kodieren\",\n muxing: \"Verpacken\",\n uploading: \"Speichern\",\n publishing: \"Veröffentlichen\",\n images: \"Cover wird erstellt\",\n },\n },\n gallery: {\n label: \"Medien\",\n view: \"Ansicht\",\n carousel: \"Karussell\",\n grid: \"Raster\",\n counter: \"{current} / {total}\",\n slide: \"{current} von {total}\",\n previous: \"Zurück\",\n next: \"Weiter\",\n goTo: \"Zu Element {index}\",\n open: \"Element {index} von {total} öffnen\",\n lightbox: \"Medienansicht\",\n locked: \"Der Rest ist gesperrt\",\n processingImage: \"Bild wird verarbeitet…\",\n image: \"Bild {index}\",\n video: \"Video {index}\",\n audio: \"Audio {index}\",\n processingAudio: \"Audio wird verarbeitet…\",\n download: \"Herunterladen\",\n failedAudio: \"Dieses Audio konnte nicht verarbeitet werden.\",\n failedImage: \"Dieses Bild konnte nicht verarbeitet werden.\",\n },\n player: {\n play: \"Video abspielen\",\n loading: \"Video wird geladen…\",\n retry: \"Erneut versuchen\",\n code: \"Code {code}\",\n quality: \"Qualität\",\n auto: \"Automatisch\",\n autoCurrent: \"Automatisch ({quality})\",\n label: \"Videoplayer\",\n resume: \"Abspielen\",\n pause: \"Pause\",\n replay: \"Noch einmal abspielen\",\n seek: \"Suchen\",\n time: \"{current} von {duration}\",\n seekBack: \"{seconds} Sekunden zurück\",\n seekForward: \"{seconds} Sekunden vor\",\n seconds: \"{seconds} Sekunden\",\n mute: \"Stummschalten\",\n unmute: \"Ton an\",\n volume: \"Lautstärke\",\n settings: \"Einstellungen\",\n speed: \"Geschwindigkeit\",\n normal: \"Normal\",\n audio: \"Audio\",\n subtitles: \"Untertitel\",\n subtitlesOff: \"Aus\",\n forced: \"{label} (erzwungen)\",\n track: \"Spur {number}\",\n fullscreen: \"Vollbild\",\n exitFullscreen: \"Vollbild beenden\",\n pip: \"Bild-im-Bild\",\n exitPip: \"Bild-im-Bild beenden\",\n theater: \"Kinomodus\",\n miniPlayer: \"Miniplayer\",\n expand: \"Vergrößern\",\n close: \"Schließen\",\n failed: \"Dieses Video konnte nicht verarbeitet werden.\",\n errors: {\n network: \"Der Videoserver ist nicht erreichbar.\",\n access: \"Du hast keinen Zugriff mehr auf dieses Video.\",\n not_found: \"Dieses Video ist nicht verfügbar.\",\n rate_limited: \"Zu viele Anfragen. Versuche es gleich noch einmal.\",\n unsupported: \"Dieses Video kann in diesem Browser nicht abgespielt werden.\",\n stalled: \"Die Wiedergabe hängt. Prüfe deine Verbindung und versuche es erneut.\",\n unknown: \"Dieses Video kann gerade nicht abgespielt werden.\",\n },\n },\n versionDownload: {\n unavailable: \"Das ist gerade nicht zum Herunterladen verfügbar.\",\n availableIn_one: \"In {count} Tag zum Herunterladen verfügbar\",\n availableIn_other: \"In {count} Tagen zum Herunterladen verfügbar\",\n label: \"Herunterladen\",\n preparing: \"Download wird vorbereitet…\",\n locked: \"Schalte das frei, um es herunterzuladen.\",\n limited: \"Download-Limit erreicht. Versuche es in {minutes} Min. erneut.\",\n failed: \"Der Download konnte nicht starten. Bitte versuche es erneut.\",\n },\n errors: {\n download_unavailable: \"Das ist gerade nicht zum Herunterladen verfügbar.\",\n no_download: \"Hier gibt es noch nichts herunterzuladen.\",\n generic: \"Auf unserer Seite ist etwas schiefgelaufen. Bitte versuche es erneut.\",\n network: \"Der Server ist nicht erreichbar. Prüfe deine Verbindung und versuche es erneut.\",\n server_unavailable: \"Der Server antwortet gerade nicht. Bitte versuche es gleich noch einmal.\",\n storage: \"Der Upload wurde unterbrochen. Bitte versuche es erneut.\",\n decode: \"Diese Datei lässt sich nicht als Bild öffnen.\",\n invalid_request: \"Das Bild konnte nicht gespeichert werden.\",\n unauthorized: \"Deine Sitzung ist abgelaufen. Melde dich erneut an.\",\n forbidden: \"Du darfst dieses Bild nicht ändern.\",\n not_found: \"Dieser Eintrag existiert nicht mehr.\",\n conflict: \"Das wurde anderswo geändert. Lade neu und versuche es erneut.\",\n incomplete: \"Der Upload wurde nicht abgeschlossen. Bitte versuche es erneut.\",\n not_uploaded: \"Der Upload ist abgelaufen. Bitte wähle das Bild erneut.\",\n too_large: \"Diese Datei ist zu groß.\",\n quota_exceeded: \"Du hast dein Speicherlimit erreicht.\",\n type_not_allowed: \"Dieser Dateityp wird hier nicht unterstützt.\",\n checksum_mismatch: \"Die Datei hat sich während des Uploads geändert. Bitte versuche es erneut.\",\n rate_limited: \"Zu viele Uploads. Versuche es in {seconds} s erneut.\",\n unavailable: \"Der Medienspeicher ist nicht erreichbar. Bitte versuche es gleich noch einmal.\",\n upgrade_required: \"Dieses Element wird gerade aktualisiert. Bitte versuche es später noch einmal.\",\n internal_error: \"Auf unserer Seite ist etwas schiefgelaufen. Bitte versuche es erneut.\",\n allowedTypes: \"Verwende {allowed}.\",\n tooLargeBy: \"Diese Datei ist {size} groß; das Limit liegt bei {max}.\",\n image_too_small: \"Dieses Bild ist nach dem Zuschneiden {width} px breit; es muss mindestens {min} px breit sein. Wähle einen größeren Bereich oder ein größeres Bild.\",\n image_too_large: \"Dieses Bild hat {width}×{height} px; erlaubt sind höchstens {megapixels} Megapixel.\",\n image_unreadable: \"Diese Datei ist kein gültiges {format}-Bild.\",\n render_timeout: \"Der Server rendert noch. Es erscheint, sobald es fertig ist; schau gleich noch einmal nach.\",\n animation_not_allowed: \"Animierte Bilder sind hier nicht erlaubt. Bitte lade ein nicht animiertes Bild hoch.\",\n animation_unsupported: \"Animierte {format}-Bilder werden nicht unterstützt. Verwende ein animiertes WebP oder GIF.\",\n animationFrames: \"Animationen dürfen höchstens {maxFrames} Bilder haben; diese hat {frames}.\",\n animationSeconds: \"Animationen dürfen höchstens {maxSeconds} Sekunden laufen.\",\n animationTooLarge: \"Diese Animation ist zu groß: {frames} Bilder mit {width}×{height} px. Verwende weniger Bilder oder eine kleinere Größe.\",\n too_many_files: \"Dieses Element enthält bereits so viele Dateien wie erlaubt. Entferne zuerst einige.\",\n animation_too_long: \"Diese Animation läuft zu lange.\",\n video_too_long: \"Diese Datei läuft länger als hier erlaubt.\",\n video_too_large: \"Die Bildgröße dieses Videos ist größer als hier erlaubt.\",\n videoTooLongBy: \"Diese Datei läuft {duration} s; hier sind höchstens {maxSeconds} s erlaubt.\",\n videoTooLargeBy: \"Dieses Video hat {width}×{height} px; Videos dürfen höchstens {megapixels} Megapixel haben.\",\n video_over_budget: \"Die Verarbeitung dieses Videos würde zu lange dauern. Verwende ein kürzeres oder kleineres Video.\",\n video_aspect_unsupported: \"Dieses Video ist zu breit oder zu hoch, um hier verwendet zu werden.\",\n videoAspectBy: \"Dieses Video hat das Format {shape}; Videos müssen hier zwischen {minAspect} und {maxAspect} liegen.\",\n tooManyFilesBy: \"Dieses Element fasst höchstens {maxFiles} dieser Dateien. Entferne zuerst einige.\",\n aborted: \"Abgebrochen.\",\n resume_mismatch: \"Der gespeicherte Upload gehört zu einer anderen Datei. Bitte wähle die Datei erneut.\",\n moderation_rejected: \"Dies wurde von der Moderation abgelehnt.\",\n comment_banned: \"Du kannst hier nicht kommentieren.\",\n comments_closed: \"Die Kommentare sind hier geschlossen.\",\n comments_locked: \"Schalte das frei, um Kommentare zu sehen und zu schreiben.\",\n not_joinable: \"Dieser Gruppe kann man gerade nicht beitreten.\",\n limit_reached: \"Du hast bereits so viele davon, wie erlaubt sind.\",\n comment_too_long: \"Dieser Kommentar ist zu lang.\",\n commentTooLongBy: \"Ein Kommentar hat höchstens {maxChars} Zeichen.\",\n not_configured: \"Diese Funktion ist auf dieser Website nicht verfügbar.\",\n tenant_mismatch: \"Bei uns ist etwas schiefgelaufen. Bitte versuche es erneut.\",\n gone: \"Dieser Inhalt ist nicht mehr verfügbar.\",\n },\n};\n"],"mappings":";;;;;;AAOA,IAAa,IAAgC;CAC3C,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,QAAQ;EACN,QAAQ;EACR,OAAO;EACP,MAAM;EACN,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,SA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,cAAc;EACd,WAAW;EACX,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,cAAc;EACd,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;EAChB,uBAAuB;EACvB,uBAAuB;EACvB,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,iBAAiB;EACjB,mBAAmB;EACnB,0BAA0B;EAC1B,eAAe;EACf,gBAAgB;EAChB,SAAS;EACT,iBAAiB;EACjB,qBAAqB;EACrB,gBAAgB;EAChB,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;AACF"}
|
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/en.js
CHANGED
|
@@ -236,7 +236,8 @@ var a = {
|
|
|
236
236
|
download_unavailable: "This isn't available to download right now.",
|
|
237
237
|
no_download: "There is nothing to download yet.",
|
|
238
238
|
generic: "Something went wrong on our end. Please try again.",
|
|
239
|
-
network: "
|
|
239
|
+
network: "Couldn't reach the server. Check your connection and try again.",
|
|
240
|
+
server_unavailable: "The server isn't responding right now. Please try again in a moment.",
|
|
240
241
|
storage: "The upload was interrupted. Please try again.",
|
|
241
242
|
decode: "This file can't be opened as an image.",
|
|
242
243
|
invalid_request: "The image could not be saved.",
|
package/dist/locales/en.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","names":[],"sources":["../../src/locales/en.ts"],"sourcesContent":["import { admin } from \"./admin/en.js\";\nimport { social } from \"./social/en.js\";\nimport { groups } from \"./groups/en.js\";\nimport { discovery } from \"./discovery/en.js\";\nimport { content } from \"./content/en.js\";\n\nexport const en = {\n ...social,\n ...admin,\n ...groups,\n ...discovery,\n ...content,\n common: {\n cancel: \"Cancel\",\n close: \"Close\",\n save: \"Save\",\n saving: \"Saving…\",\n retry: \"Try again\",\n change: \"Change\",\n upload: \"Upload\",\n editCrop: \"Edit crop\",\n remove: \"Remove\",\n rename: \"Rename\",\n replace: \"Replace\",\n },\n crop: {\n title: \"Crop image\",\n avatarTitle: \"Crop your avatar\",\n coverTitle: \"Crop your cover\",\n description: \"Drag to reposition. Scroll, pinch or use the slider to zoom.\",\n area: \"Crop area. Use the arrow keys to move the image, + or − to zoom and R to rotate.\",\n zoom: \"Zoom\",\n zoomIn: \"Zoom in\",\n zoomOut: \"Zoom out\",\n rotateLeft: \"Rotate left\",\n rotateRight: \"Rotate right\",\n reset: \"Reset\",\n undersized: \"This crop is {width} px wide; {target} px or more looks sharp on high-density screens.\",\n tooSmall: \"This image is {width} px wide at most; it must be at least {min} px. Use a bigger image.\",\n shape: \"Shape\",\n original: \"Original\",\n preview: \"Result preview\",\n size: \"{width} × {height} px\",\n },\n sortable: {\n handle: \"Reorder {name}\",\n instructions: \"To reorder, press Space or Enter, move with the arrow keys, and press Space or Enter again to drop. Escape cancels.\",\n pickedUp: \"Picked up {name}, position {position} of {total}.\",\n over: \"{name} will move to position {position} of {total}.\",\n dropped: \"{name} dropped at position {position} of {total}.\",\n droppedAway: \"{name} dropped.\",\n canceled: \"Moving {name} canceled.\",\n },\n folder: {\n label: \"Media\",\n drop: \"Drop files here, or click to choose\",\n add: \"Add files\",\n commit: \"Add {count}\",\n commitAgain: \"Try adding again\",\n adding: \"Adding…\",\n queued: \"Waiting\",\n uploaded: \"Uploaded\",\n notAdded: \"Uploaded, not added yet\",\n processing: \"Processing…\",\n processingPercent: \"Processing {percent}%\",\n edited: \"Edited\",\n failed: \"Not processed\",\n failedVideo: \"Can't play\",\n crop: \"Crop and rotate\",\n select: \"Select {name}\",\n selected: \"{count} selected\",\n removeSelected: \"Remove selected\",\n clearSelection: \"Clear selection\",\n confirmRemove: \"Remove {count} files? This can't be undone.\",\n renameLabel: \"New name for {name}\",\n paused: \"Uploads paused\",\n resume: \"Resume\",\n dismiss: \"Dismiss\",\n limitSize: \"{what} up to {size}\",\n limitMax: \"at most {max}\",\n limitAspect: \"video shapes from {min} to {max}\",\n kinds: {\n image: \"Images\",\n video: \"Videos\",\n audio: \"Audio\",\n subtitle: \"Subtitles\",\n file: \"Files\",\n },\n },\n readiness: {\n processing: \"Processing media\",\n processingHint: \"It goes live by itself once every file is processed.\",\n failedOne: \"{name} couldn't be processed\",\n failedMany: \"{count} files couldn't be processed: {names}\",\n failedHint: \"Remove them and it goes live by itself.\",\n },\n avatar: {\n label: \"Avatar\",\n empty: \"No avatar\",\n hint: \"Square image, at least {size} px.\",\n },\n cover: {\n label: \"Cover image\",\n empty: \"No cover image\",\n hint: \"Wide image, at least {width} × {height} px.\",\n drop: \"Drop an image here\",\n },\n poster: {\n title: \"Set cover\",\n description: \"Pick a frame from the video or upload an image. The cover keeps the video's shape.\",\n frame: \"Video frame\",\n upload: \"Upload image\",\n time: \"Time\",\n previousFrame: \"Previous frame\",\n nextFrame: \"Next frame\",\n jumpTo: \"Jump to {time}\",\n useFrame: \"Use this frame\",\n crop: \"Crop…\",\n cropTitle: \"Crop the cover\",\n auto: \"Automatic\",\n autoHint: \"An automatic frame is used until you pick one.\",\n drop: \"Drop an image here, or click to choose\",\n processing: \"The video is still processing. You can set a cover once it is encoded.\",\n rendering: \"Rendering cover…\",\n },\n progress: {\n decoding: \"Opening image…\",\n hashing: \"Preparing…\",\n uploading: \"Uploading… {percent}%\",\n completing: \"Finishing upload…\",\n rendering: \"Rendering sizes…\",\n },\n encode: {\n processing: \"Processing video\",\n queued: \"Waiting to process\",\n queuedPosition: \"Queued · #{position} in line\",\n stalled: \"Processing paused, waiting for the server…\",\n segments: \"segment {done} / {total}\",\n higherQualities: \"Higher qualities\",\n remainingSeconds: \"~{seconds} s left\",\n remainingMinutes: \"~{minutes} min left\",\n remainingHours: \"~{hours} h {minutes} min left\",\n almostDone: \"almost done\",\n estimating: \"estimating…\",\n phase: {\n queued: \"Queued\",\n downloading: \"Preparing\",\n probing: \"Analyzing\",\n encoding: \"Encoding\",\n muxing: \"Packaging\",\n uploading: \"Saving\",\n publishing: \"Publishing\",\n images: \"Making cover\",\n },\n },\n gallery: {\n label: \"Media\",\n view: \"Layout\",\n carousel: \"Carousel\",\n grid: \"Grid\",\n counter: \"{current} / {total}\",\n slide: \"{current} of {total}\",\n previous: \"Previous\",\n next: \"Next\",\n goTo: \"Go to item {index}\",\n open: \"Open item {index} of {total}\",\n lightbox: \"Media viewer\",\n locked: \"The rest is locked\",\n processingImage: \"Processing image…\",\n image: \"Image {index}\",\n video: \"Video {index}\",\n audio: \"Audio {index}\",\n processingAudio: \"Processing audio…\",\n download: \"Download\",\n failedAudio: \"This audio couldn't be processed.\",\n failedImage: \"This image couldn't be processed.\",\n },\n player: {\n play: \"Play video\",\n loading: \"Loading video…\",\n retry: \"Try again\",\n code: \"Code {code}\",\n quality: \"Quality\",\n auto: \"Auto\",\n autoCurrent: \"Auto ({quality})\",\n label: \"Video player\",\n resume: \"Play\",\n pause: \"Pause\",\n replay: \"Replay\",\n seek: \"Seek\",\n time: \"{current} of {duration}\",\n seekBack: \"Back {seconds} seconds\",\n seekForward: \"Forward {seconds} seconds\",\n seconds: \"{seconds} seconds\",\n mute: \"Mute\",\n unmute: \"Unmute\",\n volume: \"Volume\",\n settings: \"Settings\",\n speed: \"Speed\",\n normal: \"Normal\",\n audio: \"Audio\",\n subtitles: \"Subtitles\",\n subtitlesOff: \"Off\",\n forced: \"{label} (forced)\",\n track: \"Track {number}\",\n fullscreen: \"Fullscreen\",\n exitFullscreen: \"Exit fullscreen\",\n pip: \"Picture in picture\",\n exitPip: \"Exit picture in picture\",\n theater: \"Theater mode\",\n miniPlayer: \"Mini player\",\n expand: \"Expand\",\n close: \"Close\",\n failed: \"This video couldn't be processed.\",\n errors: {\n network: \"The video server couldn't be reached.\",\n access: \"You no longer have access to this video.\",\n not_found: \"This video isn't available.\",\n rate_limited: \"Too many requests. Try again shortly.\",\n unsupported: \"This video can't be played in this browser.\",\n stalled: \"Playback stalled. Check your connection and try again.\",\n unknown: \"This video can't be played right now.\",\n },\n },\n versionDownload: {\n unavailable: \"This isn't available to download right now.\",\n availableIn_one: \"Available to download in {count} day\",\n availableIn_other: \"Available to download in {count} days\",\n label: \"Download\",\n preparing: \"Preparing download…\",\n locked: \"Unlock this to download it.\",\n limited: \"Download limit reached. Try again in {minutes} min.\",\n failed: \"The download couldn't start. Please try again.\",\n },\n errors: {\n download_unavailable: \"This isn't available to download right now.\",\n no_download: \"There is nothing to download yet.\",\n generic: \"Something went wrong on our end. Please try again.\",\n network: \"Connection lost. Check your network and try again.\",\n storage: \"The upload was interrupted. Please try again.\",\n decode: \"This file can't be opened as an image.\",\n invalid_request: \"The image could not be saved.\",\n unauthorized: \"Your session expired. Sign in again to upload.\",\n forbidden: \"You don't have permission to change this image.\",\n not_found: \"This item no longer exists.\",\n conflict: \"This was changed elsewhere. Reload and try again.\",\n incomplete: \"The upload didn't finish. Please try again.\",\n not_uploaded: \"The upload expired. Please pick the image again.\",\n too_large: \"This file is too large.\",\n quota_exceeded: \"You've reached your storage limit.\",\n type_not_allowed: \"This file type isn't supported here.\",\n checksum_mismatch: \"The file changed during upload. Please try again.\",\n rate_limited: \"Too many uploads. Try again in {seconds} s.\",\n unavailable: \"Media storage is unavailable. Please try again shortly.\",\n upgrade_required: \"This item is being upgraded. Please try again later.\",\n internal_error: \"Something went wrong on our end. Please try again.\",\n allowedTypes: \"Use {allowed}.\",\n tooLargeBy: \"This file is {size}; the limit is {max}.\",\n image_too_small: \"This image is {width} px wide after cropping; it must be at least {min} px. Select a larger area or use a bigger image.\",\n image_too_large: \"This image is {width}×{height} px; images may have at most {megapixels} megapixels.\",\n image_unreadable: \"This file isn't a valid {format} image.\",\n render_timeout: \"The server is still rendering this. It will appear once ready; check back shortly.\",\n animation_not_allowed: \"Animated images aren't allowed here. Please upload a non-animated image.\",\n animation_unsupported: \"Animated {format} isn't supported yet. Upload a GIF or animated WebP.\",\n animationFrames: \"Animations can have at most {maxFrames} frames; this one has {frames}.\",\n animationSeconds: \"Animations can run at most {maxSeconds} seconds.\",\n animationTooLarge: \"This animation is too large: {frames} frames of {width}×{height} px. Use fewer frames or a smaller size.\",\n too_many_files: \"This item already has as many files as it allows. Remove some first.\",\n animation_too_long: \"This animation runs too long.\",\n video_too_long: \"This file runs longer than allowed here.\",\n video_too_large: \"This video's frame size is larger than allowed here.\",\n videoTooLongBy: \"This file runs {duration} s; the limit here is {maxSeconds} s.\",\n videoTooLargeBy: \"This video is {width}×{height} px; videos may have at most {megapixels} megapixels.\",\n video_over_budget: \"This video would take too long to process. Use a shorter or smaller video.\",\n video_aspect_unsupported: \"This video is too wide or too tall to be used here.\",\n videoAspectBy: \"This video is {shape}; videos here must be between {minAspect} and {maxAspect}.\",\n tooManyFilesBy: \"This item holds at most {maxFiles} of these files. Remove some first.\",\n aborted: \"Canceled.\",\n resume_mismatch: \"The saved upload is for a different file. Please pick the file again.\",\n moderation_rejected: \"This was rejected by moderation.\",\n comment_banned: \"You can't comment here.\",\n comments_closed: \"Comments are closed here.\",\n comments_locked: \"Unlock this to see and write comments.\",\n not_joinable: \"This group isn't open to join right now.\",\n limit_reached: \"You already have as many of these as allowed.\",\n comment_too_long: \"This comment is too long.\",\n commentTooLongBy: \"A comment is at most {maxChars} characters.\",\n not_configured: \"This feature isn't available on this site.\",\n tenant_mismatch: \"Something went wrong on our end. Please try again.\",\n gone: \"This content is no longer available.\",\n },\n};\n"],"mappings":";;;;;;AAMA,IAAa,IAAK;CAChB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,QAAQ;EACN,QAAQ;EACR,OAAO;EACP,MAAM;EACN,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,SAAS;CACX;CACA,MAAM;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ChB,kBAAkB;EAClB,mBAAmB;EACnB,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,cAAc;EACd,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;EAChB,uBAAuB;EACvB,uBAAuB;EACvB,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,iBAAiB;EACjB,mBAAmB;EACnB,0BAA0B;EAC1B,eAAe;EACf,gBAAgB;EAChB,SAAS;EACT,iBAAiB;EACjB,qBAAqB;EACrB,gBAAgB;EAChB,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;AACF"}
|
|
1
|
+
{"version":3,"file":"en.js","names":[],"sources":["../../src/locales/en.ts"],"sourcesContent":["import { admin } from \"./admin/en.js\";\nimport { social } from \"./social/en.js\";\nimport { groups } from \"./groups/en.js\";\nimport { discovery } from \"./discovery/en.js\";\nimport { content } from \"./content/en.js\";\n\nexport const en = {\n ...social,\n ...admin,\n ...groups,\n ...discovery,\n ...content,\n common: {\n cancel: \"Cancel\",\n close: \"Close\",\n save: \"Save\",\n saving: \"Saving…\",\n retry: \"Try again\",\n change: \"Change\",\n upload: \"Upload\",\n editCrop: \"Edit crop\",\n remove: \"Remove\",\n rename: \"Rename\",\n replace: \"Replace\",\n },\n crop: {\n title: \"Crop image\",\n avatarTitle: \"Crop your avatar\",\n coverTitle: \"Crop your cover\",\n description: \"Drag to reposition. Scroll, pinch or use the slider to zoom.\",\n area: \"Crop area. Use the arrow keys to move the image, + or − to zoom and R to rotate.\",\n zoom: \"Zoom\",\n zoomIn: \"Zoom in\",\n zoomOut: \"Zoom out\",\n rotateLeft: \"Rotate left\",\n rotateRight: \"Rotate right\",\n reset: \"Reset\",\n undersized: \"This crop is {width} px wide; {target} px or more looks sharp on high-density screens.\",\n tooSmall: \"This image is {width} px wide at most; it must be at least {min} px. Use a bigger image.\",\n shape: \"Shape\",\n original: \"Original\",\n preview: \"Result preview\",\n size: \"{width} × {height} px\",\n },\n sortable: {\n handle: \"Reorder {name}\",\n instructions: \"To reorder, press Space or Enter, move with the arrow keys, and press Space or Enter again to drop. Escape cancels.\",\n pickedUp: \"Picked up {name}, position {position} of {total}.\",\n over: \"{name} will move to position {position} of {total}.\",\n dropped: \"{name} dropped at position {position} of {total}.\",\n droppedAway: \"{name} dropped.\",\n canceled: \"Moving {name} canceled.\",\n },\n folder: {\n label: \"Media\",\n drop: \"Drop files here, or click to choose\",\n add: \"Add files\",\n commit: \"Add {count}\",\n commitAgain: \"Try adding again\",\n adding: \"Adding…\",\n queued: \"Waiting\",\n uploaded: \"Uploaded\",\n notAdded: \"Uploaded, not added yet\",\n processing: \"Processing…\",\n processingPercent: \"Processing {percent}%\",\n edited: \"Edited\",\n failed: \"Not processed\",\n failedVideo: \"Can't play\",\n crop: \"Crop and rotate\",\n select: \"Select {name}\",\n selected: \"{count} selected\",\n removeSelected: \"Remove selected\",\n clearSelection: \"Clear selection\",\n confirmRemove: \"Remove {count} files? This can't be undone.\",\n renameLabel: \"New name for {name}\",\n paused: \"Uploads paused\",\n resume: \"Resume\",\n dismiss: \"Dismiss\",\n limitSize: \"{what} up to {size}\",\n limitMax: \"at most {max}\",\n limitAspect: \"video shapes from {min} to {max}\",\n kinds: {\n image: \"Images\",\n video: \"Videos\",\n audio: \"Audio\",\n subtitle: \"Subtitles\",\n file: \"Files\",\n },\n },\n readiness: {\n processing: \"Processing media\",\n processingHint: \"It goes live by itself once every file is processed.\",\n failedOne: \"{name} couldn't be processed\",\n failedMany: \"{count} files couldn't be processed: {names}\",\n failedHint: \"Remove them and it goes live by itself.\",\n },\n avatar: {\n label: \"Avatar\",\n empty: \"No avatar\",\n hint: \"Square image, at least {size} px.\",\n },\n cover: {\n label: \"Cover image\",\n empty: \"No cover image\",\n hint: \"Wide image, at least {width} × {height} px.\",\n drop: \"Drop an image here\",\n },\n poster: {\n title: \"Set cover\",\n description: \"Pick a frame from the video or upload an image. The cover keeps the video's shape.\",\n frame: \"Video frame\",\n upload: \"Upload image\",\n time: \"Time\",\n previousFrame: \"Previous frame\",\n nextFrame: \"Next frame\",\n jumpTo: \"Jump to {time}\",\n useFrame: \"Use this frame\",\n crop: \"Crop…\",\n cropTitle: \"Crop the cover\",\n auto: \"Automatic\",\n autoHint: \"An automatic frame is used until you pick one.\",\n drop: \"Drop an image here, or click to choose\",\n processing: \"The video is still processing. You can set a cover once it is encoded.\",\n rendering: \"Rendering cover…\",\n },\n progress: {\n decoding: \"Opening image…\",\n hashing: \"Preparing…\",\n uploading: \"Uploading… {percent}%\",\n completing: \"Finishing upload…\",\n rendering: \"Rendering sizes…\",\n },\n encode: {\n processing: \"Processing video\",\n queued: \"Waiting to process\",\n queuedPosition: \"Queued · #{position} in line\",\n stalled: \"Processing paused, waiting for the server…\",\n segments: \"segment {done} / {total}\",\n higherQualities: \"Higher qualities\",\n remainingSeconds: \"~{seconds} s left\",\n remainingMinutes: \"~{minutes} min left\",\n remainingHours: \"~{hours} h {minutes} min left\",\n almostDone: \"almost done\",\n estimating: \"estimating…\",\n phase: {\n queued: \"Queued\",\n downloading: \"Preparing\",\n probing: \"Analyzing\",\n encoding: \"Encoding\",\n muxing: \"Packaging\",\n uploading: \"Saving\",\n publishing: \"Publishing\",\n images: \"Making cover\",\n },\n },\n gallery: {\n label: \"Media\",\n view: \"Layout\",\n carousel: \"Carousel\",\n grid: \"Grid\",\n counter: \"{current} / {total}\",\n slide: \"{current} of {total}\",\n previous: \"Previous\",\n next: \"Next\",\n goTo: \"Go to item {index}\",\n open: \"Open item {index} of {total}\",\n lightbox: \"Media viewer\",\n locked: \"The rest is locked\",\n processingImage: \"Processing image…\",\n image: \"Image {index}\",\n video: \"Video {index}\",\n audio: \"Audio {index}\",\n processingAudio: \"Processing audio…\",\n download: \"Download\",\n failedAudio: \"This audio couldn't be processed.\",\n failedImage: \"This image couldn't be processed.\",\n },\n player: {\n play: \"Play video\",\n loading: \"Loading video…\",\n retry: \"Try again\",\n code: \"Code {code}\",\n quality: \"Quality\",\n auto: \"Auto\",\n autoCurrent: \"Auto ({quality})\",\n label: \"Video player\",\n resume: \"Play\",\n pause: \"Pause\",\n replay: \"Replay\",\n seek: \"Seek\",\n time: \"{current} of {duration}\",\n seekBack: \"Back {seconds} seconds\",\n seekForward: \"Forward {seconds} seconds\",\n seconds: \"{seconds} seconds\",\n mute: \"Mute\",\n unmute: \"Unmute\",\n volume: \"Volume\",\n settings: \"Settings\",\n speed: \"Speed\",\n normal: \"Normal\",\n audio: \"Audio\",\n subtitles: \"Subtitles\",\n subtitlesOff: \"Off\",\n forced: \"{label} (forced)\",\n track: \"Track {number}\",\n fullscreen: \"Fullscreen\",\n exitFullscreen: \"Exit fullscreen\",\n pip: \"Picture in picture\",\n exitPip: \"Exit picture in picture\",\n theater: \"Theater mode\",\n miniPlayer: \"Mini player\",\n expand: \"Expand\",\n close: \"Close\",\n failed: \"This video couldn't be processed.\",\n errors: {\n network: \"The video server couldn't be reached.\",\n access: \"You no longer have access to this video.\",\n not_found: \"This video isn't available.\",\n rate_limited: \"Too many requests. Try again shortly.\",\n unsupported: \"This video can't be played in this browser.\",\n stalled: \"Playback stalled. Check your connection and try again.\",\n unknown: \"This video can't be played right now.\",\n },\n },\n versionDownload: {\n unavailable: \"This isn't available to download right now.\",\n availableIn_one: \"Available to download in {count} day\",\n availableIn_other: \"Available to download in {count} days\",\n label: \"Download\",\n preparing: \"Preparing download…\",\n locked: \"Unlock this to download it.\",\n limited: \"Download limit reached. Try again in {minutes} min.\",\n failed: \"The download couldn't start. Please try again.\",\n },\n errors: {\n download_unavailable: \"This isn't available to download right now.\",\n no_download: \"There is nothing to download yet.\",\n generic: \"Something went wrong on our end. Please try again.\",\n network: \"Couldn't reach the server. Check your connection and try again.\",\n server_unavailable: \"The server isn't responding right now. Please try again in a moment.\",\n storage: \"The upload was interrupted. Please try again.\",\n decode: \"This file can't be opened as an image.\",\n invalid_request: \"The image could not be saved.\",\n unauthorized: \"Your session expired. Sign in again to upload.\",\n forbidden: \"You don't have permission to change this image.\",\n not_found: \"This item no longer exists.\",\n conflict: \"This was changed elsewhere. Reload and try again.\",\n incomplete: \"The upload didn't finish. Please try again.\",\n not_uploaded: \"The upload expired. Please pick the image again.\",\n too_large: \"This file is too large.\",\n quota_exceeded: \"You've reached your storage limit.\",\n type_not_allowed: \"This file type isn't supported here.\",\n checksum_mismatch: \"The file changed during upload. Please try again.\",\n rate_limited: \"Too many uploads. Try again in {seconds} s.\",\n unavailable: \"Media storage is unavailable. Please try again shortly.\",\n upgrade_required: \"This item is being upgraded. Please try again later.\",\n internal_error: \"Something went wrong on our end. Please try again.\",\n allowedTypes: \"Use {allowed}.\",\n tooLargeBy: \"This file is {size}; the limit is {max}.\",\n image_too_small: \"This image is {width} px wide after cropping; it must be at least {min} px. Select a larger area or use a bigger image.\",\n image_too_large: \"This image is {width}×{height} px; images may have at most {megapixels} megapixels.\",\n image_unreadable: \"This file isn't a valid {format} image.\",\n render_timeout: \"The server is still rendering this. It will appear once ready; check back shortly.\",\n animation_not_allowed: \"Animated images aren't allowed here. Please upload a non-animated image.\",\n animation_unsupported: \"Animated {format} isn't supported yet. Upload a GIF or animated WebP.\",\n animationFrames: \"Animations can have at most {maxFrames} frames; this one has {frames}.\",\n animationSeconds: \"Animations can run at most {maxSeconds} seconds.\",\n animationTooLarge: \"This animation is too large: {frames} frames of {width}×{height} px. Use fewer frames or a smaller size.\",\n too_many_files: \"This item already has as many files as it allows. Remove some first.\",\n animation_too_long: \"This animation runs too long.\",\n video_too_long: \"This file runs longer than allowed here.\",\n video_too_large: \"This video's frame size is larger than allowed here.\",\n videoTooLongBy: \"This file runs {duration} s; the limit here is {maxSeconds} s.\",\n videoTooLargeBy: \"This video is {width}×{height} px; videos may have at most {megapixels} megapixels.\",\n video_over_budget: \"This video would take too long to process. Use a shorter or smaller video.\",\n video_aspect_unsupported: \"This video is too wide or too tall to be used here.\",\n videoAspectBy: \"This video is {shape}; videos here must be between {minAspect} and {maxAspect}.\",\n tooManyFilesBy: \"This item holds at most {maxFiles} of these files. Remove some first.\",\n aborted: \"Canceled.\",\n resume_mismatch: \"The saved upload is for a different file. Please pick the file again.\",\n moderation_rejected: \"This was rejected by moderation.\",\n comment_banned: \"You can't comment here.\",\n comments_closed: \"Comments are closed here.\",\n comments_locked: \"Unlock this to see and write comments.\",\n not_joinable: \"This group isn't open to join right now.\",\n limit_reached: \"You already have as many of these as allowed.\",\n comment_too_long: \"This comment is too long.\",\n commentTooLongBy: \"A comment is at most {maxChars} characters.\",\n not_configured: \"This feature isn't available on this site.\",\n tenant_mismatch: \"Something went wrong on our end. Please try again.\",\n gone: \"This content is no longer available.\",\n },\n};\n"],"mappings":";;;;;;AAMA,IAAa,IAAK;CAChB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,QAAQ;EACN,QAAQ;EACR,OAAO;EACP,MAAM;EACN,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,SAAS;CACX;CACA,MAAM;EACJ,OAAO;EACP,aAAa;EACb,YAAY;EACZ,aAAa;EACb,MAAM;EACN,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,aAAa;EACb,OAAO;EACP,YAAY;EACZ,UAAU;EACV,OAAO;EACP,UAAU;EACV,SAAS;EACT,MAAM;CACR;CACA,UAAU;EACR,QAAQ;EACR,cAAc;EACd,UAAU;EACV,MAAM;EACN,SAAS;EACT,aAAa;EACb,UAAU;CACZ;CACA,QAAQ;EACN,OAAO;EACP,MAAM;EACN,KAAK;EACL,QAAQ;EACR,aAAa;EACb,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,UAAU;EACV,YAAY;EACZ,mBAAmB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EACrB,gBAAgB;EAChB,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;AACF"}
|
package/dist/locales/es.js
CHANGED
|
@@ -236,7 +236,8 @@ var a = {
|
|
|
236
236
|
download_unavailable: "Esto no está disponible para descargar ahora.",
|
|
237
237
|
no_download: "Todavía no hay nada que descargar.",
|
|
238
238
|
generic: "Algo salió mal por nuestra parte. Inténtalo de nuevo.",
|
|
239
|
-
network: "
|
|
239
|
+
network: "No se pudo conectar con el servidor. Comprueba tu conexión e inténtalo de nuevo.",
|
|
240
|
+
server_unavailable: "El servidor no responde en este momento. Inténtalo de nuevo en unos instantes.",
|
|
240
241
|
storage: "La subida se interrumpió. Inténtalo de nuevo.",
|
|
241
242
|
decode: "Este archivo no se puede abrir como imagen.",
|
|
242
243
|
invalid_request: "No se pudo guardar la imagen.",
|