diff options
author | Jiang Xin <zhiyou.jx@alibaba-inc.com> | 2022-06-17 12:03:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-17 19:38:26 +0200 |
commit | b4eda05d58ca3e4808d3d86ab5826c77995a06f7 (patch) | |
tree | 6d81aafbc779766cc5a5ec91e176b6597bae20e9 /builtin | |
parent | Another batch of fixes before -rc1 (diff) | |
download | git-b4eda05d58ca3e4808d3d86ab5826c77995a06f7.tar.xz git-b4eda05d58ca3e4808d3d86ab5826c77995a06f7.zip |
i18n: fix mismatched camelCase config variables
Some config variables are combinations of multiple words, and we
typically write them in camelCase forms in manpage and translatable
strings. It's not easy to find mismatches for these camelCase config
variables during code reviews, but occasionally they are identified
during localization translations.
To check for mismatched config variables, I introduced a new feature
in the helper program for localization[^1]. The following mismatched
config variables have been identified by running the helper program,
such as "git-po-helper check-pot".
Lowercase in manpage should use camelCase:
* Documentation/config/http.txt: http.pinnedpubkey
Lowercase in translable strings should use camelCase:
* builtin/fast-import.c: pack.indexversion
* builtin/gc.c: gc.logexpiry
* builtin/index-pack.c: pack.indexversion
* builtin/pack-objects.c: pack.indexversion
* builtin/repack.c: pack.writebitmaps
* commit.c: i18n.commitencoding
* gpg-interface.c: user.signingkey
* http.c: http.postbuffer
* submodule-config.c: submodule.fetchjobs
Mismatched camelCases, choose the former:
* Documentation/config/transfer.txt: transfer.credentialsInUrl
remote.c: transfer.credentialsInURL
[^1]: https://github.com/git-l10n/git-po-helper
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fast-import.c | 2 | ||||
-rw-r--r-- | builtin/gc.c | 2 | ||||
-rw-r--r-- | builtin/index-pack.c | 2 | ||||
-rw-r--r-- | builtin/pack-objects.c | 2 | ||||
-rw-r--r-- | builtin/repack.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c index 28d3193c38..14113cfd82 100644 --- a/builtin/fast-import.c +++ b/builtin/fast-import.c @@ -3465,7 +3465,7 @@ static void git_pack_config(void) pack_idx_opts.version = indexversion_value; if (pack_idx_opts.version > 2) git_die_config("pack.indexversion", - "bad pack.indexversion=%"PRIu32, pack_idx_opts.version); + "bad pack.indexVersion=%"PRIu32, pack_idx_opts.version); } if (!git_config_get_ulong("pack.packsizelimit", &packsizelimit_value)) max_packsize = packsizelimit_value; diff --git a/builtin/gc.c b/builtin/gc.c index 4ea70089c9..021e9256ae 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -581,7 +581,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) /* default expiry time, overwritten in gc_config */ gc_config(); if (parse_expiry_date(gc_log_expire, &gc_log_expire_time)) - die(_("failed to parse gc.logexpiry value %s"), gc_log_expire); + die(_("failed to parse gc.logExpiry value %s"), gc_log_expire); if (pack_refs < 0) pack_refs = !is_bare_repository(); diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 3e385b4800..6648f2daef 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1575,7 +1575,7 @@ static int git_index_pack_config(const char *k, const char *v, void *cb) if (!strcmp(k, "pack.indexversion")) { opts->version = git_config_int(k, v); if (opts->version > 2) - die(_("bad pack.indexversion=%"PRIu32), opts->version); + die(_("bad pack.indexVersion=%"PRIu32), opts->version); return 0; } if (!strcmp(k, "pack.threads")) { diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index cc5f41086d..39e28cfcaf 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -3170,7 +3170,7 @@ static int git_pack_config(const char *k, const char *v, void *cb) if (!strcmp(k, "pack.indexversion")) { pack_idx_opts.version = git_config_int(k, v); if (pack_idx_opts.version > 2) - die(_("bad pack.indexversion=%"PRIu32), + die(_("bad pack.indexVersion=%"PRIu32), pack_idx_opts.version); return 0; } diff --git a/builtin/repack.c b/builtin/repack.c index c957b2959f..4a7ae4cf48 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -41,7 +41,7 @@ static const char *const git_repack_usage[] = { static const char incremental_bitmap_conflict_error[] = N_( "Incremental repacks are incompatible with bitmap indexes. Use\n" -"--no-write-bitmap-index or disable the pack.writebitmaps configuration." +"--no-write-bitmap-index or disable the pack.writeBitmaps configuration." ); struct pack_objects_args { |