Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User pierrocknroll's Avatar
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    -3
    pierrocknroll can only hope to improve

      0  

    Default [4.1] Adding buttonText config to Ext.Msg.show adds the translated buttons

    [4.1] Adding buttonText config to Ext.Msg.show adds the translated buttons


    REQUIRED INFORMATION
    Ext version tested:
    • Ext 4.1
    Browser versions tested against:
    • FF12 (firebug 1.9.1 installed)
    • Chrome 18
    DOCTYPE tested against:
    • XHTML 1.0 Transitional
    Description:
    • When adding translations to the Ext.Msg.show method with the "buttonText" config, it adds the buttons that are translated instead of using the "buttons" config..
    Steps to reproduce the problem:
    Code:
     
    Ext.Msg.show
      ({
        msg: "message",
        title: "title",
        buttons: Ext.MessageBox.OKCANCEL,
        icon: Ext.MessageBox.ERROR,
        buttonText :
        {
          ok : "OK",
          cancel : "Annuler",
          yes : "Oui",
          no :"No"
        }
      });


    The result that was expected:
    • A message box with OK and CANCEL buttons.
    The result that occurs instead:
    • A message box with OK, CANCEL, YES and NO buttons.
    HELPFUL INFORMATION
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Win7

  2. #2
    Sencha User unkn's Avatar
    Join Date
    Mar 2011
    Posts
    5
    Vote Rating
    2
    unkn is on a distinguished road

      0  

    Default


    Up !
    Got exactly the same bug !
    Have anyone of the team seen that post ??

    Cheers

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,637
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Please try the following:

    Code:
    Ext.onReady(function() {
        var messageBox = Ext.create('Ext.window.MessageBox', {
            buttonText: {
                ok : "OK",
                cancel : "Annuler",
                yes: 'Oui',
                no: 'Non'
            }
        });
        messageBox.show({
            title: "A Title",
            msg: 'A Message',
            buttons: Ext.Msg.YESNO,
            icon: Ext.MessageBox.WARNING
        });
     
    });​
    Scott.

  4. #4
    Sencha User pierrocknroll's Avatar
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    -3
    pierrocknroll can only hope to improve

      0  

    Default


    Hi Scott,
    Thanks it works but.. is my test case wrong ?

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,637
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I would have to research this. I believe there is a quirk that allows your approach to fail.

    Scott.

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,120
    Vote Rating
    508
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This is actually the intended behaviour. It allows you to pass custom button text for a particular instance.

    If you want to override them globally, you can use:

    Code:
    Ext.MessageBox.buttonText = {
        ok: "Foo",
        cancel: "Bar",
        yes: "Baz",
        no: "Bleh"
    };
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar