This commit is contained in:
syuilo 2017-05-18 04:52:49 +09:00
commit 53c42f4324
3 changed files with 7 additions and 2 deletions

View file

@ -94,6 +94,8 @@ The built code is automatically pushed to https://github.com/syuilo/misskey/tree
3. `npm install`
### 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`
2. `cd misskey`
3. `npm install`

View file

@ -138,7 +138,7 @@
"riot": "3.5.0",
"rndstr": "1.0.0",
"s-age": "1.1.0",
"serve-favicon": "2.4.2",
"serve-favicon": "2.4.3",
"subdomain": "1.2.0",
"summaly": "2.0.3",
"syuilo-password-strength": "0.0.1",

View file

@ -13,6 +13,8 @@ export default (lang, locale) => ({
{
pattern: /%i18n:(.+?)%/g, replacement: (_, key) => {
let text = locale;
// Check the key existance
const error = key.split('.').some(k => {
if (text.hasOwnProperty(k)) {
text = text[k];
@ -21,9 +23,10 @@ export default (lang, locale) => ({
return true;
}
});
if (error) {
console.warn(`key '${key}' not found in '${lang}'`);
return key;
return key; // Fallback
} else {
return text.replace(/'/g, '\\\'').replace(/"/g, '\\"');
}