mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
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:
@@ -1,4 +1,5 @@
|
||||
import { isDesktop } from 'app/client/lib/browserInfo';
|
||||
import { makeT } from 'app/client/lib/localization';
|
||||
import { cssEditorInput } from "app/client/ui/HomeLeftPane";
|
||||
import { itemHeader, itemHeaderWrapper, treeViewContainer } from "app/client/ui/TreeViewComponentCss";
|
||||
import { theme } from "app/client/ui2018/cssVars";
|
||||
@@ -6,6 +7,8 @@ import { icon } from "app/client/ui2018/icons";
|
||||
import { menu, menuItem, menuText } from "app/client/ui2018/menus";
|
||||
import { dom, domComputed, DomElementArg, makeTestId, observable, Observable, styled } from "grainjs";
|
||||
|
||||
const t = makeT('ui2018.pages');
|
||||
|
||||
const testId = makeTestId('test-docpage-');
|
||||
|
||||
// the actions a page can do
|
||||
@@ -31,13 +34,13 @@ export function buildPageDom(name: Observable<string>, actions: PageActions, ...
|
||||
|
||||
const isRenaming = observable(false);
|
||||
const pageMenu = () => [
|
||||
menuItem(() => isRenaming.set(true), "Rename", testId('rename'),
|
||||
menuItem(() => isRenaming.set(true), t("Rename"), testId('rename'),
|
||||
dom.cls('disabled', actions.isReadonly)),
|
||||
menuItem(actions.onRemove, 'Remove', testId('remove'),
|
||||
menuItem(actions.onRemove, t('Remove'), testId('remove'),
|
||||
dom.cls('disabled', (use) => use(actions.isReadonly) || actions.isRemoveDisabled())),
|
||||
menuItem(actions.onDuplicate, 'Duplicate Page', testId('duplicate'),
|
||||
menuItem(actions.onDuplicate, t('DuplicatePage'), testId('duplicate'),
|
||||
dom.cls('disabled', actions.isReadonly)),
|
||||
dom.maybe(actions.isReadonly, () => menuText('You do not have edit access to this document')),
|
||||
dom.maybe(actions.isReadonly, () => menuText(t('NoEditAccess'))),
|
||||
];
|
||||
let pageElem: HTMLElement;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user