-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathi18n.config.ts
More file actions
65 lines (62 loc) · 1.71 KB
/
Copy pathi18n.config.ts
File metadata and controls
65 lines (62 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { createI18n } from "@better-i18n/next";
export const i18n = createI18n({
project:
process.env.NEXT_PUBLIC_BETTER_I18N_PROJECT || "better-i18n/demo",
defaultLocale: "en",
localePrefix: "always",
timeZone: "UTC",
});
// Exported separately so the CLI can read lint config without executing createI18n
export const i18nConfig = {
project:
process.env.NEXT_PUBLIC_BETTER_I18N_PROJECT || "better-i18n/demo",
defaultLocale: "en",
lint: {
exclude: ["**/opengraph-image.tsx"],
ignoreStrings: [
// Brand names
"better-i18n",
"Better I18N",
"Better i18n",
"Next.js i18n Starter",
"better-i18n.com",
// Code identifiers shown in code blocks / terminal UI
"i18n.config.ts",
"middleware.ts",
"useTranslations()",
"getTranslations()",
"useSetLocale()",
"useFormatter()",
"LocaleDropdown",
"BetterI18nProvider",
"createI18n()",
"betterMiddleware()",
// Framework names (proper nouns in table headers)
"Next.js",
"Expo",
"Remix",
"Hono",
"TanStack",
// Accessibility labels for demo components
"Decrease",
"Increase",
// Decorative terminal UI / code preview strings
"████████████████",
"░░░░",
"82/100",
"home.title",
"TanStack Start + CF Workers",
"Dashboard → CDN → App",
"MIT",
],
ignorePatterns: [
/^@better-i18n\//, // package names
/^https?:\/\//, // URLs
/^npx\s/, // CLI commands
/^bun\s/, // CLI commands
/^npm\s/, // CLI commands
/^\$\s/, // terminal prompts
/^#\s/, // config file comments in code blocks
],
},
};