Little help with translation

Second question, this time more about translating some text to polish. For example, it’s easy to create polish translation of „open”, „jump”, „wait” etc. etc.

Understand “open_in_polish [something]” as opening.

This above works just fine.

I know how translate things like „Taken” after player take something:

After taking, say “”.

But still, there are many things I don’t know how to translate. For example, when player tried to go somewhere but bump into locked doors (having right key in pocket), Emily Short’s lovely Locksmith extension says:

(first opening small door)
(first unlocking small door)
(with small key)

And when don’t having a key:

(first opening small door)
(first unlocking smal door)
You lack a key that fits small door.

How can I translate this? ::slight_smile:

#2

I beg your pardon? when player press enter without entering any words.
How to translate this?

If you are using a recent version of Inform 7, you should be able to replace almost any response by using the name of the rule and the letter assigned to the response.

To see what the rules and letters are, run the game, and type RESPONSES at the command prompt. You can choose which list of responses to see.

“I beg your pardon?” shows up as this response:

To change it, you add this to your code:

parser error internal rule response (X) is "New text in Polish."

In the Inform manual, this is explained in “14.11. Changing the text of responses”. (In Inform 7 6L38, that is. I don’t know if the chapter numbers have changed at all for the newer version of Inform.)

And to translate articles, pronouns and more things, you’ll have to write some code in Inform 6.

And if you want an author to be able to change the tense (present, past…) or point of view (you, I, she…), it’ll take some more complicated code that is not really documented.
But if you are making a translation just for your game without planning of releasing a polish extension, you won’t need that.

You might want to check out some of the translations here to see how people have solved these problems for other languages. These are mostly either full extensions to make a non-English language the language of play or translations of existing extensions.

There is also some Inform 7 game source code in the language-specific subdirectories here. Inform 6 and 7 files are mixed together, so you’ll have to dig through them looking for the I7 ones if that’s what you’re interested in.

No, you shouldn’t look at the link vlaviano gave if you are using 6L38.

You should instead look here for the French extension, here for the Italian extension and here for Spanish.

I can also help you if you need (I’m the maintainer of the French extension). It’s always great to have Inform in more languages!

Thanks for these links.

It seems that the versions on the official Inform site are outdated, although the German one is recent enough (2015) that it could be worth looking at.

Yeah, the current language extensions are outdated on Inform’s site. Even the German one it seems, unless you use 6G60 (maybe whoever maintains this extension found that updating it would be too much work).

Thank you, bg, Natrium729 & vlaviano - I’m really grateful. ::slight_smile:
Using „RESPONSES ALL” I now see all names, including this one from Short’s extension. Now I can translate. ^^

For now, I just need to translate it for my game, maybe some day I will think about bigger polish translation. ::slight_smile:

1 Like

Oh, I forgot. I’ve got more questions.

#1

I’ve translated taking inventory:

Instead of taking inventory:
say “Masz ubrane: [list of things worn by the player].[line break]Nosisz przy sobie: [list of things carried by the player].”

(„Masz ubrane” is polish „you carries” and „Nosisz przy sobie” - „you are wearing”)

And now, when player type „i” pops up something like:

Masz ubrane: czarne spodnie, czarna bluza and czarne buty.

(„czarne spodnie” - black pants, „czarna bluza” - black sweatshirt, „czarne buty” - black shoes)

Almost everything is in polish, except „and”. How can I get rid of it? Can I force inform7 to change „and” to my polish „and”, which is „i”? And if not, can I force inform7 to show inventory list differently, without „and” at all?

#2

Is it possible to have different names for objects when examining them and when they are in inventory?

#2:

[spoiler][code]Cubicle is a room.

A desk is a supporter in Cubicle.

A paper clip is on desk. The description is “[if paper clip is not carried]It’s a discarded paper clip.[otherwise]This might be useful to pick that lock on the boss’s office.[end if]”

Rule for printing the name of paper clip when paper clip is carried by the player:
say “bent piece of metal”.

Understand “bent/piece/metal” as paper clip when the item described is held by the player.

Test me with “x clip/x metal/take clip/i/x clip/drop metal”
[/code][/spoiler]

The Italian extension (but I think also the French and Spanish ones) does not work with 6M62 (but works with 6L38) because of a bug about:

“In Italian … is a verb”. Discussion here: I7 6M62 and "Italian" by Massimo Stella

I think that you’d better to avoid the latest version of Inform 7, if you want to work on translations.

Thank you, HanonO, for „Rule for printing the name when paper clip is carried by the player” trick. ::slight_smile:

Another question. If you write [are] in rules, you receive „are” when list has more then one item and „is” when there is only one item on a list. How can I use it in my polish translation but force inform7 to say polish „jest” instead of “is” and polish „są” instead of „are”?

You would need to write some not very well documented code I mentionned before.

Or you could write this if you don’t want to get complicated.To say jest: if the prior named object is plural-named: say "sa"; otherwise: say "jest";And you can add all the forms you need.

Also, don’t use instead rules to translate the responses, use the responses system as described in the relavant chapter of the documentation. (or look at the extensions I linked, in the section “Responses”.) That’s the way to translate that “and”.

I put

To say jest:
if the prior named object is plural-named:
say “sa”;
otherwise:
say “jest”;

in my code and then use [jest] like originally, in english, „[are]”?

Well, the best way to know the answer is to try it yourself, don’t you think?

(the answer is yes, you can now write “[jest]” instead of “[are]”, assuming you added the other forms for the other persons. Else it won’t agree with the player, for example.)

Truth is I tried and it didn’t work. I surely don’t understand something.

What do you mean saying „you added the other forms for the other persons”?

It should work (but I haven’t tested it). Could you be more specific (does it throw an error, or does it print the wrong thing ?)

By by other form, I mean if the prior named object is the player, the verb should conjugated with “you” (or whatever the point of view is). And maybe you’d want to support multiple tenses, but only present is OK if it is only for one game.

Error was related with wrong tabs. I fixed it.

I’ve add:

To say jest: if the prior named object is plural-named: say "sa"; otherwise: say "jest".

And then:

examine containers rule response (A) is "W środku [jest]: ".

Which mean something like „Inside [is/are]: [list of things in container]”

But it does not use plural polish word, „są”, but single one - „jest”, even if container is full of objects.

You need to test “if the prior naming context is plural” to work with both lists and single objects.