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

Use placeholders for language file #55

Open
Andre601 opened this issue Oct 7, 2021 · 0 comments
Open

Use placeholders for language file #55

Andre601 opened this issue Oct 7, 2021 · 0 comments

Comments

@Andre601
Copy link

Andre601 commented Oct 7, 2021

Right now are all messages, which have some sort of changing value in it either split up into a before and after section, or written in such a way, that the value would be at the start or end of the text.

The issue with this is, that especially for translators of the language file, there is lacking context or it's very restrictive on how you can format the text for your language. Not every language can support the syntax the current files use, so a setup with placeholders for (constantly) changing values would help a lot.
It would also reduce the amount of lines in the language file for all those strings that come before and after a value, because you now don't have to use two strings.

Example:

# Currently used setup

## single line with a value before it:
invalidName: 'is not a valid minecraft username'

## multiple lines. This case "Cooldown set to <ticks> ticks for <command?>"
cooldownSetTo: 'Cooldown set to'
ticksFor: 'ticks for'

# New setup
invalidName: '{name} is not a valid minecraft username'

cooldownSet: 'Cooldown set to {ticks} ticks for {command}'

This could help translators a lot in formatting their translation in a proper way that fits their language's speech pattern and similar.

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