-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Documentation fixes * Ignoring unavailable mirrors * Updated to latest nuxt, moved to nuxt-i18n module * Updated github actions * Fixed error handling * Updated docs * Updated base frontend url * Added vscode workspace * Updated to latest nuxt * Added type checks * Trying to fix npm ci issue * Trying to fix npm ci again * Another workflow fix attempt * Another fix attempt * Updated to nuxt 3.10 * Nuxt improvements * useFetch improvements * Error handling improvements & fixes * Fixes and improvements * Build fixes * Better SEO * NuxtImage fixes * SEO fixes * Bumped year in copyright * Updated nuxt to latest version * Minor docs cleanup
- Loading branch information
Showing
68 changed files
with
10,354 additions
and
16,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
BASE_URL=http://localhost:3000 | ||
SNAPSHOT_MIRRORS=[{"name": "Mainnet", "icon": "/images/networks/mainnet.svg", "mirrors": [{"name": "NA1", "path": "https://mirror-na1.veil.tools/"}, {"name": "NA2", "path": "https://mirror-na2.veil.tools/"},{"name": "EU1", "path": "https://mirror-eu1.veil.tools/"}, {"name": "EU2", "path": "https://mirror-eu2.veil.tools/"}]}, {"name": "Testnet", "icon": "/images/networks/testnet.svg", "mirrors": [{"name": "NA1", "path": "https://mirror-na1.veil.tools/testnet/"}, {"name": "NA2", "path": "https://mirror-na2.veil.tools/testnet/"},{"name": "EU1", "path": "https://mirror-eu1.veil.tools/testnet/"}, {"name": "EU2", "path": "https://mirror-eu2.veil.tools/testnet/"}]}] | ||
EXPLORER_BACKEND_ENDPOINT=https://explorer-api.veil-project.com | ||
NETWORK_PRE_MEASURE_FILE_SIZE=51200 | ||
NETWORK_MEASURE_FILE_SIZE=3145728 | ||
COOKIE_SAVE_DAYS=90 | ||
NUXT_PUBLIC_BASE_URL=http://localhost:3000 | ||
NUXT_PUBLIC_I18N_BASE_URL=http://localhost:3000 | ||
NUXT_PUBLIC_SNAPSHOT_MIRRORS=[{"name": "Mainnet", "icon": "/images/networks/mainnet.svg", "mirrors": [{"name": "NA1", "path": "https://mirror-na1.veil.tools/"}, {"name": "NA2", "path": "https://mirror-na2.veil.tools/"},{"name": "EU1", "path": "https://mirror-eu1.veil.tools/"}, {"name": "EU2", "path": "https://mirror-eu2.veil.tools/"}]}, {"name": "Testnet", "icon": "/images/networks/testnet.svg", "mirrors": [{"name": "NA1", "path": "https://mirror-na1.veil.tools/testnet/"}, {"name": "NA2", "path": "https://mirror-na2.veil.tools/testnet/"},{"name": "EU1", "path": "https://mirror-eu1.veil.tools/testnet/"}, {"name": "EU2", "path": "https://mirror-eu2.veil.tools/testnet/"}]}] | ||
NUXT_PUBLIC_EXPLORER_BACKEND_ENDPOINT=https://explorer-api.veil-project.com | ||
NUXT_PUBLIC_NETWORK_PRE_MEASURE_FILE_SIZE=51200 | ||
NUXT_PUBLIC_NETWORK_MEASURE_FILE_SIZE=3145728 | ||
NUXT_PUBLIC_COOKIE_SAVE_DAYS=90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
node_modules | ||
*.log | ||
*.log* | ||
.nuxt | ||
nuxt.d.ts | ||
.nitro | ||
.cache | ||
.output | ||
#.env | ||
dist | ||
.DS_Store | ||
*.cfg | ||
*.rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0 | ||
2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
} | ||
], | ||
"settings": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,33 @@ | ||
# Localization | ||
Localization files located at [/src/localization](/src/localization) | ||
|
||
Each folder there should match language code, logical lingual blocks defined in **/src/localization/\[locale_code\]/index.ts** | ||
Locale file defined in typescript files: **/src/localization/\[locale_code\].ts** | ||
To be more readable, localization file splitted into logical blocks stored in folder that matches localization file name, for example **/src/localization/en/** for **/src/localization/en.ts** | ||
|
||
**RTL** is currently not supported. | ||
**RTL** support is currently not tested. | ||
|
||
## Adding new locale | ||
1. Copy **/src/localization/en** directory to **/src/localization/\[locale_code\]** | ||
2. Change each **JSON** files inside newly copied directory with translation. JSON format is {\"key\": \"value\"}, you should translate only values. There also can be symbols like {block} - this are placeholders, they are replaced at runtime to actual values | ||
3. Add definition of new locale inside **/nuxt.config.ts** | ||
1. Copy **/src/localization/en.ts** file to **/src/localization/\[locale_code\].ts** | ||
2. Copy **/src/localization/en/** directory to **/src/localization/\[locale_code\]/** | ||
3. Change each **ts** files inside newly copied directory with translation. Those ts files usually export regular JSON with format {\"key\": \"value\"}, you should translate only values. There also can be symbols like {block} - placeholders, they are replaced at runtime to actual values | ||
4. Add definition of new locale inside **/nuxt.config.ts** | ||
``` | ||
locales: { | ||
"en": "English", | ||
"ru": "Русский", | ||
// add here new locale in format "[locale_code]": "locale_display_name" | ||
} | ||
``` | ||
4. Add new locale to **vue-i18n.mjs**, replace \<locale\> with locale code | ||
```bash | ||
import translation_en from "@/localization/en"; | ||
import translation_ru from "@/localization/ru"; | ||
import translation_<locale> from "@/localization/<locale>"; | ||
|
||
export default async () => ({ | ||
locale: "en", | ||
fallbackLocale: "en", | ||
messages: { | ||
en: translation_en, | ||
ru: translation_ru, | ||
<locale>: translation_<locale> | ||
{ | ||
name: "English", | ||
code: "en", | ||
iso: "en-US", | ||
file: "en.ts" | ||
}, | ||
{ | ||
name: "Русский", | ||
code: "ru", | ||
iso: "ru-RU", | ||
file: "ru.ts" | ||
} | ||
}); | ||
// add here new locale | ||
} | ||
``` | ||
5. Add **png** locale icon to **/src/public/images/locales/\[lang_code\].png** | ||
5. Add **png** locale icon to **/src/public/images/locales/\[locale_code\].png** | ||
|
||
width of icon should be **64px**, height can vary (country flags can be in different aspect ratios) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.