missing translation for screen-readers
Massimo Melina committed
Jan 25, 2024 at 15:00 UTC
5e3e2b9de37e64767ebd77ec349fcf792526e99c
3 files changed
+11
-1
frontend/src/dialog.ts
+3
-1
@@ -2,13 +2,15 @@
2
3
import { createElement as h, ReactElement, ReactNode, useEffect, useRef, useState, KeyboardEvent } from 'react'
4
import './dialog.css'
5
-import { newDialog, closeDialog, DialogOptions } from '@hfs/shared/dialogs'
5
+import { newDialog, closeDialog, DialogOptions, dialogsDefaults } from '@hfs/shared/dialogs'
6
import _ from 'lodash'
7
import { useInterval } from 'usehooks-ts'
8
import { t } from './i18n'
9
import { err2msg, isCtrlKey, pendingPromise } from './misc'
10
export * from '@hfs/shared/dialogs'
11
12
+_.merge(dialogsDefaults, { closableProps: { 'aria-label': t`Close` } })
13
+
14
interface PromptOptions extends Partial<DialogOptions> { def?:string, type?:string, trim?: boolean, helperText?: ReactNode }
15
export async function promptDialog(msg: string, { def, type, helperText, trim=true, ...rest }:PromptOptions={}) : Promise<string | null> {
16
const textarea = type === 'textarea' && type
src/langs/hfs-lang-en.json
+4
@@ -150,6 +150,10 @@
150
"Paste": "Paste",
151
"clipboard_list": "Items in clipboard:",
152
153
+ "Close": "Close",
154
+ "Folder": "Folder",
155
+ "Web page": "Web page",
156
+ "Link": "Link",
157
"Auto-play": "Auto-play",
158
"autoplay_seconds": "Seconds to wait on images",
159
"Select file": "Select file",
src/langs/hfs-lang-it.json
+4
@@ -142,6 +142,10 @@
142
"Paste": "Incolla",
143
"clipboard_list": "Elementi negli appunti",
144
145
+ "Close": "Chiudi",
146
+ "Folder": "Cartella",
147
+ "Web page": "Pagina web",
148
+ "Link": "Link",
149
"Auto-play": "Auto-play",
150
"autoplay_seconds": "Secondi di attesa mostrando immagini",
151
"Select file": "Seleziona file",