-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the problem
We can't translate section names.
How would the new feature work?
Adding an additional section_names:
option to TTY::Option::Formatter#initialize
.
Drawbacks
None I can think of.
Workaround
Hardcore ugly monkey patching, e.g. for French translation
module TTY
module Option
class Formatter
def initialize(parameters, usage, param_display: DEFAULT_PARAM_DISPLAY,
width: DEFAULT_WIDTH, order: DEFAULT_ORDER, indent: 0)
@parameters = parameters
@usage = usage
@param_display = param_display
@order = order
@width = width
@indent = indent
@space_indent = SPACE * indent
@param_indent = indent + 2
@section_names = {
usage: "Utilisation :",
arguments: "Arguments :",
keywords: "Mots clés :",
options: "Options :",
env: "Environement :",
examples: "Exemples :"
}
end
end
end
end
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request