refactor: i18n "View in LibreScore"
This commit is contained in:
parent
60d842bac7
commit
8945a53896
5 changed files with 12 additions and 2 deletions
|
@ -114,7 +114,7 @@ void (async () => {
|
|||
}
|
||||
if (librescoreLink) {
|
||||
try {
|
||||
spinner.info(`View in LibreScore: ${await librescoreLink}`)
|
||||
spinner.info(`${i18n('VIEW_IN_LIBRESCORE')()}: ${await librescoreLink}`)
|
||||
} catch { } // it doesn't affect the main feature
|
||||
}
|
||||
spinner.start()
|
||||
|
|
|
@ -27,6 +27,10 @@ export default createLocale({
|
|||
return 'Download individual parts (BETA)' as const
|
||||
},
|
||||
|
||||
'VIEW_IN_LIBRESCORE' () {
|
||||
return 'View in LibreScore' as const
|
||||
},
|
||||
|
||||
'FULL_SCORE' () {
|
||||
return 'Full score' as const
|
||||
},
|
||||
|
|
|
@ -27,6 +27,10 @@ export default createLocale({
|
|||
return 'Descargar partes individuales (BETA)' as const
|
||||
},
|
||||
|
||||
'VIEW_IN_LIBRESCORE' () {
|
||||
return 'Ver en LibreScore' as const
|
||||
},
|
||||
|
||||
'FULL_SCORE' () {
|
||||
return 'Partitura Completa' as const
|
||||
},
|
||||
|
|
|
@ -17,6 +17,8 @@ export interface LOCALE {
|
|||
'IND_PARTS_TOOLTIP' (): string;
|
||||
|
||||
'FULL_SCORE' (): string;
|
||||
|
||||
'VIEW_IN_LIBRESCORE' (): string;
|
||||
}
|
||||
|
||||
const locales = (<L extends { [n: string]: LOCALE } /** type checking */> (l: L) => Object.freeze(l))({
|
||||
|
|
|
@ -133,7 +133,7 @@ const main = (): void => {
|
|||
})
|
||||
|
||||
btnList.add({
|
||||
name: 'View in LibreScore',
|
||||
name: i18n('VIEW_IN_LIBRESCORE')(),
|
||||
action: BtnAction.openUrl(() => getLibreScoreLink(scoreinfo)),
|
||||
tooltip: 'BETA',
|
||||
icon: ICON.LIBRESCORE,
|
||||
|
|
Loading…
Reference in a new issue