mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-18 00:51:47 +03:00
fix(i18n,a11y): fix missing or incorrect translations in aria-label
strings (#2837)
This commit is contained in:
parent
77f0e2c2f8
commit
bd8cfc7b57
9 changed files with 11 additions and 10 deletions
|
@ -56,7 +56,7 @@ async function removeUserNote() {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CommonDropdown :eager-mount="command">
|
<CommonDropdown :eager-mount="command">
|
||||||
<button flex gap-1 items-center w-full rounded op75 hover="op100 text-purple" group aria-label="More actions">
|
<button flex gap-1 items-center w-full rounded op75 hover="op100 text-purple" group :aria-label="t('actions.more')">
|
||||||
<div rounded-5 p2 elk-group-hover="bg-purple/10">
|
<div rounded-5 p2 elk-group-hover="bg-purple/10">
|
||||||
<div i-ri:more-2-fill />
|
<div i-ri:more-2-fill />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@ const vAutoFocus = (el: HTMLElement) => el.focus()
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div my-8 px-3 sm:px-8 md:max-w-200 flex="~ col gap-4" relative>
|
<div my-8 px-3 sm:px-8 md:max-w-200 flex="~ col gap-4" relative>
|
||||||
<button v-auto-focus type="button" btn-action-icon absolute top--8 right-0 m1 aria-label="Close" @click="emit('close')">
|
<button v-auto-focus type="button" btn-action-icon absolute top--8 right-0 m1 :aria-label="$t('action.close')" @click="emit('close')">
|
||||||
<span i-ri:close-line />
|
<span i-ri:close-line />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -39,14 +39,14 @@ onUnmounted(() => locked.value = false)
|
||||||
<template>
|
<template>
|
||||||
<div relative h-full w-full flex pt-12 @click="onClick">
|
<div relative h-full w-full flex pt-12 @click="onClick">
|
||||||
<button
|
<button
|
||||||
v-if="hasNext" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.previous')"
|
v-if="hasNext" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.next')"
|
||||||
hover:bg="black/40" dark:bg="white/30" dark-hover:bg="white/20" absolute top="1/2" right-1 z5
|
hover:bg="black/40" dark:bg="white/30" dark-hover:bg="white/20" absolute top="1/2" right-1 z5
|
||||||
:title="$t('action.next')" @click="next"
|
:title="$t('action.next')" @click="next"
|
||||||
>
|
>
|
||||||
<div i-ri:arrow-right-s-line text-white />
|
<div i-ri:arrow-right-s-line text-white />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="hasPrev" pointer-events-auto btn-action-icon bg="black/20" aria-label="action.next"
|
v-if="hasPrev" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.prev')"
|
||||||
hover:bg="black/40" dark:bg="white/30" dark:hover-bg="white/20" absolute top="1/2" left-1 z5
|
hover:bg="black/40" dark:bg="white/30" dark:hover-bg="white/20" absolute top="1/2" left-1 z5
|
||||||
:title="$t('action.prev')" @click="prev"
|
:title="$t('action.prev')" @click="prev"
|
||||||
>
|
>
|
||||||
|
@ -71,7 +71,7 @@ onUnmounted(() => locked.value = false)
|
||||||
|
|
||||||
<div absolute top-0 w-full flex justify-end>
|
<div absolute top-0 w-full flex justify-end>
|
||||||
<button
|
<button
|
||||||
btn-action-icon bg="black/30" aria-label="action.close" hover:bg="black/40" dark:bg="white/30"
|
btn-action-icon bg="black/30" :aria-label="$t('action.close')" hover:bg="black/40" dark:bg="white/30"
|
||||||
dark:hover-bg="white/20" pointer-events-auto shrink-0 @click="emit('close')"
|
dark:hover-bg="white/20" pointer-events-auto shrink-0 @click="emit('close')"
|
||||||
>
|
>
|
||||||
<div i-ri:close-line text-white />
|
<div i-ri:close-line text-white />
|
||||||
|
|
|
@ -10,7 +10,7 @@ defineModel<boolean>()
|
||||||
<button
|
<button
|
||||||
flex items-center place-content-center h-full flex-1 class="select-none"
|
flex items-center place-content-center h-full flex-1 class="select-none"
|
||||||
:class="show ? '!text-primary' : ''"
|
:class="show ? '!text-primary' : ''"
|
||||||
aria-label="More menu"
|
:aria-label="$t('nav.more_menu')"
|
||||||
@click="toggleVisible"
|
@click="toggleVisible"
|
||||||
>
|
>
|
||||||
<span :class="show ? 'i-ri:close-fill' : 'i-ri:more-fill'" />
|
<span :class="show ? 'i-ri:close-fill' : 'i-ri:more-fill'" />
|
||||||
|
|
|
@ -97,7 +97,7 @@ function resetModal() {
|
||||||
<b text-primary>@{{ account.acct }}</b>
|
<b text-primary>@{{ account.acct }}</b>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</h2>
|
</h2>
|
||||||
<button ref="dismissButton" btn-action-icon absolute top--8 right-0 m1 aria-label="Close" @click="emit('close')">
|
<button ref="dismissButton" btn-action-icon absolute top--8 right-0 m1 :aria-label="$t('action.close')" @click="emit('close')">
|
||||||
<div i-ri:close-line />
|
<div i-ri:close-line />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ watch(shouldLoadAttachment, () => {
|
||||||
rounded-lg
|
rounded-lg
|
||||||
h-full
|
h-full
|
||||||
w-full
|
w-full
|
||||||
aria-label="Open image preview dialog"
|
:aria-label="$t('action.open_image_preview_dialog')"
|
||||||
relative
|
relative
|
||||||
@click="!shouldLoadAttachment ? loadAttachment() : openMediaPreview(attachments ? attachments : [attachment], attachments?.indexOf(attachment) || 0)"
|
@click="!shouldLoadAttachment ? loadAttachment() : openMediaPreview(attachments ? attachments : [attachment], attachments?.indexOf(attachment) || 0)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -20,7 +20,7 @@ function clickUser(user: UserLogin) {
|
||||||
<button
|
<button
|
||||||
flex rounded
|
flex rounded
|
||||||
cursor-pointer
|
cursor-pointer
|
||||||
aria-label="Switch user"
|
:aria-label="$t('action.switch_account')"
|
||||||
:class="user.account.acct === currentUser?.account.acct ? '' : 'op25 grayscale'"
|
:class="user.account.acct === currentUser?.account.acct ? '' : 'op25 grayscale'"
|
||||||
hover="filter-none op100"
|
hover="filter-none op100"
|
||||||
@click="clickUser(user)"
|
@click="clickUser(user)"
|
||||||
|
|
|
@ -36,7 +36,7 @@ function processSignIn() {
|
||||||
<button
|
<button
|
||||||
flex rounded px4 py3 text-left
|
flex rounded px4 py3 text-left
|
||||||
hover:bg-active cursor-pointer transition-100
|
hover:bg-active cursor-pointer transition-100
|
||||||
aria-label="Switch user"
|
:aria-label="$t('action.switch_account')"
|
||||||
@click="clickUser(user)"
|
@click="clickUser(user)"
|
||||||
>
|
>
|
||||||
<AccountInfo :account="user.account" :hover-card="false" square />
|
<AccountInfo :account="user.account" :hover-card="false" square />
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
"favourited": "Favorited",
|
"favourited": "Favorited",
|
||||||
"more": "More",
|
"more": "More",
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
|
"open_image_preview_dialog": "Open image preview dialog",
|
||||||
"prev": "Prev",
|
"prev": "Prev",
|
||||||
"publish": "Publish",
|
"publish": "Publish",
|
||||||
"publish_thread": "Publish thread",
|
"publish_thread": "Publish thread",
|
||||||
|
|
Loading…
Reference in a new issue