]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/run_conf.c
Fix problem of accents with new Win32 code.
[bacula/bacula] / bacula / src / dird / run_conf.c
index a5d354a7e6b547a3890e0fb79e2c964e44e27117..162b4945e5825f6428fab63eab1b75746cdfaa63 100644 (file)
@@ -54,64 +54,64 @@ struct s_keyw {
 
 /* Keywords understood by parser */
 static struct s_keyw keyw[] = {
-  {N_("on"),         s_none,    0},
-  {N_("at"),         s_at,      0},
+  {NT_("on"),         s_none,    0},
+  {NT_("at"),         s_at,      0},
 
-  {N_("sun"),        s_wday,    0},
-  {N_("mon"),        s_wday,    1},
-  {N_("tue"),        s_wday,    2},
-  {N_("wed"),        s_wday,    3},
-  {N_("thu"),        s_wday,    4},
-  {N_("fri"),        s_wday,    5},
-  {N_("sat"),        s_wday,    6},
-  {N_("jan"),        s_month,   0},
-  {N_("feb"),        s_month,   1},
-  {N_("mar"),        s_month,   2},
-  {N_("apr"),        s_month,   3},
-  {N_("may"),        s_month,   4},
-  {N_("jun"),        s_month,   5},
-  {N_("jul"),        s_month,   6},
-  {N_("aug"),        s_month,   7},
-  {N_("sep"),        s_month,   8},
-  {N_("oct"),        s_month,   9},
-  {N_("nov"),        s_month,  10},
-  {N_("dec"),        s_month,  11},
+  {NT_("sun"),        s_wday,    0},
+  {NT_("mon"),        s_wday,    1},
+  {NT_("tue"),        s_wday,    2},
+  {NT_("wed"),        s_wday,    3},
+  {NT_("thu"),        s_wday,    4},
+  {NT_("fri"),        s_wday,    5},
+  {NT_("sat"),        s_wday,    6},
+  {NT_("jan"),        s_month,   0},
+  {NT_("feb"),        s_month,   1},
+  {NT_("mar"),        s_month,   2},
+  {NT_("apr"),        s_month,   3},
+  {NT_("may"),        s_month,   4},
+  {NT_("jun"),        s_month,   5},
+  {NT_("jul"),        s_month,   6},
+  {NT_("aug"),        s_month,   7},
+  {NT_("sep"),        s_month,   8},
+  {NT_("oct"),        s_month,   9},
+  {NT_("nov"),        s_month,  10},
+  {NT_("dec"),        s_month,  11},
 
-  {N_("sunday"),     s_wday,    0},
-  {N_("monday"),     s_wday,    1},
-  {N_("tuesday"),    s_wday,    2},
-  {N_("wednesday"),  s_wday,    3},
-  {N_("thursday"),   s_wday,    4},
-  {N_("friday"),     s_wday,    5},
-  {N_("saturday"),   s_wday,    6},
-  {N_("january"),    s_month,   0},
-  {N_("february"),   s_month,   1},
-  {N_("march"),      s_month,   2},
-  {N_("april"),      s_month,   3},
-  {N_("june"),       s_month,   5},
-  {N_("july"),       s_month,   6},
-  {N_("august"),     s_month,   7},
-  {N_("september"),  s_month,   8},
-  {N_("october"),    s_month,   9},
-  {N_("november"),   s_month,  10},
-  {N_("december"),   s_month,  11},
+  {NT_("sunday"),     s_wday,    0},
+  {NT_("monday"),     s_wday,    1},
+  {NT_("tuesday"),    s_wday,    2},
+  {NT_("wednesday"),  s_wday,    3},
+  {NT_("thursday"),   s_wday,    4},
+  {NT_("friday"),     s_wday,    5},
+  {NT_("saturday"),   s_wday,    6},
+  {NT_("january"),    s_month,   0},
+  {NT_("february"),   s_month,   1},
+  {NT_("march"),      s_month,   2},
+  {NT_("april"),      s_month,   3},
+  {NT_("june"),       s_month,   5},
+  {NT_("july"),       s_month,   6},
+  {NT_("august"),     s_month,   7},
+  {NT_("september"),  s_month,   8},
+  {NT_("october"),    s_month,   9},
+  {NT_("november"),   s_month,  10},
+  {NT_("december"),   s_month,  11},
 
-  {N_("daily"),      s_daily,   0},
-  {N_("weekly"),     s_weekly,  0},
-  {N_("monthly"),    s_monthly, 0},
-  {N_("hourly"),     s_hourly,  0},
+  {NT_("daily"),      s_daily,   0},
+  {NT_("weekly"),     s_weekly,  0},
+  {NT_("monthly"),    s_monthly, 0},
+  {NT_("hourly"),     s_hourly,  0},
 
-  {N_("1st"),        s_wom,     0},
-  {N_("2nd"),        s_wom,     1},
-  {N_("3rd"),        s_wom,     2},
-  {N_("4th"),        s_wom,     3},
-  {N_("5th"),        s_wom,     4},
+  {NT_("1st"),        s_wom,     0},
+  {NT_("2nd"),        s_wom,     1},
+  {NT_("3rd"),        s_wom,     2},
+  {NT_("4th"),        s_wom,     3},
+  {NT_("5th"),        s_wom,     4},
 
-  {N_("first"),      s_wom,     0},
-  {N_("second"),     s_wom,     1},
-  {N_("third"),      s_wom,     2},
-  {N_("fourth"),     s_wom,     3},
-  {N_("fifth"),      s_wom,     4},
+  {NT_("first"),      s_wom,     0},
+  {NT_("second"),     s_wom,     1},
+  {NT_("third"),      s_wom,     2},
+  {NT_("fourth"),     s_wom,     3},
+  {NT_("fifth"),      s_wom,     4},
   {NULL,         s_none,    0}
 };
 
@@ -185,7 +185,7 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
          if (strcasecmp(lc->str, RunFields[i].name) == 0) {
             found = true;
             if (lex_get_token(lc, T_ALL) != T_EQUALS) {
-               scan_err1(lc, "Expected an equals, got: %s", lc->str);
+               scan_err1(lc, _("Expected an equals, got: %s"), lc->str);
                /* NOT REACHED */
             }
             switch (RunFields[i].token) {
@@ -242,7 +242,7 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
                if (pass == 2) {
                   res = GetResWithName(R_POOL, lc->str);
                   if (res == NULL) {
-                     scan_err1(lc, "Could not find specified Pool Resource: %s",
+                     scan_err1(lc, _("Could not find specified Pool Resource: %s"),
                                 lc->str);
                      /* NOT REACHED */
                   }
@@ -267,7 +267,7 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
                if (pass == 2) {
                   res = GetResWithName(R_STORAGE, lc->str);
                   if (res == NULL) {
-                     scan_err1(lc, "Could not find specified Storage Resource: %s",
+                     scan_err1(lc, _("Could not find specified Storage Resource: %s"),
                                 lc->str);
                      /* NOT REACHED */
                   }
@@ -279,7 +279,7 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
                if (pass == 2) {
                   res = GetResWithName(R_MSGS, lc->str);
                   if (res == NULL) {
-                     scan_err1(lc, "Could not find specified Messages Resource: %s",
+                     scan_err1(lc, _("Could not find specified Messages Resource: %s"),
                                 lc->str);
                      /* NOT REACHED */
                   }
@@ -287,7 +287,7 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
                }
                break;
             default:
-               scan_err1(lc, "Expected a keyword name, got: %s", lc->str);
+               scan_err1(lc, _("Expected a keyword name, got: %s"), lc->str);
                /* NOT REACHED */
                break;
             } /* end switch */
@@ -297,12 +297,14 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
       /* At this point, it is not a keyword. Check for old syle
        * Job Levels without keyword. This form is depreciated!!!
        */
-      for (j=0; joblevels[j].level_name; j++) {
-         if (strcasecmp(lc->str, joblevels[j].level_name) == 0) {
-            lrun.level = joblevels[j].level;
-            lrun.job_type = joblevels[j].job_type;
-            found = true;
-            break;
+      if (!found) {
+         for (j=0; joblevels[j].level_name; j++) {
+            if (strcasecmp(lc->str, joblevels[j].level_name) == 0) {
+               lrun.level = joblevels[j].level;
+               lrun.job_type = joblevels[j].job_type;
+               found = true;
+               break;
+            }
          }
       }
    } /* end for found */