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,12 +1,15 @@
import {dom, makeTestId, styled} from 'grainjs';
import {getSingleOrg, shouldHideUiElement} from 'app/common/gristUrls';
import {getOrgName} from 'app/common/UserAPI';
import {dom, makeTestId, styled} from 'grainjs';
import {makeT} from 'app/client/lib/localization';
import {AppModel} from 'app/client/models/AppModel';
import {urlState} from 'app/client/models/gristUrlState';
import {theme} from 'app/client/ui2018/cssVars';
import {menuDivider, menuIcon, menuItem, menuItemLink, menuSubHeader} from 'app/client/ui2018/menus';
import {icon} from 'app/client/ui2018/icons';
const t = makeT('SiteSwitcher');
const testId = makeTestId('test-site-switcher-');
/**
@@ -30,7 +33,7 @@ export function buildSiteSwitcher(appModel: AppModel) {
const orgs = appModel.topAppModel.orgs;
return [
menuSubHeader('Switch Sites'),
menuSubHeader(t('SwitchSites')),
dom.forEach(orgs, (org) =>
menuItemLink(urlState().setLinkUrl({ org: org.domain || undefined }),
cssOrgSelected.cls('', appModel.currentOrg ? org.id === appModel.currentOrg.id : false),
@@ -42,7 +45,7 @@ export function buildSiteSwitcher(appModel: AppModel) {
menuItem(
() => appModel.showNewSiteModal(),
menuIcon('Plus'),
'Create new team site',
t('CreateNewTeamSite'),
testId('create-new-site'),
),
];