Localization Issues

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Localization Issues

Post by Cybernetic pig »

Russian localization for GMDX is nearly complete, but there's two odd issues. The first is some lines of text are displayed with their quotes. So for example in the localization file stringx="I am a string" when displayed in-game will appear as "I am a string" instead of I am a string (no quotes). This is only a problem for approximately three strings.

The second issue is also odd. I can't figure out why the localization isn't applying.
In one of GMDX's options menus (three in total - all the rest have been localized successfully) there is a "show tips" function that gives the player some tips on how to do certain things in Deus Ex/GMDX that normally you'd find in a manual, stuff like how to mantle, or how to use the variable scope, important stuff. Well it isn't translating to russian for some reason.

The code tags on this forum messes with the formatting, so reading will be extra messy unfortunately.

The class:

Code: Select all

//=============================================================================
// MenuScreenOptions
//=============================================================================

class MenuScreenGMDXOptions2 expands MenuUIScreenWindow;

var localized string ss1, ss2, ss3, ss4, ss5;
var localized string ss6, ss7, ss8, ss9, ss10;
var localized string ss11, ss12, ss13, ss14, ss15;
var localized string ss16, ss17, ss18, ss19, ss20;

event InitWindow()
{
	Super.InitWindow();

	actionButtons[3].btn.colButtonFace.R = 255;
	actionButtons[3].btn.colButtonFace.G = 255;
	actionButtons[3].btn.colButtonFace.B = 255;
	actionButtons[3].btn.colText[0].R = 128;
	actionButtons[3].btn.colText[0].G = 0;
	actionButtons[3].btn.colText[0].B = 0;
}

function SaveSettings()
{
   Super.SaveSettings();
	player.SaveConfigOverride();
}

function ProcessAction(String actionKey)
{
	if (actionKey == "TIPS")
	{
	CreateTips();
    }
    Super.ProcessAction(actionKey);
}

function CreateTips()
{
    local float rnd;

    rnd = FRand();

    if (rnd < 0.05)
    ShowHelp(ss1);
    else if (rnd < 0.1)
    ShowHelp(ss2);
    else if (rnd < 0.15)
    ShowHelp(ss3);
    else if (rnd < 0.2)
    ShowHelp(ss4);
    else if (rnd < 0.25)
    ShowHelp(ss5);
    else if (rnd < 0.3)
    ShowHelp(ss6);
    else if (rnd < 0.35)
    ShowHelp(ss7);
    else if (rnd < 0.4)
    ShowHelp(ss8);
    else if (rnd < 0.45)
    ShowHelp(ss9);
    else if (rnd < 0.5)
    ShowHelp(ss10);
    else if (rnd < 0.55)
    ShowHelp(ss11);
    else if (rnd < 0.6)
    ShowHelp(ss12);
    else if (rnd < 0.65)
    ShowHelp(ss13);
    else if (rnd < 0.7)
    ShowHelp(ss14);
    else if (rnd < 0.75)
    ShowHelp(ss15);
    else if (rnd < 0.8)
    ShowHelp(ss16);
    else if (rnd < 0.85)
    ShowHelp(ss17);
    else if (rnd < 0.9)
    ShowHelp(ss18);
    else if (rnd < 0.95)
    ShowHelp(ss19);
    else
    ShowHelp(ss20);
}

defaultproperties
{
     bHelpAlwaysOn=True
     bUsesHelpWindow=True
     choices(0)=Class'DeusEx.MenuChoice_AlternBelt'
     choices(1)=Class'DeusEx.MenuChoice_RealTimeUI'
     choices(3)=Class'DeusEx.MenuChoice_ObjectTranslucency'
     choices(4)=Class'DeusEx.MenuChoice_AnimatedBar1'//Class'DeusEx.MenuChoice_HardcoreAI1'
     choices(5)=Class'DeusEx.MenuChoice_AnimatedBar2'//Class'DeusEx.MenuChoice_HardcoreAI2'
     choices(6)=Class'DeusEx.MenuChoice_NewGameIntro'
     choices(7)=Class'DeusEx.MenuChoice_SkillMessage'
     choices(8)=Class'DeusEx.MenuChoice_AutoSaving'
     choices(9)=Class'DeusEx.MenuChoice_AutoSaveSlots'
     actionButtons(0)=(Align=HALIGN_Right,Action=AB_Cancel)
     actionButtons(1)=(Align=HALIGN_Right,Action=AB_OK)
     actionButtons(2)=(Action=AB_Reset)
     actionButtons(3)=(Align=HALIGN_Right,Action=AB_Other,Text="Show Tips",Key="TIPS")
     Title="GMDX Advanced Options"
     ss1="TIP: You can rebind augmentation activation keys in the 'Keyboard/Mouse' settings menu."
     ss2="TIP: A sneak attack from behind grants you a damage multiplier of twelve with any weapon."
     ss3="TIP: A headshot with a poison dart is an instant non-lethal takedown to any unarmoured human NPC."
     ss4="TIP: Standing still for a variable period of time grants an accuracy bonus."
     ss5="TIP: Some surfaces when stepped on are louder than others. Metal is the loudest."
     ss6="TIP: Assign weapons to use as secondary weapons via the inventory. The default keybind to use secondary weapons is 'F'"
     ss7="ADVANCED TIP: When hacking, press ESC immediately if detected to disconnect without consequence."
     ss8="ADVANCED TIP: Variations of mouse clicking on items in the inventory acts as shortcuts. Right click to equip or use, middle mouse to drop."
     ss9="ADVANCED TIP: Out of ammo? Throw your held weapon at the enemy (DEFAULT: Middle Mouse Button). Especially effective if you have the Microfibral Muscle augmentation installed."
     ss10="TIP: Only drop combat knives when your inventory is full."
     ss11="TIP: Double press interact (DEFAULT: Right Mouse Button) to pick up a corpse regardless of inventory limitations."
     ss12="TIP: Press jump whilst airbourne to mantle onto nearby objects."
     ss13="ADVANCED TIP: Press interact (DEFAULT: Right Mouse Button) when controlling the spy drone to emit noise and distract NPCs."
     ss14="ADVANCED TIP: Next Belt Item/Prev Belt Item (DEFAULT: Mousewheel) can be used to zoom in/out when looking through scopes."
     ss15="ADVANCED TIP: With two hands free, press fire (DEFAULT: Left Mouse Button) whilst looking at objects to use them where they stand."
     ss16="TIP: Choose an easier difficulty if you have any doubts."
     ss17="ADVANCED TIP: CTRL + C/V applies when highlighting datavault notes. Useful to copy & paste computer passwords."
     ss18="ADVANCED TIP: Leaning is better than strafing under certain circumstances as whilst leaning your standing accuracy bonus is retained."
     ss19="TIP: There are many ways in which you can distract the enemy."
     ss20="Your Deus Ex is Augmented."
     ClientWidth=537
     ClientHeight=406
     helpPosY=354
     clientTextures(0)=Texture'DeusExUI.UserInterface.MenuGameOptionsBackground_1'
     clientTextures(1)=Texture'DeusExUI.UserInterface.MenuGameOptionsBackground_2'
     clientTextures(2)=Texture'DeusExUI.UserInterface.MenuGameOptionsBackground_3'
     clientTextures(3)=Texture'DeusExUI.UserInterface.MenuGameOptionsBackground_4'
     clientTextures(4)=Texture'DeusExUI.UserInterface.MenuGameOptionsBackground_5'
     clientTextures(5)=Texture'DeusExUI.UserInterface.MenuGameOptionsBackground_6'
}
The neccessary part from DeusEx.rut (localization file):

Code: Select all

[MenuScreenGMDXOptions2]   
ss1="ÑÎÂÅÒ: Âû ìîæåòå ïåðåíàçíà÷èòü êíîïêè àêòèâàöèè Àóãìåíòàöèé 'Êëàâèàòóðà/Ìûøü'."
ss2="ÑÎÂÅÒ: Ïîäëàÿ àòàêà ñçàäè íàíîñèò äâåíàäöàòèêðàòíûé óðîí ëþáûì îðóæèåì."
ss3="ÑÎÂÅÒ: Âðàã (íåáðîíèðîâàííûé) ìãíîâåííî òåðÿåò ñîçíàíèå, åñëè ïîïàñòü â ãîëîâó ñ òðàíêâèëèçàòîðà."
ss4="ÑÎÂÅÒ: Åñëè ñòîÿòü íà ìåñòå ïðèöåë ñâîäèòñÿ áûñòðåå."
ss5="ÑÎÂÅÒ: Ïåðåäâèæåíèå ïî íåêîòîðûì ïîâåðõíîñòÿì ïðîèçâîäèò áîëüøå øóìà, ïî ìåòàëëó ñàìîå ãðîìêîå."
ss6="ÑÎÂÅÒ: Äîïîëíèòåëüíîå îðóæèå íàçíà÷àåòñÿ ÷åðåç èíâåíòàðü. Êíîïêà 'ïî óìîë÷àíèþ' - 'F'"
ss7="ÄÎÏ. ÑÎÂÅÒ:. Âî âðåìÿ âçëîìà êîìïüþòåðà íàæìèòå ESC äëÿ ìãíîâåííîãî ïðåêðàùåíèÿ ïðîöåññà"
ss8="ÄÎÏ. ÑÎÂÅÒ. Â èíâåíòàðÿ íàæèìàÿ ïðàâóþ êíîïêó ìûøè ìîæíî èñïîëüçîâàòü èëè âçÿòü â ðóêè ïðåäìåò, íàæèìàÿ ñðåäíþþ êíîïêó ìûøè ìîæíî âûêèíóòü ïðåäìåò."
ss9="ÄÎÏ. ÑÎÂÅÒ: Çàêîí÷èëèñü ïàòðîíû? Áðîñüòå (Ïî óìîë÷àíèþ - 'Ñðåäíÿÿ êíîïêà ìûøè)' ñâîå îðóæèå âî âðàãà. Îñîáåííî ýôôåêòèâíî åñëè óñòàíîâëåíî ïðèðàùåíèå 'Ìèêðîôèáðàëüíûå ìûøöû'."
ss10="ÑÎÂÅÒ: Áûáðàñûâàéòå òîëüêî áîåâûå íîæè, êîãäà èíâåíòàðü çàïîëíåí"
ss11="ÑÎÂÅÒ: Äâàæäû ùåëêíèòå ïðàâîé êíîïêîé ìûøè, ÷òîáû ïîäîáðàòü òðóï, íåçàâèñèìî îò ñîäåðæèìîãî òðóïà."
ss12="ÑÎÂÅÒ: Íàæìèòå ïðûæîê â âîçäóõå, ÷òîáû ïîäòÿíóòüñÿ çà îáúåêò."
ss13="ÄÎÏ. ÑÎÂÅÒ: Íàæìèòå èñïîëüçîâàòü (ÏÎ ÓÌÎË×ÀÍÈÞ: Ïðàâàÿ êíîïêà ìûøè) êîãäà èñïîëüçóåò Äðîø-øïèîí, ÷òîáû îòâëå÷ü âðàãà øóìîì."
ss14="ÄÎÏ. ÑÎÂÅÒ: Êíîïêè ïåðåêëþ÷åíèÿ ïîÿñà ïðåäìåòîâ (ÏÎ ÓÌÎË×ÀÍÈÞ: Êîëåñèêî ìûøè) ðåãóëèðóåò ïðèáëèæåíèå ïðèöåëà."
ss15="ÄÎÏ. ÑÎÂÅÒ: Ñâîáîäíû ðóêè? Íàæìèòå 'Îãîíü' (ÏÎ ÓÌÎË×ÀÍÈÞ: Ëåâàÿ êíîïêà ìûøè), ÷òîáû èñïîëüçîâàòü ïðåäìåò íà ìåñòå"
ss16="ÑÎÂÅÒ: Âûáåðèòå ñëîæíîñòü ïîíèæå, åñëè âû ñîìíåâàåòåñü â ñâîèõ ñèëàõ."
ss17="ÄÎÏ. ÑÎÂÅÒ: Èñïîëüçóéòå êîìáèíàöèþ CTRL + C/V, ÷òîáû êîïèðîâàòü çàïèñè. Ïîëåçíî äëÿ âñòàâêè ïàðîëåé â êîìïüþòåðû."
ss18="ADVANCED TIP: Leaning is better than strafing under certain circumstances as whilst leaning your standing accuracy bonus is retained."
ss19="ÑÎÂÅÒ: Åñòü ìíîæåñòâî ñïîñîáîâ äëÿ îòâëå÷åíèÿ ïðîòèâíèêà."
ss20="Âàø Deus Ex Àóãìåíòèðîâàí."
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Localization Issues

Post by Cybernetic pig »

Bump.

Also, new strange error:
Hi I just wanted to let you know I think your mod is ace. I have a problem though I just completed the NSF Airfield mission. After the helicopter cut scene the camera falls to the helipad floor and the message: unable to find file gmdx\save\current\03_nyc_airfield.dxs is displayed.

Any ideas what I can do..?
So if I am not mistaken the game is trying to save the level data so that if the level is returned to (even though it is not technically possible at this point) everything is as the player left it...why in the world would it be failing?
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Localization Issues

Post by Hanfling »

Cybernetic pig wrote:So if I am not mistaken the game is trying to save the level data so that if the level is returned to (even though it is not technically possible at this point) everything is as the player left it...why in the world would it be failing?
Well.. I'm more like why did it even work for for them in sp to save the map to the same file it was loaded off. I tried that in HX, but it didn't work, so i need to save each iteration of the levelsave under a different file name (well extension only).
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Localization Issues

Post by Cybernetic pig »

Probably just a weird anomaly.

Hanf, my favorite difficult-to-understand German unreal tech support genius that I want to stress I appreciate as you have always offered a helping technical hand when needed even though the DX communities are basically dead: I take it you have no idea what's up with the localization either? Odd issue, huh. I see no human error.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Localization Issues

Post by Hanfling »

Uhm to solve your issue, just add the quotes in UnrealScript unless you insist on localisation of quoting (yes there is quite a lot about how quoting are typographically set in different languages, but the internet kills this).

The reason why it happens is based on how property importing and other stuff works. You can optionally quote a lot of stuff. And by the things they used that extra quoting is treated as optional. More annoying are other things like this: In a net game type: Say :D
.

Mist that first issue on first time reading. For the second issue I plain no idea, and currently also don't have. Maybe try without the quotes in the localisation file. As common practise is to put strings without quotation marks in them and as the russian seems to be out of ascii range, there might be sth. in the quote handling code which prevents them from beeing imported successfully. E.g. cutting them off straight ahead on first non ascii char.

/edit:
If everything else fails, remove the localized keyword and load them by hand using Object.GetConfig() inside InitWindow() or where you display them. You can also at least use Object.GetConfig() to query the language extension used.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Localization Issues

Post by Cybernetic pig »

Thanks once again.
Post Reply