]> err.no Git - util-linux/commitdiff
login-utils: several strings without gettext calls
authorPedro Ribeiro <p.m42.ribeiro@gmail.com>
Fri, 3 Oct 2008 07:13:20 +0000 (09:13 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 3 Oct 2008 07:13:20 +0000 (09:13 +0200)
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/agetty.c
login-utils/checktty.c
login-utils/chfn.c
login-utils/simpleinit.c

index 02de349b67cee0d8c42486000deb1da9fcbc3773..10162273a64d09f846a8350971f1a077a81a0751 100644 (file)
@@ -891,11 +891,13 @@ do_prompt(op, tp)
                  case 'd':
                  case 't':
                    {
-                     char *weekday[] = { "Sun", "Mon", "Tue", "Wed", "Thu",
-                                         "Fri", "Sat" };
-                     char *month[] = { "Jan", "Feb", "Mar", "Apr", "May",
-                                       "Jun", "Jul", "Aug", "Sep", "Oct",
-                                       "Nov", "Dec" };
+                     char *weekday[] = { N_("Sun"), N_("Mon"), N_("Tue"),
+                                         N_("Wed"), N_("Thu"), N_("Fri"),
+                                         N_("Sat") };
+                     char *month[] = { N_("Jan"), N_("Feb"), N_("Mar"),
+                                       N_("Apr"), N_("May"), N_("Jun"),
+                                       N_("Jul"), N_("Aug"), N_("Sep"),
+                                       N_("Oct"), N_("Nov"), N_("Dec") };
                      time_t now;
                      struct tm *tm;
 
index c28ee833da1010f0baf0551171afe94605240cf3..b79f7bd68098f499401ffadcb358094e840cbfaf 100644 (file)
@@ -316,7 +316,7 @@ main(int argc, char **argv)
 
        for (item = alist; item->range; item++) {
 
-               printf("hnmatch() on %-30s <-- %-15s: ", item->range, item->ip);
+               printf(_("hnmatch() on %-30s <-- %-15s: "), item->range, item->ip);
 
                if (getaddrinfo(item->ip, NULL, &hints, &info)==0 && info) {
                        if (info->ai_family == AF_INET) {
@@ -334,17 +334,18 @@ main(int argc, char **argv)
                        hostfamily = info->ai_family;
                        freeaddrinfo(info);
                        printf("%s\n", hnmatch("dummy", item->range) ?
-                                               "match" : "mismatch");
+                                               _("match") : _("mismatch"));
                }
                else
-                       printf("getaddrinfo() failed\n");
+                       printf(_("getaddrinfo() failed\n"));
 
        }
        return 0;
 }
 #endif /* MAIN_TEST_CHECKTTY */
 
-static char *wdays[] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" };
+static char *wdays[] = { N_("sun"), N_("mon"), N_("tue"), N_("wed"),
+                        N_("thu"), N_("fri"), N_("sat") };
 
 /* example timespecs:
 
index 3ca190f107d18cb810a9819fd6eba464c67066e7..bab3939c84698a2fff4de46a543cd3a51873c81b 100644 (file)
@@ -374,10 +374,10 @@ static void ask_info (oldfp, newfp)
     struct finfo *oldfp;
     struct finfo *newfp;
 {
-    newfp->full_name = prompt ("Name", oldfp->full_name);
-    newfp->office = prompt ("Office", oldfp->office);
-    newfp->office_phone        = prompt ("Office Phone", oldfp->office_phone);
-    newfp->home_phone = prompt ("Home Phone", oldfp->home_phone);
+    newfp->full_name = prompt (_("Name"), oldfp->full_name);
+    newfp->office = prompt (_("Office"), oldfp->office);
+    newfp->office_phone        = prompt (_("Office Phone"), oldfp->office_phone);
+    newfp->home_phone = prompt (_("Home Phone"), oldfp->home_phone);
     printf ("\n");
 }
 
index 739306cf4b66f9308e6d52944c5489fbfec12dca..1e7ba282570d974d8f59e275510f0366f29b8b78 100644 (file)
@@ -337,12 +337,12 @@ static int check_single_ok (void)
 
     for (i = 0; i < MAXTRIES; i++)
     {
-       pass = getpass (_ ("Password: ") );
+       pass = getpass (_("Password: ") );
        if (pass == NULL) continue;
                
        if ( !strcmp (crypt (pass, rootpass), rootpass) ) return 1;
 
-       puts (_ ("\nWrong password.\n") );
+       puts (_("\nWrong password.\n") );
     }
     return 0;
 }
@@ -944,7 +944,7 @@ static void process_command (const struct command_struct *command)
                while (waitpid (pid, &ival, 0) != pid) /*  Nothing  */;
                if ( WIFEXITED (ival) && (WEXITSTATUS (ival) == 0) )
                {
-                   sprintf (txt, "Stopped service: %s\n",
+                   sprintf (txt, _("Stopped service: %s\n"),
                             victim->first_service->name);
                    remove_entry (&available_list, victim);
                    free (victim);