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

i18n: Should strings between square brackets being translated? #1085

Closed
rakekniven opened this issue Jun 15, 2020 · 4 comments
Closed

i18n: Should strings between square brackets being translated? #1085

rakekniven opened this issue Jun 15, 2020 · 4 comments
Milestone

Comments

@rakekniven
Copy link
Member

lastDay: this.$t('tasks', '[Completed yesterday at] LT'),

Should we translate the strings? If no they are placeholders and being replaced?

@raimund-schluessler
Copy link
Member

These are strings for moment.js. moment.js uses brackets to escape strings: https://momentjs.com/docs/#/displaying/format/. So yes, strings in square brackets need to be translated, the LT is a token for moment.js and will be replaced with a time.

I guess we should put a note how to translate it similar to here:

// TRANSLATORS This is a string for moment.js. The square brackets escape the string from moment.js. Please translate the string and keep the brackets.

@raimund-schluessler raimund-schluessler added this to the 0.13.2 milestone Jun 15, 2020
@rakekniven
Copy link
Member Author

Unfortunately that doesn't help because the vue files are getting "compressed" and we loose your comments. See

2020-06-16_15h28_57

@rakekniven
Copy link
Member Author

@raimund-schluessler
Copy link
Member

Unfortunately that doesn't help because the vue files are getting "compressed" and we loose your comments.

Any other ideas? I don't see anything we can do besides putting a comment there.

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

No branches or pull requests

2 participants