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

Check valid positional substitution in internationalization strings #2

Open
eharris opened this issue Oct 9, 2019 · 0 comments
Open

Comments

@eharris
Copy link

eharris commented Oct 9, 2019

The simplest version of this might just check for matched braces for positional substitutions ({0}) in all the internationalization files, so for any { make sure it is followed by integer followed by close brace, and for any } verify it is proceeded by open brace plus integer.

An even better check would be that the number of used positional substitutions matches the number provided when they are used, but that is probably too complicated to be worth it.

This was recently discovered as a long standing problem in airsonic/airsonic#1298

@eharris eharris changed the title Create check for valid variable substitution in internationalization strings Check valid positional substitution in internationalization strings Oct 9, 2019
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