Skip to content

Commit

Permalink
only display small help message with -h
Browse files Browse the repository at this point in the history
to get the full list of options, use -H instead
  • Loading branch information
phyver committed Nov 18, 2024
1 parent dd2e286 commit ed52aeb
Show file tree
Hide file tree
Showing 12 changed files with 192 additions and 84 deletions.
7 changes: 7 additions & 0 deletions i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/en.txt"
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-welcome/en.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-full-help/en.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-help/en.txt"
Expand Down Expand Up @@ -76,6 +80,9 @@ msgstr[1] "%d missions skipped:"
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"

msgid "Available index files: "
msgstr "Available index files: "

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr "Congratulations, mission $MISSION_NB has been successfully completed!"
Expand Down
7 changes: 7 additions & 0 deletions i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/fr.txt"
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-welcome/fr.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-full-help/fr.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-help/fr.txt"
Expand Down Expand Up @@ -80,6 +84,9 @@ msgstr[1] "%d missions sautées :"
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr "AUTOMATIQUEMENT GÉNÉRÉ AU DÉMARRAGE -- NE PAS MODIFIER"

msgid "Available index files: "
msgstr "Fichiers index disponibles: "

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr "Bravo, vous avez réussi la mission $MISSION_NB !"
Expand Down
7 changes: 7 additions & 0 deletions i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/it.txt"
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-welcome/it.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-full-help/it.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-help/it.txt"
Expand Down Expand Up @@ -90,6 +94,9 @@ msgstr[1] "%d missioni saltate:"
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr "GENERATO ALL'AVVIO AUTOMATICAMENTE -- NON MODIFICARE"

msgid "Available index files: "
msgstr ""

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr "Congratulazioni, la missione $MISSION_NB é stata completata con successo!"
Expand Down
50 changes: 50 additions & 0 deletions i18n/start-full-help/en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
usage:
$GSH_EXEC_FILE [OPTIONS] [INDEX_FILE1 INDEX_FILE2 ...]

Possible values for INDEX_FILE<n> are: $GSH_INDEX_FILES.

If no INDEX_FILE is given, defaults to index.txt.

Index files are ignored when continuing from a save file.


options:
-h simple help message
-H this message
-V display version
-I show list of available index files

-P passport mode: ask for name / emails of player
-A anonymous mode
-d debug mode
-D verbose debug mode

-C continue current game (if relevant)
-R reset game
-F do not check for more recent savefiles, force using the given archive

-G do not use gettext for translation (everything will be in English)
-L ... set LANGUAGE variable (ex: -L fr:it:en)
On non GNU systems, set the variable LC_MESSAGES to a valid locale.
This flag is ignored when continuing from a save file.

-S simple
the savefile is obtained by adding a "-save" suffix,
each savefile overwrites the previous one
-S index
savefiles are numbered so that all savefiles are kept
-S overwrite
the savefile overwrite the initial GameShell file
(you can use option -R to start a new game from the start)

-B use bash
-Z use zsh

-q quiet: don't show information messages
-n black and white: don't use ANSI escape codes for color
-c ... give that command to GameShell (for testing)

-U download last version of GameShell (requires network access)
-X only extract tgz archive
-K do not remove GameShell temporary directory on exit

51 changes: 51 additions & 0 deletions i18n/start-full-help/fr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
utilisation :
$GSH_EXEC_FILE [OPTIONS] [INDEX_FILE1 INDEX_FILE2 ...]

Les valeurs possibles pour INDEX_FILE<n> sont : $GSH_INDEX_FILES.

Si aucun INDEX_FILE n'est donné, utilise index.txt par défaut.

Les fichier index sont ignorés lorsqu'on reprend une session à partir d'un
fichier de sauvegarde.


options :
-h message d'aide simplifié
-H ce message
-V affiche la version
-I affiche la liste des fichier index disponibles

-P mode passeport : demande le nom / email du joueur
-D mode debug
-v lecture "verbeuse" des scripts de mission (seulement en mode debug)
-A mode anonyme

-C continue la partie en cours (si pertinent)
-R recommence une partie du début
-F ne vérifie pas l'existence de fichiers de sauvegarde plus récents,
force l'utilisation de l'archive donnée

-G désactive gettext pour les traductions (tout sera en Anglais)
-L initialise la variable LANGUAGE (ex : -L fr:it:en)
Pour les systèmes non GNU, initialisez la variable LC_MESSAGES
avec une locale valide.
Cette option est sans effet lorsqu'on reprend une session à partir
d'un fichier de sauvegarde.

-S simple
le fichier de sauvegarde est obtenu en ajoutant un suffix "-save",
chaque fichier de sauvegarde remplace le précédent
-S index
les fichiers de sauvegarde sont numérotés pour que toutes les
sauvegardes soient conservées
-S overwrite
le fichier de sauvegarde remplace l'instance initial de GameShell
(on peut utiliser l'option -R pour lancer une partie à partir du début)

-q mode silencieux : n'affiche pas les messages d'information
-n mode noir et blanc : n'utilise pas les séquences ANSI
-c CMD donne cette commande à GameShell (pour faire des tests)

-U télécharge la dernière version de GameShell (nécessite un accès réseau)
-X extrait juste l'archive tgz
-K ne supprime pas le répertoire temporaire de GameShell à la sortie
40 changes: 40 additions & 0 deletions i18n/start-full-help/it.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
options:
-h messaggio di aiuto breve
-H questo avviso
-V mostra versione
-I ...

-P modalitá passaporto: chiede il nome/email del giocatore
-A modalitá anonima
-d modalitá debug
-D modalitá debug verbosa

-C continua la partita corrente (se rilevante)
-R reimposta la partita
-F non cercare salvataggi recenti, utilizza forzatamente l'archivio definito

-G non utilizzare gettext per le traduzioni (sarà tutto in Inglese)
-L ... imposta la variabile LANGUAGE (ex: -L fr:it:en)
Su sistemi non GNU, imposta la variabile LC_MESSAGES
per un "locale" valido.

-S simple
il file di salvataggio è generato con un suffiso "-save",
ogni salvataggio sovrascrive il precedente
-S index
i salvataggi sono numerati così sono tutti conservati
-S overwrite
il salvataggio sovrascrive il file iniziale di GameShell
(puoi utilizzare l'opzione -R per avviare un nuovo gioco dall'inizio)

-B usa bash
-Z usa zsh

-q silenzioso: non mostra avvisi informativi
-n bianco e nero: non usa i codici di escape ANSI per i colori
-c ... dai quel comando a GameShell (in testing)

-U scarica l'ultima versione di GameShell (richiede accesso alla rete)
-X estrai solo l'archivio tgz
-K non rimuovere la cartella temporanea di GameShell all'uscita

30 changes: 2 additions & 28 deletions i18n/start-help/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,15 @@ If no INDEX_FILE is given, defaults to index.txt.
Index files are ignored when continuing from a save file.


options:
main options:
-h this message
-H show all available options
-V display version

-P passport mode: ask for name / emails of player
-A anonymous mode
-d debug mode
-D verbose debug mode

-C continue current game (if relevant)
-R reset game
-F do not check for more recent savefiles, force using the given archive

-G do not use gettext for translation (everything will be in English)
-L ... set LANGUAGE variable (ex: -L fr:it:en)
On non GNU systems, set the variable LC_MESSAGES to a valid locale.
This flag is ignored when continuing from a save file.

-S simple
the savefile is obtained by adding a "-save" suffix,
each savefile overwrites the previous one
-S index
savefiles are numbered so that all savefiles are kept
-S overwrite
the savefile overwrite the initial GameShell file
(you can use option -R to start a new game from the start)

-B use bash
-Z use zsh

-q quiet: don't show information messages
-n black and white: don't use ANSI escape codes for color
-c ... give that command to GameShell (for testing)

-U download last version of GameShell (requires network access)
-X only extract tgz archive
-K do not remove GameShell temporary directory on exit

27 changes: 2 additions & 25 deletions i18n/start-help/fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,18 @@ Les fichier index sont ignorés lorsqu'on reprend une session à partir d'un
fichier de sauvegarde.


options :
options principales :
-h ce message
-H affiche toutes les options
-V affiche la version

-P mode passeport : demande le nom / email du joueur
-D mode debug
-v lecture "verbeuse" des scripts de mission (seulement en mode debug)
-A mode anonyme

-C continue la partie en cours (si pertinent)
-R recommence une partie du début
-F ne vérifie pas l'existence de fichiers de sauvegarde plus récents,
force l'utilisation de l'archive donnée

-G désactive gettext pour les traductions (tout sera en Anglais)
-L initialise la variable LANGUAGE (ex : -L fr:it:en)
Pour les systèmes non GNU, initialisez la variable LC_MESSAGES
avec une locale valide.
Cette option est sans effet lorsqu'on reprend une session à partir
d'un fichier de sauvegarde.

-S simple
le fichier de sauvegarde est obtenu en ajoutant un suffix "-save",
chaque fichier de sauvegarde remplace le précédent
-S index
les fichiers de sauvegarde sont numérotés pour que toutes les
sauvegardes soient conservées
-S overwrite
le fichier de sauvegarde remplace l'instance initial de GameShell
(on peut utiliser l'option -R pour lancer une partie à partir du début)

-q mode silencieux : n'affiche pas les messages d'information
-n mode noir et blanc : n'utilise pas les séquences ANSI
-c CMD donne cette commande à GameShell (pour faire des tests)

-U télécharge la dernière version de GameShell (nécessite un accès réseau)
-X extrait juste l'archive tgz
-K ne supprime pas le répertoire temporaire de GameShell à la sortie
27 changes: 0 additions & 27 deletions i18n/start-help/it.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,10 @@ options:
-h questo avviso
-V mostra versione

-P modalitá passaporto: chiede il nome/email del giocatore
-A modalitá anonima
-d modalitá debug
-D modalitá debug verbosa

-C continua la partita corrente (se rilevante)
-R reimposta la partita
-F non cercare salvataggi recenti, utilizza forzatamente l'archivio definito

-G non utilizzare gettext per le traduzioni (sarà tutto in Inglese)
-L ... imposta la variabile LANGUAGE (ex: -L fr:it:en)
Su sistemi non GNU, imposta la variabile LC_MESSAGES
per un "locale" valido.

-S simple
il file di salvataggio è generato con un suffiso "-save",
ogni salvataggio sovrascrive il precedente
-S index
i salvataggi sono numerati così sono tutti conservati
-S overwrite
il salvataggio sovrascrive il file iniziale di GameShell
(puoi utilizzare l'opzione -R per avviare un nuovo gioco dall'inizio)

-B usa bash
-Z usa zsh

-q silenzioso: non mostra avvisi informativi
-n bianco e nero: non usa i codici di escape ANSI per i colori
-c ... dai quel comando a GameShell (in testing)

-U scarica l'ultima versione di GameShell (richiede accesso alla rete)
-X estrai solo l'archivio tgz
-K non rimuovere la cartella temporanea di GameShell all'uscita

7 changes: 7 additions & 0 deletions i18n/template.pot
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ msgstr ""
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr ""

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr ""

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr ""
Expand Down Expand Up @@ -75,6 +79,9 @@ msgstr[1] ""
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr ""

msgid "Available index files: "
msgstr ""

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr ""
Expand Down
4 changes: 2 additions & 2 deletions lib/header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GSH_EXEC_DIR=$(cd "$GSH_EXEC_DIR"; pwd -P)
# just in case
GSH_EXEC_DIR=${GSH_EXEC_DIR:-.}

while getopts ":hnPdDACRXUVqGL:KBZc:FS:" opt
while getopts ":hHInPdDACRXUVqGL:KBZc:FS:" opt
do
case "$opt" in
V)
Expand Down Expand Up @@ -85,7 +85,7 @@ do
F)
GSH_FORCE="true"
;;
h)
h | H | I)
# used to avoid checking for more recent files
GSH_HELP="true"
;;
Expand Down
Loading

0 comments on commit ed52aeb

Please sign in to comment.