mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Fix tests
This commit is contained in:
parent
676c27d6c9
commit
83ea6868cb
@ -72,7 +72,7 @@ export class TypeTransform extends ColumnTransform {
|
|||||||
return basicButton(dom.on('click', () => this.editor.writeObservable()),
|
return basicButton(dom.on('click', () => this.editor.writeObservable()),
|
||||||
t('Preview'), testId("type-transform-update"),
|
t('Preview'), testId("type-transform-update"),
|
||||||
dom.cls('disabled', (use) => use(disableButtons) || use(this.formulaUpToDate)),
|
dom.cls('disabled', (use) => use(disableButtons) || use(this.formulaUpToDate)),
|
||||||
{ title: t('UpdateFormula') }
|
{ title: t('Update formula (Shift+Enter)') }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return basicButton(dom.on('click', () => { this._reviseTypeChange.set(true); }),
|
return basicButton(dom.on('click', () => { this._reviseTypeChange.set(true); }),
|
||||||
|
@ -135,10 +135,10 @@ export function MultiColumnMenu(options: IMultiColumnContextMenu) {
|
|||||||
const disableForReadonlyView = dom.cls('disabled', options.isReadonly);
|
const disableForReadonlyView = dom.cls('disabled', options.isReadonly);
|
||||||
const num: number = options.numColumns;
|
const num: number = options.numColumns;
|
||||||
const nameClearColumns = options.isFiltered ?
|
const nameClearColumns = options.isFiltered ?
|
||||||
t('ResetEntireColumns', {count: num}) :
|
t('Reset {{count}} entire columns', {count: num}) :
|
||||||
t('ResetColumns', {count: num});
|
t('Reset {{count}} columns', {count: num});
|
||||||
const nameDeleteColumns = t('DeleteColumns', {count: num});
|
const nameDeleteColumns = t('Delete {{count}} columns', {count: num});
|
||||||
const nameHideColumns = t('HideColumns', {count: num});
|
const nameHideColumns = t('Hide {{count}} columns', {count: num});
|
||||||
const frozenMenu = options.disableFrozenMenu ? null : freezeMenuItemCmd(options);
|
const frozenMenu = options.disableFrozenMenu ? null : freezeMenuItemCmd(options);
|
||||||
return [
|
return [
|
||||||
frozenMenu ? [frozenMenu, menuDivider()]: null,
|
frozenMenu ? [frozenMenu, menuDivider()]: null,
|
||||||
@ -229,7 +229,7 @@ export function freezeAction(options: IMultiColumnContextMenu): { text: string;
|
|||||||
const properNumber = numFrozen - firstColumnIndex;
|
const properNumber = numFrozen - firstColumnIndex;
|
||||||
text = properNumber === numFrozen ?
|
text = properNumber === numFrozen ?
|
||||||
t('Unfreeze all columns') :
|
t('Unfreeze all columns') :
|
||||||
t('UnFreeze {{count}} columns', {count: properNumber});
|
t('Unfreeze {{count}} columns', {count: properNumber});
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
text,
|
text,
|
||||||
@ -240,13 +240,13 @@ export function freezeAction(options: IMultiColumnContextMenu): { text: string;
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isLastFrozenSet) {
|
if (isLastFrozenSet) {
|
||||||
text = t('UnfreezeColumn', {count: length});
|
text = t('Unfreeze {{count}} columns', {count: length});
|
||||||
return {
|
return {
|
||||||
text,
|
text,
|
||||||
numFrozen : numFrozen - length
|
numFrozen : numFrozen - length
|
||||||
};
|
};
|
||||||
} else if (isFirstNormalSet) {
|
} else if (isFirstNormalSet) {
|
||||||
text = t('FreezeColumn', {count: length});
|
text = t('Freeze {{count}} columns', {count: length});
|
||||||
return {
|
return {
|
||||||
text,
|
text,
|
||||||
numFrozen : numFrozen + length
|
numFrozen : numFrozen + length
|
||||||
|
@ -51,7 +51,7 @@ export class SortFilterConfig extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _save() {
|
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.activeSortJson.save(),
|
||||||
this._section.saveFilters(),
|
this._section.saveFilters(),
|
||||||
]));
|
]));
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
"Widget does not require any permissions.": "Widget does not require any permissions.",
|
"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 to {{read}} the current table.": "Widget needs to {{read}} the current table.",
|
||||||
"Widget needs {{fullAccess}} to this document.": "Widget needs {{fullAccess}} to this document.",
|
"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"
|
"{{wrongTypeCount}} non-{{columnType}} columns are not shown_other": "{{wrongTypeCount}} non-{{columnType}} columns are not shown"
|
||||||
},
|
},
|
||||||
"DataTables": {
|
"DataTables": {
|
||||||
@ -302,12 +302,12 @@
|
|||||||
"Column options are limited in summary tables.": "Column options are limited in summary tables.",
|
"Column options are limited in summary tables.": "Column options are limited in summary tables.",
|
||||||
"Convert column to data": "Convert column to data",
|
"Convert column to data": "Convert column to data",
|
||||||
"Convert to trigger formula": "Convert to trigger formula",
|
"Convert to trigger formula": "Convert to trigger formula",
|
||||||
"Data Columns_one": "Data Columns",
|
"Data Columns_one": "Data Column",
|
||||||
"Data Columns_other": "Data Columns",
|
"Data Columns_other": "Data Columns",
|
||||||
"Empty Columns_one": "Empty Columns",
|
"Empty Columns_one": "Empty Column",
|
||||||
"Empty Columns_other": "Empty Columns",
|
"Empty Columns_other": "Empty Columns",
|
||||||
"Enter formula": "Enter formula",
|
"Enter formula": "Enter formula",
|
||||||
"Formula Columns_one": "Formula Columns",
|
"Formula Columns_one": "Formula Column",
|
||||||
"Formula Columns_other": "Formula Columns",
|
"Formula Columns_other": "Formula Columns",
|
||||||
"Make into data column": "Make into data column",
|
"Make into data column": "Make into data column",
|
||||||
"Mixed Behavior": "Mixed Behavior",
|
"Mixed Behavior": "Mixed Behavior",
|
||||||
@ -337,35 +337,29 @@
|
|||||||
"Clear values": "Clear values",
|
"Clear values": "Clear values",
|
||||||
"Column Options": "Column Options",
|
"Column Options": "Column Options",
|
||||||
"Convert formula to data": "Convert formula to data",
|
"Convert formula to data": "Convert formula to data",
|
||||||
"DeleteColumns_one": "DeleteColumns",
|
"Delete {{count}} columns_one": "Delete column",
|
||||||
"DeleteColumns_other": "DeleteColumns",
|
"Delete {{count}} columns_other": "Delete {{count}} columns",
|
||||||
"Filter Data": "Filter Data",
|
"Filter Data": "Filter Data",
|
||||||
"Freeze {{count}} columns_one": "Freeze {{count}} columns",
|
"Freeze {{count}} columns_one": "Freeze {{count}} columns",
|
||||||
"Freeze {{count}} columns_other": "Freeze {{count}} columns",
|
"Freeze {{count}} columns_other": "Freeze {{count}} columns",
|
||||||
"Freeze {{count}} more columns_one": "Freeze {{count}} more columns",
|
"Freeze {{count}} more columns_one": "Freeze {{count}} more columns",
|
||||||
"Freeze {{count}} more columns_other": "Freeze {{count}} more columns",
|
"Freeze {{count}} more columns_other": "Freeze {{count}} more columns",
|
||||||
"FreezeColumn_one": "FreezeColumn",
|
"Hide {{count}} columns_one": "Hide column",
|
||||||
"FreezeColumn_other": "FreezeColumn",
|
"Hide {{count}} columns_other": "Hide {{count}} columns",
|
||||||
"HideColumns_one": "HideColumns",
|
|
||||||
"HideColumns_other": "HideColumns",
|
|
||||||
"Insert column to the {{to}}": "Insert column to the {{to}}",
|
"Insert column to the {{to}}": "Insert column to the {{to}}",
|
||||||
"More sort options ...": "More sort options ...",
|
"More sort options ...": "More sort options ...",
|
||||||
"Rename column": "Rename column",
|
"Rename column": "Rename column",
|
||||||
"ResetColumns_one": "ResetColumns",
|
"Reset {{count}} columns_one": "Reset column",
|
||||||
"ResetColumns_other": "ResetColumns",
|
"Reset {{count}} columns_other": "Reset {{count}} columns",
|
||||||
"ResetEntireColumns_one": "ResetEntireColumns",
|
"Reset {{count}} entire columns_one": "Reset entire column",
|
||||||
"ResetEntireColumns_other": "ResetEntireColumns",
|
"Reset {{count}} entire columns_other": "Reset {{count}} entire columns",
|
||||||
"Show column {{- label}}": "Show column {{- label}}",
|
"Show column {{- label}}": "Show column {{- label}}",
|
||||||
"Sort": "Sort",
|
"Sort": "Sort",
|
||||||
"Sorted (#{{count}})_one": "Sorted (#{{count}})",
|
"Sorted (#{{count}})_one": "Sorted (#{{count}})",
|
||||||
"Sorted (#{{count}})_other": "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 all columns": "Unfreeze all columns",
|
||||||
"Unfreeze {{count}} columns_one": "Unfreeze {{count}} columns",
|
"Unfreeze {{count}} columns_one": "Unfreeze {{count}} columns",
|
||||||
"Unfreeze {{count}} columns_other": "Unfreeze {{count}} columns",
|
"Unfreeze {{count}} columns_other": "Unfreeze {{count}} columns"
|
||||||
"UnfreezeColumn_one": "UnfreezeColumn",
|
|
||||||
"UnfreezeColumn_other": "UnfreezeColumn"
|
|
||||||
},
|
},
|
||||||
"GristDoc": {
|
"GristDoc": {
|
||||||
"Added new linked section to view {{viewName}}": "Added new linked section to view {{viewName}}",
|
"Added new linked section to view {{viewName}}": "Added new linked section to view {{viewName}}",
|
||||||
@ -579,7 +573,7 @@
|
|||||||
"Revert": "Revert",
|
"Revert": "Revert",
|
||||||
"Save": "Save",
|
"Save": "Save",
|
||||||
"Sort": "Sort",
|
"Sort": "Sort",
|
||||||
"UpdateSortFilterSettings": "UpdateSortFilterSettings"
|
"Update Sort & Filter settings": "Update Sort & Filter settings"
|
||||||
},
|
},
|
||||||
"ThemeConfig": {
|
"ThemeConfig": {
|
||||||
"Appearance ": "Appearance ",
|
"Appearance ": "Appearance ",
|
||||||
@ -616,7 +610,7 @@
|
|||||||
"Cancel": "Cancel",
|
"Cancel": "Cancel",
|
||||||
"Preview": "Preview",
|
"Preview": "Preview",
|
||||||
"Revise": "Revise",
|
"Revise": "Revise",
|
||||||
"UpdateFormula": "UpdateFormula"
|
"Update formula (Shift+Enter)": "Update formula (Shift+Enter)"
|
||||||
},
|
},
|
||||||
"UserManagerModel": {
|
"UserManagerModel": {
|
||||||
"Editor": "Editor",
|
"Editor": "Editor",
|
||||||
|
@ -112,7 +112,7 @@ describe("Localization", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("loads correct languages from file system", async 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();
|
await driver.navigate().refresh();
|
||||||
assert.equal(await driver.findWait('.test-welcome-title', 3000).getText(), 'TestMessage');
|
assert.equal(await driver.findWait('.test-welcome-title', 3000).getText(), 'TestMessage');
|
||||||
const gristConfig: any = await driver.executeScript("return window.gristConfig");
|
const gristConfig: any = await driver.executeScript("return window.gristConfig");
|
||||||
|
Loading…
Reference in New Issue
Block a user