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 * as roles from 'app/common/roles';
import {manageTeamUsersApp} from 'app/client/ui/OpenUserManager';
import {maybeAddSiteSwitcherSection} from 'app/client/ui/SiteSwitcher';
import {BindableValue, Disposable, dom, DomContents, styled} from 'grainjs';
import {makeT} from 'app/client/lib/localization';
const t = makeT('AppHeader');
// Maps a name of a Product (from app/gen-server/entity/Product.ts) to a tag (pill) to show next
// to the org name.
@@ -54,11 +57,11 @@ export class AppHeader extends Disposable {
this._orgName && cssDropdownIcon('Dropdown'),
menu(() => [
menuSubHeader(
`${this._appModel.isTeamSite ? 'Team' : 'Personal'} Site`
+ (this._appModel.isLegacySite ? ' (Legacy)' : ''),
this._appModel.isTeamSite ? t('TeamSite') : t('PersonalSite')
+ (this._appModel.isLegacySite ? ` (${t('Legacy')})` : ''),
testId('orgmenu-title'),
),
menuItemLink(urlState().setLinkUrl({}), 'Home Page', testId('orgmenu-home-page')),
menuItemLink(urlState().setLinkUrl({}), t('HomePage'), testId('orgmenu-home-page')),
// Show 'Organization Settings' when on a home page of a valid org.
(!this._docPageModel && currentOrg && !currentOrg.owner ?