🌐 Remove abandoned languages (#739)

This commit is contained in:
Luke Vella 2023-07-13 14:34:15 +01:00 committed by GitHub
parent 47d5d1c70d
commit 1920de1402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 11 deletions

View file

@ -10,7 +10,7 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
});
const nextConfig = {
i18n: i18n,
i18n: { ...i18n, localeDetection: false },
productionBrowserSourceMaps: true,
output: "standalone",
transpilePackages: [

View file

@ -201,5 +201,6 @@
"monthlyBillingDescription": "per month",
"plan_finalizePolls": "Finalize polls",
"plan_extendedPollLife": "Keep polls indefinitely",
"plan_prioritySupport": "Priority support"
"plan_prioritySupport": "Priority support",
"becomeATranslator": "Help translate"
}

View file

@ -1,5 +1,7 @@
import { ArrowUpRight } from "@rallly/icons";
import { Button } from "@rallly/ui/button";
import { Form, FormField, FormItem, FormLabel } from "@rallly/ui/form";
import Link from "next/link";
import { useRouter } from "next/router";
import { useTranslation } from "next-i18next";
import { useForm } from "react-hook-form";
@ -44,7 +46,7 @@ export const LanguagePreference = () => {
</FormItem>
)}
/>
<div className="mt-6">
<div className="mt-6 flex flex-wrap gap-2">
<Button
variant="primary"
disabled={!form.formState.isDirty}
@ -53,6 +55,15 @@ export const LanguagePreference = () => {
>
<Trans i18nKey="save" />
</Button>
<Button asChild variant="ghost">
<Link
target="_blank"
href="https://support.rallly.co/contribute/translations"
>
<Trans i18nKey="becomeATranslator" defaults="Help translate" />
<ArrowUpRight className="h-4 w-4" />
</Link>
</Button>
</div>
</form>
</Form>

View file

@ -3,7 +3,7 @@ import test, { expect } from "@playwright/test";
test("should show correct language if supported", async ({ browser }) => {
const context = await browser.newContext({ locale: "de" });
const page = await context.newPage();
await page.goto("/");
await page.goto("/new");
await expect(page.locator("text=Neue Umfrage")).toBeVisible();
});

View file

@ -4,20 +4,13 @@
"da": "Dansk",
"de": "Deutsch",
"en": "English",
"es": "Español",
"fi": "Suomi",
"fr": "Français",
"hr": "Hrvatski",
"hu": "Magyar",
"it": "Italiano",
"ko": "한국어",
"nl": "Nederlands",
"pl": "Polski",
"pt": "Português",
"pt-BR": "Português - Brasil",
"ru": "Pусский",
"sk": "Slovenčina",
"sv": "Svenska",
"vi": "Tiếng Việt",
"zh": "汉语"
}