diff --git a/src/ChangeLog b/src/ChangeLog index 4049f66cc..2ab8dc797 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-11-10 Pavel Roskin + + * global.h [!ENABLE_NLS]: Provide replacement for ngettext. + * screen.c (display_mini_info): Cast panel->total to unsigned + long before passing it to ngettext() to avoid warnings. + 2005-11-02 Pavel Roskin * glibcompat.c: Move Q_ back ... diff --git a/src/global.h b/src/global.h index b66b3b3cb..04ba14aca 100644 --- a/src/global.h +++ b/src/global.h @@ -139,6 +139,7 @@ struct timeval { #else /* Stubs that do something close enough. */ # define textdomain(String) # define gettext(String) (String) +# define ngettext(String1,String2,Num) (((Num) == 1) ? (String1) : (String2)) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) diff --git a/src/screen.c b/src/screen.c index 2e0084c46..189639c7f 100644 --- a/src/screen.c +++ b/src/screen.c @@ -685,7 +685,8 @@ display_mini_info (WPanel *panel) * First make "N bytes", then insert it into "X in M files". */ g_snprintf(b_bytes, sizeof (b_bytes), - ngettext("%s byte", "%s bytes", panel->total), + ngettext("%s byte", "%s bytes", + (unsigned long)panel->total), size_trunc_sep(panel->total)); g_snprintf(buffer, sizeof (buffer), ngettext("%s in %d file", "%s in %d files", panel->marked),