农业网格国际化
Internationalisation with ag-grid
从这个页面:https://www.ag-grid.com/javascript-grid-internationalisation/我找不到如何更改过滤器的 AND
和 OR
字词:
对于版本 17.1.1
ag-grid\src\ts\filter\baseFilter.ts
这些部分没有翻译
const DEFAULT_TRANSLATIONS: {[name: string]: string}= {
loadingOoo:'Loading...',
equals:'Equals',
notEqual:'Not equal',
lessThan:'Less than',
greaterThan:'Greater than',
inRange:'In range',
lessThanOrEqual:'Less than or equals',
greaterThanOrEqual:'Greater than or equals',
filterOoo:'Filter...',
contains:'Contains',
notContains:'Not contains',
startsWith: 'Starts with',
endsWith: 'Ends with',
searchOoo: 'Search...',
selectAll: 'Select All',
applyFilter: 'Apply Filter',
clearFilter: 'Clear Filter'
};
最新版本还没有在translations
,代码部分是here
this.addDestroyableEventListener(andButton, 'change', () => {
this.conditionValue = 'AND';
this.onFilterChanged();
});
this.addDestroyableEventListener(orButton, 'change', () => {
this.conditionValue = 'OR';
this.onFilterChanged();
});
所以他们只是对其进行了硬编码,需要在他们的 zendesk 中创建一个问题。
Update version 20.2 added support for filter 'AND/OR' localization
// filter conditions
andCondition: 'AND',
orCondition: 'OR',
从这个页面:https://www.ag-grid.com/javascript-grid-internationalisation/我找不到如何更改过滤器的 AND
和 OR
字词:
对于版本 17.1.1
ag-grid\src\ts\filter\baseFilter.ts
这些部分没有翻译
const DEFAULT_TRANSLATIONS: {[name: string]: string}= {
loadingOoo:'Loading...',
equals:'Equals',
notEqual:'Not equal',
lessThan:'Less than',
greaterThan:'Greater than',
inRange:'In range',
lessThanOrEqual:'Less than or equals',
greaterThanOrEqual:'Greater than or equals',
filterOoo:'Filter...',
contains:'Contains',
notContains:'Not contains',
startsWith: 'Starts with',
endsWith: 'Ends with',
searchOoo: 'Search...',
selectAll: 'Select All',
applyFilter: 'Apply Filter',
clearFilter: 'Clear Filter'
};
最新版本还没有在translations
,代码部分是here
this.addDestroyableEventListener(andButton, 'change', () => {
this.conditionValue = 'AND';
this.onFilterChanged();
});
this.addDestroyableEventListener(orButton, 'change', () => {
this.conditionValue = 'OR';
this.onFilterChanged();
});
所以他们只是对其进行了硬编码,需要在他们的 zendesk 中创建一个问题。
Update version 20.2 added support for filter 'AND/OR' localization
// filter conditions
andCondition: 'AND',
orCondition: 'OR',