summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-08-30 03:56:51 +0900
committerGitHub <noreply@github.com>2018-08-30 03:56:51 +0900
commit4e11da98d90c1c44fce1abaf63c248896feff03a (patch)
treecbe91363f87a3cc29b142433c16e4b16ccf2aa7d /src/misc
parentNew translations ja-JP.yml (French) (diff)
parent:art: (diff)
downloadmisskey-4e11da98d90c1c44fce1abaf63c248896feff03a.tar.gz
misskey-4e11da98d90c1c44fce1abaf63c248896feff03a.tar.bz2
misskey-4e11da98d90c1c44fce1abaf63c248896feff03a.zip
Merge branch 'develop' into l10n_develop
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/fa.ts4
-rw-r--r--src/misc/i18n.ts8
2 files changed, 7 insertions, 5 deletions
diff --git a/src/misc/fa.ts b/src/misc/fa.ts
index 077bb51e6d..8be06362c3 100644
--- a/src/misc/fa.ts
+++ b/src/misc/fa.ts
@@ -25,9 +25,9 @@ export const replacement = (match: string, key: string) => {
arg == 'S' ? 'fas' :
arg == 'B' ? 'fab' :
'';
- } else if (arg[0] == '.') {
+ } else if (arg.startsWith('.')) {
classes.push('fa-' + arg.substr(1));
- } else if (arg[0] == '-') {
+ } else if (arg.startsWith('-')) {
transform = arg.substr(1).split('|').join(' ');
} else {
name = arg;
diff --git a/src/misc/i18n.ts b/src/misc/i18n.ts
index a07af3e939..3dbfd7fe7b 100644
--- a/src/misc/i18n.ts
+++ b/src/misc/i18n.ts
@@ -27,10 +27,12 @@ export default class Replacer {
let text = texts;
if (path) {
+ path = path.replace('.ts', '');
+
if (text.hasOwnProperty(path)) {
text = text[path];
} else {
- if (this.lang === 'ja') console.warn(`path '${path}' not found`);
+ if (this.lang === 'ja-JP') console.warn(`path '${path}' not found`);
return key; // Fallback
}
}
@@ -46,10 +48,10 @@ export default class Replacer {
});
if (error) {
- if (this.lang === 'ja') console.warn(`key '${key}' not found in '${path}'`);
+ if (this.lang === 'ja-JP') console.warn(`key '${key}' not found in '${path}'`);
return key; // Fallback
} else if (typeof text !== 'string') {
- if (this.lang === 'ja') console.warn(`key '${key}' is not string in '${path}'`);
+ if (this.lang === 'ja-JP') console.warn(`key '${key}' is not string in '${path}'`);
return key; // Fallback
} else {
return text;