add Polish and Croatian languages

This commit is contained in:
Henry Dollman
2024-11-07 13:11:58 -05:00
parent a97e6149bb
commit 02825ed109
4 changed files with 33 additions and 29 deletions

View File

@@ -1,7 +1,7 @@
import type { LinguiConfig } from "@lingui/conf" import type { LinguiConfig } from "@lingui/conf"
const config: LinguiConfig = { const config: LinguiConfig = {
locales: ["en", "ar", "de", "es", "fr", "it", "ja", "ko", "pt", "tr", "ru", "uk", "vi", "zh-CN", "zh-HK"], locales: ["en", "ar", "de", "es", "fr", "hr", "it", "ja", "ko", "pl", "pt", "tr", "ru", "uk", "vi", "zh-CN", "zh-HK"],
sourceLocale: "en", sourceLocale: "en",
compileNamespace: "ts", compileNamespace: "ts",
catalogs: [ catalogs: [

View File

@@ -36,7 +36,7 @@ export function AddSystemButton({ className }: { className?: string }) {
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
# monitor other disks / partitions by mounting a folder in /extra-filesystems # monitor other disks / partitions by mounting a folder in /extra-filesystems
# - /mnt/disk1/.beszel:/extra-filesystems/disk1:ro # - /mnt/disk/.beszel:/extra-filesystems/sda1:ro
environment: environment:
PORT: ${port} PORT: ${port}
KEY: "${publicKey}"`) KEY: "${publicKey}"`)
@@ -107,33 +107,27 @@ export function AddSystemButton({ className }: { className?: string }) {
</DialogDescription> </DialogDescription>
</TabsContent> </TabsContent>
<form onSubmit={handleSubmit as any}> <form onSubmit={handleSubmit as any}>
<div className="grid gap-3 mt-1 mb-4"> <div className="grid xs:grid-cols-[auto_1fr] gap-y-3 gap-x-4 items-center mt-1 mb-4">
<div className="grid grid-cols-4 items-center gap-4"> <Label htmlFor="name" className="xs:text-end">
<Label htmlFor="name" className="text-end"> <Trans>Name</Trans>
<Trans>Name</Trans> </Label>
</Label> <Input id="name" name="name" className="" required />
<Input id="name" name="name" className="col-span-3" required /> <Label htmlFor="host" className="xs:text-end">
</div> <Trans>Host / IP</Trans>
<div className="grid grid-cols-4 items-center gap-4"> </Label>
<Label htmlFor="host" className="text-end"> <Input id="host" name="host" className="" required />
<Trans>Host / IP</Trans> <Label htmlFor="port" className="xs:text-end">
</Label> <Trans>Port</Trans>
<Input id="host" name="host" className="col-span-3" required /> </Label>
</div> <Input ref={port} name="port" id="port" defaultValue="45876" className="" required />
<div className="grid grid-cols-4 items-center gap-4"> <Label htmlFor="pkey" className="xs:text-end whitespace-pre">
<Label htmlFor="port" className="text-end"> <Trans comment="Use 'Key' if your language requires many more characters">Public Key</Trans>
<Trans>Port</Trans> </Label>
</Label> <div className="relative">
<Input ref={port} name="port" id="port" defaultValue="45876" className="col-span-3" required /> <Input readOnly id="pkey" value={publicKey} className="" required></Input>
</div>
<div className="grid grid-cols-4 items-center gap-4 relative">
<Label htmlFor="pkey" className="text-end whitespace-pre">
<Trans comment="Use 'Key' if your language requires many more characters">Public Key</Trans>
</Label>
<Input readOnly id="pkey" value={publicKey} className="col-span-3" required></Input>
<div <div
className={ className={
"h-6 w-24 bg-gradient-to-r rtl:bg-gradient-to-l from-transparent to-background to-65% absolute end-1 pointer-events-none" "h-6 w-24 bg-gradient-to-r rtl:bg-gradient-to-l from-transparent to-background to-65% absolute top-2 end-1 pointer-events-none"
} }
></div> ></div>
<TooltipProvider delayDuration={100}> <TooltipProvider delayDuration={100}>
@@ -142,7 +136,7 @@ export function AddSystemButton({ className }: { className?: string }) {
<Button <Button
type="button" type="button"
variant={"link"} variant={"link"}
className="absolute end-0" className="absolute end-0 top-0"
onClick={() => copyToClipboard(publicKey)} onClick={() => copyToClipboard(publicKey)}
> >
<Copy className="h-4 w-4 " /> <Copy className="h-4 w-4 " />

View File

@@ -22,7 +22,7 @@ export function LangToggle() {
{languages.map(({ lang, label, e }) => ( {languages.map(({ lang, label, e }) => (
<DropdownMenuItem <DropdownMenuItem
key={lang} key={lang}
className={cn("px-3 flex gap-2.5", lang === i18n.locale && "font-semibold")} className={cn("px-2.5 flex gap-2.5", lang === i18n.locale && "font-semibold")}
onClick={() => dynamicActivate(lang)} onClick={() => dynamicActivate(lang)}
> >
<span>{e}</span> {label} <span>{e}</span> {label}

View File

@@ -24,6 +24,11 @@ export default [
label: "Français", label: "Français",
e: "🇫🇷", e: "🇫🇷",
}, },
{
lang: "hr",
label: "Hrvatski",
e: "🇭🇷",
},
{ {
lang: "it", lang: "it",
label: "Italiano", label: "Italiano",
@@ -39,6 +44,11 @@ export default [
label: "한국어", label: "한국어",
e: "🇰🇷", e: "🇰🇷",
}, },
{
lang: "pl",
label: "Polski",
e: "🇵🇱",
},
{ {
lang: "pt", lang: "pt",
label: "Português", label: "Português",