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 positional arguments in all translatable fmt strings #9253

Merged
merged 1 commit into from Nov 17, 2020

Conversation

JosJuice
Copy link
Member

We want to use positional arguments in translatable strings that have more than one argument so that translators can change the order of them, but the question is: Should we also use positional arguments in translatable strings with only one argument? I think it makes most sense that way, partially so that translators don't even have to be aware of the non-positional syntax and partially because "translatable strings use positional arguments" is an easier rule for us to remember than "transitional strings which have more than one argument use positional arguments". But let me know if you have a different opinion.

We want to use positional arguments in translatable strings
that have more than one argument so that translators can change
the order of them, but the question is: Should we also use
positional arguments in translatable strings with only one
argument? I think it makes most sense that way, partially
so that translators don't even have to be aware of the
non-positional syntax and partially because "translatable
strings use positional arguments" is an easier rule for us
to remember than "transitional strings which have more than
one argument use positional arguments". But let me know if
you have a different opinion.
@BhaaLseN
Copy link
Member

Coming mostly from a C# background, I only know the positional variant; and as such would be in favor of using it in general (at least for translatable strings). At least from my experience there, translators are more likely to understand what it means if a string contains {0}, {1} etc. rather than just a bunch of {} with no apparent content.
For other stuff, I have no real preference; the thing that gets me more than the absence of position is the way certain format specifiers work (mainly the combination of the alternate form specifier with a total width, which includes the specifier in it).

@leoetlino leoetlino merged commit 07be82d into dolphin-emu:master Nov 17, 2020
10 checks passed
@JosJuice JosJuice deleted the positional-arguments branch November 17, 2020 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants