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,3 +1,4 @@
|
||||
import {makeT} from 'app/client/lib/localization';
|
||||
import {menuItem, menuSubHeader} from 'app/client/ui2018/menus';
|
||||
import {dom} from 'grainjs';
|
||||
|
||||
@@ -7,13 +8,15 @@ interface IFieldOptions {
|
||||
revertToCommon: () => void;
|
||||
}
|
||||
|
||||
const t = makeT('FieldMenus');
|
||||
|
||||
export function FieldSettingsMenu(useColOptions: boolean, disableSeparate: boolean, actions: IFieldOptions) {
|
||||
useColOptions = useColOptions || disableSeparate;
|
||||
return [
|
||||
menuSubHeader(`Using ${useColOptions ? 'common' : 'separate'} settings`),
|
||||
useColOptions ? menuItem(actions.useSeparate, 'Use separate settings', dom.cls('disabled', disableSeparate)) : [
|
||||
menuItem(actions.saveAsCommon, 'Save as common settings'),
|
||||
menuItem(actions.revertToCommon, 'Revert to common settings'),
|
||||
menuSubHeader(t('UsingSettings', {context: useColOptions ? 'common' : 'separate'})),
|
||||
useColOptions ? menuItem(actions.useSeparate, t('Settings', {context: 'useseparate'}), dom.cls('disabled', disableSeparate)) : [
|
||||
menuItem(actions.saveAsCommon, t('Settings', {context: 'savecommon'})),
|
||||
menuItem(actions.revertToCommon, t('Settings', {context: 'revertcommon'})),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user