Skip to content

Commit a67fae3

Browse files
authored
Merge branch 'dev' into patch-3
2 parents bbc2cb2 + 8e7b274 commit a67fae3

File tree

1,148 files changed

+121811
-36167
lines changed

Some content is hidden

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

1,148 files changed

+121811
-36167
lines changed

.all-contributorsrc

Lines changed: 130 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8756,7 +8756,8 @@
87568756
"profile": "https://github.com/MahendraBishnoi29",
87578757
"contributions": [
87588758
"ideas",
8759-
"code"
8759+
"code",
8760+
"bug"
87608761
]
87618762
},
87628763
{
@@ -10210,6 +10211,134 @@
1021010211
"content",
1021110212
"code"
1021210213
]
10214+
},
10215+
{
10216+
"login": "maxime216-pro",
10217+
"name": "Maxime Dessez",
10218+
"avatar_url": "https://avatars.githubusercontent.com/u/66296351?v=4",
10219+
"profile": "http://maximedessez.fr",
10220+
"contributions": [
10221+
"bug",
10222+
"translation"
10223+
]
10224+
},
10225+
{
10226+
"login": "Tyler-233",
10227+
"name": "Tyler-233",
10228+
"avatar_url": "https://avatars.githubusercontent.com/u/44740396?v=4",
10229+
"profile": "https://github.com/Tyler-233",
10230+
"contributions": [
10231+
"translation",
10232+
"content"
10233+
]
10234+
},
10235+
{
10236+
"login": "neodaoist",
10237+
"name": "neodaoist",
10238+
"avatar_url": "https://avatars.githubusercontent.com/u/3170590?v=4",
10239+
"profile": "http://neodaoist.xyz",
10240+
"contributions": [
10241+
"content"
10242+
]
10243+
},
10244+
{
10245+
"login": "atharvadeosthale",
10246+
"name": "Atharva Deosthale",
10247+
"avatar_url": "https://avatars.githubusercontent.com/u/11805367?v=4",
10248+
"profile": "https://links.atharva.codes",
10249+
"contributions": [
10250+
"content"
10251+
]
10252+
},
10253+
{
10254+
"login": "ckartik",
10255+
"name": "Kartik Chopra",
10256+
"avatar_url": "https://avatars.githubusercontent.com/u/13803371?v=4",
10257+
"profile": "https://github.com/ckartik",
10258+
"contributions": [
10259+
"content"
10260+
]
10261+
},
10262+
{
10263+
"login": "BBashh",
10264+
"name": "Bibash Tandon",
10265+
"avatar_url": "https://avatars.githubusercontent.com/u/125178349?v=4",
10266+
"profile": "https://github.com/BBashh",
10267+
"contributions": [
10268+
"content"
10269+
]
10270+
},
10271+
{
10272+
"login": "vaibhavtevatia",
10273+
"name": "Vaibhav Tevatia",
10274+
"avatar_url": "https://avatars.githubusercontent.com/u/86671961?v=4",
10275+
"profile": "https://github.com/vaibhavtevatia",
10276+
"contributions": [
10277+
"code"
10278+
]
10279+
},
10280+
{
10281+
"login": "cnn-rnn",
10282+
"name": "cnn-rnn",
10283+
"avatar_url": "https://avatars.githubusercontent.com/u/44789658?v=4",
10284+
"profile": "https://github.com/cnn-rnn",
10285+
"contributions": [
10286+
"ideas"
10287+
]
10288+
},
10289+
{
10290+
"login": "SahityaRoy",
10291+
"name": "Sahitya Roy",
10292+
"avatar_url": "https://avatars.githubusercontent.com/u/72821604?v=4",
10293+
"profile": "https://www.linkedin.com/in/sahitya-roy-244b941a2/",
10294+
"contributions": [
10295+
"ideas"
10296+
]
10297+
},
10298+
{
10299+
"login": "Keecointoken",
10300+
"name": "KeeCoin",
10301+
"avatar_url": "https://avatars.githubusercontent.com/u/99338330?v=4",
10302+
"profile": "https://www.keecoin.io",
10303+
"contributions": [
10304+
"ideas"
10305+
]
10306+
},
10307+
{
10308+
"login": "tomatowax",
10309+
"name": "Seungwook Chi",
10310+
"avatar_url": "https://avatars.githubusercontent.com/u/799503?v=4",
10311+
"profile": "http://www.tomatowax.com/",
10312+
"contributions": [
10313+
"content"
10314+
]
10315+
},
10316+
{
10317+
"login": "0xx92",
10318+
"name": "0xx92",
10319+
"avatar_url": "https://avatars.githubusercontent.com/u/133748557?v=4",
10320+
"profile": "https://github.com/0xx92",
10321+
"contributions": [
10322+
"content"
10323+
]
10324+
},
10325+
{
10326+
"login": "altinocoelho",
10327+
"name": "altinocoelho",
10328+
"avatar_url": "https://avatars.githubusercontent.com/u/92543849?v=4",
10329+
"profile": "https://github.com/altinocoelho",
10330+
"contributions": [
10331+
"content"
10332+
]
10333+
},
10334+
{
10335+
"login": "viac92",
10336+
"name": "viac92",
10337+
"avatar_url": "https://avatars.githubusercontent.com/u/64146594?v=4",
10338+
"profile": "https://github.com/viac92",
10339+
"contributions": [
10340+
"content"
10341+
]
1021310342
}
1021410343
],
1021510344
"contributorsPerLine": 7,
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Update Crowdin Contributors
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * SUN" # Runs every Sunday at midnight
6+
workflow_dispatch:
7+
8+
jobs:
9+
create_pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
20+
- name: Install dependencies
21+
run: yarn install
22+
23+
- name: Install ts-node
24+
run: yarn global add ts-node
25+
26+
- name: Set up git
27+
run: |
28+
git config --global user.email "[email protected]"
29+
git config --global user.name "GitHub Action"
30+
31+
- name: Generate timestamp and readable date
32+
id: date
33+
run: |
34+
echo "TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
35+
echo "READABLE_DATE=$(date +'%B %-d')" >> $GITHUB_ENV
36+
37+
- name: Fetch latest dev and create new branch
38+
run: |
39+
git fetch origin dev
40+
git checkout -b "automated-update-${{ env.TIMESTAMP }}" origin/dev
41+
42+
- name: Run script
43+
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/getCrowdinContributors.ts
44+
env:
45+
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
46+
47+
- name: Commit and push
48+
run: |
49+
git add -A
50+
git commit -m "Update Crowdin contributors"
51+
git push origin "automated-update-${{ env.TIMESTAMP }}"
52+
53+
- name: Create PR body
54+
run: |
55+
echo "This PR was automatically created to update Crowdin contributors." > pr_body.txt
56+
echo "This workflows runs every Sunday at 00:00 (UTC)." >> pr_body.txt
57+
echo "" >> pr_body.txt
58+
echo "Thank you to everyone contributing to translate ethereum.org ❤️" >> pr_body.txt
59+
60+
- name: Create Pull Request
61+
run: |
62+
gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }}
63+
gh pr create --base dev --head "automated-update-${{ env.TIMESTAMP }}" --title "Update translation contributors from Crowdin - ${{ env.READABLE_DATE }}" --body-file pr_body.txt

.storybook/babel-storybook-config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const babelConfig = {
1+
import { TransformOptions } from "@babel/core"
2+
3+
export const babelConfig: TransformOptions = {
24
sourceType: "unambiguous",
35
presets: [
46
[

.storybook/i18next.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import i18n, { Resource } from "i18next"
2+
import { initReactI18next } from "gatsby-plugin-react-i18next"
3+
4+
export const baseLocales = {
5+
en: { title: "English", left: "En" },
6+
zh: { title: "中国人", left: "Zh" },
7+
ru: { title: "Русский", left: "Ru" },
8+
uk: { title: "українська", left: "Uk" },
9+
}
10+
11+
// Only i18n files named in this array are being exposed to Storybook. Add filenames as necessary.
12+
const ns = ["common", "page-about", "page-upgrades", "page-developers-index"]
13+
const supportedLngs = Object.keys(baseLocales)
14+
15+
/**
16+
* Taking the ns array and combining all the ids
17+
* under a single ns per language, set to the default of "translation"
18+
*/
19+
const resources: Resource = ns.reduce((acc, n) => {
20+
supportedLngs.forEach((lng) => {
21+
if (!acc[lng]) acc[lng] = {}
22+
acc[lng] = {
23+
translation: {
24+
...acc[lng].translation,
25+
...require(`../src/intl/${lng}/${n}.json`),
26+
},
27+
}
28+
})
29+
return acc
30+
}, {})
31+
32+
i18n.use(initReactI18next).init({
33+
debug: true,
34+
fallbackLng: "en",
35+
interpolation: { escapeValue: false },
36+
react: { useSuspense: false },
37+
supportedLngs,
38+
resources,
39+
})
40+
41+
export default i18n

.storybook/main.js renamed to .storybook/main.ts

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const { propNames } = require("@chakra-ui/react")
1+
import { StorybookConfig } from "@storybook/react-webpack5"
2+
import { propNames } from "@chakra-ui/react"
3+
import { babelConfig } from "./babel-storybook-config"
24

3-
const { babelConfig } = require("./babel-storybook-config")
4-
5-
module.exports = {
5+
const config: StorybookConfig = {
66
stories: ["../src/components/**/*.stories.tsx"],
77
addons: [
88
"@storybook/addon-links",
@@ -11,9 +11,10 @@ module.exports = {
1111
// https://storybook.js.org/addons/@storybook/addon-a11y/
1212
"@storybook/addon-a11y",
1313
"@chakra-ui/storybook-addon",
14+
"storybook-react-i18next",
1415
],
1516
staticDirs: ["../static"],
16-
babel: async (options) => ({
17+
babel: async () => ({
1718
...babelConfig,
1819
}),
1920
framework: {
@@ -27,30 +28,30 @@ module.exports = {
2728
},
2829
features: {},
2930
webpackFinal: async (config) => {
30-
const isRuleExist =
31-
config.module && config.module.rules && config.module.rules.length
32-
if (isRuleExist) {
33-
// Transpile Gatsby module because Gatsby includes un-transpiled ES6 code.
34-
config.module.rules[0].exclude = [
35-
/node_modules\/(?!(gatsby|gatsby-script)\/)/,
36-
]
37-
38-
// Remove core-js to prevent issues with Storybook
39-
config.module.rules[0].exclude = [/core-js/]
40-
}
41-
4231
if (
43-
isRuleExist &&
44-
config.module.rules[0].use &&
45-
config.module.rules[0].use.length
32+
config.module != undefined &&
33+
config.module.rules != undefined &&
34+
config.module.rules[0] !== "..."
4635
) {
47-
// Use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
48-
config.module.rules[0].use[0].options.plugins.push(
49-
require.resolve("babel-plugin-remove-graphql-queries")
50-
)
36+
config.module.rules[0].exclude = [/node_modules\/(?!(gatsby)\/)/]
37+
config.module.rules[0].use = [
38+
{
39+
loader: require.resolve("babel-loader"),
40+
options: {
41+
presets: [
42+
// use @babel/preset-react for JSX and env (instead of staged presets)
43+
require.resolve("@babel/preset-react"),
44+
require.resolve("@babel/preset-env"),
45+
],
46+
plugins: [
47+
// use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
48+
require.resolve("babel-plugin-remove-graphql-queries"),
49+
],
50+
},
51+
},
52+
]
5153
}
5254

53-
config.resolve.mainFields = ["browser", "module", "main"]
5455
return config
5556
},
5657
typescript: {
@@ -83,3 +84,5 @@ module.exports = {
8384
},
8485
},
8586
}
87+
88+
export default config

0 commit comments

Comments
 (0)