Merge pull request #829 from larstobi/feat/norwegian-bokmal

feat(i18n): add Norwegian Bokmål locale
This commit is contained in:
Linus Rath
2026-08-28 19:56:01 +02:00
committed by GitHub
6 changed files with 3513 additions and 1 deletions
+1
View File
@@ -35,6 +35,7 @@ export const LOCALE_LOADERS: Record<string, () => Promise<Messages>> = {
ko: () => import('@/locales/ko/common.json').then((m) => m.default),
lv: () => import('@/locales/lv/common.json').then((m) => m.default),
mn: () => import('@/locales/mn/common.json').then((m) => m.default),
nb: () => import('@/locales/nb/common.json').then((m) => m.default),
nl: () => import('@/locales/nl/common.json').then((m) => m.default),
pl: () => import('@/locales/pl/common.json').then((m) => m.default),
pt: () => import('@/locales/pt/common.json').then((m) => m.default),
+12
View File
@@ -235,6 +235,17 @@ export function FlagDK(props: FlagProps) {
);
}
/** Norway – Red with a blue Nordic cross outlined in white */
export function FlagNO(props: FlagProps) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 16" width={W} height={H} className={flagClass} {...props}>
<rect width="22" height="16" fill="#BA0C2F" />
<path d="M0 8h22M8 0v16" stroke="#fff" strokeWidth="4" />
<path d="M0 8h22M8 0v16" stroke="#00205B" strokeWidth="2" />
</svg>
);
}
/** Romania – Vertical blue, yellow, red tricolour */
export function FlagRO(props: FlagProps) {
return (
@@ -354,6 +365,7 @@ export const flagComponents: Record<string, (props: FlagProps) => ReactElement>
ko: FlagKR,
lv: FlagLV,
mn: FlagMN,
nb: FlagNO,
nl: FlagNL,
pl: FlagPL,
pt: FlagBR,
+1
View File
@@ -24,6 +24,7 @@ const languages = [
{ value: 'hu', label: 'Magyar' },
{ value: 'lv', label: 'Latviešu' },
{ value: 'nl', label: 'Nederlands' },
{ value: 'nb', label: 'Norsk bokmål' },
{ value: 'pl', label: 'Polski' },
{ value: 'pt', label: 'Português' },
{ value: 'ro', label: 'Română' },
+3
View File
@@ -78,6 +78,9 @@ export default getRequestConfig(async ({ requestLocale }) => {
case 'mn':
messages = (await import('../locales/mn/common.json')).default;
break;
case 'nb':
messages = (await import('../locales/nb/common.json')).default;
break;
case 'nl':
messages = (await import('../locales/nl/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', 'ca', 'cs', 'da', 'de', 'en', 'es', 'fa', 'fr', 'he', 'hu', 'it', 'ja', 'ko', 'lv', 'mn', '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', 'mn', 'nb', '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