Re: String formatting with APR_INT64_T etc. & gettext localization

2014-05-01 Thread Mattias Engdegård
1 maj 2014 kl. 08.13 skrev Dongsheng Song: _("The repository trunk version is %"PRId64".") Will translate to: _("The repository trunk version is %lld.") // ILP32 _("The repository trunk version is %I64d.") // MSVC _("The repository trunk version is %ld.") // LP64 No, gettext recognises stand

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-30 Thread Dongsheng Song
I'm prefer use helper function to translate numbers to strings. Why ? Because without this approach, the same source will became to different translate source on different platforms. e.g. _("The repository trunk version is %"PRId64".") Will translate to: _("The repository trunk version is %lld.")

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-27 Thread Julian Foad
Branko Čibej wrote: >>>+    -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? > > It's wrong on all platforms, unless you also explicitly cast the > values to the declared format t

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-27 Thread Julian Foad
Branko Čibej wrote: >>>+    -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? > > It's wrong on all platforms, unless you also explicitly cast the > values to the declared format t

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-27 Thread Mattias Engdegård
1. Use PRIu64 etc. from . Good, if you can get it all to work on Windows. No problem with a bit of configury magic. See for example . Perhaps – I was mainly thinking about gettext and its runtime. A non- standard build of it may be required then. (I

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-26 Thread Julian Foad
Mattias Engdegård wrote: > 25 apr 2014 kl. 18.53 skrev Julian Foad: > >>  1. Use PRIu64 etc. from . > > Good, if you can get it all to work on Windows. No problem with a bit of configury magic. See for example . >>  2. Use a helper function to format an in

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-25 Thread Branko Čibej
On 25.04.2014 22:31, Mattias Engdegård wrote: > 25 apr 2014 kl. 18.53 skrev Julian Foad: > >> 1. Use PRIu64 etc. from . > > 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

Re: String formatting with APR_INT64_T etc. & gettext localization

2014-04-25 Thread Mattias Engdegård
25 apr 2014 kl. 18.53 skrev Julian Foad: 1. Use PRIu64 etc. from . 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

String formatting with APR_INT64_T etc. & gettext localization

2014-04-25 Thread Julian Foad
Mattias Engdegård mentioned [1] that nobody has run the 'po-update.sh' script in trunk for some time, as it complains about some format strings it can't handle: ../libsvn_fs_fs/index.c:594: ... string ends in the middle of a directive. ../libsvn_fs_fs/index.c:654: ... string ends in the middle o