I think I found a bug concerning the localization of a Textview that contains multiline text.
Please have a look at the following example:
Code: Select all
@REQUIRE "RapaGUI", {Link = True}
@APPTITLE "Localization-Test"
moai.CreateApp([[<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window id="mainWindow" width="300" height="200" title="Localization-Test">
<vgroup>
<textview>
This textview has more\nthan one line\nand has no i18n attribute set.
</textview>
<textview i18n="0">
This textview has more\nthan one line\nand has the i18n attribute set.
</textview>
</vgroup>
</window>
</application>]])
Repeat
WaitEvent
Forever
Note: I left out the @CATALOG preprocessor on purpose for it's not needed to demonstrate the bug.
If there's a catalog file that contains the translated text, everything works fine, and \n is treated correctly as linebreaks.
But if there's no catalog file and the default text is used instead, \n is actually rendered as \n and not as linebreaks. As demonstrated in the example, this only happens if the i18n attribute is present.
This happens on Windows as well as with MUI, so it seems not to be wxWidget or MUI related.
Cheers, Michael