alan-if / alan-i18n

ALAN Internationalization Project
Other
0 stars 1 forks source link

Add new test adventure, modify messages #45

Closed Rich15 closed 2 years ago

Rich15 commented 2 years ago

Messages test

Add 'meta-messages' adventure to test game messages in Spanish.

I used the meta verbs test from the STD Library for reference. However, not all functionalities from that library are present in the Spanish one, so some tests were skipped.

I had a problem with the 'ticker' that is supposed to keep count of player's turns. I'm not sure whether this has something to do with the Library or it's because I did something wrong. Either way, it was marked to be solved when possible.

Besides that, all messages seemed to be working fine.

Translations and synonyms

Translate the confirmation message when you try to restart. Before it said "RETURN confirms", which was a little bit confusing. Update with a proper translation.

Also add new synonyms 'guardar' and 'reiniciar' for 'save' and 'restart', which are more common and sound more natural in Spanish.

tajmone commented 2 years ago

Thanks a lot!

I used the meta verbs test from the STD Library for reference. However, not all functionalities from that library are present in the Spanish one, so some tests were skipped.

Sure, they don't fully overlap so tweaks are needed.

I had a problem with the 'ticker' that is supposed to keep count of player's turns. I'm not sure whether this has something to do with the Library or it's because I did something wrong. Either way, it was marked to be solved when possible.

I'll look into it.

When it comes to turns ticking, it's a tricky topic and I don't remember exactly the details right now. Successful commands should always tick. Whether a failed command ticks or not might depend on many factors:

As you can see from the above list, the boundary between a META command and one that should tick is not always clear when it comes to failing commands. Also, the definition of "command failure" is a bit fuzzy and not always clear. Which is why in the StdLib test file I added all those notes regarding the expectation of what each test should result in, and why. Hopefully those notes will be useful now, and save us time.

We need to document turn ticks, META VERBs and failed commands in a clear way because authors creating turn-sensitive puzzles should be aware of how turns-ticking could go wrong. I personally don't like those adventures where you're thrown into a situation that needs to be solved in x turns, but they are part of the IF tradition.

tajmone commented 2 years ago

Amended Solution File

@Rich15, I've amended your commit and force pushed to fix two problems:

  1. Failed build due to missing final empty line in .alan source (seems like you're EditorConfig plug-in is not handling this, you might want to enforce adding a new line by tweaking your editor preferences for the ALAN extensions, or globally).
  2. Removed prompt from comment lines — i.e > ;; — otherwise ARun complains about the > as an unknown word. The comment delimiter in ALAN solutions is just ;, and you can use it at the beginning of a command or after it (e.g. take apple ; some comment), ARun will ignore anything following the semicolon.
tajmone commented 2 years ago

Ticker Fixed

@Rich15, the ticker wasn't working because you forgot to Schedule it when the game starts:

Schedule ticker at hero after 0.

Events need to be manually activated from the code in order to execute.

Rules, on the other hand, are executed whenever its prerequisite conditions are met (e.g. the Hero entering a room, an object been taken, etc.).

I've also reformatted the source code by wrapping it at 80. Sorry for this, but I have very poor eyesight and need to work with large fonts, as well as work with two code panels side by side, so wrapping at 80 is something I need. But it's also good practice in general, because files might be viewed in the terminal, e.g. when diffing changes via Git, or shown in GUI diff previewers that show two files side by side (even three files, when executing a three-way-merge).

The exception is AsciiDoc, where splitting contents one-sentence-per-line is idiomatic, but in this case we're dealing with prose so we can safely use wrapping in the editor (force-wrapped code can be harder to read though).

tajmone commented 2 years ago

Added Button to Acrivate Ticker

@Rich15, I've tweaked the meta test adventure by adding a button to active and stop the ticker, since we only need it when testing META VERBs, but it's not useful when testing generic runtime MESSAGEs.

I'll also split the tests into separate solution files, so we can focus on the specific tests in isolation, e.g. some runtime MESSAGEs are not related to META VERBs, but we need to elicit them nonetheless.

I noticed in your comments that you mention that the Spanish library has no transcript commands. We probably should add those to the Foundation libraries too, so this might become part of the current changes in the dev branch, resulting in a new library version, along with the new tests, and fixing any runtime messages that aren't handling GNA properly.

It's probably going to take some time, because eliciting all the runtime messages can be tricky, and requires some careful planning and testing, but this is an important step, since MESSAGEs are at the very core of the Spanish library.

I've also noticed that many of the original verbs have standard responses that assume the object to always be masculine singular. I'll try to fix some of these too, but I think that some of these library messages need some planning and a smarter approach — i.e. trying to come up with messages which are gender and number neutral, so that we don't have to worry about GNA and using all the grammar attributes. In the Italian library that worked well in many cases, whereas in others I decided to implement some "global" library messages that can be shared by multiple verbs, but that requires creating a hidden location to store them as string attributes (a topic which is being discussed also for the English library).