Skip to content

Commit a2a609b

Browse files
fix(validation): rename interpolation variable to signerName for translators
Using a generic {name} placeholder gives translators no context about what the variable represents. Rename it to {signerName} so it is immediately clear that the value is the signer's display name, email, or "Unknown" if no identification is available. Also improve the TRANSLATORS comments to reference {signerName}. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 42b7244 commit a2a609b

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/components/validation/SignerDetails.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</template>
3232
<template #extra-actions>
3333
<NcButton v-if="signer.signed" variant="tertiary"
34-
:aria-label="isOpen ? t('libresign', 'Collapse details') : t('libresign', 'Expand details')"
34+
:aria-label="toggleDetailsAriaLabel"
3535
@click.stop="toggleOpen">
3636
<template #icon>
3737
<NcIconSvgWrapper v-if="isOpen"
@@ -296,6 +296,21 @@ export default {
296296
n,
297297
}
298298
},
299+
computed: {
300+
toggleDetailsAriaLabel() {
301+
const signerName = this.getName(this.signer)
302+
if (this.isOpen) {
303+
// TRANSLATORS Accessible label for the button that collapses the signature details of
304+
// a specific signer in the document validation page. {signerName} is the signer's
305+
// display name, email, or "Unknown" when no identification is available.
306+
return t('libresign', 'Collapse details of {signerName}', { signerName })
307+
}
308+
// TRANSLATORS Accessible label for the button that expands the signature details of
309+
// a specific signer in the document validation page. {signerName} is the signer's
310+
// display name, email, or "Unknown" when no identification is available.
311+
return t('libresign', 'Expand details of {signerName}', { signerName })
312+
},
313+
},
299314
data() {
300315
return {
301316
isOpen: this.initiallyOpen,

0 commit comments

Comments
 (0)