Hi! So here’s the promised thread about translating the new version of Inform!
I’ll start with a guide to get a translation started. Keep in mind there are still a few things to iron out.
And thanks @CrocMiam who helped for some of the points!
Creating the language kit
First, we’ll assume you’re using this on the command line to compile a project.
inform7 -internal Internal -external External -project project.inform -format=Inform6/32d -no-census-update -transient Transient
With the source of the project being:
"Hello World" by Natrium729 (in French)
[With your language inside the parentheses above.]
Kitchen is a room.
The next step is to create a kit for your translation. Copy the English kit located at Internal/Inter/EnglishLanguageKit/
into External/Inter/
(no need to copy the .interb
files). Rename it into FrenchLanguageKit
or ItalianLanguageKit
and so on, and rename the file FrenchLanguageKit/Sections/Language.i6t
into Language.w
.
In your kit, remove the priority
field from kit_metadata.json
(so that it’s read after the Standard Rules, since it’s likely the translation uses things defined in them) and update the title
and version
fields; and the need
field to point to the Inform extension of your translation.
Then, update the Title
, Author
, Purpose
and Licence
fields in the file Contents.w
in your kit.
And if I haven’t forgotten anything, we’re done now for the kit! Onto the next step, the extension.
For more info about kits, see the relevant page in the extension.
Creating the extension
Now, create an empty extension in External/Extensions/Author name/French Language.i7x
(with the correct author and language name, of course).
Then paste the content from the extension for the previous version of Inform piece by piece, and compile each time to make sure nothing is broken. There are some things to watch for, though.
For Inform 6 inclusions, if they are replacing a part of Language.i6t
, then you likely have to move them into the Sections/Language.w
of your kit, into the appropriate part, instead of writing it in the extension.
If they are replacing another part of the template, for example:
Include (-
[ PrintTimeOfDay;
! Content of the routine.
];
-) instead of "Digital Printing" in "Time.i6t".
You have to use the new syntax to replace an existing Inform 6 routine instead:
Include (-
[ PrintTimeOfDay;
! Content of the routine.
];
-) replacing "PrintTimeOfDay".
For Preform, some no longer work, for example <indefinite-article>
. You have to find the new equivalent Preform, but I haven’t found everything out yet, so I just kept it commented out for the moment. For the X translates into French as Y
to work, you have to add the following, (replace fr
in the name with your language code), even though I don’t understand everything in it:
<grammatical-case-names> ::=
nominative | accusative
<noun-declension> ::=
* <fr-noun-declension-group> <fr-noun-declension-tables>
<fr-noun-declension-group> ::=
* 1
<fr-noun-declension-tables> ::=
<fr-noun-declension-uninflected>
<fr-noun-declension-uninflected> ::=
0 | 0 |
0 | 0
Defining adjectives with In French X is an adjective
makes Inter error out, but I haven’t found why.
For the rest of the Preform, you have to double-check that the names and content of the non-terminals are still the same as in the English Syntax.preform
built in Inform.
A bug with adaptive verbs: in text subtitution, you write them in the viewpoint specified in the adaptive text viewpoint property of the language. In French, that would be "[as]"
for “avoir” However, when using the verb as a value (like in a phrase To lookup (V - a verb)
), you now have to use the first person plural, like in English: "[lookup the verb avons]"
.
Some new responses to add since 6L38:
- describe what’s on mentioned supporters in room descriptions rule response (A)
- action processing internal rule response (K)
- immediately undo rule response (F)
- announce items from multiple object lists rule response (A)
- can’t insert what’s already inserted rule response (A)
And now you should have a more or less working translation, albeit with some workarounds. You also should double-check the Inform 6 to make sure they weren’t updated since last time (Some constants in #Ifdef
s aren’t the same, for instance, like in Banner
.).
So I hope that was helpful and that I haven’t forgotten anything! I’ll add things as I encounter them, and I’ll hope you’ll do too!
Let’s get the translations going!