Spanish Wearing Mechanics #33
Replies: 10 comments 20 replies
-
Hi @tajmone! Thanks for answering and explaining the background. Answers to translation questions.
In Spanish, wear has no single-word translation. Instead we usually use llevar puesto (to wear clothes on = llevar ropa puesta, ponerse ropa). I think
(Note: "vestido" would also work, but it only applies to clothes like pants and shirts, not to shoes or glasses.)
The best translation I can come up with is "portador". This could also mean "carrier", but again, the verb wear and Spanish translations don't get along so well. Taking your example:
To Spanish:
If it has any syntax mistakes please let me know :) Additional Comment on
|
Beta Was this translation helpful? Give feedback.
-
New Mechanics ImplementedOk @Rich15, the new wearing mechanics should be now fixed and working in the Spanish library. You can check the updated code in the I had to improvise a few terms translations, so I just wanted confirmation that these are OK:
Some temporary attributes for internal library use were still not translated. They are not crucial but they could make the code easier to read and understand:
Beside that, the library seems to work fine with the new system. The Vampiro sample adventure did contain a wearable item, so I had to do some minor tweaks to the code to make it use the new wearing system, and it seems fine. There's only one change left from this set of changes, i.e. editing the runtime message so when listing the items in a container it will specify "being worn" when the item is a worn item (of course, it should only happens when listing actors). My problem here is that I noticed that these messages in the original pALANte code don't seem to carry out any checks regarding the gender and number of either the carrier nor the items being listed. The English library only checks for number, since nouns gender doesn't affect the text output — from
The Spanish library doesn't seem to carry out any checks in this respect — from
and for some reason the Not knowing how gender and number should affect these sentences, I'm a bit stuck here (and elsewhere), so I couldn't implement here the changes which in the English library mention worn items — from
I could just leave these messages in English for the time being (and I'll probably do so after lunch), but the question begs whether the Spanish code should take into account gender and number when generating "(being worn)". In the Italian library I have to change the text based on whether the noun mentioned is plural or singular, masculine or feminine; but it usually boils down to just changing the final vowel of an adjective (since this is a common case, I've added on each object a In general, while looking at the Spanish library code, I noticed that in many places message responses don't carry out extra checks on gender and number of some nouns. This seems to apply specially to actors, where I think the author assumes that they are always singular, so there are only checks for gender (if any). Truth is, even though it's rare, you can encounter actors which are plural nouns (e.g. "the evil twins"). But this is not an issue specific to the wearing mechanics, so it can be safely postponed. It was more of a pending question that's been on my mind, but I thought of sharing it with you so you get a better understanding of the areas where I'm struggling. Automated TranscriptLater I'll try setup the test suite for the Spanish library and create a simple adventure with some actors and wearable items, so we'll have some automated test to track changes in the wearing mechanics — all tests are automated, so that whenever a line of code is changes in the library we can immediately see how its impacting the existing sample adventures and tests, because Git will detect changes in the resulting transcripts (usually these are expected changes due to fixes, but sometime unexpected side effects are caught too). For the Spanish lib, right now there's only the transcript generated for the walk-through of the Vampiro sample adventure: But that transcript should give a good idea on whether the basic verbs are handling the grammar correctly in verb responses. |
Beta Was this translation helpful? Give feedback.
-
Spanish Test Suite Now Available@Rich15, I've now set-up the Spanish test suite in: Any Right now, there's only a single test, for wearables:
The transcript gives you an indication of the current state of the wearing mechanics, its verbs and messages, etc. I've left all comments in English to simplify interventions by non-Spanish speakers (bug fixes, etc.). |
Beta Was this translation helpful? Give feedback.
-
Hey @tajmone! Sorry for answering late, I was having some trouble with my internet connection. Translations
Regarding
|
Beta Was this translation helpful? Give feedback.
-
New Wiki Pages for Translators and PortersI've just added two new pages to the project wiki which are going to be useful for all library translation work:
@Rich15, you should look at these pages, I've added various links for Spanish libraries, but I also believe that the Italian library articles might be of help, since the languages are very similar. Some of those articles (all in English) describe how Italian grammar and prepositions are handled in IF in general, while others provide ALAN specific examples, including mentioning known problems and limits. @thoni56, I couldn't find any Swedish libraries, and didn't provide links to Swedish translators and dictionaries yet (having zero knowledge of the language it's hard for me to tell the quality of resources I find online). OK, this should really be my swan song for today: one hour left to my dentist appointment! I though of some last heroic act before meeting my faith 😉... |
Beta Was this translation helpful? Give feedback.
-
Wearables Examples@Rich15, could you please provide me at least one example of wearable items for each gender an number combination (i.e. masculine/feminine & singular/plural)? I need these nouns for test suite, in order to check that they are mentioned correctly. E.g. in Italian these could be:
Also, I would like to fix the current message which is shown when listing worn items (i.e. The idea is that the runtime MESSAGEs defined in the The question is: is there a standard way to translate "being worn" for any noun by knowing its gender and noun? In Italian the "worn" adjective will have a fixed declination based on g/n, so you don't need to know anything else:
is it the same in Spanish? As you can see from the above, in this case only the final vowel of the adjective is affected, which why I've added to each noun the
Right now I'll just add a series of
|
Beta Was this translation helpful? Give feedback.
-
GNA Fixes@Rich15, I've fixed the missing GNA checks in
Hopefully it's working correctly. Now
I also noted that you mentioned that the
I guess that also Bare in mind that GNA applies to both parameters here. In some messages (not these two though), the parameter might also be referring to an actor, which means that if it's a named actor it will never be shown with the article — e.g. "Bob" instead of "the professor". I'm not sure if this could make a difference in how these sentences need be written or whether it's irrelevant (my guess would be that this shouldn't affect verbs and adjectives). Probably most of the GNA fixes should be postponed to when we have the new initialization module, since this will allow less
Wearables Test AdventureI'd like to drop my original
Can you handle adapting your adventure and tests accordingly? I won't be able to ensure that the Spanish text is correct (in fact the twins text is all in English in my adventure). Once that's in place, I'll take care of deleting my old adventure and only keep yours, and update the various solutions files to cover all the required tests for GNA, verbs checks, error messages, exceptions, etc. Before merging the Spanish dev branch I'm waiting to see how the current work on updating scenery objects in the English library is going (Thomas and I are discussing some problems that need to be solved before merging this update), because I'd like to integrate in the next Spanish version those scenery updates too. But if the scenery changes end up requiring too many changes, or taking too long, I'll just postpone it for the Spanish library and make a smaller update (if the English update is out before we've fixed the test adventure I'll include it, otherwise I'll just create the new Spanish version with these updates). In any case, once these changes and fixes are merged into By working together on the grammar module, I'll get a chance to learn better how GNA works in Spanish, and you'll get to understand how the core of the library works, which is going to enable both of us to work with more confidence on the library sources (after all, neither of us wrote it in the first place). I'm sure that by now you're starting to realize that the ALAN language is fairly simple to learn (by design), and that it can be mastered in a matter of weeks. Obviously, there is no better way of learning it than using it, and in this respect the library test suite offers ample chances of creating many small adventures, each targetting a specific set of features. So, in a way, when developing or maintaining a library you end up writing lots of ALAN code, covering all features and angles, which is a good way to learn the language inside out (and to find any hidden bugs), much more than writing a "real" game, since test suites are intended to push every feature to its limits, covering every possible case (even the most unlikely ones). |
Beta Was this translation helpful? Give feedback.
-
Wrapping up Next Release@Rich15, I want to wrap the dev branch and create a new minor release for the Spanish library, so we can start working on the grammar module — it doesn't make sense to keep working on the current system, especially now that you pointed out that the Also, I don't like to keep dev branches open for too long because the risk is that I end forgetting all the changes that are there (since I'm spread thin across different projects at once). I'd like to proceed as follow:
this means that no two adventures can share a common base name. I.e. the So I must keep only one of them or I can't merge. Also, I'm thinking of renaming all tests into English:
because it makes it easier for all developers to find which test is doing what — we can safely assume English as the shared language for all developers on the team. I'm also in favour of keeping English comments within the adventure and solution files, as well as having the opening descriptive text in English, so if any ALAN bugs come up during the test it's going to be easier to contextualize them. After all, these are only tests, not full adventures, so as long as the actual individual tests are in Spanish we should be fine. Be aware that I shall be renaming and deleting test files in the About Test FilesHaving a test suite that covers extensively the library features is on of our main goals right now, since it's our window on the library integrity status. Because test files don't really belong to library releases, they can be integrated at any time, and not necessarily with a specific library release. We usually include them with the new library versions just because it allows us to keep the number of commits shorter. I think that the best strategy for developing the test suite together would be if I start creating the test adventures drafts and the you help me translating them and filling them out — i.e. I provide a "skeleton" or sketch, and you flesh it out. Missing Examples NounsJust like we did with actors and wearable items, we'll be needing a list of objects covering each gender and number to test all the possible objects types — at least two for each gender and number, so we can test that they are listed correctly in the various combinations:
As we saw with the The different types of game objects we'll need to be testing are the following:
The idea is that for all the above categories of objects types (for which there's either a special library class or dedicated attributes), we need to cover tests for all genders and nouns. I have no ideas of how to find common objects names covering all GNA for these, so it would be really helpful if you help me flesh out a list, so I can start sketching some initial tests. As the list comes into being, I'll be adding it to a reference document somewhere, so it can be consulted when creating new tests. Library ExamplesIt would also be useful to have a list of common furniture and props that can be used to quickly flesh out rooms in test adventures, to allow testing "real case scenarios" and advances library tricks (e.g. implementing things not covered by the library, like pouring wine from a bottle, creating disposable containers like soda cans, etc.) — after all, we also need to test the usability of the library, not just its internal integrity (this part is much more fun, since it's closer to writing real adventures, since they are small scale examples of a real adventure). These tests will probably ultimately become small library examples that will be included in the release package, to show end users how to implement various things. But initially they'll be created as test adventures, then at a later stage, when the library is mature, we'll simply create a polished version as examples. So, things like common furniture and house appliances for the various rooms of the household would be useful — just remember to provide their article too, and mention their gender and number, so I can handle them correctly. |
Beta Was this translation helpful? Give feedback.
-
Lib ES v2.0.1 Released@Rich15, I've finally managed to release To keep Git's history cleaner and shorter, I've squashed all commits into one. Unfortunately this means that the single commit results created by me, but I've made it very clear all over the place (including the commit message) that this new version was the result of your contributions and work. I've also hard reset the I've kept your new test adventure for wearables items and dropped mine, although I ultimately sort of merged the two together (keeping some of my old code in comment blocks, in case we need it later). I've also renamed it to Now I'll start looking into the grammar module. I'll begin by studying the Inform 6 Spanish library, to see what grammar elements are handled and how, so I can getter a better picture of what the initialization code should do. Once I have a clearer perspective, I'll update Discussion #35 with my findings and some initial proposal. I really think that the grammar module is going to make the library easier to use, but also easier to maintain for us developers. I really want to thank you for all your precious support and contributions — without which these important updates would have never come into being, since I was basically stuck and running into circles. |
Beta Was this translation helpful? Give feedback.
-
Fused tests and Library release
Hi @tajmone. That's great! Fusing both tests was a really good idea.
|
Beta Was this translation helpful? Give feedback.
-
@Rich15, sorry for the late reply but it has been a long day and I couldn't get to the PC any earlier.
Ok then, in this Discussion I'll present you the main obstacle I'm facing now in updating the Spanish library.
We've recently updated the English library code that handles the mechanics of wearing items (clothes, glasses, backpacks, etc.) — you can read the full Discussion of the changes at #18, in case you're curious, but here I'll provide you with an overview of the task and its problems.
The Basic Classes in ALAN
But let's start with an overview of ALAN's predefined classes system...
ALAN provides IF authors with some basic classes which can be used to create the various "things" that populate an adventure world, as shown in this diagram:
The classes in grey color are only related to player input commands (i.e. literal strings and numbers), whereas the classes in yellow are the abstract blueprints from which concrete game "objects" are created (instantiated).
The Old Wearing System
For the wearing mechanics, we're dealing with two main classes:
actor
(the potential wearer) andobject
(the potential item being worn).Since only some objects are wearable, we define a
wearable
attribute on every object, which can either be true or false, depending on whether the object is a wearable item or not — we could have created awearable
class, but the attribute is more flexible in this case, and the library uses quite a number of attributes to control different properties of objects (eatable, readable, etc.).So, the English library module defines the
wearable
attribute in thewear.i
module:As you can see, the language is very close to English prose, it's almost like reading text rather than code (but it's not a natural programming language, like Inform7).
Now, when an object is IN the
Hero
(the player character in the game), the the player is carrying that object (i.e. it's in the inventory). Actors, like objects, can be given theContainer
property, which allows to place object inside them.The question arises: how can the game distinguish between items which are just carried by the Hero and those which are worn by him?
The old wearing mechanics of the libraries used a trick to this end, it would create an
entity
instance called theworn
, and move therein all worn items by the player. So the command 'wear X' would result in item X being moved into thisworn
entity, which has the sole purpose of holding the items worn by the player at any moment in the game.Since objects of the
entity
type are always "in scope" (i.e. considered in the current room/location of the player) they would always be reachable in the game.The New Wearing System
The above solution worked well at the time (i.e. 10+ years ago) but in the meantime ALAN introduced some new language features that end up clashing with the worn entity, so we decided to adopt a simpler approach, even though it adds more code to the library.
In the new system,
worn
is just a true/false attribute, so any item is eitherworn
ornot worn
at any given moment (and of course, the library code ensures that only items which arewearable
can end up being worn).We've also added a
wearer
attribute to easily track who's wearing the item, which now allows also non-player characters to wear items. The definition shown above has now become:Please note that the keywords
IS
,HAS
andCAN
are just aliases of each other, and they all refer to attributes of the true/false type, and they are provided to make the source code more intuitive to read — butcould have just been written
or even
the use of
has
just makes it clear what the attribute role is.I've started the adaptation work for the Spanish Foundation Library in a dedicated development branch, so I'll be able to ensure that everything works fine before putting the code in the actual library, as well as add some tests. This temporary development branch can be seen here:
https://github.com/alan-if/alan-i18n/tree/dev_alan-es_wearing
My main problem right now is translating correctly the new attributes and messages.
In the English library, the change from
worn
being an entity to becoming an attribute didn't have any "prose implications" — before the library code had to check if an object wasin worn
, now it checks ifis worn
.The equivalent modules in the Spanish library are the
llevar.i
andinventario.i
files, which currently hold the following definitions, respectively:and
Translation Questions
Here are some linguistic doubts I need help with:
llevado
identifier previously used for the entity also be used for the attribute? i.e. would it makes sense to read in the codeis llevado
,is not llevado
,make object llevado
, etc.?During my attempt to dig into the Spanish dictionary, I got the impression that the term "llevado" actually means "carried", rather than "worn". But no matter how many translators I tried, I couldn't find a term specifically indicating an item being worn (remember, it's not just clothing, but glasses, etc.).
The whole point of this attribute is to distinguish items which are simply carried by actors from those which are actually worn, so it would be good to ensure the term is specific enough.
Please, note that these identifiers are only internal references to the adventure source code, so they don't affect the text shown in the actual game; but since this is a reusable library, its terminology should be as explicit as possible, so that anyone reading an adventure source can intuitively understand what the code does.
wearer
attribute?Again, my search attempt didn't lead to any terms I could feel confident with.
Here are some practical examples of how this attribute is used in the code with the English library:
So, although the ALAN language keyword remain English words, the idea is that the use of Spanish identifiers should result in code which can be read and understood easily by any native Spanish speaker which understands the basic words of the ALAN language (is, not, verb, make, etc.).
Also note that these attributes will have to be uses "as they are", regardless of the gender and number of the object they refer to — it's always assumed the attribute refers to the class, not the specific instance. So if it's an
object
attribute, it should take the gender and number form of the Spanish equivalent of the term "object"; and if its an attribute specific to a custom created class, it should follow the name of that class, etc.. That's to keep things simple.So, these are the Spanish terms which I'm currently stuck with, and which I'd like to also understand better how they are understood and used, so I can take in better the library code and how it's perceived by a native speaker.
But as I start to tweak the various verbs, I might also have to deal with translating new messages, and handling correctly their gender, number and animate/inanimate status (aka GNA) to ensure the messages are correctly printed with all types of nouns.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions