Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix label for "remove cut" buttons #692

Merged

Conversation

LukasKalbertodt
Copy link
Member

I am not sure what the initial intention was here, but I guess we don't
really need different labels for the two different buttons. Helps
keeping the translation strings to a minimum. Before this commit, the
"remove end" button did not have any translation and showed the
translation key.

Copy link
Member

@JulianKniephoff JulianKniephoff left a comment

Choose a reason for hiding this comment

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

review-remove-${marker}-end was probably a typo and was supposed to be just review-remove-${marker}, and the intention was to be able to translate the two labels independently, which I still think is the right thing to do, although I wouldn't mind unifying them, either, in a simple case like this.

However, if this is only about saving translations, may I direct your attention to i18next's "nesting" feature. With that, you could have

  "review-remove-start": "Remove",
  "review-remove-end": "$t(review-remove-start)",

in the English translation, and then only have to translate review-remove-start in all the languages where the two strings are supposed to be the same, because English is the fallback (presumably?) and nesting is evaluated dynamically.

Another possibility would be to pass the marker as so called context, and then translations could either say

  "review-remove": "Remove",

to unify or

  "review-remove_start": "Remove start",
  "review-remove_end": "Remove end",

to distinguish.

I am not sure what the initial intention was here, but I guess we don't
really need different labels for the two different buttons. Helps
keeping the translation strings to a minimum. Before this commit, the
"remove end" button did not have any translation and showed the
translation key.
@LukasKalbertodt
Copy link
Member Author

Went with using contexts now.

@LukasKalbertodt LukasKalbertodt merged commit 9d25086 into elan-ev:master Aug 25, 2020
@LukasKalbertodt LukasKalbertodt deleted the fix-review-remove-cut-label branch August 25, 2020 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants