refs #151 Translate messages

This commit is contained in:
AkiraFukushima 2018-08-13 15:27:53 +09:00
parent 8bbb27cb7c
commit 4ed72f01d4
28 changed files with 186 additions and 92 deletions

View File

@ -159,5 +159,50 @@
"new_list": "New List",
"edit": "Edit"
}
},
"message": {
"account_load_error": "Failed to load accounts",
"account_remove_error": "Failed to remove the account",
"preferences_load_error": "Failed to load preferences",
"timeline_fetch_error": "Failed to fetch timeline",
"notification_fetch_error": "Failed to fetch notification",
"favourite_fetch_error": "Failed to fetch favorite",
"start_streaming_error": "Failed to start streaming",
"attach_error": "Could not attach the file",
"authorize_duplicate_error": "Can not login the same account of the same domain",
"authorize_error": "Failed to authorize",
"followers_fetch_error": "Failed to fetch followers",
"follows_fetch_error": "Failed to fetch follows",
"toot_fetch_error": "Failed to fetch the toot detail",
"follow_error": "Failed to follow the user",
"unfollow_error": "Failed to unfollow the user",
"lists_fetch_error": "Failed to fetch lists",
"list_create_error": "Failed to create a list",
"members_fetch_error": "Failed to fetch members",
"remove_user_error": "Failed to remove the user",
"find_account_error": "Account not found",
"reblog_error": "Failed to reblog",
"unreblog_error": "Failed to unreblog",
"favourite_error": "Failed to favourite",
"unfavourite_error": "Failed to unfavourite",
"delete_error": "Failed to delete the toot",
"search_error": "Failed to search",
"toot_error": "Failed to toot",
"update_list_memberships_error": "Failed to update the list memberships",
"add_user_error": "Failed to add user",
"authorize_url_error": "Failed to get authorize url",
"domain_confirmed": "{{domain}} is confirmed, please login",
"domain_doesnt_exist": "{{domain}} does not exist"
},
"validation": {
"login": {
"rquire_domain_name": "Domain name is required",
"domain_format": "Please write only domain name"
},
"new_toot": {
"toot_length": "Toot length should be {{min}} to {{max}}",
"attach_length": "You can only attach up to {{max}} images",
"attach_image": "You can only attach images or videos"
}
}
}

View File

@ -159,5 +159,50 @@
"new_list": "新規リスト",
"edit": "編集"
}
},
"message": {
"account_load_error": "アカウントの読み込みに失敗しました",
"account_remove_error": "アカウントの削除に失敗しました",
"preferences_load_error": "設定の読み込みに失敗しました",
"timeline_fetch_error": "タイムラインの読み込みに失敗しました",
"notification_fetch_error": "通知の読み込みに失敗しました",
"favourite_fetch_error": "お気に入りの読み込みに失敗しました",
"start_streaming_error": "ストリーミングを開始できませんでした",
"attach_error": "ファイルを添付できませんでした",
"authorize_duplicate_error": "同一ドメイン同一アカウントではログインできません",
"authorize_error": "認証に失敗しました",
"followers_fetch_error": "フォロワーの取得に失敗しました",
"follows_fetch_error": "フォローの取得に失敗しました",
"toot_fetch_error": "トゥート詳細の読み込みに失敗しました",
"follow_error": "フォローに失敗しました",
"unfollow_error": "フォロー解除に失敗しました",
"lists_fetch_error": "リストの読み込みに失敗しました",
"list_create_error": "リストの作成に失敗しました",
"members_fetch_error": "メンバーの取得に失敗しました",
"remove_user_error": "ユーザの削除に失敗しました",
"find_account_error": "アカウントが見つかりません",
"reblog_error": "ブーストできませんでした",
"unreblog_error": "ブースト解除に失敗しました",
"favourite_error": "お気に入りできませんでした",
"unfavourite_error": "お気に入り解除に失敗しました",
"delete_error": "トゥート削除に失敗しました",
"search_error": "検索に失敗しました",
"toot_error": "トゥートに失敗しました",
"update_list_memberships_error": "リストメンバーの更新に失敗しました",
"add_user_error": "メンバー追加に失敗しました",
"authorize_url_error": "認証用URLの取得に失敗しました",
"domain_confirmed": "{{domain}} が確認できました,ログインしてください",
"domain_doesnt_exist": "{{domain}} は存在しません"
},
"validation": {
"login": {
"rquire_domain_name": "ドメイン名は必須です",
"domain_format": "ドメイン名のみを入力してください"
},
"new_toot": {
"toot_length": "トゥートの長さは {{min}} から {{max}}文字である必要があります",
"attach_length": "添付ファイルは {{max}} つまでです",
"attach_image": "画像かビデオしか添付できません"
}
}
}

View File

@ -71,12 +71,12 @@ export default {
.catch((err) => {
if (err.name === 'DuplicateRecordError') {
this.$message({
message: 'Can not login the same account of the same domain',
message: this.$t('message.authorize_duplicate_error'),
type: 'error'
})
} else {
this.$message({
message: 'Failed to authorize',
message: this.$t('message.authorize_error'),
type: 'error'
})
}

View File

@ -37,20 +37,6 @@ export default {
return {
form: {
domainName: ''
},
rules: {
domainName: [
{
type: 'string',
required: true,
message: 'Domain name is required'
},
{
pattern: domainFormat,
trigger: 'change',
message: 'Please write only domain name'
}
]
}
}
},
@ -58,7 +44,25 @@ export default {
...mapState({
selectedInstance: state => state.Login.selectedInstance,
searching: state => state.Login.searching
})
}),
rules: {
get () {
return {
domainName: [
{
type: 'string',
required: true,
message: this.$t('validation.login.require_domain_name')
},
{
pattern: domainFormat,
trigger: 'change',
message: this.$t('validation.login.domain_format')
}
]
}
}
}
},
methods: {
login () {
@ -77,7 +81,7 @@ export default {
.catch(() => {
loading.close()
this.$message({
message: 'Could not get authorize url',
message: this.$t('message.authorize_url_error'),
type: 'error'
})
})
@ -88,19 +92,19 @@ export default {
this.$store.dispatch('Login/confirmInstance', this.form.domainName)
.then(() => {
this.$message({
message: `${this.form.domainName} is confirmed, please login`,
message: this.$t('message.domain_confirmed', {domain: this.form.domainName}),
type: 'success'
})
})
.catch(() => {
this.$message({
message: `${this.form.domainName} does not exist`,
message: this.$t('domain_doesnt_exist', {domain: this.form.domainName}),
type: 'error'
})
})
} else {
this.$message({
message: 'Please write only domain name',
message: this.$t('validation.login.domain_format'),
type: 'error'
})
return false

View File

@ -85,13 +85,13 @@ export default {
this.$store.commit('Preferences/Account/updateAccountLoading', true)
try {
await this.$store.dispatch('Preferences/Account/loadAccounts')
this.$store.commit('Preferences/Account/updateAccountLoading', false)
} catch (err) {
this.$store.commit('Preferences/Account/updateAccountLoading', false)
return this.$message({
message: 'Failed to load accounts',
message: this.$t('message.account_load_error'),
type: 'error'
})
} finally {
this.$store.commit('Preferences/Account/updateAccountLoading', false)
}
},
removeAccount (index, accounts) {
@ -101,7 +101,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to remove the association',
message: this.$t('message.account_remove_error'),
type: 'error'
})
})

View File

@ -161,7 +161,7 @@ export default {
this.$store.dispatch('Preferences/General/loadGeneral')
.catch(() => {
this.$message({
message: 'Failed to load preferences',
message: this.$t('message.preferences_load_error'),
type: 'error'
})
})

View File

@ -83,7 +83,7 @@ export default {
this.$store.dispatch('TimelineSpace/watchShortcutEvents')
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch(() => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
})
@ -91,7 +91,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Home/fetchTimeline', account)
} catch (err) {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
}
@ -99,7 +99,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Notifications/fetchNotifications', account)
} catch (err) {
this.$message({
message: 'Could not fetch notification',
message: this.$t('message.notification_fetch_error'),
type: 'error'
})
}
@ -107,7 +107,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Local/fetchLocalTimeline', account)
} catch (err) {
this.$message({
message: 'Could not fetch local timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
}
@ -115,7 +115,7 @@ export default {
this.$store.dispatch('TimelineSpace/startUserStreaming', account)
.catch(() => {
this.$message({
message: 'Failed to start streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})
@ -131,7 +131,7 @@ export default {
const file = e.dataTransfer.files.item(0)
if (!file.type.includes('image') && !file.type.includes('video')) {
this.$message({
message: 'You can only attach images or videos',
message: this.$t('validation.new_toot.attach_image'),
type: 'error'
})
return false
@ -141,7 +141,7 @@ export default {
this.$store.dispatch('TimelineSpace/Modals/NewToot/uploadImage', file)
.catch(() => {
this.$message({
message: 'Could not attach the file',
message: this.$t('message.attach_error'),
type: 'error'
})
})

View File

@ -82,7 +82,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Account not found',
message: this.$t('message.find_account_error'),
type: 'error'
})
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', false)

View File

@ -82,7 +82,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Account not found',
message: this.$t('message.find_account_error'),
type: 'error'
})
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', false)

View File

@ -188,7 +188,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Account not found',
message: this.$t('message.find_account_error'),
type: 'error'
})
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', false)
@ -225,7 +225,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to unreblog',
message: this.$t('message.unreblog_error'),
type: 'error'
})
})
@ -236,7 +236,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to reblog',
message: this.$t('message.reblog_error'),
type: 'error'
})
})
@ -250,7 +250,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to unfavourite',
message: this.$t('message.unfavourite_error'),
type: 'error'
})
})
@ -261,7 +261,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to favourite',
message: this.$t('message.favourite_error'),
type: 'error'
})
})
@ -309,7 +309,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to delete the toot',
message: this.$t('message.delete_error'),
type: 'error'
})
})

View File

@ -42,7 +42,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Favourites/fetchFavourites', this.account)
.catch(() => {
this.$message({
message: 'Could not fetch favourites',
message: this.$t('message.favourite_fetch_error'),
type: 'error'
})
})
@ -82,7 +82,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Favourites/lazyFetchFavourites', this.favourites[this.favourites.length - 1])
.catch(() => {
this.$message({
message: 'Could not fetch favourites',
message: this.$t('message.favourite_fetch_error'),
type: 'error'
})
})
@ -99,7 +99,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -113,7 +113,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Favourites/fetchFavourites', account)
.catch(() => {
this.$message({
message: 'Could not fetch favourites',
message: this.$t('message.favourite_fetch_error'),
type: 'error'
})
})

View File

@ -73,14 +73,14 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Hashtag/Tag/fetch', tag)
.catch(() => {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
this.$store.dispatch('TimelineSpace/Contents/Hashtag/Tag/startStreaming', tag)
.catch(() => {
this.$message({
message: 'Could not start streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})
@ -124,7 +124,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -139,7 +139,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Hashtag/Tag/fetch', tag)
.catch(() => {
this.$message({
message: 'Could not fetch timeline with tag',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -149,7 +149,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Hashtag/Tag/startStreaming', tag)
.catch(() => {
this.$message({
message: 'Failed to restart streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})

View File

@ -71,7 +71,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Home/lazyFetchTimeline', this.timeline[this.timeline.length - 1])
.catch(() => {
this.$message({
message: 'Could not fetch home timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -95,7 +95,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -106,7 +106,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Home/fetchTimeline', account)
.catch(() => {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -115,7 +115,7 @@ export default {
this.$store.dispatch('TimelineSpace/startUserStreaming', account)
.catch(() => {
this.$message({
message: 'Failed to restart streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})

View File

@ -34,7 +34,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Lists/Edit/fetchMembers', this.list_id)
} catch (err) {
this.$message({
message: 'Failed to fetch members',
message: this.$t('message.members_fetch_error'),
type: 'error'
})
} finally {
@ -51,7 +51,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Lists/Edit/fetchMembers', this.list_id)
} catch (err) {
this.$message({
message: 'Failed to remove user',
message: this.$t('message.remove_user_error'),
type: 'error'
})
} finally {

View File

@ -53,7 +53,7 @@ export default {
return this.$store.dispatch('TimelineSpace/Contents/Lists/Index/fetchLists')
.catch(() => {
this.$message({
message: 'Failed to fetch lists',
message: this.$t('message.lists_fetch_error'),
type: 'error'
})
})
@ -65,7 +65,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Lists/Index/fetchLists')
} catch (err) {
this.$message({
message: 'Failed to create a list',
message: this.$t('message.list_create_error'),
type: 'error'
})
} finally {

View File

@ -81,14 +81,14 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Lists/Show/fetchTimeline', this.list_id)
} catch (err) {
this.$message({
message: 'Failed to get timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
}
this.$store.dispatch('TimelineSpace/Contents/Lists/Show/startStreaming', this.list_id)
.catch(() => {
this.$message({
message: 'Failed to start streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})
@ -120,7 +120,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -135,7 +135,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Lists/Show/fetchTimeline', this.list_id)
.catch(() => {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -145,7 +145,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Lists/Show/startStreaming', this.list_id)
.catch(() => {
this.$message({
message: 'Failed to restart streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})

View File

@ -76,7 +76,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Local/lazyFetchTimeline', this.timeline[this.timeline.length - 1])
.catch(() => {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -94,7 +94,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -106,7 +106,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Local/fetchLocalTimeline', account)
.catch(() => {
this.$message({
message: 'Could not fetch local timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -115,7 +115,7 @@ export default {
this.$store.dispatch('TimelineSpace/startLocalStreaming', account)
.catch(() => {
this.$message({
message: 'Failed to restart streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})

View File

@ -71,7 +71,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Notifications/lazyFetchNotifications', this.notifications[this.notifications.length - 1])
.catch(() => {
this.$message({
message: 'Could not fetch notification',
message: this.$t('message.notification_fetch_error'),
type: 'error'
})
})
@ -89,7 +89,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -102,7 +102,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Notifications/fetchNotifications', account)
.catch(() => {
this.$message({
message: 'Could not fetch notifications',
message: this.$t('message.notification_fetch_error'),
type: 'error'
})
})

View File

@ -73,14 +73,14 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Public/fetchPublicTimeline')
} catch (err) {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
}
this.$store.dispatch('TimelineSpace/Contents/Public/startPublicStreaming')
.catch(() => {
this.$message({
message: 'Failed to start streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})
@ -96,7 +96,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Public/lazyFetchTimeline', this.timeline[this.timeline.length - 1])
.catch(() => {
this.$message({
message: 'Could not fetch timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -114,7 +114,7 @@ export default {
try {
const account = await this.$store.dispatch('TimelineSpace/localAccount', this.$route.params.id).catch((err) => {
this.$message({
message: 'Could not find account',
message: this.$t('message.account_load_error'),
type: 'error'
})
throw err
@ -128,7 +128,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Contents/Public/fetchPublicTimeline')
.catch(() => {
this.$message({
message: 'Could not fetch public timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -138,7 +138,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Public/startPublicStreaming')
.catch(() => {
this.$message({
message: 'Failed to restart streaming',
message: this.$t('message.start_streaming_error'),
type: 'error'
})
})

View File

@ -56,7 +56,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Search/Account/search', this.query)
.catch(() => {
this.$message({
message: 'Could not search',
message: this.$t('message.search_error'),
type: 'error'
})
})

View File

@ -141,7 +141,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/follow', account)
.catch(() => {
this.$message({
message: 'Could not follow this user',
message: this.$t('message.follow_error'),
type: 'error'
})
})
@ -150,7 +150,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/unfollow', account)
.catch(() => {
this.$message({
message: 'Could not unfollow this user',
message: this.$t('message.unfollow_error'),
type: 'error'
})
})

View File

@ -32,7 +32,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Followers/fetchFollowers', this.account)
.catch(() => {
this.$message({
message: 'Could not get followers',
message: this.$t('message.followers_fetch_error'),
type: 'error'
})
})

View File

@ -32,7 +32,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Follows/fetchFollows', this.account)
.catch(() => {
this.$message({
message: 'Could not get follows',
message: this.$t('message.follows_fetch_error'),
type: 'error'
})
})

View File

@ -44,7 +44,7 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Timeline/fetchTimeline', this.account)
.catch(() => {
this.message({
message: 'Could not get timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})
@ -60,7 +60,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Could not fetch account timeline',
message: this.$t('message.timeline_fetch_error'),
type: 'error'
})
})

View File

@ -43,7 +43,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Could not fetch toot detail',
message: this.$t('message.toot_fetch_error'),
type: 'error'
})
})

View File

@ -81,7 +81,7 @@ export default {
})
.catch(() => {
this.$message({
message: 'Failed to add user',
message: this.$t('message.add_user_error'),
type: 'error'
})
})

View File

@ -50,7 +50,7 @@ export default {
return this.$store.dispatch('TimelineSpace/Modals/ListMembership/changeBelongToLists', value)
.catch(() => {
this.$message({
message: 'Failed to update list memberships',
message: this.$t('message.update_list_memberships_error'),
type: 'error'
})
})
@ -72,7 +72,7 @@ export default {
await this.$store.dispatch('TimelineSpace/Modals/ListMembership/fetchLists')
} catch (err) {
this.$message({
message: 'Failed to fetch list',
message: this.$t('message.lists_fetch_error'),
type: 'error'
})
} finally {

View File

@ -160,7 +160,7 @@ export default {
}
if (this.status.length <= 0 || this.status.length >= 500) {
return this.$message({
message: 'Toot length should be 1 to 500',
message: this.$t('validation.new_toot.toot_length', {min: 1, max: 500}),
type: 'error'
})
}
@ -181,7 +181,7 @@ export default {
if (this.attachedMedias.length > 0) {
if (this.attachedMedias.length > 4) {
return this.$message({
message: 'You can only attach up to 4 images',
message: this.$t('validation.new_toot.attach_length', {max: 4}),
type: 'error'
})
}
@ -193,7 +193,7 @@ export default {
this.$store.dispatch('TimelineSpace/Modals/NewToot/postToot', form)
.catch(() => {
this.$message({
message: 'Could not toot',
message: this.$t('message.toot_error'),
type: 'error'
})
})
@ -209,7 +209,7 @@ export default {
const file = e.target.files.item(0)
if (!file.type.includes('image') && !file.type.includes('video')) {
this.$message({
message: 'You can only attach images or videos',
message: this.$t('validation.new_toot.attach_image'),
type: 'error'
})
return
@ -221,7 +221,7 @@ export default {
this.$store.dispatch('TimelineSpace/Modals/NewToot/uploadImage', file)
.catch(() => {
this.$message({
message: 'Could not attach the file',
message: this.$t('message.attach_error'),
type: 'error'
})
})