Skip to content

Commit b726ab6

Browse files
authored
Merge pull request #14976 from ethereum/staging
Deploy v9.6.0
2 parents b9041be + 03d5337 commit b726ab6

File tree

390 files changed

+3774
-7028
lines changed

Some content is hidden

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

390 files changed

+3774
-7028
lines changed

.all-contributorsrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12697,6 +12697,24 @@
1269712697
"contributions": [
1269812698
"content"
1269912699
]
12700+
},
12701+
{
12702+
"login": "jenish-thapa",
12703+
"name": "Jenish Thapa",
12704+
"avatar_url": "https://avatars.githubusercontent.com/u/141203631?v=4",
12705+
"profile": "https://github.com/jenish-thapa",
12706+
"contributions": [
12707+
"ideas"
12708+
]
12709+
},
12710+
{
12711+
"login": "iusx",
12712+
"name": "iusx",
12713+
"avatar_url": "https://avatars.githubusercontent.com/u/57232813?v=4",
12714+
"profile": "https://jiangxue.org/~ritsu",
12715+
"contributions": [
12716+
"code"
12717+
]
1270012718
}
1270112719
],
1270212720
"contributorsPerLine": 7,

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ IS_PREVIEW_DEPLOY=false
2929
# Build pages only for the specified langs. Leave it empty to build all the langs
3030
# e.g. `en,fr` will only build English and French pages
3131
# Note: always include `en` as it is the default lang of the site
32-
BUILD_LOCALES=
32+
NEXT_PUBLIC_BUILD_LOCALES=
3333

3434
# If resource constraints are being hit during builds, change LIMIT_CPUS to a
3535
# fixed number of CPUs (e.g. 2) to limit the demand during build time

.eslintrc.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
// Packages. `react` related packages come first.
2424
// Also, put `react-icons` in sorting order not with `react`
2525
["^react(?!-.)$", "^\\w", "^@\\w"],
26-
// The Chakra theme directory if imported to story file or other places
27-
["^@/@chakra-ui"],
2826
// From the `types` directory.
2927
["^@/lib/types", "^@/lib/interfaces"],
3028
// From the `components` directory.
@@ -65,17 +63,6 @@
6563
"varsIgnorePattern": "^_$"
6664
}
6765
],
68-
"unused-imports/no-unused-imports-ts": "warn",
69-
"no-restricted-imports": [
70-
"warn",
71-
{
72-
"paths": [
73-
{
74-
"name": "react-i18next",
75-
"message": "Please use next-i18next instead of react-i18next."
76-
}
77-
]
78-
}
79-
]
66+
"unused-imports/no-unused-imports-ts": "warn"
8067
}
8168
}

.github/ISSUE_TEMPLATE/suggest_quiz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Suggest quiz
2-
description: Add, update, delete questions for a quiz on ethereum.osg
2+
description: Add, update, delete questions for a quiz on ethereum.org
33
title: Add/Update/Delete quiz question
44
labels: ["feature ✨", "quiz 📚"]
55
body:

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"config ⚙️":
1717
- i18n.config.json
1818
- next.config.js
19-
- next-i18next.config,js
2019
- next-sitemap.config.js
2120
- tsconfig.json
2221
- .nvmrc

.github/workflows/chromatic.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- "src/components/**/*"
1616
- "src/pages/**/*"
1717
- "src/layouts/**/*"
18-
- "src/@chakra-ui/**/*"
1918
- ".storybook/**/*"
2019
- "tailwind.config.ts"
2120
- "src/styles/**/*"

.storybook/ChakraDecorator.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

.storybook/main.ts

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin"
2-
import { propNames } from "@chakra-ui/react"
32
import type { StorybookConfig } from "@storybook/nextjs"
43

54
/**
@@ -17,8 +16,8 @@ import type { StorybookConfig } from "@storybook/nextjs"
1716
const config: StorybookConfig = {
1817
stories: [
1918
"../src/components/**/*.stories.{ts,tsx}",
20-
"../src/@chakra-ui/stories/*.stories.tsx",
2119
"../src/layouts/stories/*.stories.tsx",
20+
"../src/styles/*.stories.tsx",
2221
],
2322
addons: [
2423
"@storybook/addon-links",
@@ -29,9 +28,9 @@ const config: StorybookConfig = {
2928
},
3029
},
3130
"@storybook/addon-interactions",
32-
"storybook-react-i18next",
3331
"@storybook/addon-themes",
3432
"@chromatic-com/storybook",
33+
"storybook-next-intl",
3534
],
3635
staticDirs: ["../public"],
3736
framework: {
@@ -41,11 +40,6 @@ const config: StorybookConfig = {
4140
docs: {
4241
autodocs: "tag",
4342
},
44-
refs: {
45-
"@chakra-ui/react": {
46-
disable: true,
47-
},
48-
},
4943
webpackFinal: async (config) => {
5044
config.module = config.module || {}
5145
config.module.rules = config.module.rules || []
@@ -79,23 +73,6 @@ const config: StorybookConfig = {
7973
typescript: {
8074
reactDocgenTypescriptOptions: {
8175
shouldExtractLiteralValuesFromEnum: true,
82-
/**
83-
* For handling bloated controls table of Chakra Props
84-
*
85-
* https://github.com/chakra-ui/chakra-ui/issues/2009#issuecomment-852793946
86-
*/
87-
propFilter: (prop) => {
88-
const excludedPropNames = propNames.concat([
89-
"as",
90-
"apply",
91-
"sx",
92-
"__css",
93-
])
94-
const isStyledSystemProp = excludedPropNames.includes(prop.name)
95-
const isHTMLElementProp =
96-
prop.parent?.fileName.includes("node_modules") ?? false
97-
return !(isStyledSystemProp || isHTMLElementProp)
98-
},
9976
},
10077

10178
reactDocgen: "react-docgen-typescript",

.storybook/modes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pickBy from "lodash/pickBy"
22

3-
import { baseLocales } from "./i18next"
3+
import { baseLocales } from "./next-intl"
44
import { breakpointSet } from "./preview"
55

66
export const viewportModes = breakpointSet.reduce<{

.storybook/i18next.ts renamed to .storybook/next-intl.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import i18n, { Resource } from "i18next"
2-
// eslint-disable-next-line no-restricted-imports
3-
import { initReactI18next } from "react-i18next"
4-
51
export const baseLocales = {
62
en: { title: "English", left: "En" },
73
zh: { title: "中国人", left: "Zh" },
@@ -32,7 +28,7 @@ const supportedLngs = Object.keys(baseLocales)
3228
/**
3329
* Taking the ns array and generating those files for each language available.
3430
*/
35-
const resources: Resource = ns.reduce((acc, n) => {
31+
const messagesByLocale = ns.reduce((acc, n) => {
3632
supportedLngs.forEach((lng) => {
3733
if (!acc[lng]) acc[lng] = {}
3834

@@ -57,16 +53,18 @@ const resources: Resource = ns.reduce((acc, n) => {
5753

5854
return acc
5955
}, {})
60-
console.log("🚀 ~ constresources:Resource=ns.reduce ~ resources:", resources)
56+
console.log(
57+
"🚀 ~ constresources:Resource=ns.reduce ~ resources:",
58+
messagesByLocale
59+
)
6160

62-
i18n.use(initReactI18next).init({
63-
debug: true,
64-
fallbackLng: "en",
65-
interpolation: { escapeValue: false },
66-
react: { useSuspense: false },
67-
supportedLngs,
68-
resources,
69-
defaultNS: "common",
70-
})
61+
const nextIntl = {
62+
defaultLocale: "en",
63+
messagesByLocale,
64+
getMessageFallback: ({ key }: { key: string }) => {
65+
const keyOnly = key.split(".").pop()
66+
return keyOnly || key
67+
},
68+
}
7169

72-
export default i18n
70+
export default nextIntl

0 commit comments

Comments
 (0)