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

l10n: Variables cannot be reordered #118

Closed
rakekniven opened this issue Feb 20, 2023 · 2 comments
Closed

l10n: Variables cannot be reordered #118

rakekniven opened this issue Feb 20, 2023 · 2 comments

Comments

@rakekniven
Copy link
Member

Comment from translator:
Reordering of variables does not work, if I write e.g. %2$s, it says %s is not present in the translation, so I can't save it.

print_unescaped($l->t('These images are provided %s by %s.', $links));

print_unescaped($l->t('These images are provided %s by %s.', $links));

Another translator requested reordering as well.

@newhinton
Copy link
Contributor

What exactly is the issue? Do i need to specify the order of the variables and split the array into two parameters? Will that fix the translation-issue?

@rakekniven
Copy link
Member Author

You have to avoid multiple %s in one sentence. Use numbered placeholders like %1 and %2 and so on.

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