genstrings drops field specifiers
| Originator: | CocoaNative | ||
| Number: | rdar://11768872 | Date Originated: | 2012/06/28 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 2011-10-12 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
genstring drops format specifiers ("02" (zero-two) as in "%02lu") from my translatable string. The "02" is important in this situation so a time of day will appear as "11:05" rather than "11:5".
Steps to Reproduce:
run genstring on a file containing the following:
NSLocalizedString(@"Game time %lu/%lu %02lu:%02lu will next occur %@.", @"Future date+time result message - dialog message")
Expected Results:
a translatable string of:
"Game time %1$lu/%2$lu %3$02lu:%4$02lu will next occur %5$@."
Actual Results:
a translatable string missing "02" in 2 places:
"Game time %1$lu/%2$lu %3$lu:%4$lu will next occur %5$@."
Regression:
I tried it on a simpler file (containing only the line in "steps to reproduce" above). Genstrings produced the same erroneous results.
Notes:
Genstring doesn't seem to output (or contain) version info. The one on my system is:
-rwxr-xr-x 1 root wheel 84848 Oct 12 2011 /usr/bin/genstrings
and has a signature (md5) of:
fa463fe0b31667b49a757009d4db031a /usr/bin/genstrings
May I suggest that adding version info to gesturing may be helpful for future troubleshooting? (e.g. in genstring's help text (when run with no parameters or options), or via a command line parameter such as "-version")
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!