Pentaho

 View Only

 Filter Component translation.

  • Pentaho
  • Ctools
  • Pentaho
David Martinez's profile image
David Martinez posted 12-19-2018 15:43

We are using a FilterComponent in one of our dashboards, everything works as expected but internationalization.

After triying some workarounds, we can't figure out how to change language in this component, neither can find any component documentation solving this.

Any idea would be welcome


#Pentaho
#Ctools
Carlos Russo's profile image
Carlos Russo

Do you mean that the procedure described in the plugin samples for CDE (i.e. under /public/plugin-samples/pentaho-cdf-dd/tests/FilterComponent) is not working?

David Martinez's profile image
David Martinez

Hi Carlos,

we hadn't seen this sample, just unsuccesfully searched arround on internet. Thanks, It's really useful.

All componet's strings have already been traslated except group's "all items" that doesn't seem to be working.

Acord to Filter Component Reference, we have modified Advanced properties with the code shown below:

function options(){   return {     component: {       Root: {         strings:{             title: '',            // overrides Title property             isDisabled: 'No hay datos', // message displayed when the filter is disabled             allItems: 'Todos', // message displayed when all items are selected             noItems: 'No hay datos', // message displayed when no items are selected             btnApply: 'Aplicar', // label of the Apply button             btnCancel: 'Cancelar'  // label of the Cancel button         }       },       Group: {         options: {           showGroupSelection: true         },         strings: { // Same keys than Root, but used in the context of a Group           allItems: 'Todos',           noItems: 'No hay datos',           btnApply: 'Aplicar',           btnCancel: 'Cancelar'         }       },       Item: {             options: {                 showButtonOnlyThis: true, //show/hide"Only This"                 buttonshowValue: false//optionally shows the value associated with the item             },             strings: {                 btnOnlyThis: 'solo'//caption of the "Only this"             }         }     }   }; }

Despite of the Group.Strings.allItems property, "All" is displayed in every group of the component.

Carlos Russo's profile image
Carlos Russo

Try adding the property  Group.strings.groupSelection