--- powertop-2.5/src/lib.h +++ powertop-2.5-nls/src/lib.h @@ -33,7 +33,11 @@ #include "config.h" #endif +#ifdef ENABLE_NLS #define _(STRING) gettext(STRING) +#else +#define _(STRING) (STRING) +#endif #define POWERTOP_VERSION "v"PACKAGE_VERSION #define POWERTOP_SHORT_VERSION PACKAGE_VERSION --- powertop-2.5/src/main.cpp +++ powertop-2.5-nls/src/main.cpp @@ -369,8 +369,10 @@ int main(int argc, char **argv) set_new_handler(out_of_memory); setlocale (LC_ALL, ""); +#ifdef ENABLE_NLS bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); +#endif while (1) { /* parse commandline options */ c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options, &option_index); --- powertop-2.5/src/report/report-maker.h +++ powertop-2.5-nls/src/report/report-maker.h @@ -75,8 +75,13 @@ #include /* Conditional gettext. We need original strings for CSV. */ +#ifdef ENABLE_NLS #define __(STRING) \ ((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING)) +#else +#define __(STRING) (STRING) +#endif + #ifndef UNUSED #define UNUSED __attribute__((unused))