mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Mark more strings as translatable (#795)
* add modals translations * GridViewMenus: add translations for column type
This commit is contained in:
parent
5533b9b7ee
commit
b2e3d8787c
@ -9,8 +9,11 @@ import {icon} from 'app/client/ui2018/icons';
|
||||
import {cssModalTooltip, modalTooltip} from 'app/client/ui2018/modals';
|
||||
import {dom, DomContents, keyframes, observable, styled, svg} from 'grainjs';
|
||||
import {IPopupOptions} from 'popweasel';
|
||||
import {makeT} from 'app/client/lib/localization';
|
||||
import merge = require('lodash/merge');
|
||||
|
||||
const t = makeT('modals');
|
||||
|
||||
/**
|
||||
* This is a file for all custom and pre-configured popups, modals, toasts and tooltips, used
|
||||
* in more then one component.
|
||||
@ -35,19 +38,21 @@ export function buildConfirmDelete(
|
||||
Escape: () => ctl.close(),
|
||||
Enter: () => { onSave(remember.get()); ctl.close(); },
|
||||
}),
|
||||
dom('div', `Are you sure you want to delete ${single ? 'this' : 'these'} record${single ? '' : 's'}?`,
|
||||
dom('div', single ?
|
||||
t(`Are you sure you want to delete this record?`)
|
||||
: t(`Are you sure you want to delete these records?`),
|
||||
dom.style('margin-bottom', '10px'),
|
||||
),
|
||||
dom('div',
|
||||
labeledSquareCheckbox(remember, "Don't ask again.", testId('confirm-remember')),
|
||||
labeledSquareCheckbox(remember, t("Don't ask again."), testId('confirm-remember')),
|
||||
dom.style('margin-bottom', '10px'),
|
||||
),
|
||||
cssButtons(
|
||||
primaryButton('Delete', testId('confirm-save'), dom.on('click', () => {
|
||||
primaryButton(t('Delete'), testId('confirm-save'), dom.on('click', () => {
|
||||
onSave(remember.get());
|
||||
ctl.close();
|
||||
})),
|
||||
basicButton('Cancel', testId('confirm-cancel'), dom.on('click', () => ctl.close()))
|
||||
basicButton(t('Cancel'), testId('confirm-cancel'), dom.on('click', () => ctl.close()))
|
||||
)
|
||||
), {}
|
||||
);
|
||||
@ -81,9 +86,9 @@ export function showDeprecatedWarning(
|
||||
dom.style('justify-content', 'space-between'),
|
||||
dom.style('align-items', 'center'),
|
||||
dom('div',
|
||||
labeledSquareCheckbox(remember, "Don't show again.", testId('confirm-remember')),
|
||||
labeledSquareCheckbox(remember, t("Don't show again."), testId('confirm-remember')),
|
||||
),
|
||||
basicButton('Dismiss', testId('confirm-save'),
|
||||
basicButton(t('Dismiss'), testId('confirm-save'),
|
||||
dom.on('click', () => { ctl.close(); onClose(remember.get()); })
|
||||
)
|
||||
),
|
||||
@ -105,7 +110,7 @@ export function showDeprecatedWarning(
|
||||
export function reportUndo(
|
||||
doc: GristDoc,
|
||||
messageLabel: string,
|
||||
buttonLabel = 'Undo to restore'
|
||||
buttonLabel = t('Undo to restore')
|
||||
) {
|
||||
// First create a notification with a button to undo the delete.
|
||||
let notification = reportSuccess(messageLabel, {
|
||||
@ -179,12 +184,12 @@ export function showBehavioralPrompt(
|
||||
dom.style('align-items', 'center'),
|
||||
dom('div',
|
||||
cssSkipTipsCheckbox(dontShowTips,
|
||||
cssSkipTipsCheckboxLabel("Don't show tips"),
|
||||
cssSkipTipsCheckboxLabel(t("Don't show tips")),
|
||||
testId('behavioral-prompt-dont-show-tips')
|
||||
),
|
||||
dom.style('visibility', hideDontShowTips ? 'hidden' : ''),
|
||||
),
|
||||
cssDismissPromptButton('Got it', testId('behavioral-prompt-dismiss'),
|
||||
cssDismissPromptButton(t('Got it'), testId('behavioral-prompt-dismiss'),
|
||||
dom.on('click', () => { onClose(dontShowTips.get()); ctl.close(); })
|
||||
),
|
||||
),
|
||||
|
@ -433,7 +433,19 @@
|
||||
"Created by": "Created by",
|
||||
"Detect duplicates in...": "Detect duplicates in...",
|
||||
"Last updated at": "Last updated at",
|
||||
"Last updated by": "Last updated by"
|
||||
"Last updated by": "Last updated by",
|
||||
"Any": "Any",
|
||||
"Numeric": "Numeric",
|
||||
"Text": "Text",
|
||||
"Integer": "Integer",
|
||||
"Toggle": "Toggle",
|
||||
"Date": "Date",
|
||||
"DateTime": "DateTime",
|
||||
"Choice": "Choice",
|
||||
"Choice List": "Choice List",
|
||||
"Reference": "Reference",
|
||||
"Reference List": "Reference List",
|
||||
"Attachment": "Attachment"
|
||||
},
|
||||
"GristDoc": {
|
||||
"Added new linked section to view {{viewName}}": "Added new linked section to view {{viewName}}",
|
||||
@ -880,7 +892,16 @@
|
||||
"modals": {
|
||||
"Cancel": "Cancel",
|
||||
"Ok": "OK",
|
||||
"Save": "Save"
|
||||
"Save": "Save",
|
||||
"Are you sure you want to delete these records?": "Are you sure you want to delete these records?",
|
||||
"Are you sure you want to delete this record?": "Are you sure you want to delete this record?",
|
||||
"Delete": "Delete",
|
||||
"Dismiss": "Dismiss",
|
||||
"Don't ask again.": "Don't ask again.",
|
||||
"Don't show again.": "Don't show again.",
|
||||
"Don't show tips": "Don't show tips",
|
||||
"Undo to restore": "Undo to restore",
|
||||
"Got it": "Got it"
|
||||
},
|
||||
"pages": {
|
||||
"Duplicate Page": "Duplicate Page",
|
||||
|
Loading…
Reference in New Issue
Block a user