Skip to content

Commit 10f4936

Browse files
authoredFeb 16, 2024
feat: localization (#1039)
* wip: localization * wip: continue localization * wip: continue localization * wip: start enforcing some lingui eslint rules * wip: form fields * feat: finish most of components, customize eslint * wip: adjust schemas * wip: include eslint * feat: localization compiles * wip: some hooks not playing nice, have more to do * fix: useGetLink * wip: auth lib * wip: address all linting errors * fix: casing * fix: cleanup code to look nicer in po file * feat: localize english * fix: clean take other language files * fix: load language based on browser * fix: use correct locale * fix: not a messages file * fix: macro and react library should not mix * fix: language extractions * fix: localizations, spelling, tsconfig * fix: needs to be mts * fix: use JS config * fix: force new package lock * feat: add BAT page translation tags * fix: missed one english translation
1 parent a615649 commit 10f4936

File tree

164 files changed

+11728
-3407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+11728
-3407
lines changed
 

‎.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
**/*.generated.tsx
22
codegen.ts
33
vite.config.mts
4+
**/*.test.ts
5+
**/*.spec.ts
6+
src/components/TimeZonePicker/useTimeZoneList.ts
7+
lingui.config.ts

‎.eslintrc.js

+43-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
root: true,
33
parser: "@typescript-eslint/parser",
4-
plugins: ["@typescript-eslint"],
4+
plugins: ["@typescript-eslint", "lingui"],
55
parserOptions: {
66
tsconfigRootDir: __dirname,
77
project: ["./tsconfig.json"],
@@ -26,5 +26,47 @@ module.exports = {
2626
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
2727
"@typescript-eslint/no-empty-function": "off",
2828
"@typescript-eslint/no-require-imports": "error",
29+
"lingui/no-unlocalized-strings": [
30+
"error",
31+
{
32+
ignoreAttribute: [
33+
"style",
34+
"sx",
35+
"fontFamily",
36+
"bgcolor",
37+
"border",
38+
"padding",
39+
"color",
40+
"alt",
41+
"borderBottom",
42+
],
43+
ignoreFunction: [
44+
"createSvgIcon",
45+
"log",
46+
"useTrackMatomoPageView",
47+
"useTrackWithMatomo",
48+
"formatInTimeZone",
49+
"zonedTimeToUtc",
50+
"utcToZonedTime",
51+
],
52+
ignoreProperty: [
53+
"documentTitle",
54+
"color",
55+
"border",
56+
"en",
57+
"es",
58+
"fontFamily",
59+
"boxShadow",
60+
"transform",
61+
"format",
62+
"name",
63+
],
64+
},
65+
],
66+
"lingui/t-call-in-function": "error",
67+
"lingui/no-single-variables-to-translate": "error",
68+
"lingui/no-expression-in-message": "error",
69+
"lingui/no-single-tag-to-translate": "error",
70+
"lingui/no-trans-inside-trans": "error",
2971
},
3072
};

0 commit comments

Comments
 (0)