mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Change translation keys for ui2018 directory
This commit is contained in:
parent
32e3d25ae5
commit
7a2a0a797f
@ -64,7 +64,7 @@ export function colorSelect(
|
|||||||
onSave,
|
onSave,
|
||||||
onOpen,
|
onOpen,
|
||||||
onRevert,
|
onRevert,
|
||||||
placeholder = t('DefaultCellStyle'),
|
placeholder = t("Default cell style"),
|
||||||
} = options;
|
} = options;
|
||||||
const selectBtn = cssSelectBtn(
|
const selectBtn = cssSelectBtn(
|
||||||
cssContent(
|
cssContent(
|
||||||
@ -188,12 +188,12 @@ function buildColorPicker(ctl: IOpenController,
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
cssButtonRow(
|
cssButtonRow(
|
||||||
primaryButton(t('Apply'),
|
primaryButton(t("Apply"),
|
||||||
dom.on('click', () => ctl.close()),
|
dom.on('click', () => ctl.close()),
|
||||||
dom.boolAttr("disabled", notChanged),
|
dom.boolAttr("disabled", notChanged),
|
||||||
testId('colors-save')
|
testId('colors-save')
|
||||||
),
|
),
|
||||||
basicButton(t('Cancel'),
|
basicButton(t("Cancel"),
|
||||||
dom.on('click', () => revert()),
|
dom.on('click', () => revert()),
|
||||||
testId('colors-cancel')
|
testId('colors-cancel')
|
||||||
)
|
)
|
||||||
|
@ -138,19 +138,20 @@ export function docBreadcrumbs(
|
|||||||
dom.maybe(options.isPublic, () => cssPublicIcon('PublicFilled', testId('bc-is-public'))),
|
dom.maybe(options.isPublic, () => cssPublicIcon('PublicFilled', testId('bc-is-public'))),
|
||||||
dom.domComputed((use) => {
|
dom.domComputed((use) => {
|
||||||
if (options.isSnapshot && use(options.isSnapshot)) {
|
if (options.isSnapshot && use(options.isSnapshot)) {
|
||||||
return cssTag(t('Snapshot'), testId('snapshot-tag'));
|
return cssTag(t("snapshot"), testId('snapshot-tag'));
|
||||||
}
|
}
|
||||||
if (use(options.isFork)) {
|
if (use(options.isFork)) {
|
||||||
return cssTag(t('Unsaved'), testId('unsaved-tag'));
|
return cssTag(t("unsaved"), testId('unsaved-tag'));
|
||||||
}
|
}
|
||||||
if (use(options.isRecoveryMode)) {
|
if (use(options.isRecoveryMode)) {
|
||||||
return cssAlertTag(t('RecoveryMode'),
|
return cssAlertTag(t("recovery mode"),
|
||||||
dom('a', dom.on('click', () => options.cancelRecoveryMode()),
|
dom('a', dom.on('click', () => options.cancelRecoveryMode()),
|
||||||
icon('CrossSmall')),
|
icon('CrossSmall')),
|
||||||
testId('recovery-mode-tag'));
|
testId('recovery-mode-tag'));
|
||||||
}
|
}
|
||||||
if (use(options.isFiddle)) {
|
if (use(options.isFiddle)) {
|
||||||
return cssTag(t('Fiddle'), tooltip({title: t('FiddleExplanation')}), testId('fiddle-tag'));
|
return cssTag(t("fiddle"), tooltip({title: t(`You may make edits, but they will create a new copy and will
|
||||||
|
not affect the original document.`)}), testId('fiddle-tag'));
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
separator(' / ',
|
separator(' / ',
|
||||||
|
@ -189,7 +189,7 @@ export function multiSelect<T>(selectedOptions: MutableObsArray<T>,
|
|||||||
|
|
||||||
const selectedOptionsText = Computed.create(null, selectedOptionsSet, (use, selectedOpts) => {
|
const selectedOptionsText = Computed.create(null, selectedOptionsSet, (use, selectedOpts) => {
|
||||||
if (selectedOpts.size === 0) {
|
if (selectedOpts.size === 0) {
|
||||||
return options.placeholder ?? t('SelectFields');
|
return options.placeholder ?? t("Select fields");
|
||||||
}
|
}
|
||||||
|
|
||||||
const optionArray = Array.isArray(availableOptions) ? availableOptions : use(availableOptions);
|
const optionArray = Array.isArray(availableOptions) ? availableOptions : use(availableOptions);
|
||||||
@ -323,8 +323,8 @@ export function upgradableMenuItem(needUpgrade: boolean, action: () => void, ...
|
|||||||
|
|
||||||
export function upgradeText(needUpgrade: boolean, onClick: () => void) {
|
export function upgradeText(needUpgrade: boolean, onClick: () => void) {
|
||||||
if (!needUpgrade) { return null; }
|
if (!needUpgrade) { return null; }
|
||||||
return menuText(dom('span', t('WorkspacesAvailableOnTeamPlans'),
|
return menuText(dom('span', t("* Workspaces are available on team plans. "),
|
||||||
cssUpgradeTextButton(t('UpgradeNow'), dom.on('click', () => onClick()))));
|
cssUpgradeTextButton(t("Upgrade now"), dom.on('click', () => onClick()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -306,13 +306,13 @@ export function saveModal(createFunc: (ctl: IModalControl, owner: MultiHolder) =
|
|||||||
cssModalTitle(options.title, testId('modal-title')),
|
cssModalTitle(options.title, testId('modal-title')),
|
||||||
cssModalBody(options.body),
|
cssModalBody(options.body),
|
||||||
cssModalButtons(
|
cssModalButtons(
|
||||||
bigPrimaryButton(options.saveLabel || t('Save'),
|
bigPrimaryButton(options.saveLabel || t("Save"),
|
||||||
dom.boolAttr('disabled', isSaveDisabled),
|
dom.boolAttr('disabled', isSaveDisabled),
|
||||||
dom.on('click', save),
|
dom.on('click', save),
|
||||||
testId('modal-confirm'),
|
testId('modal-confirm'),
|
||||||
),
|
),
|
||||||
options.extraButtons,
|
options.extraButtons,
|
||||||
options.hideCancel ? null : bigBasicButton(t('Cancel'),
|
options.hideCancel ? null : bigBasicButton(t("Cancel"),
|
||||||
dom.on('click', () => ctl.close()),
|
dom.on('click', () => ctl.close()),
|
||||||
testId('modal-cancel'),
|
testId('modal-cancel'),
|
||||||
),
|
),
|
||||||
@ -426,7 +426,7 @@ export function invokePrompt(
|
|||||||
const prom = new Promise<string|undefined>((resolve) => {
|
const prom = new Promise<string|undefined>((resolve) => {
|
||||||
onResolve = resolve;
|
onResolve = resolve;
|
||||||
});
|
});
|
||||||
promptModal(title, onResolve!, btnText ?? t('Ok'), initial, placeholder, () => {
|
promptModal(title, onResolve!, btnText ?? t("Ok"), initial, placeholder, () => {
|
||||||
if (onResolve) {
|
if (onResolve) {
|
||||||
onResolve(undefined);
|
onResolve(undefined);
|
||||||
}
|
}
|
||||||
|
@ -37,11 +37,11 @@ export function buildPageDom(name: Observable<string>, actions: PageActions, ...
|
|||||||
const pageMenu = () => [
|
const pageMenu = () => [
|
||||||
menuItem(() => isRenaming.set(true), t("Rename"), testId('rename'),
|
menuItem(() => isRenaming.set(true), t("Rename"), testId('rename'),
|
||||||
dom.cls('disabled', actions.isReadonly)),
|
dom.cls('disabled', actions.isReadonly)),
|
||||||
menuItem(actions.onRemove, t('Remove'), testId('remove'),
|
menuItem(actions.onRemove, t("Remove"), testId('remove'),
|
||||||
dom.cls('disabled', (use) => use(actions.isReadonly) || actions.isRemoveDisabled())),
|
dom.cls('disabled', (use) => use(actions.isReadonly) || actions.isRemoveDisabled())),
|
||||||
menuItem(actions.onDuplicate, t('DuplicatePage'), testId('duplicate'),
|
menuItem(actions.onDuplicate, t("Duplicate Page"), testId('duplicate'),
|
||||||
dom.cls('disabled', actions.isReadonly)),
|
dom.cls('disabled', actions.isReadonly)),
|
||||||
dom.maybe(actions.isReadonly, () => menuText(t('NoEditAccess'))),
|
dom.maybe(actions.isReadonly, () => menuText(t("You do not have edit access to this document"))),
|
||||||
];
|
];
|
||||||
let pageElem: HTMLElement;
|
let pageElem: HTMLElement;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ export function searchBar(model: SearchModel, testId: TestId = noTestId) {
|
|||||||
model.isOpen.set(_value === undefined ? !model.isOpen.get() : _value);
|
model.isOpen.set(_value === undefined ? !model.isOpen.get() : _value);
|
||||||
}, 100);
|
}, 100);
|
||||||
const inputElem: HTMLInputElement = searchInput(model.value, {onInput: true},
|
const inputElem: HTMLInputElement = searchInput(model.value, {onInput: true},
|
||||||
{type: 'text', placeholder: t('SearchInDocument')},
|
{type: 'text', placeholder: t("Search in document")},
|
||||||
dom.on('blur', () => (
|
dom.on('blur', () => (
|
||||||
keepExpanded ?
|
keepExpanded ?
|
||||||
setTimeout(() => inputElem.focus(), 0) :
|
setTimeout(() => inputElem.focus(), 0) :
|
||||||
@ -187,7 +187,7 @@ export function searchBar(model: SearchModel, testId: TestId = noTestId) {
|
|||||||
const noMatch = use(model.noMatch);
|
const noMatch = use(model.noMatch);
|
||||||
const isEmpty = use(model.isEmpty);
|
const isEmpty = use(model.isEmpty);
|
||||||
if (isEmpty) { return null; }
|
if (isEmpty) { return null; }
|
||||||
if (noMatch) { return cssLabel(t("NoResults")); }
|
if (noMatch) { return cssLabel(t("No results")); }
|
||||||
return [
|
return [
|
||||||
cssArrowBtn(
|
cssArrowBtn(
|
||||||
icon('Dropdown'),
|
icon('Dropdown'),
|
||||||
@ -197,7 +197,7 @@ export function searchBar(model: SearchModel, testId: TestId = noTestId) {
|
|||||||
dom.on('click', () => model.findNext()),
|
dom.on('click', () => model.findNext()),
|
||||||
hoverTooltip(
|
hoverTooltip(
|
||||||
[
|
[
|
||||||
t('FindNext'),
|
t("Find Next "),
|
||||||
cssShortcut(`(${['Enter', allCommands.findNext.humanKeys].join(', ')})`),
|
cssShortcut(`(${['Enter', allCommands.findNext.humanKeys].join(', ')})`),
|
||||||
],
|
],
|
||||||
{key: 'searchArrowBtnTooltip'}
|
{key: 'searchArrowBtnTooltip'}
|
||||||
@ -211,7 +211,7 @@ export function searchBar(model: SearchModel, testId: TestId = noTestId) {
|
|||||||
dom.on('click', () => model.findPrev()),
|
dom.on('click', () => model.findPrev()),
|
||||||
hoverTooltip(
|
hoverTooltip(
|
||||||
[
|
[
|
||||||
t('FindPrevious'),
|
t("Find Previous "),
|
||||||
cssShortcut(allCommands.findPrev.getKeysDesc()),
|
cssShortcut(allCommands.findPrev.getKeysDesc()),
|
||||||
],
|
],
|
||||||
{key: 'searchArrowBtnTooltip'}
|
{key: 'searchArrowBtnTooltip'}
|
||||||
|
Loading…
Reference in New Issue
Block a user