WriteHelp writes the help output with translated flag descriptions
()
| 113 | |
| 114 | // WriteHelp writes the help output with translated flag descriptions |
| 115 | func (h *TranslatedHelpWriter) WriteHelp() { |
| 116 | fmt.Fprintf(h.writer, "%s\n", i18n.T("usage_header")) |
| 117 | fmt.Fprintf(h.writer, " %s %s\n\n", h.parser.Name, i18n.T("options_placeholder")) |
| 118 | |
| 119 | fmt.Fprintf(h.writer, "%s\n", i18n.T("application_options_header")) |
| 120 | h.writeAllFlags() |
| 121 | |
| 122 | fmt.Fprintf(h.writer, "\n%s\n", i18n.T("help_options_header")) |
| 123 | fmt.Fprintf(h.writer, " -h, --help %s\n", i18n.T("help_message")) |
| 124 | } |
| 125 | |
| 126 | // getTranslatedDescription gets the translated description for a flag |
| 127 | func (h *TranslatedHelpWriter) getTranslatedDescription(flagName string) string { |
no test coverage detected