From 244746dff7eabd89720688b835cfe803372d91ef Mon Sep 17 00:00:00 2001 From: nytpu Date: Tue, 11 May 2021 11:15:50 -0600 Subject: [PATCH] add lang flag and update documentation --- doc/comitium.1.scd | 10 ++++++++++ flags.go | 1 + 2 files changed, 11 insertions(+) diff --git a/doc/comitium.1.scd b/doc/comitium.1.scd index 0d12540..5d5b023 100644 --- a/doc/comitium.1.scd +++ b/doc/comitium.1.scd @@ -60,6 +60,13 @@ command-specific flags that are not universally recognized. Set the data directory where comitium will store its files. See *FILES AND DIRECTORIES* for more information. +*-l* _LANG_, *--lang* _LANG_ + The language that comitium will use when outputting its files. Can be a + comma-separated list of language tags, comitium will use the first avalable. + Overrides the $*LANG* environment variable. See + for available + options. Defaults to en-US. + ## REFRESH FLAGS *-n* _NUM_, *--num-workers* _NUM_ @@ -91,6 +98,9 @@ command-specific flags that are not universally recognized. *COMITIUM_DATA* Set the data directory. Equivalent to the *--data* flag. +*LANG* + Set the language comitium will output. + # FILES AND DIRECTORIES ## DATA DIRECTORY diff --git a/flags.go b/flags.go index cac8f88..d27fea7 100644 --- a/flags.go +++ b/flags.go @@ -11,6 +11,7 @@ var ( globalFs = flag.NewFlagSet("global", flag.ContinueOnError) dataFlag = globalFs.StringP("data", "d", "", "The data directory where comitium will store its files") + langFlag = globalFs.StringP("lang", "l", "en-US", "The language that comitium will use when outputting its files") ) // command holds fields used for printing information about a command.