Fix tests

This commit is contained in:
Louis Delbosc 2022-12-13 17:26:42 +01:00
parent 676c27d6c9
commit 83ea6868cb
5 changed files with 25 additions and 31 deletions

View File

@ -72,7 +72,7 @@ export class TypeTransform extends ColumnTransform {
return basicButton(dom.on('click', () => this.editor.writeObservable()),
t('Preview'), testId("type-transform-update"),
dom.cls('disabled', (use) => use(disableButtons) || use(this.formulaUpToDate)),
{ title: t('UpdateFormula') }
{ title: t('Update formula (Shift+Enter)') }
);
} else {
return basicButton(dom.on('click', () => { this._reviseTypeChange.set(true); }),

View File

@ -135,10 +135,10 @@ export function MultiColumnMenu(options: IMultiColumnContextMenu) {
const disableForReadonlyView = dom.cls('disabled', options.isReadonly);
const num: number = options.numColumns;
const nameClearColumns = options.isFiltered ?
t('ResetEntireColumns', {count: num}) :
t('ResetColumns', {count: num});
const nameDeleteColumns = t('DeleteColumns', {count: num});
const nameHideColumns = t('HideColumns', {count: num});
t('Reset {{count}} entire columns', {count: num}) :
t('Reset {{count}} columns', {count: num});
const nameDeleteColumns = t('Delete {{count}} columns', {count: num});
const nameHideColumns = t('Hide {{count}} columns', {count: num});
const frozenMenu = options.disableFrozenMenu ? null : freezeMenuItemCmd(options);
return [
frozenMenu ? [frozenMenu, menuDivider()]: null,
@ -229,7 +229,7 @@ export function freezeAction(options: IMultiColumnContextMenu): { text: string;
const properNumber = numFrozen - firstColumnIndex;
text = properNumber === numFrozen ?
t('Unfreeze all columns') :
t('UnFreeze {{count}} columns', {count: properNumber});
t('Unfreeze {{count}} columns', {count: properNumber});
}
return {
text,
@ -240,13 +240,13 @@ export function freezeAction(options: IMultiColumnContextMenu): { text: string;
}
} else {
if (isLastFrozenSet) {
text = t('UnfreezeColumn', {count: length});
text = t('Unfreeze {{count}} columns', {count: length});
return {
text,
numFrozen : numFrozen - length
};
} else if (isFirstNormalSet) {
text = t('FreezeColumn', {count: length});
text = t('Freeze {{count}} columns', {count: length});
return {
text,
numFrozen : numFrozen + length

View File

@ -51,7 +51,7 @@ export class SortFilterConfig extends Disposable {
}
private async _save() {
await this._docModel.docData.bundleActions(t('UpdateSortFilterSettings'), () => Promise.all([
await this._docModel.docData.bundleActions(t('Update Sort & Filter settings'), () => Promise.all([
this._section.activeSortJson.save(),
this._section.saveFilters(),
]));

View File

@ -172,7 +172,7 @@
"Widget does not require any permissions.": "Widget does not require any permissions.",
"Widget needs to {{read}} the current table.": "Widget needs to {{read}} the current table.",
"Widget needs {{fullAccess}} to this document.": "Widget needs {{fullAccess}} to this document.",
"{{wrongTypeCount}} non-{{columnType}} columns are not shown_one": "{{wrongTypeCount}} non-{{columnType}} columns are not shown",
"{{wrongTypeCount}} non-{{columnType}} columns are not shown_one": "{{wrongTypeCount}} non-{{columnType}} column is not shown",
"{{wrongTypeCount}} non-{{columnType}} columns are not shown_other": "{{wrongTypeCount}} non-{{columnType}} columns are not shown"
},
"DataTables": {
@ -302,12 +302,12 @@
"Column options are limited in summary tables.": "Column options are limited in summary tables.",
"Convert column to data": "Convert column to data",
"Convert to trigger formula": "Convert to trigger formula",
"Data Columns_one": "Data Columns",
"Data Columns_one": "Data Column",
"Data Columns_other": "Data Columns",
"Empty Columns_one": "Empty Columns",
"Empty Columns_one": "Empty Column",
"Empty Columns_other": "Empty Columns",
"Enter formula": "Enter formula",
"Formula Columns_one": "Formula Columns",
"Formula Columns_one": "Formula Column",
"Formula Columns_other": "Formula Columns",
"Make into data column": "Make into data column",
"Mixed Behavior": "Mixed Behavior",
@ -337,35 +337,29 @@
"Clear values": "Clear values",
"Column Options": "Column Options",
"Convert formula to data": "Convert formula to data",
"DeleteColumns_one": "DeleteColumns",
"DeleteColumns_other": "DeleteColumns",
"Delete {{count}} columns_one": "Delete column",
"Delete {{count}} columns_other": "Delete {{count}} columns",
"Filter Data": "Filter Data",
"Freeze {{count}} columns_one": "Freeze {{count}} columns",
"Freeze {{count}} columns_other": "Freeze {{count}} columns",
"Freeze {{count}} more columns_one": "Freeze {{count}} more columns",
"Freeze {{count}} more columns_other": "Freeze {{count}} more columns",
"FreezeColumn_one": "FreezeColumn",
"FreezeColumn_other": "FreezeColumn",
"HideColumns_one": "HideColumns",
"HideColumns_other": "HideColumns",
"Hide {{count}} columns_one": "Hide column",
"Hide {{count}} columns_other": "Hide {{count}} columns",
"Insert column to the {{to}}": "Insert column to the {{to}}",
"More sort options ...": "More sort options ...",
"Rename column": "Rename column",
"ResetColumns_one": "ResetColumns",
"ResetColumns_other": "ResetColumns",
"ResetEntireColumns_one": "ResetEntireColumns",
"ResetEntireColumns_other": "ResetEntireColumns",
"Reset {{count}} columns_one": "Reset column",
"Reset {{count}} columns_other": "Reset {{count}} columns",
"Reset {{count}} entire columns_one": "Reset entire column",
"Reset {{count}} entire columns_other": "Reset {{count}} entire columns",
"Show column {{- label}}": "Show column {{- label}}",
"Sort": "Sort",
"Sorted (#{{count}})_one": "Sorted (#{{count}})",
"Sorted (#{{count}})_other": "Sorted (#{{count}})",
"UnFreeze {{count}} columns_one": "UnFreeze {{count}} columns",
"UnFreeze {{count}} columns_other": "UnFreeze {{count}} columns",
"Unfreeze all columns": "Unfreeze all columns",
"Unfreeze {{count}} columns_one": "Unfreeze {{count}} columns",
"Unfreeze {{count}} columns_other": "Unfreeze {{count}} columns",
"UnfreezeColumn_one": "UnfreezeColumn",
"UnfreezeColumn_other": "UnfreezeColumn"
"Unfreeze {{count}} columns_other": "Unfreeze {{count}} columns"
},
"GristDoc": {
"Added new linked section to view {{viewName}}": "Added new linked section to view {{viewName}}",
@ -579,7 +573,7 @@
"Revert": "Revert",
"Save": "Save",
"Sort": "Sort",
"UpdateSortFilterSettings": "UpdateSortFilterSettings"
"Update Sort & Filter settings": "Update Sort & Filter settings"
},
"ThemeConfig": {
"Appearance ": "Appearance ",
@ -616,7 +610,7 @@
"Cancel": "Cancel",
"Preview": "Preview",
"Revise": "Revise",
"UpdateFormula": "UpdateFormula"
"Update formula (Shift+Enter)": "Update formula (Shift+Enter)"
},
"UserManagerModel": {
"Editor": "Editor",

View File

@ -112,7 +112,7 @@ describe("Localization", function() {
});
it("loads correct languages from file system", async function() {
modifyByCode(tempLocale, "en", {HomeIntro: {Welcome: 'TestMessage'}});
modifyByCode(tempLocale, "en", {HomeIntro: {'Welcome to Grist!': 'TestMessage'}});
await driver.navigate().refresh();
assert.equal(await driver.findWait('.test-welcome-title', 3000).getText(), 'TestMessage');
const gristConfig: any = await driver.executeScript("return window.gristConfig");