Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(i18n): explore.ipld.io translation #63

Merged
merged 1 commit into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,071 changes: 380 additions & 691 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"dependencies": {
"i18next": "^19.1.0",
"i18next-browser-languagedetector": "^4.0.1",
"i18next-http-backend": "^1.0.15",
"i18next-icu": "^1.3.1",
"i18next-xhr-backend": "^3.2.2",
"internal-nav-helper": "^1.0.2",
"ipfs": "^0.40.0",
"ipfs-css": "^0.9.0",
Expand All @@ -31,7 +31,7 @@
"ipld-dag-cbor": "^0.13.1",
"ipld-dag-pb": "^0.15.2",
"ipld-ethereum": "^2.0.3",
"ipld-explorer-components": "^1.5.1",
"ipld-explorer-components": "1.6.0",
"ipld-git": "^0.2.3",
"ipld-raw": "^2.0.1",
"ipld-zcash": "^0.4.1",
Expand Down
9 changes: 7 additions & 2 deletions public/locales/cs/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "IPLD Průzkumník",
"tabName": "Prozkoumat",
"homeLink": "Hlavní stránka",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "Průzkumník - IPLD",
"header": "Prozkoumejte Merkelův les",
Expand All @@ -17,7 +22,7 @@
"explore": "Prozkoumat"
},
"CidInfo": {
"header": "Informace o CID",
"header": "CID info",
"hashDigest": "Hash digest"
},
"ObjectInfo": {
Expand All @@ -35,7 +40,7 @@
"explorer": {
"step1": {
"title": "IPLD Průzkumník",
"paragraph1": "Vaše cesta průzkumníka začíná zde. Naučte se více."
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "Cesta",
Expand Down
9 changes: 7 additions & 2 deletions public/locales/de/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "IPLD-Explorer",
"tabName": "Erkunden",
"homeLink": "Home",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "Erkunden – IPLD",
"header": "Merkle-Wald erkunden",
Expand All @@ -17,7 +22,7 @@
"explore": "Erkunden"
},
"CidInfo": {
"header": "CID-Info",
"header": "CID Informationen",
"hashDigest": "Hash-Extrakt"
},
"ObjectInfo": {
Expand All @@ -35,7 +40,7 @@
"explorer": {
"step1": {
"title": "IPLD-Explorer",
"paragraph1": "Deine Reise im Explorer startet hier. Lerne mehr."
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "Breadcrumbs",
Expand Down
39 changes: 37 additions & 2 deletions public/locales/en/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "IPLD Explorer",
"tabName": "Explore",
"homeLink": "Home",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "Explore - IPLD",
"header": "Explore the Merkle Forest",
Expand All @@ -17,7 +22,7 @@
"explore": "Explore"
},
"CidInfo": {
"header": "CID Info",
"header": "CID info",
"hashDigest": "Hash digest"
},
"ObjectInfo": {
Expand All @@ -26,5 +31,35 @@
"base": "base",
"version": "version",
"codec": "codec",
"multihash": "multihash"
"multihash": "multihash",
"tour": {
"projects": {
"title": "Featured datasets",
"paragraph1": "Explore the featured datasets or paste a CID to see how that data is structured and linked across protocols."
},
"explorer": {
"step1": {
"title": "IPLD Explorer",
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "Breadcrumbs",
"paragraph1": "The path that leads to this node.",
"paragraph2": "Click on it to traverse to its parents or children."
},
"step3": {
"title": "Node info",
"paragraph1": "Here you have detailed info about the node and you can open it in the IPFS gateway.",
"paragraph2": "If the node is a directory you can see its children and navigate to them."
},
"step4": {
"title": "CID info",
"paragraph1": "The decomposed CID so you can learn its meaning."
},
"step5": {
"title": "Visual representation",
"paragraph1": "A visual representation of the node and its children."
}
}
}
}
9 changes: 7 additions & 2 deletions public/locales/es/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "Explorador IPLD",
"tabName": "Explorar",
"homeLink": "Inicio",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "Explorar - IPLD",
"header": "Explorar el Merkle Forest",
Expand All @@ -17,7 +22,7 @@
"explore": "Explorar"
},
"CidInfo": {
"header": "CID Info",
"header": "Información del CID",
"hashDigest": "Hash digest"
},
"ObjectInfo": {
Expand All @@ -35,7 +40,7 @@
"explorer": {
"step1": {
"title": "Explorador IPLD",
"paragraph1": "Tu viaje de explorador comienza aquí. Continúa para aprender más."
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "Migas de Pan",
Expand Down
5 changes: 5 additions & 0 deletions public/locales/fr/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "Explorateur IPLD",
"tabName": "Explorer",
"homeLink": "Accueil",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "Explorer - IPLD",
"header": "Explorer la forêt de Merkle",
Expand Down
9 changes: 7 additions & 2 deletions public/locales/it/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "Esplora risorse IPLD",
"tabName": "Esplora",
"homeLink": "Home",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "Esplora - IPLD",
"header": "Esplora la Merkle Forest",
Expand All @@ -17,7 +22,7 @@
"explore": "Esplora"
},
"CidInfo": {
"header": "Informazioni del CID",
"header": "Info CID",
"hashDigest": "Hash digest"
},
"ObjectInfo": {
Expand All @@ -35,7 +40,7 @@
"explorer": {
"step1": {
"title": "Esplora risorse IPLD",
"paragraph1": "Il tuo viaggio di esploratore inizia qui. Continua a scoprire di più."
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "Breadcrumb",
Expand Down
9 changes: 7 additions & 2 deletions public/locales/ja-JP/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "IPLDエクスプローラー",
"tabName": "探索",
"homeLink": "Home",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "IPLDを探す",
"header": "マークルフォレストを探す",
Expand All @@ -17,7 +22,7 @@
"explore": "探索"
},
"CidInfo": {
"header": "CID 情報",
"header": "CID情報",
"hashDigest": "ハッシュダイジェスト"
},
"ObjectInfo": {
Expand All @@ -35,7 +40,7 @@
"explorer": {
"step1": {
"title": "IPLDエクスプローラー",
"paragraph1": "あなたの探索の旅はここから始まります。引き続き学習してください。"
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "パン粉",
Expand Down
7 changes: 6 additions & 1 deletion public/locales/zh-CN/explore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"appName": "IPLD 浏览器",
"tabName": "浏览",
"homeLink": "首页",
"UpdateAvailable": {
"paragraph1": "A new version of IPLD Explorer is available; <1>please reload</1>."
},
"StartExploringPage": {
"title": "浏览 - IPLD",
"header": "浏览 Merkle Forest",
Expand Down Expand Up @@ -35,7 +40,7 @@
"explorer": {
"step1": {
"title": "IPLD 浏览器",
"paragraph1": "您的探索之旅从这里开始。继续以了解更多。"
"paragraph1": "Your journey with IPLD Explorer starts here. Click \"Next\" to learn more."
},
"step2": {
"title": "导航栏",
Expand Down
9 changes: 5 additions & 4 deletions src/i18n.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import i18n from 'i18next'
import ICU from 'i18next-icu'
import XHR from 'i18next-xhr-backend'
import StaticHttpBackend from 'i18next-http-backend'
import LanguageDetector from 'i18next-browser-languagedetector'

import ca from 'i18next-icu/locale-data/ca'
import cs from 'i18next-icu/locale-data/cs'
import da from 'i18next-icu/locale-data/da'
import de from 'i18next-icu/locale-data/de'
Expand All @@ -20,11 +21,11 @@ import ru from 'i18next-icu/locale-data/ru'
import sv from 'i18next-icu/locale-data/sv'
import zh from 'i18next-icu/locale-data/zh'

const localeData = [cs, da, de, en, es, fr, it, ja, ko, nl, no, pl, pt, ru, sv, zh]
const localeData = [ca, cs, da, de, en, es, fr, it, ja, ko, nl, no, pl, pt, ru, sv, zh]

i18n
.use(new ICU({ localeData }))
.use(XHR)
.use(StaticHttpBackend)
.use(LanguageDetector)
.init({
ns: ['explore'],
Expand All @@ -34,7 +35,7 @@ i18n
zh: ['zh-CN', 'en'],
default: ['en']
},
debug: process.env.NODE_ENV !== 'production',
debug: process.env.DEBUG,
backend: {
// ensure a realtive path is used to look up the locales, so it works when used from /ipfs/<cid>
loadPath: 'locales/{{lng}}/{{ns}}.json'
Expand Down