krzysz00/cl-gettext — pull request #1 by gugamilare (2012-01-16 21:17:28+00:00)
Title: Fixed ngettext for large numbers and added better support for non-GNU systems

I've made two small changes in this library.

1) The function ngettext would not work for large integers that do not fit unsigned long type. Here is what Gettext manual says about this:

"About larger integer types, such as ‘uintmax_t’ or ‘unsigned long long’: they can be handled by reducing the value to a range that fits in an ‘unsigned long’. Simply casting the value to ‘unsigned long’ would not do the right thing, since it would treat ULONG_MAX + 1 like zero, ULONG_MAX + 2 like singular, and the like. Here you can exploit the fact that all mentioned plural form formulas eventually become periodic, with a period that is a divisor of 100 (or 1000 or 1000000). So, when you reduce a large value to another one in the range [1000000, 1999999] that ends in the same 6 decimal digits, you can assume that it will lead to the same plural form selection."

http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html

2) I created better support for non-GNU systems.

Cheers