i18n: update-index: mark parseopt strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		
				
					committed by
					
						
						Junio C Hamano
					
				
			
			
				
	
			
			
			
						parent
						
							c88bba18fb
						
					
				
				
					commit
					4a4838b46a
				
			@ -398,7 +398,7 @@ static void read_index_info(int line_termination)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const char * const update_index_usage[] = {
 | 
					static const char * const update_index_usage[] = {
 | 
				
			||||||
	"git update-index [options] [--] [<file>...]",
 | 
						N_("git update-index [options] [--] [<file>...]"),
 | 
				
			||||||
	NULL
 | 
						NULL
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -714,83 +714,83 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
 | 
				
			|||||||
	int parseopt_state = PARSE_OPT_UNKNOWN;
 | 
						int parseopt_state = PARSE_OPT_UNKNOWN;
 | 
				
			||||||
	struct option options[] = {
 | 
						struct option options[] = {
 | 
				
			||||||
		OPT_BIT('q', NULL, &refresh_args.flags,
 | 
							OPT_BIT('q', NULL, &refresh_args.flags,
 | 
				
			||||||
			"continue refresh even when index needs update",
 | 
								N_("continue refresh even when index needs update"),
 | 
				
			||||||
			REFRESH_QUIET),
 | 
								REFRESH_QUIET),
 | 
				
			||||||
		OPT_BIT(0, "ignore-submodules", &refresh_args.flags,
 | 
							OPT_BIT(0, "ignore-submodules", &refresh_args.flags,
 | 
				
			||||||
			"refresh: ignore submodules",
 | 
								N_("refresh: ignore submodules"),
 | 
				
			||||||
			REFRESH_IGNORE_SUBMODULES),
 | 
								REFRESH_IGNORE_SUBMODULES),
 | 
				
			||||||
		OPT_SET_INT(0, "add", &allow_add,
 | 
							OPT_SET_INT(0, "add", &allow_add,
 | 
				
			||||||
			"do not ignore new files", 1),
 | 
								N_("do not ignore new files"), 1),
 | 
				
			||||||
		OPT_SET_INT(0, "replace", &allow_replace,
 | 
							OPT_SET_INT(0, "replace", &allow_replace,
 | 
				
			||||||
			"let files replace directories and vice-versa", 1),
 | 
								N_("let files replace directories and vice-versa"), 1),
 | 
				
			||||||
		OPT_SET_INT(0, "remove", &allow_remove,
 | 
							OPT_SET_INT(0, "remove", &allow_remove,
 | 
				
			||||||
			"notice files missing from worktree", 1),
 | 
								N_("notice files missing from worktree"), 1),
 | 
				
			||||||
		OPT_BIT(0, "unmerged", &refresh_args.flags,
 | 
							OPT_BIT(0, "unmerged", &refresh_args.flags,
 | 
				
			||||||
			"refresh even if index contains unmerged entries",
 | 
								N_("refresh even if index contains unmerged entries"),
 | 
				
			||||||
			REFRESH_UNMERGED),
 | 
								REFRESH_UNMERGED),
 | 
				
			||||||
		{OPTION_CALLBACK, 0, "refresh", &refresh_args, NULL,
 | 
							{OPTION_CALLBACK, 0, "refresh", &refresh_args, NULL,
 | 
				
			||||||
			"refresh stat information",
 | 
								N_("refresh stat information"),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG,
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG,
 | 
				
			||||||
			refresh_callback},
 | 
								refresh_callback},
 | 
				
			||||||
		{OPTION_CALLBACK, 0, "really-refresh", &refresh_args, NULL,
 | 
							{OPTION_CALLBACK, 0, "really-refresh", &refresh_args, NULL,
 | 
				
			||||||
			"like --refresh, but ignore assume-unchanged setting",
 | 
								N_("like --refresh, but ignore assume-unchanged setting"),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG,
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG,
 | 
				
			||||||
			really_refresh_callback},
 | 
								really_refresh_callback},
 | 
				
			||||||
		{OPTION_LOWLEVEL_CALLBACK, 0, "cacheinfo", NULL,
 | 
							{OPTION_LOWLEVEL_CALLBACK, 0, "cacheinfo", NULL,
 | 
				
			||||||
			"<mode> <object> <path>",
 | 
								N_("<mode> <object> <path>"),
 | 
				
			||||||
			"add the specified entry to the index",
 | 
								N_("add the specified entry to the index"),
 | 
				
			||||||
			PARSE_OPT_NOARG |	/* disallow --cacheinfo=<mode> form */
 | 
								PARSE_OPT_NOARG |	/* disallow --cacheinfo=<mode> form */
 | 
				
			||||||
			PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
 | 
								PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
 | 
				
			||||||
			(parse_opt_cb *) cacheinfo_callback},
 | 
								(parse_opt_cb *) cacheinfo_callback},
 | 
				
			||||||
		{OPTION_CALLBACK, 0, "chmod", &set_executable_bit, "(+/-)x",
 | 
							{OPTION_CALLBACK, 0, "chmod", &set_executable_bit, N_("(+/-)x"),
 | 
				
			||||||
			"override the executable bit of the listed files",
 | 
								N_("override the executable bit of the listed files"),
 | 
				
			||||||
			PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
 | 
								PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
 | 
				
			||||||
			chmod_callback},
 | 
								chmod_callback},
 | 
				
			||||||
		{OPTION_SET_INT, 0, "assume-unchanged", &mark_valid_only, NULL,
 | 
							{OPTION_SET_INT, 0, "assume-unchanged", &mark_valid_only, NULL,
 | 
				
			||||||
			"mark files as \"not changing\"",
 | 
								N_("mark files as \"not changing\""),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
 | 
				
			||||||
		{OPTION_SET_INT, 0, "no-assume-unchanged", &mark_valid_only, NULL,
 | 
							{OPTION_SET_INT, 0, "no-assume-unchanged", &mark_valid_only, NULL,
 | 
				
			||||||
			"clear assumed-unchanged bit",
 | 
								N_("clear assumed-unchanged bit"),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
 | 
				
			||||||
		{OPTION_SET_INT, 0, "skip-worktree", &mark_skip_worktree_only, NULL,
 | 
							{OPTION_SET_INT, 0, "skip-worktree", &mark_skip_worktree_only, NULL,
 | 
				
			||||||
			"mark files as \"index-only\"",
 | 
								N_("mark files as \"index-only\""),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
 | 
				
			||||||
		{OPTION_SET_INT, 0, "no-skip-worktree", &mark_skip_worktree_only, NULL,
 | 
							{OPTION_SET_INT, 0, "no-skip-worktree", &mark_skip_worktree_only, NULL,
 | 
				
			||||||
			"clear skip-worktree bit",
 | 
								N_("clear skip-worktree bit"),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
 | 
				
			||||||
		OPT_SET_INT(0, "info-only", &info_only,
 | 
							OPT_SET_INT(0, "info-only", &info_only,
 | 
				
			||||||
			"add to index only; do not add content to object database", 1),
 | 
								N_("add to index only; do not add content to object database"), 1),
 | 
				
			||||||
		OPT_SET_INT(0, "force-remove", &force_remove,
 | 
							OPT_SET_INT(0, "force-remove", &force_remove,
 | 
				
			||||||
			"remove named paths even if present in worktree", 1),
 | 
								N_("remove named paths even if present in worktree"), 1),
 | 
				
			||||||
		OPT_SET_INT('z', NULL, &line_termination,
 | 
							OPT_SET_INT('z', NULL, &line_termination,
 | 
				
			||||||
			"with --stdin: input lines are terminated by null bytes", '\0'),
 | 
								N_("with --stdin: input lines are terminated by null bytes"), '\0'),
 | 
				
			||||||
		{OPTION_LOWLEVEL_CALLBACK, 0, "stdin", &read_from_stdin, NULL,
 | 
							{OPTION_LOWLEVEL_CALLBACK, 0, "stdin", &read_from_stdin, NULL,
 | 
				
			||||||
			"read list of paths to be updated from standard input",
 | 
								N_("read list of paths to be updated from standard input"),
 | 
				
			||||||
			PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
								PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
				
			||||||
			(parse_opt_cb *) stdin_callback},
 | 
								(parse_opt_cb *) stdin_callback},
 | 
				
			||||||
		{OPTION_LOWLEVEL_CALLBACK, 0, "index-info", &line_termination, NULL,
 | 
							{OPTION_LOWLEVEL_CALLBACK, 0, "index-info", &line_termination, NULL,
 | 
				
			||||||
			"add entries from standard input to the index",
 | 
								N_("add entries from standard input to the index"),
 | 
				
			||||||
			PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
								PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
				
			||||||
			(parse_opt_cb *) stdin_cacheinfo_callback},
 | 
								(parse_opt_cb *) stdin_cacheinfo_callback},
 | 
				
			||||||
		{OPTION_LOWLEVEL_CALLBACK, 0, "unresolve", &has_errors, NULL,
 | 
							{OPTION_LOWLEVEL_CALLBACK, 0, "unresolve", &has_errors, NULL,
 | 
				
			||||||
			"repopulate stages #2 and #3 for the listed paths",
 | 
								N_("repopulate stages #2 and #3 for the listed paths"),
 | 
				
			||||||
			PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
								PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
				
			||||||
			(parse_opt_cb *) unresolve_callback},
 | 
								(parse_opt_cb *) unresolve_callback},
 | 
				
			||||||
		{OPTION_LOWLEVEL_CALLBACK, 'g', "again", &has_errors, NULL,
 | 
							{OPTION_LOWLEVEL_CALLBACK, 'g', "again", &has_errors, NULL,
 | 
				
			||||||
			"only update entries that differ from HEAD",
 | 
								N_("only update entries that differ from HEAD"),
 | 
				
			||||||
			PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
								PARSE_OPT_NONEG | PARSE_OPT_NOARG,
 | 
				
			||||||
			(parse_opt_cb *) reupdate_callback},
 | 
								(parse_opt_cb *) reupdate_callback},
 | 
				
			||||||
		OPT_BIT(0, "ignore-missing", &refresh_args.flags,
 | 
							OPT_BIT(0, "ignore-missing", &refresh_args.flags,
 | 
				
			||||||
			"ignore files missing from worktree",
 | 
								N_("ignore files missing from worktree"),
 | 
				
			||||||
			REFRESH_IGNORE_MISSING),
 | 
								REFRESH_IGNORE_MISSING),
 | 
				
			||||||
		OPT_SET_INT(0, "verbose", &verbose,
 | 
							OPT_SET_INT(0, "verbose", &verbose,
 | 
				
			||||||
			"report actions to standard output", 1),
 | 
								N_("report actions to standard output"), 1),
 | 
				
			||||||
		{OPTION_CALLBACK, 0, "clear-resolve-undo", NULL, NULL,
 | 
							{OPTION_CALLBACK, 0, "clear-resolve-undo", NULL, NULL,
 | 
				
			||||||
			"(for porcelains) forget saved unresolved conflicts",
 | 
								N_("(for porcelains) forget saved unresolved conflicts"),
 | 
				
			||||||
			PARSE_OPT_NOARG | PARSE_OPT_NONEG,
 | 
								PARSE_OPT_NOARG | PARSE_OPT_NONEG,
 | 
				
			||||||
			resolve_undo_clear_callback},
 | 
								resolve_undo_clear_callback},
 | 
				
			||||||
		OPT_INTEGER(0, "index-version", &preferred_index_format,
 | 
							OPT_INTEGER(0, "index-version", &preferred_index_format,
 | 
				
			||||||
			    "write index in this format"),
 | 
								N_("write index in this format")),
 | 
				
			||||||
		OPT_END()
 | 
							OPT_END()
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user