Skip to content

Commit

Permalink
added information about language hint from the feature file name to t…
Browse files Browse the repository at this point in the history
…he language flag description
  • Loading branch information
Dmitrii Malinovskii committed Jun 20, 2024
1 parent ef24c9f commit bdbcbb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ Usage of gherkingen [FEATURE_FILE]:
-help
print usage
-language string
natural language for the feature (default "en")
Specifies the natural language used to describe the feature.
This flag is optional if language information is included in the feature file name.
The file name should be formatted as follows: <description>.<language_hint>.feature if language hint is included, or <description>.feature if it is not.
When provided, the 'language' flag takes precedence over the language hint from the file name. (default "en")
-languages
list supported natural feature languages
-list
Expand Down
6 changes: 5 additions & 1 deletion internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ func Run(arguments []string, out io.Writer, version string) (err error) {
language := flagSet.String(
"language",
defaultLanguage,
"natural language for the feature",
"Specifies the natural language used to describe the feature.\n"+
"This flag is optional if language information is included in the feature file name.\n"+
"The file name should be formatted as follows: <description>.<language_hint>.feature if language hint is included, "+
"or <description>.feature if it is not.\n"+
"When provided, the 'language' flag takes precedence over the language hint from the file name.",
)
listLanguages := flagSet.Bool(
"languages",
Expand Down

0 comments on commit bdbcbb3

Please sign in to comment.