diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-29 21:34:06 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-29 21:34:06 +0100 |
commit | f8f10578093e926f5f36289a6c11615d067fbcad (patch) | |
tree | 544d21d89cd078d8f7485f9c56908fa1b0a674d8 /src | |
parent | 7c4f90ddb8378dcf90cb0cc219105dccaa8a9d6e (diff) | |
download | libguestfs-f8f10578093e926f5f36289a6c11615d067fbcad.tar.gz libguestfs-f8f10578093e926f5f36289a6c11615d067fbcad.tar.xz libguestfs-f8f10578093e926f5f36289a6c11615d067fbcad.zip |
guestfish: Make more strings translatable.
However this doesn't yet attempt to translate the POD
command documentation. We need a plan to do that.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/generator.ml b/src/generator.ml index 00f3c4ec..dcac5626 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -5421,15 +5421,16 @@ and generate_fish_cmds () = (* list_commands function, which implements guestfish -h *) pr "void list_commands (void)\n"; pr "{\n"; - pr " printf (\" %%-16s %%s\\n\", \"Command\", \"Description\");\n"; + pr " printf (\" %%-16s %%s\\n\", _(\"Command\"), _(\"Description\"));\n"; pr " list_builtin_commands ();\n"; List.iter ( fun (name, _, _, flags, _, shortdesc, _) -> let name = replace_char name '_' '-' in - pr " printf (\"%%-20s %%s\\n\", \"%s\", \"%s\");\n" + pr " printf (\"%%-20s %%s\\n\", \"%s\", _(\"%s\"));\n" name shortdesc ) all_functions_sorted; - pr " printf (\" Use -h <cmd> / help <cmd> to show detailed help for a command.\\n\");\n"; + pr " printf (\" %%s\\n\","; + pr " _(\"Use -h <cmd> / help <cmd> to show detailed help for a command.\"));\n"; pr "}\n"; pr "\n"; @@ -5483,7 +5484,7 @@ and generate_fish_cmds () = if name <> alias then pr " || strcasecmp (cmd, \"%s\") == 0" alias; pr ")\n"; - pr " pod2text (\"%s - %s\", %S);\n" + pr " pod2text (\"%s\", _(\"%s\"), %S);\n" name2 shortdesc (" " ^ synopsis ^ "\n\n" ^ longdesc ^ warnings ^ describe_alias); pr " else\n" @@ -5582,9 +5583,9 @@ and generate_fish_cmds () = (* Check and convert parameters. *) let argc_expected = List.length (snd style) in pr " if (argc != %d) {\n" argc_expected; - pr " fprintf (stderr, \"%%s should have %d parameter(s)\\n\", cmd);\n" + pr " fprintf (stderr, _(\"%%s should have %%d parameter(s)\\n\"), cmd, %d);\n" argc_expected; - pr " fprintf (stderr, \"type 'help %%s' for help on %%s\\n\", cmd, cmd);\n"; + pr " fprintf (stderr, _(\"type 'help %%s' for help on %%s\\n\"), cmd, cmd);\n"; pr " return -1;\n"; pr " }\n"; iteri ( @@ -5693,7 +5694,7 @@ and generate_fish_cmds () = pr " else\n"; ) all_functions; pr " {\n"; - pr " fprintf (stderr, \"%%s: unknown command\\n\", cmd);\n"; + pr " fprintf (stderr, _(\"%%s: unknown command\\n\"), cmd);\n"; pr " return -1;\n"; pr " }\n"; pr " return 0;\n"; |