Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Use JSON5 for en.json #1949

Merged
merged 20 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ vercel.json
.eslintcache
.nuxt
src/locales/*.json
!src/locales/en.json
.nuxt-storybook
storybook-static
.vercel
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ Run the following commands in order to have the code up and running on your mach
# Builds and serves assets with hot-reload
# Automatically invokes pnpm install and pnpm i18n
pnpm dev
```

If you intend to change any text in the app, you will need to edit `src/locales/scripts/en.json5`. To ensure your changes are reflected immediately, run the following command.

```bash
# Watches the en.json5 file and updates the en.json file for every change.
pnpm i18n:watch-en
```

### Using HTTPS Locally
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "sebworks",
"private": true,
"scripts": {
"prepare": "./bin/install-pre-commit.sh",
"prepare": "./bin/install-pre-commit.sh && pnpm i18n:get-translations --en-only",
"predev": "pnpm install && pnpm i18n:no-get",
"dev": "pnpm dev:only",
"dev:only": "nuxt --hostname 0.0.0.0",
Expand Down Expand Up @@ -53,6 +53,7 @@
"pc:install": "python3 pre-commit.pyz install -t pre-push -t pre-commit",
"pc:lint": "python3 pre-commit.pyz run --all-files",
"i18n": "pnpm i18n:create-locales-list && pnpm i18n:get-translations && pnpm i18n:update-locales",
"i18n:watch-en": "pnpm i18n:get-translations --en-only --watch",
dhruvkb marked this conversation as resolved.
Show resolved Hide resolved
"i18n:copy-test-locales": "cp -r test/locales/* src/locales/",
"i18n:no-get": "pnpm i18n:create-locales-list && pnpm i18n:update-locales",
"i18n:create-locales-list": "node src/locales/scripts/create-wp-locale-list",
Expand Down Expand Up @@ -108,6 +109,7 @@
"devDependencies": {
"@babel/core": "^7.17.10",
"@babel/eslint-parser": "^7.17.0",
"@babel/parser": "^7.20.3",
"@babel/preset-env": "^7.1.6",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime-corejs3": "^7.17.9",
Expand Down Expand Up @@ -137,6 +139,7 @@
"autoprefixer": "^10.4.0",
"babel-jest": "^26.6.3",
"babel-loader": "8.2.5",
"chokidar": "^3.5.3",
"css-loader": "^5.2.7",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
Loading