Changeset 59156
- Timestamp:
- Mar 1, 2014, 9:55:31 AM (10 years ago)
- Location:
- grass/trunk
- Files:
-
- 3 edited
-
include/defs/glocale.h (modified) (1 diff)
-
include/glocale.h (modified) (1 diff)
-
lib/gis/locale.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
grass/trunk/include/defs/glocale.h
r57238 r59156 4 4 extern void G_init_locale(void); 5 5 extern char *G_gettext(const char *, const char *) __attribute__((format_arg (2))); 6 extern char *G_ngettext(const char *, const char *, const char *, unsigned long int) __attribute__((format_arg (2), format_arg (3))); 6 7 7 8 #endif -
grass/trunk/include/glocale.h
r49183 r59156 9 9 #include <libintl.h> 10 10 #define _(str) G_gettext(PACKAGE,(str)) 11 #define _n(strs,strp,num) G_ngettext(PACKAGE,(strs),(strp),num) 11 12 #else 12 13 #define _(str) (str) -
grass/trunk/lib/gis/locale.c
r34695 r59156 71 71 #endif 72 72 } 73 74 /** 75 * \brief Gets localized text with correct plural forms. 76 * 77 * \param[in] package 78 * \param[in] msgids A singular version of string 79 * \param[in] msgidp A plural version of string 80 * \param[in] n The number 81 * \retval char * Pointer to string 82 */ 83 84 char *G_ngettext(const char *package, const char *msgids, const char *msgidp, unsigned long int n) 85 { 86 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 87 G_init_locale(); 88 89 return dngettext(package, msgids, msgidp, n); 90 #else 91 return n == 1 ? (char *)msgids : (char *)msgidp; 92 #endif 93 }
Note:
See TracChangeset
for help on using the changeset viewer.
