From 08ce6b895cb437e7bc9e1f816cec2119dd3299e0 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Mon, 16 Apr 2018 07:07:32 +0900
Subject: [PATCH] Fix bug
---
src/build/i18n.ts | 16 ++-
src/client/app/ch/tags/channel.tag | 2 +-
src/client/app/ch/tags/index.tag | 2 +-
.../app/common/scripts/check-for-update.ts | 2 +-
.../app/common/scripts/streaming/home.ts | 2 +-
.../connect-failed.troubleshooter.vue | 6 +-
.../views/components/connect-failed.vue | 6 +-
.../views/components/messaging-room.vue | 4 +-
.../common/views/components/poll-editor.vue | 2 +-
.../app/common/views/components/poll.vue | 8 +-
.../views/components/reaction-picker.vue | 2 +-
.../app/common/views/components/signin.vue | 2 +-
.../app/common/views/components/signup.vue | 2 +-
.../app/common/views/components/time.vue | 20 +--
.../views/components/twitter-setting.vue | 2 +-
.../app/common/views/widgets/broadcast.vue | 2 +-
.../app/common/views/widgets/donation.vue | 4 +-
.../app/desktop/views/components/calendar.vue | 18 +--
.../desktop/views/components/drive.file.vue | 26 ++--
.../desktop/views/components/drive.folder.vue | 20 +--
.../views/components/drive.nav-folder.vue | 2 +-
.../app/desktop/views/components/drive.vue | 26 ++--
.../desktop/views/components/notes.note.vue | 4 +-
.../views/components/notifications.vue | 2 +-
.../views/components/post-form-window.vue | 4 +-
.../desktop/views/components/post-form.vue | 28 ++--
.../desktop/views/components/renote-form.vue | 6 +-
.../desktop/views/components/repost-form.vue | 131 ++++++++++++++++++
.../desktop/views/components/settings.2fa.vue | 10 +-
.../desktop/views/components/settings.api.vue | 2 +-
.../views/components/settings.password.vue | 10 +-
.../app/desktop/views/pages/selectdrive.vue | 2 +-
.../app/desktop/views/widgets/channel.vue | 2 +-
src/client/app/init.ts | 2 +-
.../app/mobile/views/components/drive.vue | 2 +-
.../mobile/views/components/follow-button.vue | 2 +-
.../app/mobile/views/components/note.vue | 4 +-
.../mobile/views/components/notifications.vue | 2 +-
.../app/mobile/views/components/post-form.vue | 4 +-
.../app/mobile/views/components/ui.nav.vue | 2 +-
.../mobile/views/components/user-timeline.vue | 2 +-
.../app/mobile/views/pages/followers.vue | 4 +-
.../app/mobile/views/pages/following.vue | 4 +-
.../app/mobile/views/pages/notifications.vue | 2 +-
.../mobile/views/pages/profile-setting.vue | 6 +-
src/client/app/mobile/views/pages/search.vue | 2 +-
.../app/mobile/views/pages/selectdrive.vue | 2 +-
.../app/mobile/views/pages/settings.vue | 2 +-
48 files changed, 279 insertions(+), 140 deletions(-)
create mode 100644 src/client/app/desktop/views/components/repost-form.vue
diff --git a/src/build/i18n.ts b/src/build/i18n.ts
index cb71a19394..98b5413a27 100644
--- a/src/build/i18n.ts
+++ b/src/build/i18n.ts
@@ -7,7 +7,7 @@ import locale from '../../locales';
export default class Replacer {
private lang: string;
- public pattern = /%i18n:(.+?)%/g;
+ public pattern = /%i18n:([a-z_\-@\.\!]+?)%/g;
constructor(lang: string) {
this.lang = lang;
@@ -53,11 +53,15 @@ export default class Replacer {
}
}
- public replacement(ctx, match, a, b, c) {
+ public replacement(ctx, match, key) {
const client = 'misskey/src/client/app/';
let name = null;
- let key = a || b || c;
+ const shouldEscape = key[0] == '!';
+ if (shouldEscape) {
+ key = key.substr(1);
+ }
+
if (key[0] == '@') {
name = ctx.src.substr(ctx.src.indexOf(client) + client.length);
key = key.substr(1);
@@ -65,6 +69,10 @@ export default class Replacer {
if (ctx && ctx.lang) this.lang = ctx.lang;
- return this.get(name, key).replace(/'/g, '\\x27').replace(/"/g, '\\x22');
+ const txt = this.get(name, key);
+
+ return shouldEscape
+ ? txt.replace(/'/g, '\\x27').replace(/"/g, '\\x22')
+ : txt.replace(/"/g, '"');
}
}
diff --git a/src/client/app/ch/tags/channel.tag b/src/client/app/ch/tags/channel.tag
index c0561c9b92..74b1a9ba19 100644
--- a/src/client/app/ch/tags/channel.tag
+++ b/src/client/app/ch/tags/channel.tag
@@ -252,7 +252,7 @@
diff --git a/src/client/app/ch/tags/index.tag b/src/client/app/ch/tags/index.tag
index 88df2ec45d..529b83b2c7 100644
--- a/src/client/app/ch/tags/index.tag
+++ b/src/client/app/ch/tags/index.tag
@@ -25,7 +25,7 @@
});
this.n = () => {
- const title = window.prompt('%i18n:ch.tags.mk-index.channel-title%');
+ const title = window.prompt('%i18n:!ch.tags.mk-index.channel-title%');
this.$root.$data.os.api('channels/create', {
title: title
diff --git a/src/client/app/common/scripts/check-for-update.ts b/src/client/app/common/scripts/check-for-update.ts
index 81c1eb9812..20ce64ea85 100644
--- a/src/client/app/common/scripts/check-for-update.ts
+++ b/src/client/app/common/scripts/check-for-update.ts
@@ -23,7 +23,7 @@ export default async function(mios: MiOS, force = false, silent = false) {
}
if (!silent) {
- alert('%i18n:common.update-available%'.replace('{newer}', newer).replace('{current}', current));
+ alert('%i18n:!common.update-available%'.replace('{newer}', newer).replace('{current}', current));
}
return newer;
diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts
index e085801e15..73f2c5302c 100644
--- a/src/client/app/common/scripts/streaming/home.ts
+++ b/src/client/app/common/scripts/streaming/home.ts
@@ -30,7 +30,7 @@ export class HomeStream extends Stream {
// トークンが再生成されたとき
// このままではAPIが利用できないので強制的にサインアウトさせる
this.on('my_token_regenerated', () => {
- alert('%i18n:common.my-token-regenerated%');
+ alert('%i18n:!common.my-token-regenerated%');
os.signout();
});
}
diff --git a/src/client/app/common/views/components/connect-failed.troubleshooter.vue b/src/client/app/common/views/components/connect-failed.troubleshooter.vue
index b0a9c87e78..fffabe5a30 100644
--- a/src/client/app/common/views/components/connect-failed.troubleshooter.vue
+++ b/src/client/app/common/views/components/connect-failed.troubleshooter.vue
@@ -7,21 +7,21 @@
%fa:check%
%fa:times%
- {{ network == null ? '%i18n:@checking-network%' : '%i18n:@network%' }}
+ {{ network == null ? '%i18n:!@checking-network%' : '%i18n:!@network%' }}
%fa:check%
%fa:times%
- {{ internet == null ? '%i18n:@checking-internet%' : '%i18n:@internet%' }}
+ {{ internet == null ? '%i18n:!@checking-internet%' : '%i18n:!@internet%' }}
%fa:check%
%fa:times%
- {{ server == null ? '%i18n:@checking-server%' : '%i18n:@server%' }}
+ {{ server == null ? '%i18n:!@checking-server%' : '%i18n:!@server%' }}
%i18n:@finding%
diff --git a/src/client/app/common/views/components/connect-failed.vue b/src/client/app/common/views/components/connect-failed.vue
index d90c8756b8..96857c87a1 100644
--- a/src/client/app/common/views/components/connect-failed.vue
+++ b/src/client/app/common/views/components/connect-failed.vue
@@ -3,9 +3,9 @@
%i18n:@title%
- {{ '%i18n:@description%'.substr(0, '%i18n:@description%'.indexOf('{')) }}
- {{ '%i18n:@description%'.match(/\{(.+?)\}/)[1] }}
- {{ '%i18n:@description%'.substr('%i18n:@description%'.indexOf('}') + 1) }}
+ {{ '%i18n:!@description%'.substr(0, '%i18n:!@description%'.indexOf('{')) }}
+ {{ '%i18n:!@description%'.match(/\{(.+?)\}/)[1] }}
+ {{ '%i18n:!@description%'.substr('%i18n:!@description%'.indexOf('}') + 1) }}
diff --git a/src/client/app/common/views/components/messaging-room.vue b/src/client/app/common/views/components/messaging-room.vue
index ca5416a218..38202d7581 100644
--- a/src/client/app/common/views/components/messaging-room.vue
+++ b/src/client/app/common/views/components/messaging-room.vue
@@ -8,7 +8,7 @@
%fa:info-circle%%i18n:@empty%
%fa:flag%%i18n:@no-history%
@@ -172,7 +172,7 @@ export default Vue.extend({
});
} else if (message.userId != (this as any).os.i.id) {
// Notify
- this.notify('%i18n:@new-message%');
+ this.notify('%i18n:!@new-message%');
}
},
diff --git a/src/client/app/common/views/components/poll-editor.vue b/src/client/app/common/views/components/poll-editor.vue
index fa1897f435..189172679b 100644
--- a/src/client/app/common/views/components/poll-editor.vue
+++ b/src/client/app/common/views/components/poll-editor.vue
@@ -5,7 +5,7 @@
-
-
+
diff --git a/src/client/app/common/views/components/poll.vue b/src/client/app/common/views/components/poll.vue
index fd0ebc4656..1834d4ddc2 100644
--- a/src/client/app/common/views/components/poll.vue
+++ b/src/client/app/common/views/components/poll.vue
@@ -1,19 +1,19 @@
diff --git a/src/client/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue
index 631ed13133..267eeb3a14 100644
--- a/src/client/app/common/views/components/reaction-picker.vue
+++ b/src/client/app/common/views/components/reaction-picker.vue
@@ -22,7 +22,7 @@
import Vue from 'vue';
import * as anime from 'animejs';
-const placeholder = '%i18n:@choose-reaction%';
+const placeholder = '%i18n:!@choose-reaction%';
export default Vue.extend({
props: ['note', 'source', 'compact', 'cb'],
diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue
index 4b114eb750..25f90a2f13 100644
--- a/src/client/app/common/views/components/signin.vue
+++ b/src/client/app/common/views/components/signin.vue
@@ -9,7 +9,7 @@
-
+
もしくは Twitterでログイン
diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue
index b998e6f42a..33a559ff8f 100644
--- a/src/client/app/common/views/components/signup.vue
+++ b/src/client/app/common/views/components/signup.vue
@@ -127,7 +127,7 @@ export default Vue.extend({
location.href = '/';
});
}).catch(() => {
- alert('%i18n:@some-error%');
+ alert('%i18n:!@some-error%');
(window as any).grecaptcha.reset();
this.recaptchaed = false;
diff --git a/src/client/app/common/views/components/time.vue b/src/client/app/common/views/components/time.vue
index 6e0d2b0dcb..533958697c 100644
--- a/src/client/app/common/views/components/time.vue
+++ b/src/client/app/common/views/components/time.vue
@@ -44,16 +44,16 @@ export default Vue.extend({
const time = this._time;
const ago = (this.now.getTime() - time.getTime()) / 1000/*ms*/;
return (
- ago >= 31536000 ? '%i18n:common.time.years_ago%' .replace('{}', (~~(ago / 31536000)).toString()) :
- ago >= 2592000 ? '%i18n:common.time.months_ago%' .replace('{}', (~~(ago / 2592000)).toString()) :
- ago >= 604800 ? '%i18n:common.time.weeks_ago%' .replace('{}', (~~(ago / 604800)).toString()) :
- ago >= 86400 ? '%i18n:common.time.days_ago%' .replace('{}', (~~(ago / 86400)).toString()) :
- ago >= 3600 ? '%i18n:common.time.hours_ago%' .replace('{}', (~~(ago / 3600)).toString()) :
- ago >= 60 ? '%i18n:common.time.minutes_ago%'.replace('{}', (~~(ago / 60)).toString()) :
- ago >= 10 ? '%i18n:common.time.seconds_ago%'.replace('{}', (~~(ago % 60)).toString()) :
- ago >= 0 ? '%i18n:common.time.just_now%' :
- ago < 0 ? '%i18n:common.time.future%' :
- '%i18n:common.time.unknown%');
+ ago >= 31536000 ? '%i18n:!common.time.years_ago%' .replace('{}', (~~(ago / 31536000)).toString()) :
+ ago >= 2592000 ? '%i18n:!common.time.months_ago%' .replace('{}', (~~(ago / 2592000)).toString()) :
+ ago >= 604800 ? '%i18n:!common.time.weeks_ago%' .replace('{}', (~~(ago / 604800)).toString()) :
+ ago >= 86400 ? '%i18n:!common.time.days_ago%' .replace('{}', (~~(ago / 86400)).toString()) :
+ ago >= 3600 ? '%i18n:!common.time.hours_ago%' .replace('{}', (~~(ago / 3600)).toString()) :
+ ago >= 60 ? '%i18n:!common.time.minutes_ago%'.replace('{}', (~~(ago / 60)).toString()) :
+ ago >= 10 ? '%i18n:!common.time.seconds_ago%'.replace('{}', (~~(ago % 60)).toString()) :
+ ago >= 0 ? '%i18n:!common.time.just_now%' :
+ ago < 0 ? '%i18n:!common.time.future%' :
+ '%i18n:!common.time.unknown%');
}
},
created() {
diff --git a/src/client/app/common/views/components/twitter-setting.vue b/src/client/app/common/views/components/twitter-setting.vue
index 77788290f6..6ca1037aba 100644
--- a/src/client/app/common/views/components/twitter-setting.vue
+++ b/src/client/app/common/views/components/twitter-setting.vue
@@ -3,7 +3,7 @@
%i18n:@description%%i18n:@detail%
%i18n:@connected-to%: @{{ os.i.twitter.screenName }}
- {{ os.i.twitter ? '%i18n:@reconnect%' : '%i18n:@connect%' }}
+ {{ os.i.twitter ? '%i18n:!@reconnect%' : '%i18n:!@connect%' }}
or
%i18n:@disconnect%
diff --git a/src/client/app/common/views/widgets/broadcast.vue b/src/client/app/common/views/widgets/broadcast.vue
index 6e11ec29e3..96d1d0ef3a 100644
--- a/src/client/app/common/views/widgets/broadcast.vue
+++ b/src/client/app/common/views/widgets/broadcast.vue
@@ -14,7 +14,7 @@
%i18n:@fetching%
- {{ broadcasts.length == 0 ? '%i18n:@no-broadcasts%' : broadcasts[i].title }}
+ {{ broadcasts.length == 0 ? '%i18n:!@no-broadcasts%' : broadcasts[i].title }}
%i18n:@have-a-nice-day%
diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue
index 0b0145fa0b..6b5a6697ed 100644
--- a/src/client/app/common/views/widgets/donation.vue
+++ b/src/client/app/common/views/widgets/donation.vue
@@ -3,9 +3,9 @@
%fa:heart%%i18n:@title%
- {{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
+ {{ '%i18n:!@text%'.substr(0, '%i18n:!@text%'.indexOf('{')) }}
@syuilo
- {{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}
+ {{ '%i18n:!@text%'.substr('%i18n:!@text%'.indexOf('}') + 1) }}
diff --git a/src/client/app/desktop/views/components/calendar.vue b/src/client/app/desktop/views/components/calendar.vue
index 7f0052af5c..a99b48d195 100644
--- a/src/client/app/desktop/views/components/calendar.vue
+++ b/src/client/app/desktop/views/components/calendar.vue
@@ -2,7 +2,7 @@
- {{ '%i18n:@title%'.replace('{1}', year).replace('{2}', month) }}
+ {{ '%i18n:!@title%'.replace('{1}', year).replace('{2}', month) }}
@@ -21,7 +21,7 @@
:data-is-out-of-range="isOutOfRange(i + 1)"
:data-is-donichi="isDonichi(i + 1)"
@click="go(i + 1)"
- :title="isOutOfRange(i + 1) ? null : '%i18n:@go%'"
+ :title="isOutOfRange(i + 1) ? null : '%i18n:!@go%'"
>
{{ i + 1 }}
@@ -58,13 +58,13 @@ export default Vue.extend({
month: new Date().getMonth() + 1,
selected: new Date(),
weekdayText: [
- '%i18n:common.weekday-short.sunday%',
- '%i18n:common.weekday-short.monday%',
- '%i18n:common.weekday-short.tuesday%',
- '%i18n:common.weekday-short.wednesday%',
- '%i18n:common.weekday-short.thursday%',
- '%i18n:common.weekday-short.friday%',
- '%i18n:common.weekday-short.satruday%'
+ '%i18n:!common.weekday-short.sunday%',
+ '%i18n:!common.weekday-short.monday%',
+ '%i18n:!common.weekday-short.tuesday%',
+ '%i18n:!common.weekday-short.wednesday%',
+ '%i18n:!common.weekday-short.thursday%',
+ '%i18n:!common.weekday-short.friday%',
+ '%i18n:!common.weekday-short.satruday%'
]
};
},
diff --git a/src/client/app/desktop/views/components/drive.file.vue b/src/client/app/desktop/views/components/drive.file.vue
index 5ad81322bf..d79cb6c09c 100644
--- a/src/client/app/desktop/views/components/drive.file.vue
+++ b/src/client/app/desktop/views/components/drive.file.vue
@@ -64,46 +64,46 @@ export default Vue.extend({
this.isContextmenuShowing = true;
contextmenu(e, [{
type: 'item',
- text: '%i18n:@contextmenu.rename%',
+ text: '%i18n:!@contextmenu.rename%',
icon: '%fa:i-cursor%',
onClick: this.rename
}, {
type: 'item',
- text: '%i18n:@contextmenu.copy-url%',
+ text: '%i18n:!@contextmenu.copy-url%',
icon: '%fa:link%',
onClick: this.copyUrl
}, {
type: 'link',
href: `${this.file.url}?download`,
- text: '%i18n:@contextmenu.download%',
+ text: '%i18n:!@contextmenu.download%',
icon: '%fa:download%',
}, {
type: 'divider',
}, {
type: 'item',
- text: '%i18n:common.delete%',
+ text: '%i18n:!common.delete%',
icon: '%fa:R trash-alt%',
onClick: this.deleteFile
}, {
type: 'divider',
}, {
type: 'nest',
- text: '%i18n:@contextmenu.else-files%',
+ text: '%i18n:!@contextmenu.else-files%',
menu: [{
type: 'item',
- text: '%i18n:@contextmenu.set-as-avatar%',
+ text: '%i18n:!@contextmenu.set-as-avatar%',
onClick: this.setAsAvatar
}, {
type: 'item',
- text: '%i18n:@contextmenu.set-as-banner%',
+ text: '%i18n:!@contextmenu.set-as-banner%',
onClick: this.setAsBanner
}]
}, {
type: 'nest',
- text: '%i18n:@contextmenu.open-in-app%',
+ text: '%i18n:!@contextmenu.open-in-app%',
menu: [{
type: 'item',
- text: '%i18n:@contextmenu.add-app%...',
+ text: '%i18n:!@contextmenu.add-app%...',
onClick: this.addApp
}]
}], {
@@ -141,8 +141,8 @@ export default Vue.extend({
rename() {
(this as any).apis.input({
- title: '%i18n:@contextmenu.rename-file%',
- placeholder: '%i18n:@contextmenu.input-new-file-name%',
+ title: '%i18n:!@contextmenu.rename-file%',
+ placeholder: '%i18n:!@contextmenu.input-new-file-name%',
default: this.file.name,
allowEmpty: false
}).then(name => {
@@ -157,9 +157,9 @@ export default Vue.extend({
copyToClipboard(this.file.url);
(this as any).apis.dialog({
title: '%fa:check%%i18n:@contextmenu.copied%',
- text: '%i18n:@contextmenu.copied-url-to-clipboard%',
+ text: '%i18n:!@contextmenu.copied-url-to-clipboard%',
actions: [{
- text: '%i18n:common.ok%'
+ text: '%i18n:!common.ok%'
}]
});
},
diff --git a/src/client/app/desktop/views/components/drive.folder.vue b/src/client/app/desktop/views/components/drive.folder.vue
index 16f474f4e0..0761ffb1a1 100644
--- a/src/client/app/desktop/views/components/drive.folder.vue
+++ b/src/client/app/desktop/views/components/drive.folder.vue
@@ -54,26 +54,26 @@ export default Vue.extend({
this.isContextmenuShowing = true;
contextmenu(e, [{
type: 'item',
- text: '%i18n:@contextmenu.move-to-this-folder%',
+ text: '%i18n:!@contextmenu.move-to-this-folder%',
icon: '%fa:arrow-right%',
onClick: this.go
}, {
type: 'item',
- text: '%i18n:@contextmenu.show-in-new-window%',
+ text: '%i18n:!@contextmenu.show-in-new-window%',
icon: '%fa:R window-restore%',
onClick: this.newWindow
}, {
type: 'divider',
}, {
type: 'item',
- text: '%i18n:@contextmenu.rename%',
+ text: '%i18n:!@contextmenu.rename%',
icon: '%fa:i-cursor%',
onClick: this.rename
}, {
type: 'divider',
}, {
type: 'item',
- text: '%i18n:common.delete%',
+ text: '%i18n:!common.delete%',
icon: '%fa:R trash-alt%',
onClick: this.deleteFolder
}], {
@@ -159,15 +159,15 @@ export default Vue.extend({
switch (err) {
case 'detected-circular-definition':
(this as any).apis.dialog({
- title: '%fa:exclamation-triangle%%i18n:@unable-to-process%',
- text: '%i18n:@circular-reference-detected%',
+ title: '%fa:exclamation-triangle%%i18n:!@unable-to-process%',
+ text: '%i18n:!@circular-reference-detected%',
actions: [{
- text: '%i18n:common.ok%'
+ text: '%i18n:!common.ok%'
}]
});
break;
default:
- alert('%i18n:@unhandled-error% ' + err);
+ alert('%i18n:!@unhandled-error% ' + err);
}
});
}
@@ -199,8 +199,8 @@ export default Vue.extend({
rename() {
(this as any).apis.input({
- title: '%i18n:@contextmenu.rename-folder%',
- placeholder: '%i18n:@contextmenu.input-new-folder-name%',
+ title: '%i18n:!@contextmenu.rename-folder%',
+ placeholder: '%i18n:!@contextmenu.input-new-folder-name%',
default: this.folder.name
}).then(name => {
(this as any).api('drive/folders/update', {
diff --git a/src/client/app/desktop/views/components/drive.nav-folder.vue b/src/client/app/desktop/views/components/drive.nav-folder.vue
index 40f620875e..71b2e419d9 100644
--- a/src/client/app/desktop/views/components/drive.nav-folder.vue
+++ b/src/client/app/desktop/views/components/drive.nav-folder.vue
@@ -8,7 +8,7 @@
@drop.stop="onDrop"
>
%fa:cloud%
- {{ folder == null ? '%i18n:@drive%' : folder.name }}
+ {{ folder == null ? '%i18n:!@drive%' : folder.name }}
diff --git a/src/client/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue
index abdf1338b4..5e91048d19 100644
--- a/src/client/app/desktop/views/components/drive.vue
+++ b/src/client/app/desktop/views/components/drive.vue
@@ -138,17 +138,17 @@ export default Vue.extend({
onContextmenu(e) {
contextmenu(e, [{
type: 'item',
- text: '%i18n:@contextmenu.create-folder%',
+ text: '%i18n:!@contextmenu.create-folder%',
icon: '%fa:R folder%',
onClick: this.createFolder
}, {
type: 'item',
- text: '%i18n:@contextmenu.upload%',
+ text: '%i18n:!@contextmenu.upload%',
icon: '%fa:upload%',
onClick: this.selectLocalFile
}, {
type: 'item',
- text: '%i18n:@contextmenu.url-upload%',
+ text: '%i18n:!@contextmenu.url-upload%',
icon: '%fa:cloud-upload-alt%',
onClick: this.urlUpload
}]);
@@ -306,15 +306,15 @@ export default Vue.extend({
switch (err) {
case 'detected-circular-definition':
(this as any).apis.dialog({
- title: '%fa:exclamation-triangle%%i18n:@unable-to-process%',
- text: '%i18n:@circular-reference-detected%',
+ title: '%fa:exclamation-triangle%%i18n:!@unable-to-process%',
+ text: '%i18n:!@circular-reference-detected%',
actions: [{
- text: '%i18n:common.ok%'
+ text: '%i18n:!common.ok%'
}]
});
break;
default:
- alert('%i18n:@unhandled-error% ' + err);
+ alert('%i18n:!@unhandled-error% ' + err);
}
});
}
@@ -327,8 +327,8 @@ export default Vue.extend({
urlUpload() {
(this as any).apis.input({
- title: '%i18n:@url-upload%',
- placeholder: '%i18n:@url-of-file%'
+ title: '%i18n:!@url-upload%',
+ placeholder: '%i18n:!@url-of-file%'
}).then(url => {
(this as any).api('drive/files/upload_from_url', {
url: url,
@@ -337,9 +337,9 @@ export default Vue.extend({
(this as any).apis.dialog({
title: '%fa:check%%i18n:@url-upload-requested%',
- text: '%i18n:@may-take-time%',
+ text: '%i18n:!@may-take-time%',
actions: [{
- text: '%i18n:common.ok%'
+ text: '%i18n:!common.ok%'
}]
});
});
@@ -347,8 +347,8 @@ export default Vue.extend({
createFolder() {
(this as any).apis.input({
- title: '%i18n:@create-folder%',
- placeholder: '%i18n:@folder-name%'
+ title: '%i18n:!@create-folder%',
+ placeholder: '%i18n:!@folder-name%'
}).then(name => {
(this as any).api('drive/folders/create', {
name: name,
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index 90f9e98a5c..326ec4dc89 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -9,9 +9,9 @@
%fa:retweet%
- {{ '%i18n:@reposted-by%'.substr(0, '%i18n:@reposted-by%'.indexOf('{')) }}
+ {{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}
{{ note.user | userName }}
- {{ '%i18n:@reposted-by%'.substr('%i18n:@reposted-by%'.indexOf('}') + 1) }}
+ {{ '%i18n:!@reposted-by%'.substr('%i18n:!@reposted-by%'.indexOf('}') + 1) }}
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue
index c1d4c561e8..413a87755a 100644
--- a/src/client/app/desktop/views/components/notifications.vue
+++ b/src/client/app/desktop/views/components/notifications.vue
@@ -93,7 +93,7 @@
%i18n:@empty%
%fa:spinner .pulse .fw%%i18n:common.loading%
diff --git a/src/client/app/desktop/views/components/post-form-window.vue b/src/client/app/desktop/views/components/post-form-window.vue
index 18bb39f9bc..1f0fbff760 100644
--- a/src/client/app/desktop/views/components/post-form-window.vue
+++ b/src/client/app/desktop/views/components/post-form-window.vue
@@ -4,8 +4,8 @@
%fa:map-marker-alt%
%i18n:@note%
%i18n:@reply%
- {{ '%i18n:@attaches%'.replace('{}', media.length) }}
- {{ '%i18n:@uploading-media%'.replace('{}', uploadings.length) }}
+ {{ '%i18n:!@attaches%'.replace('{}', media.length) }}
+ {{ '%i18n:!@uploading-media%'.replace('{}', uploadings.length) }}
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index 6071bbe31f..ebb0193088 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -28,9 +28,9 @@
- {{ '%i18n:@text-remain%'.replace('{}', 1000 - text.length) }}
+ {{ '%i18n:!@text-remain%'.replace('{}', 1000 - text.length) }}
@@ -69,17 +69,17 @@ export default Vue.extend({
},
placeholder(): string {
return this.renote
- ? '%i18n:@quote-placeholder%'
+ ? '%i18n:!@quote-placeholder%'
: this.reply
- ? '%i18n:@reply-placeholder%'
- : '%i18n:@note-placeholder%';
+ ? '%i18n:!@reply-placeholder%'
+ : '%i18n:!@note-placeholder%';
},
submitText(): string {
return this.renote
- ? '%i18n:@renote%'
+ ? '%i18n:!@renote%'
: this.reply
- ? '%i18n:@reply%'
- : '%i18n:@note%';
+ ? '%i18n:!@reply%'
+ : '%i18n:!@note%';
},
canPost(): boolean {
return !this.posting && (this.text.length != 0 || this.files.length != 0 || this.poll || this.renote);
@@ -236,16 +236,16 @@ export default Vue.extend({
this.deleteDraft();
this.$emit('posted');
(this as any).apis.notify(this.renote
- ? '%i18n:@reposted%'
+ ? '%i18n:!@reposted%'
: this.reply
- ? '%i18n:@replied%'
- : '%i18n:@posted%');
+ ? '%i18n:!@replied%'
+ : '%i18n:!@posted%');
}).catch(err => {
(this as any).apis.notify(this.renote
- ? '%i18n:@renote-failed%'
+ ? '%i18n:!@renote-failed%'
: this.reply
- ? '%i18n:@reply-failed%'
- : '%i18n:@note-failed%');
+ ? '%i18n:!@reply-failed%'
+ : '%i18n:!@note-failed%');
}).then(() => {
this.posting = false;
});
diff --git a/src/client/app/desktop/views/components/renote-form.vue b/src/client/app/desktop/views/components/renote-form.vue
index 1f947a71de..daae5df5e9 100644
--- a/src/client/app/desktop/views/components/renote-form.vue
+++ b/src/client/app/desktop/views/components/renote-form.vue
@@ -5,7 +5,7 @@
@@ -32,9 +32,9 @@ export default Vue.extend({
renoteId: this.note.id
}).then(data => {
this.$emit('posted');
- (this as any).apis.notify('%i18n:@success%');
+ (this as any).apis.notify('%i18n:!@success%');
}).catch(err => {
- (this as any).apis.notify('%i18n:@failure%');
+ (this as any).apis.notify('%i18n:!@failure%');
}).then(() => {
this.wait = false;
});
diff --git a/src/client/app/desktop/views/components/repost-form.vue b/src/client/app/desktop/views/components/repost-form.vue
new file mode 100644
index 0000000000..d5b1696757
--- /dev/null
+++ b/src/client/app/desktop/views/components/repost-form.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
diff --git a/src/client/app/desktop/views/components/settings.2fa.vue b/src/client/app/desktop/views/components/settings.2fa.vue
index 0809dd798c..99b6cb947c 100644
--- a/src/client/app/desktop/views/components/settings.2fa.vue
+++ b/src/client/app/desktop/views/components/settings.2fa.vue
@@ -34,7 +34,7 @@ export default Vue.extend({
methods: {
register() {
(this as any).apis.input({
- title: '%i18n:@enter-password%',
+ title: '%i18n:!@enter-password%',
type: 'password'
}).then(password => {
(this as any).api('i/2fa/register', {
@@ -47,13 +47,13 @@ export default Vue.extend({
unregister() {
(this as any).apis.input({
- title: '%i18n:@enter-password%',
+ title: '%i18n:!@enter-password%',
type: 'password'
}).then(password => {
(this as any).api('i/2fa/unregister', {
password: password
}).then(() => {
- (this as any).apis.notify('%i18n:@unregistered%');
+ (this as any).apis.notify('%i18n:!@unregistered%');
(this as any).os.i.twoFactorEnabled = false;
});
});
@@ -63,10 +63,10 @@ export default Vue.extend({
(this as any).api('i/2fa/done', {
token: this.token
}).then(() => {
- (this as any).apis.notify('%i18n:@success%');
+ (this as any).apis.notify('%i18n:!@success%');
(this as any).os.i.twoFactorEnabled = true;
}).catch(() => {
- (this as any).apis.notify('%i18n:@failed%');
+ (this as any).apis.notify('%i18n:!@failed%');
});
}
}
diff --git a/src/client/app/desktop/views/components/settings.api.vue b/src/client/app/desktop/views/components/settings.api.vue
index 6ae29cb58a..a43c6e8ea6 100644
--- a/src/client/app/desktop/views/components/settings.api.vue
+++ b/src/client/app/desktop/views/components/settings.api.vue
@@ -15,7 +15,7 @@ export default Vue.extend({
methods: {
regenerateToken() {
(this as any).apis.input({
- title: '%i18n:@enter-password%',
+ title: '%i18n:!@enter-password%',
type: 'password'
}).then(password => {
(this as any).api('i/regenerate_token', {
diff --git a/src/client/app/desktop/views/components/settings.password.vue b/src/client/app/desktop/views/components/settings.password.vue
index 39896daf67..9e89bc0f6e 100644
--- a/src/client/app/desktop/views/components/settings.password.vue
+++ b/src/client/app/desktop/views/components/settings.password.vue
@@ -11,21 +11,21 @@ export default Vue.extend({
methods: {
reset() {
(this as any).apis.input({
- title: '%i18n:@enter-current-password%',
+ title: '%i18n:!@enter-current-password%',
type: 'password'
}).then(currentPassword => {
(this as any).apis.input({
- title: '%i18n:@enter-new-password%',
+ title: '%i18n:!@enter-new-password%',
type: 'password'
}).then(newPassword => {
(this as any).apis.input({
- title: '%i18n:@enter-new-password-again%',
+ title: '%i18n:!@enter-new-password-again%',
type: 'password'
}).then(newPassword2 => {
if (newPassword !== newPassword2) {
(this as any).apis.dialog({
title: null,
- text: '%i18n:@not-match%',
+ text: '%i18n:!@not-match%',
actions: [{
text: 'OK'
}]
@@ -36,7 +36,7 @@ export default Vue.extend({
currentPasword: currentPassword,
newPassword: newPassword
}).then(() => {
- (this as any).apis.notify('%i18n:@changed%');
+ (this as any).apis.notify('%i18n:!@changed%');
});
});
});
diff --git a/src/client/app/desktop/views/pages/selectdrive.vue b/src/client/app/desktop/views/pages/selectdrive.vue
index c846f2418f..7a00896640 100644
--- a/src/client/app/desktop/views/pages/selectdrive.vue
+++ b/src/client/app/desktop/views/pages/selectdrive.vue
@@ -29,7 +29,7 @@ export default Vue.extend({
}
},
mounted() {
- document.title = '%i18n:@title%';
+ document.title = '%i18n:!@title%';
},
methods: {
onSelected(file) {
diff --git a/src/client/app/desktop/views/widgets/channel.vue b/src/client/app/desktop/views/widgets/channel.vue
index 975058b0e2..7e96f8ee3d 100644
--- a/src/client/app/desktop/views/widgets/channel.vue
+++ b/src/client/app/desktop/views/widgets/channel.vue
@@ -1,7 +1,7 @@
- %fa:tv%{{ channel ? channel.title : '%i18n:@title%' }}
+ %fa:tv%{{ channel ? channel.title : '%i18n:!@title%' }}
%i18n:@get-started%
diff --git a/src/client/app/init.ts b/src/client/app/init.ts
index 2fb8f15cf3..990933ec0e 100644
--- a/src/client/app/init.ts
+++ b/src/client/app/init.ts
@@ -69,7 +69,7 @@ html.setAttribute('lang', lang);
const head = document.getElementsByTagName('head')[0];
const meta = document.createElement('meta');
meta.setAttribute('name', 'description');
-meta.setAttribute('content', '%i18n:common.misskey%');
+meta.setAttribute('content', '%i18n:!common.misskey%');
head.appendChild(meta);
//#endregion
diff --git a/src/client/app/mobile/views/components/drive.vue b/src/client/app/mobile/views/components/drive.vue
index ec1b983d0b..7aa666e1bb 100644
--- a/src/client/app/mobile/views/components/drive.vue
+++ b/src/client/app/mobile/views/components/drive.vue
@@ -32,7 +32,7 @@
diff --git a/src/client/app/mobile/views/components/follow-button.vue b/src/client/app/mobile/views/components/follow-button.vue
index a6b5cf0556..5d6b8ebf84 100644
--- a/src/client/app/mobile/views/components/follow-button.vue
+++ b/src/client/app/mobile/views/components/follow-button.vue
@@ -7,7 +7,7 @@
%fa:minus%
%fa:plus%
%fa:spinner .pulse .fw%
- {{ user.isFollowing ? '%i18n:@unfollow%' : '%i18n:@follow%' }}
+ {{ user.isFollowing ? '%i18n:!@unfollow%' : '%i18n:!@follow%' }}
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index cde8b6c2ce..cccb8875b4 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -9,9 +9,9 @@
%fa:retweet%
-
{{ '%i18n:@reposted-by%'.substr(0, '%i18n:@reposted-by%'.indexOf('{')) }}
+
{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}
{{ note.user | userName }}
-
{{ '%i18n:@reposted-by%'.substr('%i18n:@reposted-by%'.indexOf('}') + 1) }}
+
{{ '%i18n:!@reposted-by%'.substr('%i18n:!@reposted-by%'.indexOf('}') + 1) }}
diff --git a/src/client/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue
index 231ce2c1be..ad43a27b98 100644
--- a/src/client/app/mobile/views/components/notifications.vue
+++ b/src/client/app/mobile/views/components/notifications.vue
@@ -11,7 +11,7 @@
%i18n:@empty%
%fa:spinner .pulse .fw%%i18n:common.loading%
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 4b038fd2b6..861e8653ba 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -5,12 +5,12 @@
{{ 1000 - text.length }}
%fa:map-marker-alt%
-
+