Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Additional questions about Internationalization

    Yours answer was
    Hello Jarek,

    For future reference, emailing a .pdf is the worst possible format for a bug report or question.

    The best approach is to post to the SmartClient Forums with the SmartClient.com account that has support - this causes an immediate alert to the support team, whereas emails do not, and require manual verification of your purchase which will slow processing. The forums are the best approach for non-confidential questions like these (which obviously do not contain confidential information despite being marked that way).

    Issue Reports:

    #1 The correct call is ListGrid.setFieldIcon(). Note that behavior here doesn't differ between editions - the framework code is literally exactly the same. Something else you changed caused a difference in behavior.

    #2 Ellipsis is a native behavior and Firefox has a number of bugs in this area. In 4.0 we are introducing some workarounds to make ellipsis work in Firefox, but these will not be patched onto 3.1 (it's not a framework bugfix).

    #3 Since there presumably could be 10s of thousands of messages, we would not recommend adding an expand all feature that actually tries to expand all messages.

    You could either:
    a. expand just visible rows - use getVisibleRows() to find out which are visible
    b. switch to recordComponents with recordComponentPoolingMode:"recycle" enabled, and add your own expand/collapse controls (don't use the built-in expansion feature)

    Questions:

    #1 You can do this through the Internationalization system by replacing these string constants in the English locale. See the Internationalization overview for details.

    http://www.smartclient.com/smartgwte...docs/I18n.html

    #2 Call filterBuilder.setCriteria() to populate the FilterBuilder with default criteria


    But


    In reply to answer :
    #1 You can do this through the Internationalization system by replacing these string constants in the English locale. See the Internationalization overview for details.

    http://www.smartclient.com/smartgwte...docs/I18n.html


    I cannot see the class, only interface, so I did:

    1.png
    2.png
    3.png
    It is not working, what do I missed ?

    In reply to answer
    #2

    I don’t know if you understand me well about my issue:

    Code:
    import com.smartgwt.clinet.i18n.SmartGwtMessges
    
    public interface CustomizedSgwtMessages extends SmartGwtMessges {
     @Override
     public string operators_equalsTitle();
     
     @Override
     public string operators_iEqualsTitle();
     
    }
    No matter which field I would take, I want it to start with operator “contains” chosen. In normal case I would use default value for SelectItem, but how to access it inside filter builder


    Jarek
    Attached Files
    Last edited by jdurak; 17 Apr 2013, 10:36.

    #2
    Look over our instructions - you have not posted with an account that is marked as having support. Please start posting with an account that has support or we may miss your questions.

    As far as #1, it looks like you may have named your .properties wrongly, refer to the default language packs for the correct names.

    We're checking on #2.

    Comment


      #3
      About #2 (making "contains" the default operator for a field): you could achieve this by setting dataSourceField.validOperators or DataSource.setTypeOperators().

      These APIs are primarily used to restrict the set of operators which are considered valid for specific fields or field type, but they also control the order the operators appear in the FilterBuilder.

      So if you just recapitulate the standard set of operators but put "contains" first, it will be the default option that appears in the FilterBuilder.

      Comment


        #4
        Hi its my commercial account (jdurak here).

        #1 Still does not work, so I will update info about it. So:

        (1) I got this in main module file:
        Code:
        public void onModuleLoad() {
        		
        	CustomizedSgwtMessages myMessages = GWT.create(CustomizedSgwtMessages.class);
        	I18nUtil.initMessages(myMessages);
        
        	(...)
        }
        (2) I got this in file named CustomizedSgwtMessages.properties, this file is placed in the same catalog like the: Messages.properties
        Code:
        operators.equalsTitle = equals (case sensitive)
        operators.iEqualsTitle = equals
        (3) I got this in gile named CustomizedSgwtMessages.java, this file is placed in the same catalog like main module file
        Code:
        import com.smartgwt.client.i18n.SmartGwtMessages;
        
        public interface CustomizedSgwtMessages extends SmartGwtMessages {
            @Override
            public String operators_equalsTitle();
            
            @Override
            public String operators_iEqualsTitle();
         }
        How do I suppose to name .properties file ?

        Comment


          #5
          OK, i found it.

          Code suppose to have "_" sign not "."

          Right way:

          Code:
           
          
          operators_equalsTitle = equals (case sensitive)
          operators_iEqualsTitle = equals
          I placed "." because that how it works with archetype for maven GWT, but when I checked out your .properties file I saw how you name the messages.

          Comment

          Working...
          X