Merge branch 'master' of https://github.com/syuilo/misskey
This commit is contained in:
commit
53c42f4324
|
@ -94,6 +94,8 @@ The built code is automatically pushed to https://github.com/syuilo/misskey/tree
|
||||||
3. `npm install`
|
3. `npm install`
|
||||||
|
|
||||||
### Using source code
|
### Using source code
|
||||||
|
If you want to build Misskey manually, you can do it via `build` command after download the source code of Misskey and install dependencies:
|
||||||
|
|
||||||
1. `git clone -b master git://github.com/syuilo/misskey.git`
|
1. `git clone -b master git://github.com/syuilo/misskey.git`
|
||||||
2. `cd misskey`
|
2. `cd misskey`
|
||||||
3. `npm install`
|
3. `npm install`
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
"riot": "3.5.0",
|
"riot": "3.5.0",
|
||||||
"rndstr": "1.0.0",
|
"rndstr": "1.0.0",
|
||||||
"s-age": "1.1.0",
|
"s-age": "1.1.0",
|
||||||
"serve-favicon": "2.4.2",
|
"serve-favicon": "2.4.3",
|
||||||
"subdomain": "1.2.0",
|
"subdomain": "1.2.0",
|
||||||
"summaly": "2.0.3",
|
"summaly": "2.0.3",
|
||||||
"syuilo-password-strength": "0.0.1",
|
"syuilo-password-strength": "0.0.1",
|
||||||
|
|
|
@ -13,6 +13,8 @@ export default (lang, locale) => ({
|
||||||
{
|
{
|
||||||
pattern: /%i18n:(.+?)%/g, replacement: (_, key) => {
|
pattern: /%i18n:(.+?)%/g, replacement: (_, key) => {
|
||||||
let text = locale;
|
let text = locale;
|
||||||
|
|
||||||
|
// Check the key existance
|
||||||
const error = key.split('.').some(k => {
|
const error = key.split('.').some(k => {
|
||||||
if (text.hasOwnProperty(k)) {
|
if (text.hasOwnProperty(k)) {
|
||||||
text = text[k];
|
text = text[k];
|
||||||
|
@ -21,9 +23,10 @@ export default (lang, locale) => ({
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
console.warn(`key '${key}' not found in '${lang}'`);
|
console.warn(`key '${key}' not found in '${lang}'`);
|
||||||
return key;
|
return key; // Fallback
|
||||||
} else {
|
} else {
|
||||||
return text.replace(/'/g, '\\\'').replace(/"/g, '\\"');
|
return text.replace(/'/g, '\\\'').replace(/"/g, '\\"');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue