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

@@ -13,6 +13,9 @@ import flatten = require('lodash/flatten');
import forEach = require('lodash/forEach');
import zip = require('lodash/zip');
import zipObject = require('lodash/zipObject');
import {makeT} from 'app/client/lib/localization';
const t = makeT('components.duplicatePage');
// Duplicate page with pageId. Starts by prompting user for a new name.
export async function duplicatePage(gristDoc: GristDoc, pageId: number) {
@@ -27,8 +30,7 @@ export async function duplicatePage(gristDoc: GristDoc, pageId: number) {
cssLabel("Name"),
inputEl = cssInput({value: pageName + ' (copy)'}),
),
"Note that this does not copy data, ",
"but creates another view of the same data.",
t("DoesNotCopyData"),
])
));
}
@@ -39,7 +41,7 @@ async function makeDuplicate(gristDoc: GristDoc, pageId: number, pageName: strin
const viewSections = sourceView.viewSections.peek().peek();
let viewRef = 0;
await gristDoc.docData.bundleActions(
`Duplicate page ${pageName}`,
t("DuplicatePageName", {pageName}),
async () => {
// create new view and new sections
const results = await createNewViewSections(gristDoc.docData, viewSections);