Merge pull request #681 from marc0s/feature/catalan-translation
feat: add Catalan translation
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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' },
|
||||
|
||||
@@ -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
@@ -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
Reference in New Issue
Block a user