PDA

View Full Version : [FIXED] Bug with Ext.msg.Confirm and Translation/Localisation



malstroem
13 Feb 2012, 3:43 AM
Ext version tested:

Ext 4.1.0 Beta 2

Browser versions tested against:

FF 10.0.1
Chrome 17

DOCTYPE tested against:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Description:

When using confirmation dialogues with Ext.Msg.confirm() having a foreign language file included (e.g. ext-lang-de.js) the buttons are only translated on the very first dialogue after page refresh. At any point later, there are english buttons with Yes/No...

Steps to reproduce the problem:

Create an Ext.Msg.confirm('Title:','Question:')
include ext-lang-de.js in your app
show the confirmation dialogue after page refresh (F5) and again after having it shown once

The result that was expected:

correct translation / localisation every time the dialogue is shown.

The result that occurs instead:

english buttonText instead of included language

mitchellsimoens
13 Feb 2012, 6:21 AM
What Ext JS script are you using? If you are using one of the all builds then this should work but if you are using one where you are dynamically loading classes then this file won't affect it as the class has to be loaded before this override file is loaded.

malstroem
13 Feb 2012, 6:39 AM
I am NOT using the new class loading system / bootstrap....
I am just including ext-all.js and the lang-file in this order:

<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript" src="ext/locale/ext-lang-de.js"></script>