[i18n] Incorrect usage of translation function
Open
@hweihwang is already working on this.
Since Sep 8, 2026.
bug
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
The file MardownSourceComparison.vue contains an incorrect usage of the t() function for loading translated UI strings. Therefore, it is not possible to translate the strings that are supposed to be displayed to users.
- Go to https://github.com/nextcloud/text/blob/8e8d470dc70b11effe841f28d4d0a72e4591739b/src/components/MarkdownSourceComparison.vue#L227
- Because of the inline logic in the second parameter of the
t()function, the stringsRemoved line {line}andAdded line {line}are not detected and offered for translation in Transifex.
The code should roughly look like this, instead:
return h('div', {
class: ['text-source-comparison__line', operation && `text-source-comparison__line--${operation}`],
hidden: rowProps.layoutMode === 'single' && rowProps.activeSide !== side,
'aria-label': operation && operation === 'removed' ? t('text', 'Removed line {line}', { line: value!.number }) : t('text', 'Added line {line}', { line: value!.number }),
'data-source-operation': operation,
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.