Skip to content

Commit b4eda05

Browse files
jiangxingitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b81b98f commit b4eda05

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

Documentation/config/http.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ http.schannelUseSSLCAInfo::
203203
when the `schannel` backend was configured via `http.sslBackend`,
204204
unless `http.schannelUseSSLCAInfo` overrides this behavior.
205205

206-
http.pinnedpubkey::
206+
http.pinnedPubkey::
207207
Public key of the https service. It may either be the filename of
208208
a PEM or DER encoded public key file or a string starting with
209209
'sha256//' followed by the base64 encoded sha256 hash of the

builtin/fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3465,7 +3465,7 @@ static void git_pack_config(void)
34653465
pack_idx_opts.version = indexversion_value;
34663466
if (pack_idx_opts.version > 2)
34673467
git_die_config("pack.indexversion",
3468-
"bad pack.indexversion=%"PRIu32, pack_idx_opts.version);
3468+
"bad pack.indexVersion=%"PRIu32, pack_idx_opts.version);
34693469
}
34703470
if (!git_config_get_ulong("pack.packsizelimit", &packsizelimit_value))
34713471
max_packsize = packsizelimit_value;

builtin/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
581581
/* default expiry time, overwritten in gc_config */
582582
gc_config();
583583
if (parse_expiry_date(gc_log_expire, &gc_log_expire_time))
584-
die(_("failed to parse gc.logexpiry value %s"), gc_log_expire);
584+
die(_("failed to parse gc.logExpiry value %s"), gc_log_expire);
585585

586586
if (pack_refs < 0)
587587
pack_refs = !is_bare_repository();

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ static int git_index_pack_config(const char *k, const char *v, void *cb)
15751575
if (!strcmp(k, "pack.indexversion")) {
15761576
opts->version = git_config_int(k, v);
15771577
if (opts->version > 2)
1578-
die(_("bad pack.indexversion=%"PRIu32), opts->version);
1578+
die(_("bad pack.indexVersion=%"PRIu32), opts->version);
15791579
return 0;
15801580
}
15811581
if (!strcmp(k, "pack.threads")) {

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3170,7 +3170,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
31703170
if (!strcmp(k, "pack.indexversion")) {
31713171
pack_idx_opts.version = git_config_int(k, v);
31723172
if (pack_idx_opts.version > 2)
3173-
die(_("bad pack.indexversion=%"PRIu32),
3173+
die(_("bad pack.indexVersion=%"PRIu32),
31743174
pack_idx_opts.version);
31753175
return 0;
31763176
}

builtin/repack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static const char *const git_repack_usage[] = {
4141

4242
static const char incremental_bitmap_conflict_error[] = N_(
4343
"Incremental repacks are incompatible with bitmap indexes. Use\n"
44-
"--no-write-bitmap-index or disable the pack.writebitmaps configuration."
44+
"--no-write-bitmap-index or disable the pack.writeBitmaps configuration."
4545
);
4646

4747
struct pack_objects_args {

commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ static int verify_utf8(struct strbuf *buf)
15261526
static const char commit_utf8_warn[] =
15271527
N_("Warning: commit message did not conform to UTF-8.\n"
15281528
"You may want to amend it after fixing the message, or set the config\n"
1529-
"variable i18n.commitencoding to the encoding your project uses.\n");
1529+
"variable i18n.commitEncoding to the encoding your project uses.\n");
15301530

15311531
int commit_tree_extended(const char *msg, size_t msg_len,
15321532
const struct object_id *tree,

gpg-interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ static int sign_buffer_ssh(struct strbuf *buffer, struct strbuf *signature,
985985

986986
if (!signing_key || signing_key[0] == '\0')
987987
return error(
988-
_("user.signingkey needs to be set for ssh signing"));
988+
_("user.signingKey needs to be set for ssh signing"));
989989

990990
if (is_literal_ssh_key(signing_key, &literal_key)) {
991991
/* A literal ssh key */

http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int http_options(const char *var, const char *value, void *cb)
349349
if (!strcmp("http.postbuffer", var)) {
350350
http_post_buffer = git_config_ssize_t(var, value);
351351
if (http_post_buffer < 0)
352-
warning(_("negative value for http.postbuffer; defaulting to %d"), LARGE_PACKET_MAX);
352+
warning(_("negative value for http.postBuffer; defaulting to %d"), LARGE_PACKET_MAX);
353353
if (http_post_buffer < LARGE_PACKET_MAX)
354354
http_post_buffer = LARGE_PACKET_MAX;
355355
return 0;

remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ static void validate_remote_url(struct remote *remote)
633633
else if (!strcmp("allow", value))
634634
return;
635635
else
636-
die(_("unrecognized value transfer.credentialsInURL: '%s'"), value);
636+
die(_("unrecognized value transfer.credentialsInUrl: '%s'"), value);
637637

638638
for (i = 0; i < remote->url_nr; i++) {
639639
struct url_info url_info = { 0 };

submodule-config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ int parse_submodule_fetchjobs(const char *var, const char *value)
302302
{
303303
int fetchjobs = git_config_int(var, value);
304304
if (fetchjobs < 0)
305-
die(_("negative values not allowed for submodule.fetchjobs"));
305+
die(_("negative values not allowed for submodule.fetchJobs"));
306306
return fetchjobs;
307307
}
308308

0 commit comments

Comments
 (0)