Skip to content

Commit 93b988d

Browse files
committed
Merge branch 'dev' into performance/find-wallets-optimizations
2 parents ff34db5 + d70c495 commit 93b988d

File tree

369 files changed

+6456
-3999
lines changed

Some content is hidden

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

369 files changed

+6456
-3999
lines changed

.all-contributorsrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12096,6 +12096,33 @@
1209612096
"contributions": [
1209712097
"doc"
1209812098
]
12099+
},
12100+
{
12101+
"login": "yunseonna",
12102+
"name": "yunseon na",
12103+
"avatar_url": "https://avatars.githubusercontent.com/u/148749864?v=4",
12104+
"profile": "https://github.com/yunseonna",
12105+
"contributions": [
12106+
"doc"
12107+
]
12108+
},
12109+
{
12110+
"login": "alex1092",
12111+
"name": "Alex",
12112+
"avatar_url": "https://avatars.githubusercontent.com/u/59183749?v=4",
12113+
"profile": "https://github.com/alex1092",
12114+
"contributions": [
12115+
"code"
12116+
]
12117+
},
12118+
{
12119+
"login": "kyndrawynne",
12120+
"name": "kyndrawynne",
12121+
"avatar_url": "https://avatars.githubusercontent.com/u/108100622?v=4",
12122+
"profile": "https://github.com/kyndrawynne",
12123+
"contributions": [
12124+
"bug"
12125+
]
1209912126
}
1210012127
],
1210112128
"contributorsPerLine": 7,

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
["^@/data"],
3131
// From the `constants` directory.
3232
["^@/lib/constants"],
33+
// From the `.storybook/utils` file
34+
["^@/storybook-utils"],
3335
// Parent imports. Put `..` last.
3436
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
3537
// Other relative imports. Put same-folder imports and `.` last.

.github/workflows/build-crowdin.yml

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

.github/workflows/crowdin-ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Crowdin CI
2+
3+
on:
4+
schedule:
5+
- cron: "20 4 1 * *" # Runs at 4:20 AM on the first day of every month
6+
workflow_dispatch: # Can be dispatched manually
7+
8+
jobs:
9+
create_approved_language_bucket_prs:
10+
runs-on: ubuntu-latest
11+
env:
12+
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
13+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
16+
steps:
17+
# Set up environment
18+
- name: Check out code
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
26+
- name: Install dependencies
27+
run: yarn install
28+
29+
- name: Install ts-node
30+
run: yarn global add ts-node
31+
32+
- name: Set up git
33+
run: |
34+
git config --global user.email "[email protected]"
35+
git config --global user.name "GitHub Action"
36+
37+
- name: Fetch latest dev
38+
run: git fetch origin dev
39+
40+
# Build translations
41+
- name: Build Crowdin project
42+
id: build-crowdin
43+
run: |
44+
npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/triggerBuild.ts;
45+
grep BUILD_ID output.env >> $GITHUB_ENV;
46+
47+
- name: Await latest build to finish
48+
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/awaitLatestBuild.ts
49+
50+
- name: Check build success
51+
run: |
52+
if [ $(grep BUILD_SUCCESS output.env | cut -d'=' -f2) = false ]; then
53+
echo "Build timed out, exiting"
54+
exit 1
55+
fi
56+
shell: bash
57+
58+
# Prepare bucket ids
59+
- name: Get latest translation bucket directory ids
60+
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/getBucketDirectoryIds.ts
61+
62+
# Import approved translations
63+
- name: Get translations
64+
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/getTranslations.ts
65+
66+
# Post updates as language-specific PRs
67+
- name: Process commits and post PRs by language
68+
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/postLangPRs.ts

.github/workflows/get-translations.yml

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ robots.txt
5050
# .crowdin folder used as temp forlder for crowdin-import script
5151
.crowdin
5252

53-
# vscode workplace configuration
53+
# workplace configuration
5454
.vscode
55+
.idea
5556

5657
# Crowdin report output
5758
src/data/crowdin/bucketsAwaitingReviewReport.csv

.storybook/i18next.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const baseLocales = {
1010
}
1111

1212
// Only i18n files named in this array are being exposed to Storybook. Add filenames as necessary.
13-
const ns = [
13+
export const ns = [
1414
"common",
1515
"glossary",
1616
"learn-quizzes",
@@ -19,7 +19,7 @@ const ns = [
1919
"page-learn",
2020
"page-upgrades",
2121
"page-developers-index",
22-
]
22+
] as const
2323
const supportedLngs = Object.keys(baseLocales)
2424

2525
/**

.storybook/manager.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { addons } from "@storybook/manager-api"
22
import theme from "./theme"
3-
// @ts-ignore
43
import favicon from "../public/favicon.png"
54

65
addons.setConfig({

.storybook/modes.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { baseLocales } from "./i18next"
2+
import { chakraBreakpointArray } from "./preview"
3+
4+
export const viewportModes = chakraBreakpointArray.reduce<{
5+
[mode: string]: { viewport: string }
6+
}>((arr, [token]) => {
7+
return {
8+
...arr,
9+
[token]: {
10+
viewport: token,
11+
},
12+
}
13+
}, {})
14+
15+
export const langModes = Object.keys(baseLocales).reduce<{
16+
[locale: string]: { locale: string }
17+
}>((arr, curr) => {
18+
return {
19+
...arr,
20+
[curr]: {
21+
locale: curr,
22+
},
23+
}
24+
}, {})
25+
26+
type LangViewModeObj = {
27+
[key: string]: { viewport: string; locale: string }
28+
}
29+
30+
export const langViewportModes = Object.entries(
31+
viewportModes
32+
).reduce<LangViewModeObj>((arr, curr) => {
33+
const [viewKey, viewVal] = curr
34+
35+
const currLangViewObj = {} as LangViewModeObj
36+
37+
Object.entries(langModes).forEach(([langKey, langVal]) => {
38+
currLangViewObj[`${langKey}-${viewKey}`] = {
39+
viewport: viewVal.viewport,
40+
locale: langVal.locale,
41+
}
42+
})
43+
44+
return {
45+
...arr,
46+
...currLangViewObj,
47+
}
48+
}, {})

.storybook/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { MotionGlobalConfig } from "framer-motion"
1111

1212
MotionGlobalConfig.skipAnimations = isChromatic()
1313

14-
const chakraBreakpointArray = Object.entries(theme.breakpoints) as [
14+
export const chakraBreakpointArray = Object.entries(theme.breakpoints) as [
1515
string,
1616
string
1717
][]

0 commit comments

Comments
 (0)