(core) Capitalization in new colum menu

Summary:
- "Add Column" -> "Add column"
- "Detect Duplicates in" -> "Detect duplicates in"
- "Last Updated At" -> "Last updated at"
- "Created By" (At) -> "Created by" (at)
- "Last Updated By" -> "Last updated by"

Test Plan: I looked at menu and cannot see any more capital letters anywhere other that begining of the menu position.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4127
This commit is contained in:
Jakub Serafin 2023-12-01 11:28:38 +01:00
parent a1c62f32f4
commit 8038ee881c
3 changed files with 27 additions and 25 deletions

View File

@ -50,7 +50,7 @@ function buildAddNewColumMenuSection(gridView: GridView, index?: number): DomEle
async () => {
await gridView.insertColumn(null, {index});
},
t("Add Column"),
t("Add column"),
testId('new-columns-menu-add-new'),
);
}
@ -184,9 +184,9 @@ function buildTimestampMenuItems(gridView: GridView, index?: number) {
return menuItemSubmenu(() => [
menuItem(
async () => {
await gridView.insertColumn(t('Created At'), {
await gridView.insertColumn(t('Created at'), {
colInfo: {
label: t('Created At'),
label: t('Created at'),
type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
isFormula: false,
formula: 'NOW()',
@ -202,9 +202,9 @@ function buildTimestampMenuItems(gridView: GridView, index?: number) {
),
menuItem(
async () => {
await gridView.insertColumn(t('Last Updated At'), {
await gridView.insertColumn(t('Last updated at'), {
colInfo: {
label: t('Last Updated At'),
label: t('Last updated at'),
type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
isFormula: false,
formula: 'NOW()',
@ -228,9 +228,9 @@ function buildAuthorshipMenuItems(gridView: GridView, index?: number) {
return menuItemSubmenu(() => [
menuItem(
async () => {
await gridView.insertColumn(t('Created By'), {
await gridView.insertColumn(t('Created by'), {
colInfo: {
label: t('Created By'),
label: t('Created by'),
type: 'Text',
isFormula: false,
formula: 'user.Name',
@ -246,9 +246,9 @@ function buildAuthorshipMenuItems(gridView: GridView, index?: number) {
),
menuItem(
async () => {
await gridView.insertColumn(t('Last Updated By'), {
await gridView.insertColumn(t('Last updated by'), {
colInfo: {
label: t('Last Updated By'),
label: t('Last updated by'),
type: 'Text',
isFormula: false,
formula: 'user.Name',
@ -329,7 +329,7 @@ function buildDetectDuplicatesMenuItems(gridView: GridView, index?: number) {
{searchInputPlaceholder: t('Search columns')}
),
{allowNothingSelected: true},
t('Detect Duplicates in...'),
t('Detect duplicates in...'),
testId('new-columns-menu-shortcuts-duplicates'),
);
}

View File

@ -1,9 +1,11 @@
"use strict";
import { assert, driver } from 'mocha-webdriver';
import { $, gu, test } from 'test/nbrowser/gristUtil-nbrowser';
const colHeaderScrollOpts = {block: "start", inline: "end"};
describe('ColumnOps.ntest', function() {
gu.bigScreen();
const cleanup = test.setupTestSuite(this);
before(async function() {
@ -41,7 +43,7 @@ describe('ColumnOps.ntest', function() {
await assert.isPresent(gu.getColumnHeader('A'), false);
await $('.mod-add-column').scrollIntoView(true);
await $('.mod-add-column').click();
await gu.actions.selectFloatingOption('Add Column');
await gu.actions.selectFloatingOption('Add column');
await gu.userActionsCollect(true);
await gu.waitToPass(() => gu.getColumnHeader('A'));
await gu.getOpenEditingLabel(await gu.getColumnHeader('A')).wait().sendKeys($.ENTER);
@ -76,7 +78,7 @@ describe('ColumnOps.ntest', function() {
await gu.waitForServer();
await assert.isPresent(gu.getColumnHeader('Name'), false);
// Then show it using the add column menu
// Then show it using the Add column menu
await $('.mod-add-column').scrollIntoView(true);
await $(".mod-add-column").click();
await showColumn('Name');
@ -84,7 +86,7 @@ describe('ColumnOps.ntest', function() {
await assert.isPresent(gu.getColumnHeader('Name'), true);
});
it("[+] button show add column directly if no hidden columns", async function() {
it("[+] button show Add column directly if no hidden columns", async function() {
await $('.mod-add-column').scrollIntoView(true);
await $(".mod-add-column").click();
await showColumn("Pop");

View File

@ -992,11 +992,11 @@ describe('GridViewNewColumnMenu', function () {
// Make sure we have Created At column at the end.
const columns = await gu.getColumnNames();
assert.deepEqual(columns, ['A', 'B', 'C', 'Created At']);
assert.deepEqual(columns, ['A', 'B', 'C', 'Created at']);
// Make sure this is the column that is selected.
assert.equal(await driver.find('.test-field-label').value(), 'Created At');
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_At');
assert.equal(await driver.find('.test-field-label').value(), 'Created at');
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_at');
// Check behavior - this is trigger formula
assert.equal(await gu.columnBehavior(), "Data Column");
@ -1019,11 +1019,11 @@ describe('GridViewNewColumnMenu', function () {
// Make sure we have this column at the end.
const columns = await gu.getColumnNames();
assert.deepEqual(columns, ['A', 'B', 'C', 'Last Updated At']);
assert.deepEqual(columns, ['A', 'B', 'C', 'Last updated at']);
// Make sure this is the column that is selected.
assert.equal(await driver.find('.test-field-label').value(), 'Last Updated At');
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_Updated_At');
assert.equal(await driver.find('.test-field-label').value(), 'Last updated at');
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_updated_at');
// Check behavior - this is trigger formula
assert.equal(await gu.columnBehavior(), "Data Column");
@ -1053,11 +1053,11 @@ describe('GridViewNewColumnMenu', function () {
// Make sure we have this column at the end.
const columns = await gu.getColumnNames();
assert.deepEqual(columns, ['A', 'B', 'C', 'Created By']);
assert.deepEqual(columns, ['A', 'B', 'C', 'Created by']);
// Make sure this is the column that is selected.
assert.equal(await driver.find('.test-field-label').value(), 'Created By');
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_By');
assert.equal(await driver.find('.test-field-label').value(), 'Created by');
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_by');
// Check behavior - this is trigger formula
assert.equal(await gu.columnBehavior(), "Data Column");
@ -1081,11 +1081,11 @@ describe('GridViewNewColumnMenu', function () {
// Make sure we have this column at the end.
const columns = await gu.getColumnNames();
assert.deepEqual(columns, ['A', 'B', 'C', 'Last Updated By']);
assert.deepEqual(columns, ['A', 'B', 'C', 'Last updated by']);
// Make sure this is the column that is selected.
assert.equal(await driver.find('.test-field-label').value(), 'Last Updated By');
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_Updated_By');
assert.equal(await driver.find('.test-field-label').value(), 'Last updated by');
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_updated_by');
// Check behavior - this is trigger formula
assert.equal(await gu.columnBehavior(), "Data Column");