Code

colors: simplify i18n strings
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 20 Mar 2017 20:00:58 +0000 (21:00 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Mon, 20 Mar 2017 20:00:58 +0000 (21:00 +0100)
src/colors.c

index 0c79e13d57d56e72b616cde344032e13efe29b9a..2c1a2d04922571224e11bf3d7cff1f762b16b365 100644 (file)
@@ -152,7 +152,8 @@ colors_str2color(const char *str)
                        if (cur != endptr && endptr[0] == '\0') {
                                color |= tmp;
                        } else {
-                               fprintf(stderr,_("Warning: Unknown color - %s\n"), str);
+                               fprintf(stderr, "%s: %s\n",
+                                       _("Unknown color"), str);
                                return COLOR_ERROR;
                        }
                }
@@ -191,7 +192,8 @@ colors_assign(const char *name, const char *value)
        color_entry_t *entry = colors_lookup_by_name(name);
 
        if (!entry) {
-               fprintf(stderr,_("Warning: Unknown color field - %s\n"), name);
+               fprintf(stderr, "%s: %s",
+                       _("Unknown color field"), name);
                return -1;
        }