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,3 +1,4 @@
import {makeT} from 'app/client/lib/localization';
import {ACIndex, ACItem, ACResults, buildHighlightedDom, normalizeText} from "app/client/lib/ACIndex";
import {cssSelectItem} from "app/client/lib/ACSelect";
import {Autocomplete, IAutocompleteOptions} from "app/client/lib/autocomplete";
@@ -17,6 +18,8 @@ import {createUserImage, cssUserImage} from "app/client/ui/UserImage";
import {Computed, computed, dom, DomElementArg, Holder, IDisposableOwner, Observable, styled} from "grainjs";
import {cssMenuItem} from "popweasel";
const t = makeT('lib.ACUserManager');
export interface ACUserItem extends ACItem {
value: string;
label: string;
@@ -106,9 +109,10 @@ export function buildACMemberEmail(
cssUserImagePlus.cls('-invalid', (use) => !use(enableAdd),
)),
cssMemberText(
cssMemberPrimaryPlus("Invite new member"),
cssMemberPrimaryPlus(t("InviteNewMember")),
cssMemberSecondaryPlus(
dom.text(use => `We'll email an invite to ${use(emailObs)}`)
// dom.text(use => `We'll email an invite to ${use(emailObs)}`)
dom.text(use => t('InviteEmail', {email: use(emailObs)})) // TODO i18next
)
),
testId("um-add-email")
@@ -139,7 +143,7 @@ export function buildACMemberEmail(
(emailInput = cssEmailInput(
emailObs,
{onInput: true, isValid},
{type: "email", placeholder: "Enter email address"},
{type: "email", placeholder: t("EmailInputPlaceholder")},
dom.on("input", acOpen),
dom.on("focus", acOpen),
dom.on("click", acOpen),