Posted by: Argent77
« on: May 20, 2017, 11:47:33 AM »
I've noticed that the LANGUAGE variable can apparently be used directly in the LANGUAGE statement where it is defined. The mod finds the right tra file and displays strings correctly. However, at the end of the installation or uninstallation process I'm getting an error message about missing translations.
The test mod consists of a tra file "TestLanguage/languages/english/setup.tra":
@1 = ~Test component~
@100 = ~A test message...~
And a tp2 file "TestLanguage/setup-TestLanguage.tp2":
BACKUP ~TestLanguage/backup~
AUTHOR ~Myself~
VERSION ~1.0~
LANGUAGE ~English~ ~english~ ~%MOD_FOLDER%/languages/%LANGUAGE%/setup.tra~
BEGIN @1 // Test component
PRINT @100 // A test message...
Installing the mod results in the following debug log:
WeiDU v 24001 Log
D:\Games\Baldur's Gate Siege of Dragonspear\Data\00806\setup-TestLanguage.exe
[.\chitin.key] loaded, 776244 bytes
[.\chitin.key] 95 BIFFs, 55250 resources
[.\engine.lua] loaded, 101 bytes
[.\weidu.conf] loaded, 17 bytes
[.\lang\en_us\dialog.tlk] loaded, 8665736 bytes
[.\lang\en_us\dialog.tlk] 71358 string entries
Using Language [English]
[English] has 1 top-level TRA files
[TestLanguage/languages/english/setup.tra] has 2 translation strings
Using .\lang\en_us\dialog.tlk
TESTLANGUAGE/SETUP-TESTLANGUAGE.TP2 0 1 Installed
Install Component [Test component]?
[I]nstall, or [N]ot Install or [Q]uit?
Installing [Test component] [1.0]
A test message...
Saving This Log:
TESTLANGUAGE/SETUP-TESTLANGUAGE.TP2 0 1 Installed
TESTLANGUAGE/SETUP-TESTLANGUAGE.TP2 0 0 Installed ~Test component~
TESTLANGUAGE/SETUP-TESTLANGUAGE.TP2's 1th component not found.ERROR: No translation provided for @1
Continuing despite error.
SUCCESSFULLY INSTALLED Test component
And the WeiDU.log entry contains an undefined component name string:
~TESTLANGUAGE/SETUP-TESTLANGUAGE.TP2~ #0 #0 // UNDEFINED STRING: @1: 1.0