feat: add Catalan translation

This commit is contained in:
marc0s
2026-07-23 19:41:21 +02:00
parent 457063a48b
commit 144d6503cc
5 changed files with 3305 additions and 1 deletions
+14
View File
@@ -76,6 +76,19 @@ export function FlagES(props: FlagProps) {
);
}
/** Catalonia Senyera: four red horizontal bars on a yellow field */
export function FlagCAT(props: FlagProps) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 18" width={W} height={H} className={flagClass} {...props}>
<rect width="27" height="18" fill="#FCDD09" />
<rect y="2" width="27" height="2" fill="#DA121A" />
<rect y="6" width="27" height="2" fill="#DA121A" />
<rect y="10" width="27" height="2" fill="#DA121A" />
<rect y="14" width="27" height="2" fill="#DA121A" />
</svg>
);
}
/** Italy Green, White, Red vertical */
export function FlagIT(props: FlagProps) {
return (
@@ -309,6 +322,7 @@ export function FlagSK(props: FlagProps) {
/** Map locale codes to flag components */
export const flagComponents: Record<string, (props: FlagProps) => ReactElement> = {
ca: FlagCAT,
cs: FlagCS,
sk: FlagSK,
da: FlagDK,
+1
View File
@@ -9,6 +9,7 @@ import { flagComponents } from './flag-icons';
const languages = [
{ value: 'auto', label: 'Auto' },
{ value: 'ar', label: 'العربية' },
{ value: 'ca', label: 'Català' },
{ value: 'cs', label: 'Česky' },
{ value: 'sk', label: 'Slovenčina' },
{ value: 'da', label: 'Dansk' },
+3
View File
@@ -36,6 +36,9 @@ export default getRequestConfig(async ({ requestLocale }) => {
case 'ar':
messages = (await import('../locales/ar/common.json')).default;
break;
case 'ca':
messages = (await import('../locales/ca/common.json')).default;
break;
case 'cs':
messages = (await import('../locales/cs/common.json')).default;
break;
+1 -1
View File
@@ -12,7 +12,7 @@ const localePrefix = (process.env.NEXT_PUBLIC_LOCALE_PREFIX ?? 'never') as
| 'always'
| 'as-needed';
const SUPPORTED_LOCALES = ['ar', 'cs', 'da', 'de', 'en', 'es', 'fa', 'fr', 'he', 'hu', 'it', 'ja', 'ko', 'lv', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'tr', 'uk', 'zh'] as const;
const SUPPORTED_LOCALES = ['ar', 'ca', 'cs', 'da', 'de', 'en', 'es', 'fa', 'fr', 'he', 'hu', 'it', 'ja', 'ko', 'lv', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'tr', 'uk', 'zh'] as const;
// Fallback locale used when the visitor's Accept-Language header does not
// match any supported locale (and no NEXT_LOCALE cookie is set yet). Admins
File diff suppressed because it is too large Load Diff