-
Notifications
You must be signed in to change notification settings - Fork 50
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
Don't mark formated strings as c-format #57
Comments
I am not sure. Are you using a particular tool that enforces this? Except for this difference, it is basically c-format, right? If so, by removing the tag, are we losing tooling support that is enabled the the format being recognized? I guess I see this as a tooling question, if that makes sense. |
msgfmt --check which is "the tool" to deal with .po files. Yes by removing the c-format marker the format is not being recognized anymore as c-format, which is a good thing since "android strings" are not really c-format |
I'm not familiar with the details of c-format strings; I think I chose to add With tooling I mean validation that might happen in translation UIs, for example. In other words, I am wondering (and I haven't used this tool or gettext in a long time, so I might be ways off):
Is this wrong? I am certainly open to changing this, since |
I agree with you that trying to keep c-format if the string is c-format compatible may be a good idea. The problem though is that a string being being c-format compatible means
Which i'm not sure how easy is to get right if the string is c-format compatible or not. |
Probably it should be using Edit: the links provided in the gettext manual are long dead, so here is the relevant Java API: In particular:
|
At first I thought poedit et al. just happened to have terrible support for It turns out that Java has two completely different types of format strings: the above mentioned Formatter class which provides printf-like functionality via It is the Coincidentally, However, general platform support for an as-of-yet unreleased version of gettext is probably a long way off. Perhaps moving from |
I think I'd merge a PR that makes it configurable. |
If we have a string like
a2po will create
But the problem is that adding c-format enforces that the translation strings contain both %1 and %2 since printf c-format can't skip strings while android can.
So I think it's better not to include c-format, does that make sense to you?
The text was updated successfully, but these errors were encountered: