intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Aug 18, 2018 3:38 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: translate directions
PostPosted: Wed Jul 04, 2018 7:37 am 
Offline

Joined: Mon Apr 02, 2018 3:05 pm
Posts: 15
Hi,

I translate an IF game, and I want to translate the directions in that. I did the following:
Code:
 Understand "é/észak" as north. 
Understand "d/dél" as south.
Understand "k/kelet" as east.
Understand "ny/nyugat" as west.
Understand "fel" as up.
Understand "le" as down.
Understand "be" as inside.
Understand "ki" as outside.
The printed name of north is "észak" .
The printed name of south is "dél" .
The printed name of east is "kelet" .
The printed name of west is "nyugat" .
The printed name of  up is "fel" .
The printed name of down is "le" .
The printed name of inside is "be" .
The printed name of  outside is "ki" .

The problem is that the game uses the old abbreviations too. For example, when I write d, I mean dél/south, but I get the answer:
Quote:
Which do you mean, the dél or the le?

How can I remove the original abbreviations?


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Wed Jul 04, 2018 8:34 am 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 340
The easiest way is to replace that section of the Standard Rules. (It's Section SR1/4 - Directions.)


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Wed Jul 04, 2018 1:40 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2637
Location: The Midwest
Specifically, use something like this:

Code:
Section - New Directions (in place of Section SR1/4 - Directions in Standard Rules by Graham Nelson)


Then within that section, define your directions in place of the standard ones.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Thu Jul 05, 2018 6:28 am 
Offline

Joined: Mon Apr 02, 2018 3:05 pm
Posts: 15
Draconis wrote:
Specifically, use something like this:

Code:
Section - New Directions (in place of Section SR1/4 - Directions in Standard Rules by Graham Nelson)


Then within that section, define your directions in place of the standard ones.


Thanks. I did the following:
Code:
Section - New Directions (in place of Section SR1/4 - Directions in Standard Rules by Graham Nelson)

The specification of direction is "Represents a direction of movement, such
as northeast or down. They always occur in opposite, matched pairs: northeast
and southwest, for instance; down and up."

A direction can be privately-named or publicly-named. A direction is usually
publicly-named.
A direction can be marked for listing or unmarked for listing. A direction is
usually unmarked for listing.

A direction has a direction called an opposite.

Include (-
   has scenery, ! class CompassDirection,
-) when defining a direction.

The észak is a direction.
The északkelet is a direction.
The északnyugat is a direction.
The dél is a direction.
The délkelet is a direction.
The délnyugat is a direction.
The kelet is a direction.
The nyugat is a direction.
The fel is a direction.
The le is a direction.
The belül is a direction.
The kívül is a direction.

The észak has opposite dél. Understand "é" or "north" as észak.
The északkelet has opposite délnyugat. Understand "ék" as északkelet.
The északnyugat has opposite délkelet. Understand "ény" as északnyugat.
The dél has opposite észak. Understand "d" or "south" as dél.
The délkelet has opposite északnyugat. Understand "dk" as délkelet.
The délnyugat has opposite északkelet. Understand "dny" as délnyugat.
The kelet has opposite nyugat. Understand "k" or "east" as kelet.
The nyugat has opposite kelet. Understand "ny" or "west" as nyugat.
Fel has opposite le. Understand "up" as fel.
Le has opposite Fel. Understand "down" as le.
Belül has opposite kívül. Understand "be" as belül.
Kívül has opposite belül. Understand "ki" as kívül.

The verb to be fölötte means the reversed mapping fel relation.
The verb to be mapped fölötte means the reversed mapping fel relation.
The verb to be alatta means the reversed mapping le relation.
The verb to be mapped alatta means the reversed mapping le relation.

It has the following problem: the compiler complains about several rules in other sections in the Standard rules, for example:
Quote:
In the sentence 'if the second noun is down or the actor is on the second noun' , I was expecting that 'second noun is down or the actor is on the second noun' would be a condition...

So, I have to correct these rules too, or I have to leave the original English directions in my version, and replace the abbreviations only, with my directions, abbreviations.
The first version is not perfect, because players can use the original direction names. The second maybe means to include and rewrite the whole Standard rules...


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Thu Jul 05, 2018 7:35 am 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5320
Location: Burlington, VT
pischta wrote:
The first version is not perfect, because players can use the original direction names.


You might be able to solve this by making the English directions privately-named. When something is privately-named the player can't use its source code name to refer to it--they can only use the Understand statements you have explicitly given.

This would still mean that you have to use the English names in your source codes instead of the Hungarian ones, though, but that might still be easier than rewriting lots more of the Standard Rules.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Thu Jul 05, 2018 8:35 am 
Offline

Joined: Mon Apr 02, 2018 3:05 pm
Posts: 15
matt w wrote:
pischta wrote:
The first version is not perfect, because players can use the original direction names.


You might be able to solve this by making the English directions privately-named.

Thanks, I will use that.
Quote:
This would still mean that you have to use the English names in your source codes instead of the Hungarian ones, though, but that might still be easier than rewriting lots more of the Standard Rules.

No problem.
But I still have error messages after this:
Code:
The north is a privately-named direction.
The northeast is a privately-named direction.
The northwest is a privately-named direction.
The south is a privately-named direction.
The southeast is a privately-named direction.
The southwest is a privately-named direction.
The east is a privately-named direction.
The west is a privately-named direction.
The up is a privately-named direction.
The down is a privately-named direction.
The inside is a privately-named direction.
The outside is a privately-named direction.

The north has opposite south. Understand "é" or "észak" as north.
The northeast has opposite southwest. Understand "ék" or "északkelet" as northeast.
The northwest has opposite southeast. Understand "ény" or "északnyugat" as northwest.
The south has opposite north. Understand "d" or "dél" as south.
The southeast has opposite northwest. Understand "dk" or "délkelet" as southeast.
The southwest has opposite northeast. Understand "dny" or "délnyugat" as southwest.
The east has opposite west. Understand "k" or "kelet" as east.
The west has opposite east. Understand "ny" or "nyugat" as west.
Up has opposite down. Understand "fel" as up.
Down has opposite up. Understand "le" as down.
Inside has opposite outside. Understand "be" as inside.
Outside has opposite inside. Understand "ki" as outside.

The inside object translates into I6 as "in_obj".
The outside object translates into I6 as "out_obj".

The verb to be above means the reversed mapping up relation.
The verb to be mapped above means the reversed mapping up relation.
The verb to be below means the reversed mapping down relation.
The verb to be mapped below means the reversed mapping down relation.

Quote:
You wrote 'The verb to be above means the reversed mapping up relation' : but new verbs can only be defined in terms of existing relations, all of which have names ending 'relation': thus '...implies the possession relation' is an example of a valid definition, this being one of the relations built into Inform.

I didn't find more about 'above' and 'below' in the Standard Rules extension.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Thu Jul 05, 2018 1:28 pm 
Offline
User avatar

Joined: Fri Jul 11, 2014 12:50 pm
Posts: 104
In fact, it is possible to use the translated name even in your source if you write:
Code:
North translates into Hungarian as észak.

(And I think you wouldn't need the understand lines then.)

However, the line above won't work by default. You would first have to create a new file at a specific place in your Inform installation to define the Hungarian language (I can explain later if you really want).

A full-featured language extension is quite difficult to write and there as there are a lot of undocumented features that you can use.

You can see the French extension (French Language.i7x) to have an idea of how a language extension looks like. It may seem really complicated, but you don't need all that is there to have a working extension. And obviously, it's easier to understand if you know French, but it may still help you if you don't.

I'm the maintainer of the French extension, so feel free to ask me anything. Seeing a new translation always makes me happy! :D

There is also Spanish and Italian extensions, but I couldn't find the links at the moment.

If you only want to translate a game, having a full language extension may be overkill, though.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: translate directions
PostPosted: Fri Jul 06, 2018 3:21 am 
Offline

Joined: Mon Apr 02, 2018 3:05 pm
Posts: 15
Natrium729 wrote:
In fact, it is possible to use the translated name even in your source if you write:
Code:
North translates into Hungarian as észak.

(And I think you wouldn't need the understand lines then.)

Maybe just for short versions?

Quote:
You would first have to create a new file at a specific place in your Inform installation to define the Hungarian language (I can explain later if you really want).

Yes, please help me to write a very basic version. Maybe I extend it later, but I think it is a very big task, and I won't have time creating a pro version. Hungarian language is very complicated :)


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group