Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inform 7 and the future of IF games in foreign languages

14 views
Skip to first unread message

Eric Forgeot

unread,
Dec 17, 2006, 3:20:14 PM12/17/06
to
(Rakontointeraktiva is a group of users who work at a better support of the
localisation of Interactive Fiction games and systems. In the following
message, I will talk from my point of view but also from the point of view
of the group, after the discussions we had in emails and on the list. It's
located there : http://groups.google.fr/group/rakontointeraktiva?lnk=lr )

Inform 7 is a really nice piece of software, and it was really exciting to
test whether it was possible to adapt it for other languages than English.

We will explain here how we managed to do it, but also where we got
problems.

First, it was great to notice the new libraries were heavily based on the
previous standard 6.10 and later 6.11 inform libraries, and especially it
was well commented and was not trying to break everything herited from the
past of Inform. For ex. the additions for inform7 (the ni parser) are
like :

#ifndef NI_BUILD_COUNT;
Verb meta 'brief' 'normal'
* -> LMode1;

So it was easy to adapt our current localised inform 6 libraries for the NI
parser.

But on the other hand, some statements of Inform 7 are not supporting the
specificities of foreign languages by default, so we had to change them
this way, for example :

A thing can be female.

It's reasonnable to think it doesn't need to be included in the standard
inform 7 libraries, it's up to the translators to include this themselves
(how about the use of gender in some english nouns btw ? Isn't "ship" a
female word, or is it only in poetry ?)

The same goes for the directions :

A direction has a miscellaneous-value called printed name.
The printed name of north is "nord".
The printed name of south is "sud".
The printed name of east is "est".
The printed name of west is "ouest".


The printed name of northeast is "nord-est".
The printed name of southwest is "sud-ouest".
The printed name of southeast is "sud-est".
The printed name of northwest is "nord-ouest".


The printed name of inside is "dedans".
The printed name of outside is "dehors".
The printed name of up is "en haut".
the printed name of down is "en bas".

Adding this king of definitions to a specific language extension would be
the basic to make inform7 work for any language.

But we had also a few problems when we wanted for example to have a female
scenery supporter, the resulting message (in french), when supporting
something, was something like "on laobject est ..." ( "on (in english,
probably...) theobject (they were mixed together) is ...)".

It seems this kind of thing was located in one of the *.i6 file of the
reserved extensions. We don't mind having some more files to translate, in
addition to the traditionnal english.h and grammar.h, in order to make it
work for us, but if those parts to translate are spread in too many files
and inside the inner parts of I7, it will be very difficult for us to
maintain during the natural evolution of the system.

It should be especially conveniant to include this into new extensions, even
if it's for linking to inform6 translated libraries. But where should we
store those libraries ? Could we had them included in the same extension
folder for example ? It the most reasonnable, since Infom 7 was made like
a "bundle" (on macintosh for example), so we don't have to open it and add
our new libraries onto the reserved folder "Natural". We'd like to follow
the Inform 7 rules, conventions and spirit as close as possible.

We can also wonder what kind of thing should be translated in Inform7. Only
what is displayed to the player ? Or the full authoring system ? I
personnaly think the latter would be impossible to adapt, it would be like
translating Basic, Python or C++ into a foreign language, it's too
confusing. From an author's point of view, I found using Inform 7 with
French rather o.k. : The flexibility and ease of use of the new system
could easily be a strong advantage in regard of the verbosity (in English)
of the code, so I managed to cope with the mix of the 2 languages without
much problem.

Some Spanish and French authors agreed they only want I7 to be able
to "talk" to the player in their native language, and they don't need to be
able to write I7 code in something different from english, and probably
most authors will stick to this.

So we may want to have the Inform authors' views (I think especially to
Graham and Emily) about those questions :

1/ How far will Inform 7 allow the support to other languages in the
future ? Inform is the most translated system, it would be a pity if it
would no longer be. With the current "beta" state of Inform 7, it's still
ok, but how will it evolve with the next versions ?

2/ In the Inform authors' opinion, which files should be absolutely
necessary to translate ? Of course english.h, grammar.h, which is already
done (but need to be adapted). Rulebooks.i6 ? verbs.i6 ? More of the
type .i6 ?

For our part, those additional translations will be done only when inform 7
will leave its "beta" state, but will the Inform authors make some
facilities for us ?

With a few "hack", I could adapt fairly easily our french libraries, but I
think I shortcut a few of the new inform 7 possibilities. Nevertheless,
it's working well, and I could make a whole game with it, and a little
working example.
(see : http://anamnese.online.fr/site2/if/Inform7/Sarvegne and
http://anamnese.online.fr/site2/if/Inform7/PetitGnome)

Of course we will try to deal ourselves on the different issues which can be
adapted into some localization extensions, as you can see below, but we
will also ask you when it's something which can't be changed without
touching the official I7 libraries.

Some more concrete requests :

We managed to make some extensions for Spanish and French. But we need some
changes in the inform7 rules :

In Main.i6 (around line 384) :
Please replace Include "Grammar";

by

1. IFDEF ForeignLanguage;
2. IFNOT;

Include "Grammar";

1. ENDIF;

so to avoid the english definition, we can use in our language extension :

Use Foreign Language translates as (- Constant ForeignLanguage; -).
Use Foreign Language.
Include (-
Include "FrenchGN11";
-).

(the foreign grammar library can be included there without problem instead
of in the main.i6, so it means this request could be included into the
official libraries)

Ideally, the Main.i6 could also include : Use Foreign Language translates as
(- Constant ForeignLanguage; -).

But we had also to change this line in the main.i6 :

{-open-file}!% +language_name=FrenchN11
{-call:compile_icl_commands}

For my part, I couldn't find a way to include a generic variable instead of
the FrenchN11 into the Main.i6 library, and this should be changed in the
future.
At the moment, it means we have to either rename or delete the English.h in
the official libraries, and name our localised libraries with english.h, or
change the lines in main.i6 as above. Neither are satisfying for us because
we don't really like to unofficially change the core of Inform7.

About the localisation extensions, they are there at the moment :

Spanish :

http://groups-beta.google.com/group/rakontointeraktiva/files?hl=en

French :

http://anamnese.online.fr/site2/if/inform7/French
http://anamnese.online.fr/site2/if/inform7/FrenchGN11.h
http://anamnese.online.fr/site2/if/inform7/FrenchN11.h

And the archive of the French ones :
http://anamnese.online.fr/site2/if/inform7/Inform7_French.zip


Here we will write down a few more remarks / requests :

1/
The articles, gender and number were easier to deal with Inform 6, unlike in
english, all of this is not obvious in French, Italian, Spanish, German,
Finnish, Swedish...
In an object definition in inform 6 we could add an article variable, so the
parser was dealing correctly with it. Because of the lack of this support,
the player has to remove sometime some articles if he/she doesn't want to
bring confusion.

2/
It's not easy to implement a new verb in an other language (it was easier
too in inform 6), because it's using english forms, with -ing, and it seems
it doesn't work if we use something else

3/
Another annoying thing is the use of ' ', inside a description, it's
supposed to be replaced by " " like a comment, but in French and in other
languages as well, such as Italian, it's much used in sentences, so we
had " in middle of sentences instead of ' . By the way, haven't english
users similar problems in their own sentences ( it's ... - you're ... -
height o'clock ... etc) ?

4/
In the story presentation, it's written "by", and there is no way to change
it into another language (as far as I know)

5/
I think a kind a postprocessor for the NI compiler could be conveniant, so
we could also replace into the auto.inf some inform 6 code by others
(expecially needed in a few occasion when using foreign languages).

6/
We could also wonder how to be able to translate a game into several
language in the same source. For ex. add a leading "[fr]blablalb" into a
string, or for the ease of implementation, a "[if fr]blalbla[end if]english
description. For the name of object, it's possible to mix everything in the
same source (since glulx allow more memory).
This feature could be conveniant when it's the author who translate the
game, and also if the translator find some bugs in the source (think of
putting an open source game on a cvs repository)

7/
And how about the translation of extensions ? Will it need to be separated
into a different file (and probably a different author) ? If so then in
case of revision it will be longer to be translated again.
Since the inform website is now the official repository for extensions, we
could imagine a way to merge an extension with its translations (see point
6 above).
Those points are certainly not a priority at all at the moment...


8/
I add problems to include extensions with accented letters in the
description of it (but it was ok for the documentation).

for ex :

French by Eric Forgeot begins here.

"Des additions aux règles de base pour supporter les spécificités du
français."

A supporter can be female.
/.../
Understand "sud-est/sudest" as southeast.

French ends here.

---- DOCUMENTATION ----

Inform7 va s'améliorer en incluant d'autres langues que l'anglais dans
son système.

but the result in the documentation for the extension was :

Des additions aux rgles de base pour supporter les spcificits du franais.

...

Inform7 va s'améliorer en incluant d'autres langues que l'anglais dans
son système.


9/
Back to inform6, some french authors experienced problems with the 6/11
parserm.h :

With the new rules for handling errors, this part is responsible for some
ambiguous answers because of articles :

if (etype == UPTO_PE) { L__M(##Miscellany, 28);
for (m=0 : m<32 : m++) pattern-->m = pattern2-->m;
pcount = pcount2; PrintCommand(0); L__M(##Miscellany, 56);

for example in the case we have a girl and a door/gate (female gender) in
the same room, if we type a typo or if there is no synonymous for a noun :

ouvrir la prote ("open the gaet")
Je n'ai compris que : ouvrir la fille ("I understood only : open the girl")

We'd like to disable the UPTO_PE constant for us, but it seems impossible
unless we change the parserm.h file, which is not a good solution.

10/
Accessories, I found some english verbs which remain are messed up : typing
sauver (save, in french) is ok, but typing save propose to end the game.
It's like that in zoom, but not in the inform 7 IDE (on mac). Score doesn't
understand the command, but fullscore displays the score. But otherwise 99%
of the english verbs are working as expected. Maybe it's related to to
debuging verbs. So far I haven't seen anything, but I'll investigate
further, and it's not that important.

Our Spanish members also debated on more issues on this thread :

http://groups.google.fr/group/rakontointeraktiva/browse_thread/thread/311485649f552b8c/c3863193a972792a#c3863193a972792a

It was related also to some problems with parts of the body. Some could be
solved by new rules, but some others seemed to be build-in rules.


Thank you in advance for your attention.

Eric Forgeot

unread,
Dec 22, 2006, 5:49:20 AM12/22/06
to
I made an error in two of the url given in the last post. Here is the
correction for my working examples :

http://anamnese.online.fr/site2/if/inform7/Sarvegne/
http://anamnese.online.fr/site2/if/inform7/PetitGnome/


Emily Short

unread,
Jan 1, 2007, 1:04:55 AM1/1/07
to

(Sorry this has gone unanswered a while; we haven't forgotten, but have
been a bit swamped.)

0 new messages