25 apr 2014 kl. 18.53 skrev Julian Foad:

1. Use PRIu64 etc. from <inttypes.h>.

Good, if you can get it all to work on Windows.

2. Use a helper function to format an integer as a string; insert the result with "%s".

Probably the most practical solution for the time being.

3. Double-formatting, using "...%%%s..." to insert the correct format specifier.

In addition to the problems you mentioned with this approach, it yields unnecessarily messy strings for the translators to deal with, and possibly misunderstand.

4. Modify 'gettext' to expand or recognize these macros.
5. Pre-process the source to expand these macros.

Sounds fragile, and again, it needs to be verified on Windows.

+    -e 's/APR_SSIZE_T_FMT/"ld"/g' \
+    -e 's/APR_SIZE_T_FMT/"lu"/g' \
+    -e 's/APR_OFF_T_FMT/"ld"/g' \

Surely these must be wrong on IL32P64 platforms? (Why not use z?)

+# For each file name on standard input, process the file's content into a
+# new file and write the new file's name on standard output.

Perhaps I have misunderstood your patch entirely, but will that really produce the right file names in the resulting .pot file?

Reply via email to