summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-02 19:03:31 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-02 19:03:31 +0900
commit7b33c63f78eb87ce80fe5ed29af62860384415d9 (patch)
tree27969fbead652090f31137b3a39d377bff582b71 /src/client/app/common/scripts
parentRefactoring (diff)
downloadsharkey-7b33c63f78eb87ce80fe5ed29af62860384415d9.tar.gz
sharkey-7b33c63f78eb87ce80fe5ed29af62860384415d9.tar.bz2
sharkey-7b33c63f78eb87ce80fe5ed29af62860384415d9.zip
#332 (#2065)
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/compose-notification.ts14
-rw-r--r--src/client/app/common/scripts/date-stringify.ts10
-rw-r--r--src/client/app/common/scripts/fuck-ad-block.ts4
3 files changed, 14 insertions, 14 deletions
diff --git a/src/client/app/common/scripts/compose-notification.ts b/src/client/app/common/scripts/compose-notification.ts
index c93609bc59..4fb0610fd7 100644
--- a/src/client/app/common/scripts/compose-notification.ts
+++ b/src/client/app/common/scripts/compose-notification.ts
@@ -15,22 +15,22 @@ export default function(type, data): Notification {
switch (type) {
case 'drive_file_created':
return {
- title: 'ファイルがアップロードされました',
+ title: '%i18n:common.notification.file-uploaded%',
body: data.name,
icon: data.url
};
case 'unread_messaging_message':
return {
- title: `${getUserName(data.user)}さんからメッセージ:`,
+ title: '%i18n:common.notification.message-from%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.message-from%'.split("{}")[1] ,
body: data.text, // TODO: getMessagingMessageSummary(data),
icon: data.user.avatarUrl
};
case 'reversi_invited':
return {
- title: '対局への招待があります',
- body: `${getUserName(data.parent)}さんから`,
+ title: '%i18n:common.notification.reversi-invited%',
+ body: '%i18n:common.notification.reversi-invited-by%'.split("{}")[0] + `${getUserName(data.parent)}` + '%i18n:common.notification.reversi-invited-by%'.split("{}")[1],
icon: data.parent.avatarUrl
};
@@ -38,21 +38,21 @@ export default function(type, data): Notification {
switch (data.type) {
case 'mention':
return {
- title: `${getUserName(data.user)}さんから:`,
+ title: '%i18n:common.notification.notified-by%'.split("{}")[0] + `${getUserName(data.user)}さんから:` + '%i18n:common.notification.notified-by%'.split("{}")[1],
body: getNoteSummary(data),
icon: data.user.avatarUrl
};
case 'reply':
return {
- title: `${getUserName(data.user)}さんから返信:`,
+ title: '%i18n:common.notification.reply-from%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.reply-from%'.split("{}")[1],
body: getNoteSummary(data),
icon: data.user.avatarUrl
};
case 'quote':
return {
- title: `${getUserName(data.user)}さんが引用:`,
+ title: '%i18n:common.notification.quoted-by%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.quoted-by%'.split("{}")[1],
body: getNoteSummary(data),
icon: data.user.avatarUrl
};
diff --git a/src/client/app/common/scripts/date-stringify.ts b/src/client/app/common/scripts/date-stringify.ts
index e51de8833d..2b8e525567 100644
--- a/src/client/app/common/scripts/date-stringify.ts
+++ b/src/client/app/common/scripts/date-stringify.ts
@@ -1,12 +1,12 @@
export default date => {
if (typeof date == 'string') date = new Date(date);
return (
- date.getFullYear() + '年' +
- (date.getMonth() + 1) + '月' +
- date.getDate() + '日' +
+ date.getFullYear() + '%i18n:common.date.full-year%' +
+ (date.getMonth() + 1) + '%i18n:common.date.month%' +
+ date.getDate() + '%i18n:common.date.day%' +
' ' +
- date.getHours() + '時' +
- date.getMinutes() + '分' +
+ date.getHours() + '%i18n:common.date.hours%' +
+ date.getMinutes() + '%i18n:common.date.minutes%' +
' ' +
`(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})`
);
diff --git a/src/client/app/common/scripts/fuck-ad-block.ts b/src/client/app/common/scripts/fuck-ad-block.ts
index 9bcf7deeff..ed0904aeb3 100644
--- a/src/client/app/common/scripts/fuck-ad-block.ts
+++ b/src/client/app/common/scripts/fuck-ad-block.ts
@@ -5,8 +5,8 @@ declare const fuckAdBlock: any;
export default (os) => {
function adBlockDetected() {
os.apis.dialog({
- title: '%fa:exclamation-triangle%広告ブロッカーを無効にしてください',
- text: '<strong>Misskeyは広告を掲載していません</strong>が、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。',
+ title: '%fa:exclamation-triangle%%i18n:common.adblock.detected%',
+ text: '%i18n:common.adblock.warning%',
actins: [{
text: 'OK'
}]