Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

i18n: make duplicate notes suffix translatable #859

Merged

Conversation

pano9000
Copy link
Contributor

Hello,

This PR makes the "(dup)" suffix for duplicated notes translatable.
Previously this was fully hardcoded as " (dup)", now we can translate it, using notes.duplicate-note-suffix.

I've also added support for RTL languages by allowing the translators to decide where the suffix should be placed:
For LTR languages it will be at the "right end" of the string, for RTL languages it will be at the "left end" of the string.
This is using notes.duplicate-note-title.

To keep the same functionality as before for RTL langs (where the suffix is only added once for a note, even if there are several clones), I expanded the res.note.title check to also check for startsWith.
Since majority of languages are LTR, I've kept the "endsWith" check as first check, so that we can make use of short-circuiting.

I did not update the existing translations with these new translation keys though – this way these will still keep the English translation until they get properly translated.

Closes #825

Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@eliandoran eliandoran merged commit 3c37d5d into TriliumNext:develop Dec 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i18n: "Duplicate Subtree" prefix should be translatable
2 participants