{"thread":{"id":"39239","subject":"[PATCH] Fixed a translation error","startedAt":"2015-05-04T11:16:04Z","lastAt":"2015-05-04T11:16:04Z","messageCount":1,"participants":["Alangi Derick"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260518","messageId":"5547698d.0350b40a.4b47.ffff8d24@mx.google.com","threadId":"39239","inReplyTo":null,"subject":"[PATCH] Fixed a translation error","fromName":"Alangi Derick","fromEmail":"alangiderick@gmail.com","sentAt":"2015-05-04T11:16:04Z","receivedAt":"2015-05-04T11:16:04Z","isPatch":true,"sender":{"key":"alangiderick@gmail.com","avatar":"https://gravatar.com/avatar/f5878e69e83b4cf7ed499336c4a114dc2cb253253bc57c9b8ffcf0e129320795?d=mp&s=160"},"body":"Signed-off-by: Alangi Derick <alangiderick@gmail.com>\n---\n builtin/config.c | 34 +++++++++++++++++-----------------\n 1 file changed, 17 insertions(+), 17 deletions(-)\n\ndiff --git a/builtin/config.c b/builtin/config.c\nindex d32c532..2b6bf0a 100644\n--- a/builtin/config.c\n+++ b/builtin/config.c\n@@ -85,7 +85,7 @@ static struct option builtin_config_options[] = {\n static void check_argc(int argc, int min, int max) {\n \tif (argc >= min && argc <= max)\n \t\treturn;\n-\terror(\"wrong number of arguments\");\n+\terror(_(\"wrong number of arguments\"));\n \tusage_with_options(builtin_config_usage, builtin_config_options);\n }\n \n@@ -366,10 +366,10 @@ static int get_colorbool(const char *var, int print)\n static void check_write(void)\n {\n \tif (given_config_source.use_stdin)\n-\t\tdie(\"writing to stdin is not supported\");\n+\t\tdie(_(\"writing to stdin is not supported\"));\n \n \tif (given_config_source.blob)\n-\t\tdie(\"writing config blobs is not supported\");\n+\t\tdie(_(\"writing config blobs is not supported\"));\n }\n \n struct urlmatch_current_candidate_value {\n@@ -412,7 +412,7 @@ static int get_urlmatch(const char *var, const char *url)\n \tconfig.cb = &values;\n \n \tif (!url_normalize(url, &config.url))\n-\t\tdie(\"%s\", config.url.err);\n+\t\tdie(_(\"%s\"), config.url.err);\n \n \tconfig.section = xstrdup_tolower(var);\n \tsection_tail = strchr(config.section, '.');\n@@ -477,7 +477,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \n \tif (use_global_config + use_system_config + use_local_config +\n \t    !!given_config_source.file + !!given_config_source.blob > 1) {\n-\t\terror(\"only one config file at a time.\");\n+\t\terror(_(\"only one config file at a time.\"));\n \t\tusage_with_options(builtin_config_usage, builtin_config_options);\n \t}\n \n@@ -500,7 +500,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\t\t * location; error out even if XDG_CONFIG_HOME\n \t\t\t * is set and points at a sane location.\n \t\t\t */\n-\t\t\tdie(\"$HOME not set\");\n+\t\t\tdie(_(\"$HOME not set\"));\n \n \t\tif (access_or_warn(user_config, R_OK, 0) &&\n \t\t    xdg_config && !access_or_warn(xdg_config, R_OK, 0))\n@@ -530,17 +530,17 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (HAS_MULTI_BITS(types)) {\n-\t\terror(\"only one type at a time.\");\n+\t\terror(_(\"only one type at a time.\"));\n \t\tusage_with_options(builtin_config_usage, builtin_config_options);\n \t}\n \n \tif ((actions & (ACTION_GET_COLOR|ACTION_GET_COLORBOOL)) && types) {\n-\t\terror(\"--get-color and variable type are incoherent\");\n+\t\terror(_(\"--get-color and variable type are incoherent\"));\n \t\tusage_with_options(builtin_config_usage, builtin_config_options);\n \t}\n \n \tif (HAS_MULTI_BITS(actions)) {\n-\t\terror(\"only one action at a time.\");\n+\t\terror(_(\"only one action at a time.\"));\n \t\tusage_with_options(builtin_config_usage, builtin_config_options);\n \t}\n \tif (actions == 0)\n@@ -561,7 +561,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\t\t\tdie_errno(\"unable to read config file '%s'\",\n \t\t\t\t\t  given_config_source.file);\n \t\t\telse\n-\t\t\t\tdie(\"error processing config file(s)\");\n+\t\t\t\tdie(_(\"error processing config file(s)\"));\n \t\t}\n \t}\n \telse if (actions == ACTION_EDIT) {\n@@ -569,11 +569,11 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \n \t\tcheck_argc(argc, 0, 0);\n \t\tif (!given_config_source.file && nongit)\n-\t\t\tdie(\"not in a git directory\");\n+\t\t\tdie(_(\"not in a git directory\"));\n \t\tif (given_config_source.use_stdin)\n-\t\t\tdie(\"editing stdin is not supported\");\n+\t\t\tdie(_(\"editing stdin is not supported\"));\n \t\tif (given_config_source.blob)\n-\t\t\tdie(\"editing blobs is not supported\");\n+\t\t\tdie(_(\"editing blobs is not supported\"));\n \t\tgit_config(git_default_config, NULL);\n \t\tconfig_file = xstrdup(given_config_source.file ?\n \t\t\t\t      given_config_source.file : git_path(\"config\"));\n@@ -598,8 +598,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\tvalue = normalize_value(argv[0], argv[1]);\n \t\tret = git_config_set_in_file(given_config_source.file, argv[0], value);\n \t\tif (ret == CONFIG_NOTHING_SET)\n-\t\t\terror(\"cannot overwrite multiple values with a single value\\n\"\n-\t\t\t\"       Use a regexp, --add or --replace-all to change %s.\", argv[0]);\n+\t\t\terror(_(\"cannot overwrite multiple values with a single value\\n\"\n+\t\t\t\"       Use a regexp, --add or --replace-all to change %s.\"), argv[0]);\n \t\treturn ret;\n \t}\n \telse if (actions == ACTION_SET_ALL) {\n@@ -669,7 +669,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\tif (ret < 0)\n \t\t\treturn ret;\n \t\tif (ret == 0)\n-\t\t\tdie(\"No such section!\");\n+\t\t\tdie(_(\"No such section!\"));\n \t}\n \telse if (actions == ACTION_REMOVE_SECTION) {\n \t\tint ret;\n@@ -680,7 +680,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\tif (ret < 0)\n \t\t\treturn ret;\n \t\tif (ret == 0)\n-\t\t\tdie(\"No such section!\");\n+\t\t\tdie(_(\"No such section!\"));\n \t}\n \telse if (actions == ACTION_GET_COLOR) {\n \t\tcheck_argc(argc, 1, 2);\n-- \n2.4.0.5.g7a7787e.dirty\n"}]}