phyver / GameShell

a game to learn (or teach) how to use standard commands in a Unix shell
GNU General Public License v3.0
2.12k stars 135 forks source link

Path validator on language files #101

Closed Mte90 closed 2 years ago

Mte90 commented 2 years ago

A common issue during the localization is people that escape variable or don't write them rightly in po files.

The game is not able to report that issue to the user, in my opinion those cases should be like 0.
As example GSH_Home should not something in the po files as is the official path for the game or break it.

Basically:

phyver commented 2 years ago

I see what you mean. I like the fact that the full path is explicit in the po files: some start with$GSH_HOME , others with $MISSION_DIR, etc. All problems arising from misspelled path variables should be easy to detect when testing the mission.

The test-bash target in the Makefile runs through all 42 missions and aborts if any auto.sh script fails. You can do it by hand with

    $ ./utils/archive.sh -a
    $ ./gameshell.sh -dc 'for _ in $(seq 42); do gsh auto --abort; done' 

I'm not sure it would catch all such errors, but probably most of them!

Mte90 commented 2 years ago

Ohhh cool this is very useful I found another bug in the translation. Maybe add it to the documentation?