I need to translate the “and”, “or”, “not” operators text shown in the FilterBuilder when the “topOperatorAppearance” parameter is equal to “bracket”.
I tried setting the “andTitle”
No, I also have a tight schedule and I cannot use a new version in production without having the time to do comprehensive tests of all my code (my application is quite complex).
The following 7.0RC2 patch allows localization of the operator-title strings in the FilterBuilder’s “bracket” item.
Note that, once this patch is applied to 7.0rc2, the i18n properties andTitle, orTitle and notTitle affect both the “radio” and “bracket” topOperatorAppearance modes. If you want any of the entries to remain as they were before this change (“and”, “or”, “not”), you’ll now need to specifically set the corresponding and/or/notTitle attributes to those strings.
As of 8.0, the default values of those properties have changed and affect only the “bracket” appearance - there are seperate i18n titles for the “radio” appearance.
//----------------------------------------------------------------------------
// Isomorphic SmartClient 7.0rc2 patch
// Purpose: Allow FilterBuilder operator-titles to be altered via Operators.and/or/notTitle
// when topOperatorAppearance is “bracket”
//
// Applies to SmartClient 7.0RC2 builds only
//----------------------------------------------------------------------------
if (window.isc) {
if (isc.version.startsWith(“7.0rc2”)) { isc.FilterBuilder.addProperties({ initWidget : function() { this.Super(“initWidget”,arguments);
this.addButtonDefaults.prompt=this.addButtonPrompt;
this.removeButtonDefaults.prompt=this.removeButtonPrompt;
this.subClauseButtonDefaults.prompt=this.subClauseButtonPrompt;
this.subClauseButtonDefaults.title=this.subClauseButtonTitle;
var _1;
if(this.showSubClauseButton==_1) {
this.showSubClauseButton=(this.topOperatorAppearance!="radio")
}
this.clauses=[];
var _2=this.topOperatorAppearance;
var _3=this.getDataSource().getTypeOperatorMap("text",true,"criteria");
if(_2=="bracket"){
if(this.showTopRemoveButton){
var _6=this.removeButton=this.createAutoChild("removeButton",{
click:function(){
this.creator.parentClause.removeButtonClick(this.creator)
}
});
this.clauseLayout=this;this.addMember(_6)
}
this.addAutoChild("topOperatorForm");
this.topOperatorForm.items[0].valueMap=_3;
this.topOperatorForm.items[0].defaultValue=this.topOperator;
this.addAutoChild("bracket")
}
this.addAutoChild("clauseStack");
if(_2=="radio"){
this.addAutoChild("radioOperatorForm");
var _7={};
for(var i=0;i<this.radioOptions.length;i++){
_7[this.radioOptions[i]]=_3[this.radioOptions[i]]
}
this.radioOperatorForm.items[0].valueMap=_7;
this.radioOperatorForm.items[0].defaultValue=this.topOperator
}
this.addAutoChildren(["buttonBar","addButton","subClauseButton"]);
if(this.criteria){
this.setCriteria(this.criteria)
} else if(!this.allowEmpty&&!this.dontCreateEmptyChild){
this.addNewClause()
}
this.setTopOperator(this.topOperator)
}
});
} else {
isc.Log.logWarn("Patch code for SmartClient version 7.0RC2 included in this application. " +
"You are running version:" + isc.version + ". This patch code will have no effect " +
"and can be removed.");
}