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

Mention string templates should not be used as they cannot be localised #147

Open
aral opened this issue Nov 5, 2021 Discussed in #146 · 0 comments
Open

Mention string templates should not be used as they cannot be localised #147

aral opened this issue Nov 5, 2021 Discussed in #146 · 0 comments

Comments

@aral
Copy link
Contributor

aral commented Nov 5, 2021

Discussed in #146

Originally posted by aral November 5, 2021
Reference: https://github.com/elementary/docs/blob/master/writing-apps/code-style.md#string-formatting

It would be good to provide a reason for why string templates are discouraged, given their ergonomic advantages over remembering every % code on the planet.

I haven’t been able to find any information on how translations work/don’t work with string templates but I’m assuming they are complicated at the very least. Is this the reason why they’re discouraged?

I’ve now confirmed that string templates are not picked up/included in .po files.

We should mention this reason in the docs.

aral added a commit to aral/docs-4 that referenced this issue Nov 5, 2021
…be used

Specifically, because they cannot be localised.
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

1 participant