1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-15 13:30:05 +00:00

feat: replace "publish" with "schedule" in label/aria text

This commit is contained in:
TAKAHASHI Shuuji 2024-03-03 17:32:35 +09:00
parent d2494f0fd5
commit 4b1ceccd85
No known key found for this signature in database
GPG key ID: F15C887632129F5E
2 changed files with 30 additions and 2 deletions

View file

@ -300,6 +300,28 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
</li> </li>
</ol> </ol>
</CommonErrorMessage> </CommonErrorMessage>
<CommonErrorMessage v-if="failedMessages.length > 0" described-by="publish-failed">
<header id="publish-failed" flex justify-between>
<div flex items-center gap-x-2 font-bold>
<div aria-hidden="true" i-ri:error-warning-fill />
<p>{{ scheduleDateTime ? $t('state.schedule_failed') : $t('state.publish_failed') }}</p>
</div>
<CommonTooltip placement="bottom" :content="scheduleDateTime ? $t('state.clear_schedule_failed') : $t('action.clear_publish_failed')">
<button
flex rounded-4 p1 hover:bg-active cursor-pointer transition-100 :aria-label="scheduleDateTime ? $t('state.clear_schedule_failed') : $t('action.clear_publish_failed')"
@click="failedMessages = []"
>
<span aria-hidden="true" w="1.75em" h="1.75em" i-ri:close-line />
</button>
</CommonTooltip>
</header>
<ol ps-2 sm:ps-1>
<li v-for="(error, i) in failedMessages" :key="i" flex="~ col sm:row" gap-y-1 sm:gap-x-2>
<strong>{{ i + 1 }}.</strong>
<span>{{ error }}</span>
</li>
</ol>
</CommonErrorMessage>
<div relative flex-1 flex flex-col :class="shouldExpanded ? 'min-h-30' : ''"> <div relative flex-1 flex flex-col :class="shouldExpanded ? 'min-h-30' : ''">
<EditorContent <EditorContent
@ -519,7 +541,7 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
<CommonTooltip <CommonTooltip
v-if="failedMessages.length > 0" id="publish-failed-tooltip" placement="top" v-if="failedMessages.length > 0" id="publish-failed-tooltip" placement="top"
:content="$t('tooltip.publish_failed')" :content="scheduleDateTime ? $t('state.schedule_failed') : $t('tooltip.publish_failed')"
> >
<button <button
btn-danger rounded-3 text-sm w-full flex="~ gap1" items-center md:w-fit btn-danger rounded-3 text-sm w-full flex="~ gap1" items-center md:w-fit
@ -528,7 +550,7 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
<span block> <span block>
<div block i-carbon:face-dizzy-filled /> <div block i-carbon:face-dizzy-filled />
</span> </span>
<span>{{ $t('state.publish_failed') }}</span> <span>{{ scheduleDateTime ? $t('state.schedule_failed') : $t('state.publish_failed') }}</span>
</button> </button>
</CommonTooltip> </CommonTooltip>
@ -554,6 +576,7 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
<template v-else> <template v-else>
<span v-if="draft.editingStatus">{{ $t('action.save_changes') }}</span> <span v-if="draft.editingStatus">{{ $t('action.save_changes') }}</span>
<span v-else-if="draft.params.inReplyToId">{{ $t('action.reply') }}</span> <span v-else-if="draft.params.inReplyToId">{{ $t('action.reply') }}</span>
<span v-else-if="scheduleDateTime">{{ !isSending ? $t('action.schedule') : $t('state.scheduling') }}</span>
<span v-else>{{ !isSending ? $t('action.publish') : $t('state.publishing') }}</span> <span v-else>{{ !isSending ? $t('action.publish') : $t('state.publishing') }}</span>
</template> </template>
</button> </button>

View file

@ -61,6 +61,7 @@
"clear": "Clear", "clear": "Clear",
"clear_publish_failed": "Clear publish errors", "clear_publish_failed": "Clear publish errors",
"clear_save_failed": "Clear save errors", "clear_save_failed": "Clear save errors",
"clear_schedule_failed": "Clear schedule errors",
"clear_upload_failed": "Clear file upload errors", "clear_upload_failed": "Clear file upload errors",
"close": "Close", "close": "Close",
"compose": "Compose", "compose": "Compose",
@ -82,6 +83,7 @@
"reset": "Reset", "reset": "Reset",
"save": "Save", "save": "Save",
"save_changes": "Save changes", "save_changes": "Save changes",
"schedule": "Schedule",
"sign_in": "Sign in", "sign_in": "Sign in",
"sign_in_to": "Sign in to {0}", "sign_in_to": "Sign in to {0}",
"switch_account": "Switch account", "switch_account": "Switch account",
@ -612,6 +614,8 @@
"publish_failed": "Publish failed", "publish_failed": "Publish failed",
"publishing": "Publishing", "publishing": "Publishing",
"save_failed": "Save failed", "save_failed": "Save failed",
"schedule_failed": "Schedule failed",
"scheduling": "Scheduling",
"upload_failed": "Upload failed", "upload_failed": "Upload failed",
"uploading": "Uploading..." "uploading": "Uploading..."
}, },
@ -736,6 +740,7 @@
"pick_an_icon": "Pick an icon", "pick_an_icon": "Pick an icon",
"publish_failed": "Close failed messages at the top of editor to republish posts", "publish_failed": "Close failed messages at the top of editor to republish posts",
"remove_thread_item": "Remove item from thread", "remove_thread_item": "Remove item from thread",
"schedule_failed": "Close failed messages at the top of editor to reschedule posts",
"schedule_post": "Schedule post", "schedule_post": "Schedule post",
"start_thread": "Start thread", "start_thread": "Start thread",
"toggle_bold": "Toggle bold", "toggle_bold": "Toggle bold",