Skip to content

Commit

Permalink
show skipable missions in gsh index
Browse files Browse the repository at this point in the history
  • Loading branch information
phyver committed Aug 29, 2024
1 parent f3e5e7a commit f55660e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
3 changes: 3 additions & 0 deletions i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ msgstr[1] "game time: %s in %d sessions"
msgid "n"
msgstr "n"

msgid "optional"
msgstr "optional"

msgid "password:"
msgstr "password:"

Expand Down
3 changes: 3 additions & 0 deletions i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ msgstr[1] "temps de jeu : %s en %d sessions"
msgid "n"
msgstr "n"

msgid "optional"
msgstr "facultatif"

msgid "password:"
msgstr "mot de passe :"

Expand Down
3 changes: 3 additions & 0 deletions i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ msgstr[1] "tempo di gioco: %s in %d sessioni"
msgid "n"
msgstr "n"

msgid "optional"
msgstr "facoltativo"

msgid "password:"
msgstr "password:"

Expand Down
3 changes: 3 additions & 0 deletions i18n/template.pot
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ msgstr[1] ""
msgid "n"
msgstr ""

msgid "optional"
msgstr ""

msgid "password:"
msgstr ""

Expand Down
16 changes: 11 additions & 5 deletions scripts/_gsh_index
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,28 @@ do
continue
fi

SKIPABLE=""
if [ -f "$GSH_MISSIONS/$mission_dir/skip.txt" ] || [ -d "$GSH_MISSIONS/$mission_dir/skip" ]
then
SKIPABLE=" [$(gettext "optional")]"
fi

if grep -q "^$n CHECK_OK" "$GSH_CONFIG/missions.log"
then
COLOR="green"
STATUS=" ($(gettext "completed"))"
STATUS=" ($(gettext "completed"))"
elif grep -q "^$n CHECK_OOPS" "$GSH_CONFIG/missions.log"
then
COLOR="red"
STATUS=" ($(gettext "failed"))"
STATUS=" ($(gettext "failed"))"
elif grep -q "^$n SKIP" "$GSH_CONFIG/missions.log"
then
COLOR="yellow"
STATUS=" ($(gettext "skipped"))"
STATUS=" ($(gettext "skipped"))"
elif grep -q "^$n CANCEL_DEP_PB" "$GSH_CONFIG/missions.log"
then
COLOR="magenta"
STATUS=" ($(gettext "cancelled"))"
STATUS=" ($(gettext "cancelled"))"
else
COLOR="white"
STATUS=""
Expand All @@ -39,7 +45,7 @@ do
fi

printf "%s%2d " "$LEAD" "$n"
color_echo "$COLOR" "$mission_dir$STATUS"
color_echo "$COLOR" "$mission_dir$SKIPABLE$STATUS"

n="$((n + 1))"
done < "$GSH_CONFIG/index.txt" | pager

0 comments on commit f55660e

Please sign in to comment.