cryptsetup 1.5.0-rc2 messages questions
Hello,
while updating Czech translation for cryptsetup 1.5.0-rc2, I found few issues I'd like to clarify.
(1) Message:
#: src/cryptsetup_reencrypt.c:1249
msgid "[OPTION...] <device>"
is not properly internationalized:
poptSetOtherOptionHelp(popt_context, N_("[OPTION...] <device>"));As a result, the usage syntax is not fully localized:
$ ./src/cryptsetup-reencrypt --help
crypt_reencrypt 1.5.0-rc2
Použití: cryptsetup-reencrypt [OPTION...] <device>
--version Vypíše verzi balíkuThis is because there should be _()' instead of N_()'.
(2) It think message
#: src/cryptsetup_reencrypt.c:451
#, c-format
msgid "Log file %s exists, restarting reencryption.\n"
should be rephrased to resuming reencryption' if I understand the reencryption log correctly. Restarting' means drop everything what has been done till now and start again from the begining.
(3) There is missing space after the number 1.
#: src/cryptsetup_reencrypt.c:1288
msgid "Only values between 1MiB and 64 MiB allowed for reencryption block size."
-- Petr
Quoted 2 lines · Petr Pisar
while updating Czech translation for cryptsetup 1.5.0-rc2, I found few issues I'd like to clarify.
There will be more cleanups needed, I added that to rc2 because this reencryption tool can be useful for several people but it is still experimental.
Let me know if there are other changes needed. (I guess ping on IRC works better in this case ;-)
Quoted 1 line
poptSetOtherOptionHelp(popt_context, N_("[OPTION...] <device>"));Hm. Then same problem is then in cryptsetup for years:
N_("[OPTION...] <action> <action-specific>"));
Quoted 9 lines
(2) It think message
#:
src/cryptsetup_reencrypt.c:451
#, c-format
msgid "Log file %s exists, restarting reencryption.\n"should be rephrased to
resuming reencryption' if I understand the reencryption log correctly.Restarting' means drop everything what has been done till now and start again from the begining.
yes, I am using "suspending reencryption" elsewhere so resuming is definitely better.
Quoted 3 lines
(3) There is missing space after the number 1.
#:src/cryptsetup_reencrypt.c:1288
msgid "Only values between 1MiB and 64 MiB allowed for reencryption block size."
ok, I'll change that.
Thanks,
Milan
Quoted 8 lines · Milan Broz
Quoted 1 line · Petr Pisar
poptSetOtherOptionHelp(popt_context, N_("[OPTION...] <device>"));Hm. Then same problem is then in cryptsetup for years:
N_("[OPTION...] <action> <action-specific>"));
Yes. I checked popt sources, and obviously, application is reponsible for translating the text. Following patch fixes it in all three main programs.
-- Petr
PATCH 1/1 Pass help text to popt already translated
popt does not process the text registered by poptSetOtherOptionHelp() through gettext on its own. Application must do it.
--- src/cryptsetup.c | 2 +- src/cryptsetup_reencrypt.c | 2 +- src/veritysetup.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
src/cryptsetup.c +1 -1
@@ -1326,7 +1326,7 @@ int main(int argc, const char **argv) popt_context =poptGetContext (PACKAGE , argc, argv, popt_options,0 );poptSetOtherOptionHelp (popt_context, -N_ ("[OPTION...] <action> <action-specific>" )); +_ ("[OPTION...] <action> <action-specific>" ));while ((r =poptGetNextOpt (popt_context)) >0 ) {unsigned long long ull_value;
src/cryptsetup_reencrypt.c +1 -1
@@ -1260,7 +1260,7 @@ int main(int argc, const char **argv) popt_context =poptGetContext (PACKAGE , argc, argv, popt_options,0 );poptSetOtherOptionHelp (popt_context, -N_ ("[OPTION...] <device>" )); +_ ("[OPTION...] <device>" ));while ((r =poptGetNextOpt (popt_context)) >0 ) ;if (r <-1 )
src/veritysetup.c +1 -1
@@ -517,7 +517,7 @@ int main(int argc, const char **argv) popt_context =poptGetContext ("verity" , argc, argv, popt_options,0 );poptSetOtherOptionHelp (popt_context, -N_ ("[OPTION...] <action> <action-specific>" )); +_ ("[OPTION...] <action> <action-specific>" ));while ((r =poptGetNextOpt (popt_context)) >0 ) {unsigned long long ull_value;
Signature · 1 line
1.7.3.4
Milan Broz
AppliedRe: [dm-crypt] [PATCH] Pass help text to popt already translated
Quoted 2 lines · Petr Písař
popt does not process the text registered by
poptSetOtherOptionHelp()through gettext on its own. Application must do it.
Applied, thanks.
Milan