fix: internationalize dialogs (#2033)
* fix: internationalize dialogs Fixes #1988 * test: fix test * test: fix test * Revert "test: fix test" This reverts commit 559e3d80eb8d65f7ab9443966d4fcfd087e4f8f0.
This commit is contained in:
parent
ad9609738b
commit
66fc202b5c
|
@ -653,5 +653,15 @@ export default {
|
||||||
createdFilter: 'Created filter',
|
createdFilter: 'Created filter',
|
||||||
failedToModifyFilter: 'Failed to modify filter: {error}',
|
failedToModifyFilter: 'Failed to modify filter: {error}',
|
||||||
deletedFilter: 'Deleted filter',
|
deletedFilter: 'Deleted filter',
|
||||||
required: 'Required'
|
required: 'Required',
|
||||||
|
// Dialogs
|
||||||
|
profileOptions: 'Profile options',
|
||||||
|
copyLink: 'Copy link',
|
||||||
|
emoji: 'Emoji',
|
||||||
|
editMedia: 'Edit media',
|
||||||
|
shortcutHelp: 'Shortcut help',
|
||||||
|
statusOptions: 'Status options',
|
||||||
|
confirm: 'Confirm',
|
||||||
|
closeDialog: 'Close dialog',
|
||||||
|
postPrivacy: 'Post privacy'
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<div class="close-dialog-button-wrapper">
|
<div class="close-dialog-button-wrapper">
|
||||||
<button class="close-dialog-button focus-fix"
|
<button class="close-dialog-button focus-fix"
|
||||||
data-a11y-dialog-hide aria-label="Close dialog">
|
data-a11y-dialog-hide aria-label="{intl.closeDialog}">
|
||||||
<SvgIcon className="close-dialog-button-svg" href="#fa-times" />
|
<SvgIcon className="close-dialog-button-svg" href="#fa-times" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showAccountProfileOptionsDialog (account, relationship, verifyCredentials) {
|
export default function showAccountProfileOptionsDialog (account, relationship, verifyCredentials) {
|
||||||
return showDialog(AccountProfileOptionsDialog, {
|
return showDialog(AccountProfileOptionsDialog, {
|
||||||
label: 'Profile options dialog',
|
label: 'intl.profileOptions',
|
||||||
title: '',
|
title: '',
|
||||||
account: account,
|
account: account,
|
||||||
relationship: relationship,
|
relationship: relationship,
|
||||||
|
|
|
@ -2,5 +2,5 @@ import ComposeDialog from '../components/ComposeDialog.html'
|
||||||
import { showDialog } from './showDialog'
|
import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showComposeDialog () {
|
export default function showComposeDialog () {
|
||||||
return showDialog(ComposeDialog, { label: 'Compose dialog' })
|
return showDialog(ComposeDialog, { label: 'intl.composeStatus' })
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showCopyDialog (text) {
|
export default function showCopyDialog (text) {
|
||||||
return showDialog(CopyDialog, {
|
return showDialog(CopyDialog, {
|
||||||
label: 'Copy dialog',
|
label: 'intl.copyLink',
|
||||||
title: 'Copy link',
|
title: 'intl.copyLink',
|
||||||
text
|
text
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showEmojiDialog (realm) {
|
export default function showEmojiDialog (realm) {
|
||||||
return showDialog(EmojiDialog, {
|
return showDialog(EmojiDialog, {
|
||||||
label: 'Emoji dialog',
|
label: 'intl.emoji',
|
||||||
title: 'Emoji',
|
title: 'intl.emoji',
|
||||||
realm
|
realm
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showMediaDialog (mediaItems, scrolledItem) {
|
export default function showMediaDialog (mediaItems, scrolledItem) {
|
||||||
return showDialog(MediaDialog, {
|
return showDialog(MediaDialog, {
|
||||||
label: 'Media dialog',
|
label: 'intl.media',
|
||||||
mediaItems,
|
mediaItems,
|
||||||
scrolledItem
|
scrolledItem
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showMediaEditDialog (realm, index, type) {
|
export default function showMediaEditDialog (realm, index, type) {
|
||||||
return showDialog(MediaFocalPointDialog, {
|
return showDialog(MediaFocalPointDialog, {
|
||||||
label: 'Edit media',
|
label: 'intl.editMedia',
|
||||||
title: 'Edit media',
|
title: 'intl.editMedia',
|
||||||
realm,
|
realm,
|
||||||
index,
|
index,
|
||||||
type
|
type
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showMuteDialog (account) {
|
export default function showMuteDialog (account) {
|
||||||
return showDialog(MuteDialog, {
|
return showDialog(MuteDialog, {
|
||||||
label: 'Mute dialog',
|
label: 'intl.mute',
|
||||||
account
|
account
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showPostPrivacyDialog (realm) {
|
export default function showPostPrivacyDialog (realm) {
|
||||||
return showDialog(PostPrivacyDialog, {
|
return showDialog(PostPrivacyDialog, {
|
||||||
label: 'Post privacy dialog',
|
label: 'intl.postPrivacy',
|
||||||
title: 'Post privacy',
|
title: 'intl.postPrivacy',
|
||||||
realm: realm
|
realm: realm
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import ReportDialog from '../components/ReportDialog.html'
|
import ReportDialog from '../components/ReportDialog.html'
|
||||||
import { showDialog } from './showDialog'
|
import { showDialog } from './showDialog'
|
||||||
|
import { formatIntl } from '../../../_utils/formatIntl'
|
||||||
|
|
||||||
export default function showReportDialog ({ account, status }) {
|
export default function showReportDialog ({ account, status }) {
|
||||||
|
const label = formatIntl('intl.reportAccount', { account: `@${account.acct}` })
|
||||||
return showDialog(ReportDialog, {
|
return showDialog(ReportDialog, {
|
||||||
label: 'Report dialog',
|
label,
|
||||||
title: `Report @${account.acct}`,
|
title: label,
|
||||||
account,
|
account,
|
||||||
status
|
status
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showShortcutHelpDialog (options) {
|
export default function showShortcutHelpDialog (options) {
|
||||||
return showDialog(ShortcutHelpDialog, Object.assign({
|
return showDialog(ShortcutHelpDialog, Object.assign({
|
||||||
label: 'shortcut help dialog'
|
label: 'intl.shortcutHelp'
|
||||||
}, options))
|
}, options))
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showStatusOptionsDialog (status) {
|
export default function showStatusOptionsDialog (status) {
|
||||||
return showDialog(StatusOptionsDialog, {
|
return showDialog(StatusOptionsDialog, {
|
||||||
label: 'Status options dialog',
|
label: 'intl.statusOptions',
|
||||||
title: '',
|
title: '',
|
||||||
status: status
|
status: status
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { showDialog } from './showDialog'
|
||||||
|
|
||||||
export default function showTextConfirmationDialog (options) {
|
export default function showTextConfirmationDialog (options) {
|
||||||
return showDialog(TextConfirmationDialog, Object.assign({
|
return showDialog(TextConfirmationDialog, Object.assign({
|
||||||
label: 'Confirmation dialog'
|
label: 'intl.confirm'
|
||||||
}, options))
|
}, options))
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ export const composePollAddButton = $('.compose-poll button:last-of-type')
|
||||||
|
|
||||||
export const composeMediaSensitiveCheckbox = $('.compose-media-sensitive input')
|
export const composeMediaSensitiveCheckbox = $('.compose-media-sensitive input')
|
||||||
|
|
||||||
export const postPrivacyDialogButtonUnlisted = $('[aria-label="Post privacy dialog"] li:nth-child(2) button')
|
export const postPrivacyDialogButtonUnlisted = $('[aria-label="Post privacy"] li:nth-child(2) button')
|
||||||
|
|
||||||
export const accountProfileFilterStatuses = $('.account-profile-filters li:nth-child(1)')
|
export const accountProfileFilterStatuses = $('.account-profile-filters li:nth-child(1)')
|
||||||
export const accountProfileFilterStatusesAndReplies = $('.account-profile-filters li:nth-child(2)')
|
export const accountProfileFilterStatusesAndReplies = $('.account-profile-filters li:nth-child(2)')
|
||||||
|
|
Loading…
Reference in a new issue