Results 1 to 2 of 2

Thread: Hardcoded faulty english text in Tree(Grid)DragSource

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default Hardcoded faulty english text in Tree(Grid)DragSource

    Required Information

    Version(s) of Ext GWT
    GXT 3.1.0

    Description
    While dragging an item on a Tree, the status feedback is always in english: "1 itmes selected".

    1.) This should be localized.
    2.) Singular and plural should be respected. Since there are several patterns in different languages, using @PluralCount would help a lot.
    http://www.gwtproject.org/doc/latest...uralForms.html

    Expected result
    - Text of Status Feedback is localized or at least localizable by putting <your-project>/src/main/java/com/sencha/gxt/messages/client/XMessages_<country-code>.properties in your project.
    - Text distinguishes between singular and plural.

    Actual result
    It is always "n itmes selected", no matter what.

    Test case
    None.
    Please get your examples running different languages!

    Helpful Information
    Debugging already done
    Code:
    public class TreeDragSource<M> extends DragSource {
    
      private TreeSource treeSource = TreeSource.BOTH;
    
      /**
       * Creates a drag source for the specified tree.
       * 
       * @param tree the tree to enable as a drag source
       */
      public TreeDragSource(Tree<M, ?> tree) {
        super(tree);
        setStatusText("{0} items selected");
      }
    
    ...
    
      @Override
      protected void onDragStart(DndDragStartEvent event) {
    
    ...
    
        if (selected.size() > 0) {
          event.setCancelled(false);
    
          if (getStatusText() == null) {
            event.getStatusProxy().update(DefaultMessages.getMessages().listField_itemsSelected(selected.size()));
          } else {
            event.getStatusProxy().update(Format.substitute(getStatusText(), selected.size()));
          }
        }
      }
    }
    As you can see, the text would be taken from Localization, if it not has been set already.
    TreeGridDragSource has the same code.

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    Still exists in GXT 3.1.4

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •