Make a good part of the app localizable and add French translations (#325)

Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
This commit is contained in:
Arnaud Peich
2022-10-28 18:11:08 +02:00
committed by GitHub
parent ec20e7fb68
commit 79deeca640
78 changed files with 2364 additions and 665 deletions

View File

@@ -1,3 +1,4 @@
import {makeT} from 'app/client/lib/localization';
import {GristDoc} from 'app/client/components/GristDoc';
import {cssInput} from 'app/client/ui/cssInput';
import {cssField} from 'app/client/ui/MakeCopyMenu';
@@ -9,6 +10,8 @@ import {saveModal} from 'app/client/ui2018/modals';
import {commonUrls} from 'app/common/gristUrls';
import {Computed, Disposable, dom, input, makeTestId, Observable, styled} from 'grainjs';
const t = makeT('DuplicateTable');
const testId = makeTestId('test-duplicate-table-');
/**
@@ -71,7 +74,7 @@ class DuplicateTableModal extends Disposable {
input(
this._newTableName,
{onInput: true},
{placeholder: 'Name for new table'},
{placeholder: t('NewName')},
(elem) => { setTimeout(() => { elem.focus(); }, 20); },
dom.on('focus', (_ev, elem) => { elem.select(); }),
dom.cls(cssInput.className),
@@ -80,21 +83,21 @@ class DuplicateTableModal extends Disposable {
),
cssWarning(
cssWarningIcon('Warning'),
dom('div',
"Instead of duplicating tables, it's usually better to segment data using linked views. ",
cssLink({href: commonUrls.helpLinkingWidgets, target: '_blank'}, 'Read More.')
),
t("AdviceWithLink", {link: cssLink({href: commonUrls.helpLinkingWidgets, target: '_blank'}, 'Read More.')})
), //TODO: i18next
),
cssField(
cssCheckbox(
this._includeData,
'Copy all data in addition to the table structure.',
t('CopyAllData'),
testId('copy-all-data'),
),
),
dom.maybe(this._includeData, () => cssWarning(
cssWarningIcon('Warning'),
dom('div', 'Only the document default access rules will apply to the copy.'),
dom('div', t('WarningACL')),
testId('acl-warning'),
)),
];