How include translation station name?

thediabl0
Posts: 90
Joined: Tue Mar 17, 2015 11:15 am

How include translation station name?

Post by thediabl0 »

Hello, I include the name in moddesc with tag l10n, but the station name show bad:

Image
PC Specs:
- i5 4690 3.5 Ghz
- GTX 1060 O6G
- 16 GB Ram DDR3
- Win 7 Pro
- Xbox One Controller
SLUBADOG
Posts: 14
Joined: Fri Nov 18, 2016 7:28 pm

Re: How include translation station name?

Post by SLUBADOG »

Could you paste your code?
User avatar
Decker_MMIV
Posts: 287
Joined: Wed Aug 22, 2012 1:02 am

Re: How include translation station name?

Post by Decker_MMIV »

Suggestion / experiment:

Code: Select all

<text name="$l10n_station_inn" ...
<text name="l10n_station_inn"  ...
<text name="station_inn"       ...
Also try to change the user-attribute value in the map I3D file, and see if that changes anything regarding "matching" the same value in your modDesc.XML file's <text> elements.
thediabl0
Posts: 90
Joined: Tue Mar 17, 2015 11:15 am

Re: How include translation station name?

Post by thediabl0 »

SLUBADOG wrote:Could you paste your code?
In i3d map:

Code: Select all

    <UserAttribute nodeId="17245">
      <Attribute name="index" type="string" value="FREIGHTYARD"/>
....

In map01.xml:

Code: Select all

        <tipTrigger index="FREIGHTYARD" stationName="station_freightYard" 
        ....
too in map01.xml, but no work:

Code: Select all

        <tipTrigger index="FREIGHTYARD" stationName="$l10n_station_freightYard" 
        ....

In moddesc.xml:

Code: Select all

    <l10n>
      <text name="station_freightYard">
         <en>Freight Yard</en>
         <de>Güterbahnhof</de>
      </text>
    </l10n>
Decker_MMIV wrote:Suggestion / experiment:

Code: Select all

<text name="$l10n_station_inn" ...
<text name="l10n_station_inn"  ...
<text name="station_inn"       ...
Also try to change the user-attribute value in the map I3D file, and see if that changes anything regarding "matching" the same value in your modDesc.XML file's <text> elements.
The second line I have not tried yet, but in the next code work in the game:

Code: Select all

        <tipTrigger index="FARM_SILO" stationName="station_farmSilo"  
and l10n_en.xml is different:

Code: Select all

<l10n>
	<elements>
		<e k="station_farmSilo" v="Farm Silo"/>
....
but no work in my map.

Edit:

In game show the station name write in map01.xml, no translate.
PC Specs:
- i5 4690 3.5 Ghz
- GTX 1060 O6G
- 16 GB Ram DDR3
- Win 7 Pro
- Xbox One Controller
SLUBADOG
Posts: 14
Joined: Fri Nov 18, 2016 7:28 pm

Re: How include translation station name?

Post by SLUBADOG »

Try to change this line of code:

Code: Select all

<tipTrigger index="FREIGHTYARD" stationName="$l10n_station_freightYard" 
to this:

Code: Select all

<tipTrigger index="FREIGHTYARD" stationName=$l10n_station_freightYard
thediabl0
Posts: 90
Joined: Tue Mar 17, 2015 11:15 am

Re: How include translation station name?

Post by thediabl0 »

SLUBADOG wrote:Try to change this line of code:

Code: Select all

<tipTrigger index="FREIGHTYARD" stationName="$l10n_station_freightYard" 
to this:

Code: Select all

<tipTrigger index="FREIGHTYARD" stationName=$l10n_station_freightYard

No is possible, the xml value need into " "
PC Specs:
- i5 4690 3.5 Ghz
- GTX 1060 O6G
- 16 GB Ram DDR3
- Win 7 Pro
- Xbox One Controller
User avatar
Decker_MMIV
Posts: 287
Joined: Wed Aug 22, 2012 1:02 am

Re: How include translation station name?

Post by Decker_MMIV »

My guess then is, that it could be due to 'TipTrigger' is a base-script and therefor the g_i18n:getText() which is called in lines 301 - 304 simply won't use the mod-map's modDesc.XML's <l10n><text> elements.

Maybe make a "bug report" to GIANTS, about the TipTrigger needs to also look into map-mod's <l10n><text> elements, instead of just the base-game's global i18n lookup table.

A workaround would be to inject the custom <l10n><text> elements into the base-game's global i18n lookup table. But that needs a LUA script to be loaded before the map is loaded/parsed.
thediabl0
Posts: 90
Joined: Tue Mar 17, 2015 11:15 am

Re: How include translation station name?

Post by thediabl0 »

Is possible add stationName with string to User attibute TipTrigger, but this only replaces to stationName in map01.xml

Bug report in "[FS17] Bug Collection Thread (Version 1.3 and up) "?
PC Specs:
- i5 4690 3.5 Ghz
- GTX 1060 O6G
- 16 GB Ram DDR3
- Win 7 Pro
- Xbox One Controller
Post Reply