forked from craigary/nobelium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Make basic l10n messages lazy-loaded
- Loading branch information
1 parent
ea3bd33
commit 4fb0de8
Showing
11 changed files
with
157 additions
and
166 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"NAV": { | ||
"INDEX": "Blog", | ||
"RSS": "RSS", | ||
"SEARCH": "Search", | ||
"ABOUT": "About" | ||
}, | ||
"PAGINATION": { | ||
"PREV": "Prev", | ||
"NEXT": "Next" | ||
}, | ||
"POST": { | ||
"BACK": "Back", | ||
"TOP": "Top" | ||
}, | ||
"PAGE": { | ||
"ERROR_404": { | ||
"MESSAGE": "Nothing here" | ||
} | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"NAV": { | ||
"INDEX": "Blog", | ||
"RSS": "RSS", | ||
"SEARCH": "Buscar", | ||
"ABOUT": "Acerca de mí" | ||
}, | ||
"PAGINATION": { | ||
"PREV": "Anterior", | ||
"NEXT": "Siguiente" | ||
}, | ||
"POST": { | ||
"BACK": "Atrás", | ||
"TOP": "Arriba" | ||
}, | ||
"PAGE": { | ||
"ERROR_404": { | ||
"MESSAGE": "No hay nada aquí" | ||
} | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"NAV": { | ||
"INDEX": "ブログ", | ||
"RSS": "購読", | ||
"SEARCH": "検索", | ||
"ABOUT": "このサイトについて" | ||
}, | ||
"PAGINATION": { | ||
"PREV": "前ページ", | ||
"NEXT": "次ページ" | ||
}, | ||
"POST": { | ||
"BACK": "戻る", | ||
"TOP": "トップに戻る" | ||
}, | ||
"PAGE": { | ||
"ERROR_404": { | ||
"MESSAGE": "ここにはいない" | ||
} | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"NAV": { | ||
"INDEX": "博客", | ||
"RSS": "订阅", | ||
"SEARCH": "搜索", | ||
"ABOUT": "关于" | ||
}, | ||
"PAGINATION": { | ||
"PREV": "上一页", | ||
"NEXT": "下一页" | ||
}, | ||
"POST": { | ||
"BACK": "返回", | ||
"TOP": "回到顶部" | ||
}, | ||
"PAGE": { | ||
"ERROR_404": { | ||
"MESSAGE": "什么也没有" | ||
} | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"NAV": { | ||
"INDEX": "網誌", | ||
"RSS": "訂閱", | ||
"SEARCH": "搜尋", | ||
"ABOUT": "關於" | ||
}, | ||
"PAGINATION": { | ||
"PREV": "上一頁", | ||
"NEXT": "下一頁" | ||
}, | ||
"POST": { | ||
"BACK": "返回", | ||
"TOP": "回到頂端" | ||
}, | ||
"PAGE": { | ||
"ERROR_404": { | ||
"MESSAGE": "呢度乜都冇" | ||
} | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"NAV": { | ||
"INDEX": "部落格", | ||
"RSS": "訂閱", | ||
"SEARCH": "搜尋", | ||
"ABOUT": "關於" | ||
}, | ||
"PAGINATION": { | ||
"PREV": "上一頁", | ||
"NEXT": "下一頁" | ||
}, | ||
"POST": { | ||
"BACK": "返回", | ||
"TOP": "回到頂端" | ||
}, | ||
"PAGE": { | ||
"ERROR_404": { | ||
"MESSAGE": "這裡什麼都沒有" | ||
} | ||
} | ||
} |
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,12 @@ | ||
const requireAsset = require.context('.', true, /^\.\/(\w+)\/([\w-]+)\.json$/, 'lazy') | ||
|
||
/** | ||
* Lazy-load lang data | ||
* | ||
* @param {string} section - The section of lang data to load | ||
* @param {string} lang - The language name | ||
* @returns {Promise<object>} - The content of a lang JSON | ||
*/ | ||
export default function loadLocale (section, lang) { | ||
return requireAsset(`./${section}/${lang}.json`) | ||
} |
This file was deleted.
Oops, something went wrong.
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