From e561d8e4136f926436cc59974fe78846f286e918 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Fri, 23 Apr 2021 19:42:32 +0200 Subject: [PATCH 1/8] should be almost set --- packages/files-ui/.linguirc | 2 +- packages/files-ui/src/App.tsx | 112 ++-- .../Modules/FileBrowsers/FileInfoModal.tsx | 20 +- .../Components/Modules/FilePreviewModal.tsx | 16 +- .../Modules/LoginModule/ConciseExplainer.tsx | 2 +- .../Modules/LoginModule/MissingShares.tsx | 2 +- .../Modules/Settings/LanguageSelection.tsx | 37 + .../Components/Modules/Settings/Profile.tsx | 2 + .../Modules/Settings/Security/index.tsx | 6 +- .../files-ui/src/Contexts/LanguageContext.tsx | 103 +-- packages/files-ui/src/locales/en/messages.po | 12 +- packages/files-ui/src/locales/fr/messages.mo | Bin 0 -> 8964 bytes packages/files-ui/src/locales/fr/messages.po | 630 ++++++++++++++++++ 13 files changed, 814 insertions(+), 130 deletions(-) create mode 100644 packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx create mode 100644 packages/files-ui/src/locales/fr/messages.mo create mode 100644 packages/files-ui/src/locales/fr/messages.po diff --git a/packages/files-ui/.linguirc b/packages/files-ui/.linguirc index 1b7ae61f54..2c705d1e0d 100644 --- a/packages/files-ui/.linguirc +++ b/packages/files-ui/.linguirc @@ -9,6 +9,6 @@ "formatOptions": { "origins": false }, - "locales": ["en"], + "locales": ["en", "fr"], "sourceLocale": "en" } \ No newline at end of file diff --git a/packages/files-ui/src/App.tsx b/packages/files-ui/src/App.tsx index d95f81cfe1..73f8394c4d 100644 --- a/packages/files-ui/src/App.tsx +++ b/packages/files-ui/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react" +import React, { useCallback, useEffect } from "react" import { init as initSentry, ErrorBoundary, showReportDialog } from "@sentry/react" import { Web3Provider } from "@chainsafe/web3-context" import { ImployApiProvider, UserProvider, BillingProvider } from "@chainsafe/common-contexts" @@ -25,13 +25,42 @@ if ( environment: process.env.REACT_APP_SENTRY_ENV }) } + +const availableLanguages = [ + { id: "en", label: "English" }, + { id: "fr", label: "Français" } +] + +const onboardConfig = { + dappId: process.env.REACT_APP_BLOCKNATIVE_ID || "", + walletSelect: { + wallets: [ + { walletName: "coinbase" }, + { + walletName: "trust", + rpcUrl: + "https://mainnet.infura.io/v3/a7e16429d2254d488d396710084e2cd3" + }, + { walletName: "metamask", preferred: true }, + { walletName: "authereum" }, + { walletName: "opera" }, + { walletName: "operaTouch" }, + { walletName: "torus" }, + { walletName: "status" }, + { + walletName: "walletConnect", + infuraKey: "a7e16429d2254d488d396710084e2cd3", + preferred: true + } + ] + } +} + const App: React.FC<{}> = () => { const { initHotjar } = useHotjar() const { canUseLocalStorage } = useLocalStorage() const hotjarId = process.env.REACT_APP_HOTJAR_ID - const apiUrl = - process.env.REACT_APP_API_URL || "https://stage.imploy.site/api/v1" - + const apiUrl = process.env.REACT_APP_API_URL || "https://stage.imploy.site/api/v1" // This will default to testnet unless mainnet is specifically set in the ENV const directAuthNetwork = (process.env.REACT_APP_DIRECT_AUTH_NETWORK === "mainnet") ? "mainnet" : "testnet" @@ -41,64 +70,43 @@ const App: React.FC<{}> = () => { } }, [hotjarId, initHotjar]) + const fallBack = useCallback(({ error, componentStack, eventId, resetError }) => ( + + + An error occurred and has been logged. If you would like to + provide additional info to help us debug and resolve the issue, + click the `"`Provide Additional Details`"` button + + {error?.message.toString()} + {componentStack} + {eventId} + + + + ), []) + return ( ( - - - An error occurred and has been logged. If you would like to - provide additional info to help us debug and resolve the issue, - click the `"`Provide Additional Details`"` button - - {error?.message.toString()} - {componentStack} - {eventId} - - - - )} + fallback={fallBack} onReset={() => window.location.reload()} > - - + + diff --git a/packages/files-ui/src/Components/Modules/FileBrowsers/FileInfoModal.tsx b/packages/files-ui/src/Components/Modules/FileBrowsers/FileInfoModal.tsx index 2d3a293401..db294e147a 100644 --- a/packages/files-ui/src/Components/Modules/FileBrowsers/FileInfoModal.tsx +++ b/packages/files-ui/src/Components/Modules/FileBrowsers/FileInfoModal.tsx @@ -206,7 +206,7 @@ const FileInfoModal: React.FC = ({ > General - {fullFileInfo.persistent?.uploaded ? ( + {fullFileInfo.persistent?.uploaded && (
= ({ {fullFileInfo.persistent?.uploaded}
- ) : null} - {fullFileInfo.content?.size !== undefined ? ( + )} + {fullFileInfo.content?.size !== undefined && (
= ({ {formatBytes(fullFileInfo.content?.size)}
- ) : null} + )}
= ({ > Technical - {fullFileInfo.persistent?.stored_cid !== undefined ? ( + {fullFileInfo.persistent?.stored_cid !== undefined && (
= ({ {fullFileInfo.persistent?.stored_cid}
- ) : null} - {fullFileInfo.persistent?.stored_cid !== undefined ? ( + )} + {fullFileInfo.persistent?.stored_cid !== undefined && (
= ({ {fullFileInfo.persistent?.stored_cid}
- ) : null} + )}
= ({ > CID (Content Identifier) - {copied ? ( + {copied && ( = ({ > copied ! - ) : null} + )} + // <> // // Move - // + // // ), // onClick: () => console.log, // }, // { // contents: ( - // + // <> // // Share - // + // // ), // onClick: () => console.log, // }, // { // contents: ( - // + // <> // // Rename - // + // // ), // onClick: () => console.log, // }, // { // contents: ( - // + // <> // // Delete - // + // // ), // onClick: () => console.log, // }, diff --git a/packages/files-ui/src/Components/Modules/LoginModule/ConciseExplainer.tsx b/packages/files-ui/src/Components/Modules/LoginModule/ConciseExplainer.tsx index f5dfd11dc9..ccac24b5c6 100644 --- a/packages/files-ui/src/Components/Modules/LoginModule/ConciseExplainer.tsx +++ b/packages/files-ui/src/Components/Modules/LoginModule/ConciseExplainer.tsx @@ -158,7 +158,7 @@ const ConciseExplainer: React.FC = ({ className, onConti alt="password and keys" /> - Enter a password + Enter password
diff --git a/packages/files-ui/src/Components/Modules/LoginModule/MissingShares.tsx b/packages/files-ui/src/Components/Modules/LoginModule/MissingShares.tsx index 6130ad13f1..72501688cf 100644 --- a/packages/files-ui/src/Components/Modules/LoginModule/MissingShares.tsx +++ b/packages/files-ui/src/Components/Modules/LoginModule/MissingShares.tsx @@ -190,7 +190,7 @@ const MissingShares = ({ className }: IMissingShares) => { size="large" onClick={() => setWithPassword(true)} > - Enter a password + Enter password )}
+
diff --git a/packages/files-ui/src/Components/Modules/Settings/Security/index.tsx b/packages/files-ui/src/Components/Modules/Settings/Security/index.tsx index c53756e9cf..a4714772cf 100644 --- a/packages/files-ui/src/Components/Modules/Settings/Security/index.tsx +++ b/packages/files-ui/src/Components/Modules/Settings/Security/index.tsx @@ -325,8 +325,8 @@ const Security = ({ className }: SecurityProps) => { - A backup phrase will be generated for your account.
- We do not store it and it can only be displayed once. Please save it somewhere safe! + A backup phrase will be generated and used for your account.
+ We do not store it and it can only be displayed once. Save it somewhere safe!
{
- Backup Phrase + Backup phrase diff --git a/packages/files-ui/src/Contexts/LanguageContext.tsx b/packages/files-ui/src/Contexts/LanguageContext.tsx index 26d6812af8..9e930d20ed 100644 --- a/packages/files-ui/src/Contexts/LanguageContext.tsx +++ b/packages/files-ui/src/Contexts/LanguageContext.tsx @@ -1,8 +1,8 @@ -import React, { useState, useEffect } from "react" +import React, { useState, useEffect, useCallback } from "react" import { i18n } from "@lingui/core" -import { messages as catalogEn } from "../locales/en/messages" import { I18nProvider } from "@lingui/react" import * as plurals from "make-plural/plurals" +import { useLocalStorage } from "@chainsafe/browser-storage-hooks" export type LanguageContext = { availableLanguages: Language[] @@ -22,29 +22,39 @@ type LanguageProviderProps = { availableLanguages: Language[] } -const LanguageContext = React.createContext( - undefined -) +const DEFAULT_LANGUAGE = "en" +const DEFAULT_LOCALE = "en-GB" +const PREFERED_LANGUAGE_KEY = "csf.preferedLanguage" -const getLanguages = (): string[] => { - // eslint-disable-next-line @typescript-eslint/ban-ts-ignore - // @ts-ignore - const { languages, language, userLanguage } = window.navigator +const defaultContext: LanguageContext = { + availableLanguages: [], + selectedLanguage: DEFAULT_LANGUAGE, + selectedLocale: DEFAULT_LOCALE, + setActiveLanguage: () => {console.error("setActiveLanguage not implemented")}, + formatLocaleDate: () => {console.error("formatLocaleDate not implemented"); return ""} +} + +const LanguageContext = React.createContext(defaultContext) + +const getLanguages = (prefered = ""): string[] => { + const { languages, language } = window.navigator if (Array.isArray(languages)) { // Dedupe array of languages - return [...new Set(languages.map((l) => l.split("-")[0]))] + const deduped = [...new Set(languages.map((l) => l.split("-")[0]))] + const preferedFirst = prefered + ? [prefered, ...deduped.filter((lang) => prefered !== lang)] + : deduped + + return preferedFirst } if (language) { - return [language.split("-")[0]] + return [prefered, language.split("-")[0]] } - if (userLanguage) { - return [userLanguage.split("-")[0]] - } // If language not detected use english - return ["en"] + return [prefered, DEFAULT_LANGUAGE] } const getLocales = (): string[] => { @@ -65,30 +75,45 @@ const getLocales = (): string[] => { return [userLanguage] } // If language not detected use english - return ["en-GB"] + return [DEFAULT_LOCALE] } -const LanguageProvider = ({ - children, - availableLanguages -}: LanguageProviderProps) => { - const [selectedLanguage, setSelectedLanguage] = useState("") +const LanguageProvider = ({ children, availableLanguages }: LanguageProviderProps) => { + const [selectedLanguage, setSelectedLanguage] = useState("") + const { localStorageGet, localStorageSet } = useLocalStorage() const userLocales = getLocales() - useEffect(() => { - const userLanguages = getLanguages() + const setLanguage = useCallback((newLanguage: string, setPrefered = true) => { + if (!availableLanguages.find((l) => l.id === newLanguage)) { + console.error("Locale is not available, evalutaing:", newLanguage) + return + } + import(`../locales/${newLanguage}/messages.js`) + .then((newCatalog) => { + i18n.load(newLanguage, newCatalog.default.messages) + i18n.loadLocaleData(newLanguage, { plurals: (plurals as Record)[newLanguage] }) + i18n.activate(newLanguage) + setSelectedLanguage(newLanguage) + setPrefered && localStorageSet(PREFERED_LANGUAGE_KEY, newLanguage) + }) + .catch(console.error) + }, [availableLanguages, localStorageSet]) + + + useEffect(() => { + const prefered = localStorageGet(PREFERED_LANGUAGE_KEY) + const userLanguages = getLanguages(prefered || "") const matchingLanguages = [...new Set(userLanguages)].filter((x) => new Set(availableLanguages.map((l) => l.id)).has(x) ) - const defaultLanguage = matchingLanguages[0] || "en" - // eslint-disable-next-line @typescript-eslint/ban-ts-ignore - //@ts-ignore - i18n.loadLocaleData(defaultLanguage, { plurals: plurals[defaultLanguage] }) - i18n.load(defaultLanguage, catalogEn) - i18n.activate(defaultLanguage) - setSelectedLanguage(defaultLanguage) - }, [availableLanguages]) + + const defaultLanguage = matchingLanguages[0] || DEFAULT_LANGUAGE + + // passing false because this language wasn't + // set explicitely by the user + setLanguage(defaultLanguage, false) + }, [availableLanguages, localStorageGet, setLanguage]) const formatLocaleDate = (date: Date) => { const result = new Intl.DateTimeFormat(userLocales[0], { @@ -105,23 +130,11 @@ const LanguageProvider = ({ return result } - const setLanguage = async (newLanguage: string) => { - if (!availableLanguages.map((l) => l.id).includes(newLanguage)) { - console.log("This locale is not available") - return - } - - // const newCatalog = await import(`../locales/${newLanguage}/messages.js`) - // i18n.load(newLanguage, neimport { messagesascatalogEn } from "locales/en/messages.mjs"; - // i18n.activate(newLanguage) - setSelectedLanguage(newLanguage) - } - return ( We do not store it and <1>it can only be displayed once. Save it somewhere safe!" msgstr "A backup phrase will be generated and used for your account.<0/>We do not store it and <1>it can only be displayed once. Save it somewhere safe!" -msgid "A backup phrase will be generated for your account.<0/>We do not store it and <1>it can only be displayed once. Please save it somewhere safe!" -msgstr "A backup phrase will be generated for your account.<0/>We do not store it and <1>it can only be displayed once. Please save it somewhere safe!" - msgid "A file with the same name already exists" msgstr "A file with the same name already exists" @@ -40,9 +37,6 @@ msgstr "Approve" msgid "Are you sure?" msgstr "Are you sure?" -msgid "Backup Phrase" -msgstr "Backup Phrase" - msgid "Backup phrase" msgstr "Backup phrase" @@ -163,12 +157,12 @@ msgstr "Drop to upload files" msgid "Encryption Password" msgstr "Encryption Password" -msgid "Enter a password" -msgstr "Enter a password" - msgid "Enter backup phrase:" msgstr "Enter backup phrase:" +msgid "Enter password" +msgstr "Enter password" + msgid "Enter password:" msgstr "Enter password:" diff --git a/packages/files-ui/src/locales/fr/messages.mo b/packages/files-ui/src/locales/fr/messages.mo new file mode 100644 index 0000000000000000000000000000000000000000..94bc25cf8865a356cba17de1becbd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f-9ks!alY$C7Nj;<M;^}i%y24OdgIg;Fn5ER_hrIaZ?+o?9921v3?MAD!bI3bOr zZIaw1`=B(XA0mray^qk81EKr8l|u=NWxQzWc-y7`CLH@f=R=#~f$AmnG5&Hj zNjz7Si~OgUql~CYLNk`lR@8PBLMrxTvzh-5YGPqLX-q6+qa|}ZI2=bkxs!P}A$}!&Uu0=(@{~4cI=wF49mSL$;n0(=&$oLwoc>TtBJYyh)KfK2Ucz-6KA#FZ^G-Ed zTzXTb1Dq6Lir8w=sCsG^n)LtLl_We do not store it and <1>it can only be displayed once. Save it somewhere safe!" +msgstr "Une phrase de backup sera générée et utilisé pour ce comte.<0/>Nous ne la sauvergardons pas <1>elle ne peut être montrée qu'une seule fois. Garde la dans un endroit sûr!" + +msgid "A file with the same name already exists" +msgstr "Un fichier avec ce nom existe déjà" + +msgid "Account" +msgstr "Compte" + +msgid "Add at least one more authentication method to protect your account. You’d only need any two to sign in to Files from any device." +msgstr "Ajoute au moins une méthode d’authentification pour protéger ce compte. Tu as besoin de 2 méthode pour accéder à Files depuis n'importe quel appareil." + +msgid "Add more files" +msgstr "Ajoute d'autres fichiers" + +msgid "Approve" +msgstr "Accepter" + +msgid "Are you sure?" +msgstr "Es-tu certain?" + +msgid "Backup phrase" +msgstr "Phrase de secours" + +msgid "Backup phrase does not match user account, please double-check and try again." +msgstr "La phrase de secours est incorrecte, merci de vérifier et réessayer." + +msgid "Bin" +msgstr "Corbeille" + +msgid "Browser:" +msgstr "Explorateur:" + +msgid "By connecting your wallet, you agree to our <0>Terms of Service and <1>Privacy Policy" +msgstr "En connectant ton portefeuille, tu acceptes nos <0>Terms of Service et <1>Privacy Policy" + +msgid "By forgetting this browser, you will not be able to use its associated recovery key to sign-in." +msgstr "Supprimer ce navigateur implique que la clé de sécurité qui lui est associée ne pourra plus être utilisé pour accéder à Files." + +msgid "CID (Content Identifier)" +msgstr "CID (Identifiant de contenu)" + +msgid "Cancel" +msgstr "Annuler" + +msgid "Change Password" +msgstr "Modifier" + +msgid "Change password" +msgstr "Modifier" + +msgid "Click or drag to upload files" +msgstr "Clique ou faire glisser un ficher pour uploader" + +msgid "Close" +msgstr "Fermer" + +msgid "Complete" +msgstr "Terminé" + +msgid "Confirm" +msgstr "Confirmer" + +msgid "Confirm Password:" +msgstr "Confirmer le mot de passe:" + +msgid "Connect Wallet to Files" +msgstr "Connecter un wallet à Files" + +msgid "Connect a new wallet" +msgstr "Connecter un nouveau wallet" + +msgid "Connection failed" +msgstr "La connexion a échouée" + +msgid "Continue" +msgstr "Continuer" + +msgid "Continue with Facebook" +msgstr "Continuer avec Facebook" + +msgid "Continue with Github" +msgstr "Continuer avec GitHub" + +msgid "Continue with Google" +msgstr "Continuer avec Google" + +msgid "Continue with Web3 Wallet" +msgstr "Continuer avec un wallet Web3" + +msgid "Copied!" +msgstr "Copié!" + +msgid "Copy CID" +msgstr "Copier le CID" + +msgid "Create" +msgstr "Créer" + +msgid "Create Folder" +msgstr "Créer un dossier" + +msgid "Create folder" +msgstr "Créer un dossier" + +msgid "Dark Theme" +msgstr "Thème sombre" + +msgid "Date uploaded" +msgstr "Ajouté le" + +msgid "Decryption failed" +msgstr "Le déchiffrage a échoué" + +msgid "Delete" +msgstr "Supprimer" + +msgid "Delete selected" +msgstr "Supprimer selection" + +msgid "Device awaiting confirmation" +msgstr "Appareil en attente de confirmation" + +msgid "Display Settings" +msgstr "Paramètres d'affichage" + +msgid "Download" +msgstr "Télécharger" + +msgid "Download complete" +msgstr "Téléchargement terminé" + +msgid "Download recovery key" +msgstr "Télécharger la clé de sauvegarde" + +msgid "Drop to upload files" +msgstr "Faire glisser pour uploader un fichier" + +msgid "Encryption Password" +msgstr "Mot de passe de chiffrage" + +msgid "Enter backup phrase:" +msgstr "Phrase de sauvegarder:" + +msgid "Enter password" +msgstr "Mot de passe" + +msgid "Enter password:" +msgstr "Mot de passe:" + +msgid "Essentials - Free" +msgstr "Essentials - Gratuit" + +msgid "Failed to get signature" +msgstr "Échec de l'obtention de la signature" + +msgid "Failed to migrate account, please try again." +msgstr "Échec de la migration du compte, veuillez réessayer." + +msgid "" +"Failed to validate signature.\n" +"If you are using a contract wallet, please make \n" +"sure you have activated your wallet." +msgstr "" +"Échec de la validation de la signature.\n" +"Si vous utilisez un contract wallet, veuillez\n" +"vérifier que vous avez activé votre wallet." + +msgid "File" +msgstr "Fichier" + +msgid "File Info" +msgstr "Info du fichier" + +msgid "File format not supported." +msgstr "Format de fichier non supporté." + +msgid "File moved successfully" +msgstr "Fichier déplacé avec succès" + +msgid "File renamed successfully" +msgstr "Fichier renommé avec succès" + +msgid "File size" +msgstr "Taille" + +msgid "Files" +msgstr "Fichiers" + +msgid "Files uses device backups to save your browser." +msgstr "Files enregistre ce navigateur." + +msgid "Folder" +msgstr "Dossier" + +msgid "Folder created successfully" +msgstr "Dossier créé avec succès" + +msgid "Folders" +msgstr "Dossiers" + +msgid "For security reasons, upon signing in we’ll ask you for one of the following to confirm your identity." +msgstr "Pour des raisons de sécurité, lors de votre connexion, nous vous demanderons l'un des éléments suivants pour confirmer votre identité." + +msgid "Forget this browser" +msgstr "Oublier ce navigateur" + +msgid "General" +msgstr "Info" + +msgid "Generate backup phrase" +msgstr "Créer une phrase de sauvegarde" + +msgid "Generate phrase" +msgstr "Créer une phrase de sauvegarde" + +msgid "Generating..." +msgstr "Création..." + +msgid "Get Started" +msgstr "Commencer" + +msgid "Go back" +msgstr "Retour" + +msgid "Great! You’re all done." +msgstr "Génial! Vous avez terminé." + +msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever." +msgstr "Hey! Tu ne disposes que de deux méthodes d'authentification. Si tu en perds une, tu seras bloqué pour toujours et ne pourras plus te connecter à ton compte Files." + +msgid "Hold on, we are logging you in..." +msgstr "Un instant, nous te connectons ..." + +msgid "Home" +msgstr "Accueil" + +msgid "Info" +msgstr "Info" + +msgid "I’m done saving my backup phrase" +msgstr "Phrase de sauvegarde enregistrée" + +msgid "Learn more" +msgstr "En apprendre plus" + +msgid "Learn more about ChainSafe" +msgstr "En apprendre plus sur ChainSafe" + +msgid "Let's get you set up." +msgstr "C'est parti." + +msgid "Light Theme" +msgstr "Thème clair" + +msgid "Loading preview" +msgstr "Chargement de l’aperçu" + +msgid "Looks like you’re signing in from a new browser. Please choose one of the following to continue:" +msgstr "Connectez à partir d'un nouveau navigateur. Choisis une des options suivantes pour continuer:" + +msgid "Move" +msgstr "Déplacer" + +msgid "Move selected" +msgstr "Déplacer sélection" + +msgid "Move to..." +msgstr "Déplacer vers..." + +msgid "My Files" +msgstr "Mes Fichiers" + +msgid "Name" +msgstr "Nom" + +msgid "New folder" +msgstr "Nouveau dossier" + +msgid "Next" +msgstr "Suivant" + +msgid "Nice to see you again!" +msgstr "Ravi de te revoir!" + +msgid "No files to show" +msgstr "Aucun fichier à afficher" + +msgid "No folders" +msgstr "Aucun dossier" + +msgid "No search results for" +msgstr "Aucun fichier à afficher" + +msgid "No thanks" +msgstr "Non merci" + +msgid "Number of copies (Replication Factor)" +msgstr "Nombre de copies (facteur de réplication)" + +msgid "OK" +msgstr "OK" + +msgid "One sec, getting files ready..." +msgstr "Un instant, nous préparons vos fichiers..." + +msgid "Operating system:" +msgstr "Système d'exploitation:" + +msgid "Or confirm by signing into your Files on any browser you’ve used before." +msgstr "Ou accepte la requête de connexion depuis n'importe quel appareil ou navigateur utilisé auparavant." + +msgid "Password" +msgstr "Mot de passe" + +msgid "Password confirmation is required" +msgstr "La confirmation du mot de passe est requise" + +msgid "Password does not match user account, please double-check and try again." +msgstr "Le mot de passe ne correspond pas au compte, merci de vérifier et réessayer." + +msgid "Password needs to be more complex" +msgstr "Le mot de passe n'est pas assez sûr" + +msgid "Password setup" +msgstr "Configuration du mot de passe" + +msgid "Password:" +msgstr "Mot de Passe:" + +msgid "Passwords must match" +msgstr "Les mots de passes de correspondent pas" + +msgid "Please provide a password" +msgstr "Merci de donner un mot de passe" + +msgid "Preview" +msgstr "Aperçu" + +msgid "Previous" +msgstr "" + +msgid "Privacy Policy" +msgstr "" + +msgid "Profile and Display" +msgstr "" + +msgid "Profile updated" +msgstr "" + +msgid "Recover" +msgstr "" + +msgid "Recover with passphrase" +msgstr "" + +msgid "Reject" +msgstr "" + +msgid "Reject all" +msgstr "" + +msgid "Remind me later" +msgstr "" + +msgid "Rename" +msgstr "" + +msgid "Rename File/Folder" +msgstr "" + +msgid "Requested from" +msgstr "" + +msgid "Resources" +msgstr "" + +msgid "Restore with backup phrase" +msgstr "" + +msgid "Save changes" +msgstr "" + +msgid "Save this browser for next time?" +msgstr "" + +msgid "Saved" +msgstr "" + +msgid "Saved Browser" +msgstr "" + +msgid "Saved Browsers" +msgstr "" + +msgid "Saved browser" +msgstr "" + +msgid "Saved on:" +msgstr "" + +msgid "Search results" +msgstr "" + +msgid "Search..." +msgstr "" + +msgid "Security" +msgstr "" + +msgid "Select a wallet" +msgstr "" + +msgid "Send Feedback" +msgstr "" + +msgid "Set Password" +msgstr "" + +msgid "Set it up now" +msgstr "" + +msgid "Set up" +msgstr "" + +msgid "Set up a password" +msgstr "" + +msgid "Set up password" +msgstr "" + +msgid "Set up sign in methods" +msgstr "" + +msgid "Settings" +msgstr "" + +msgid "Share" +msgstr "" + +msgid "Sign Out" +msgstr "" + +msgid "Sign in" +msgstr "" + +msgid "Sign in with a different account" +msgstr "" + +msgid "Sign-in methods" +msgstr "" + +msgid "Sign-in with {0}" +msgstr "" + +msgid "Size" +msgstr "" + +msgid "Social Sign-in Wallet" +msgstr "" + +msgid "Social Sign-in or Wallet" +msgstr "" + +msgid "Social sign in or wallet" +msgstr "" + +msgid "Something went wrong. We couldn't upload your file" +msgstr "" + +msgid "Start Upload" +msgstr "" + +msgid "Storage Plan" +msgstr "" + +msgid "Stored by miner" +msgstr "" + +msgid "Technical" +msgstr "" + +msgid "Terms and Conditions" +msgstr "" + +msgid "Thanks for taking care of that. You can <0/> adjust these anytime in security settings." +msgstr "" + +msgid "The authentication popup was closed" +msgstr "" + +msgid "The system is undergoing maintenance, thank you for being patient." +msgstr "" + +msgid "Theme" +msgstr "" + +msgid "There was an error authenticating" +msgstr "" + +msgid "There was an error connecting your wallet" +msgstr "" + +msgid "There was an error creating this folder" +msgstr "" + +msgid "There was an error deleting this" +msgstr "" + +msgid "There was an error getting file info" +msgstr "" + +msgid "There was an error getting folder info" +msgstr "" + +msgid "There was an error getting search results" +msgstr "" + +msgid "There was an error getting the preview." +msgstr "" + +msgid "There was an error moving this file" +msgstr "" + +msgid "There was an error recovering this" +msgstr "" + +msgid "There was an error renaming this file" +msgstr "" + +msgid "Try again" +msgstr "" + +msgid "Try another method" +msgstr "" + +msgid "Update" +msgstr "" + +msgid "Upload" +msgstr "" + +msgid "Upload complete" +msgstr "" + +msgid "Use a different login method" +msgstr "" + +msgid "Use a saved browser" +msgstr "" + +msgid "View folder" +msgstr "" + +msgid "Wallet address" +msgstr "" + +msgid "Web3: {0}" +msgstr "" + +msgid "What a fine day it is." +msgstr "" + +msgid "What a fine night it is." +msgstr "" + +msgid "Without setting up at least three authentication factors, you risk getting locked out of your account.<0/><1/>Remember, you need a minimum of two factors to sign in. If you only have one, you’ll lose access to your account forever." +msgstr "" + +msgid "Yes I understand" +msgstr "" + +msgid "Yes, save it" +msgstr "" + +msgid "You are about to delete {0} file(s)." +msgstr "" + +msgid "You can change this later." +msgstr "" + +msgid "You will need to sign a message in your wallet to complete sign in." +msgstr "" + +msgid "Your Authentication Factors" +msgstr "" + +msgid "Your recovery key can be used to restore your account in place of your backup phrase." +msgstr "" + +msgid "copied !" +msgstr "" + +msgid "deleted successfully" +msgstr "" + +msgid "file" +msgstr "" + +msgid "folder" +msgstr "" + +msgid "on" +msgstr "" + +msgid "recovered successfully" +msgstr "" + +msgid "storage-plan-desc" +msgstr "" From 8e657e9548a261f0d80cd44f71c9998f8e779c9c Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Mon, 26 Apr 2021 11:02:38 +0100 Subject: [PATCH 2/8] dropdown styling --- .../Modules/Settings/LanguageSelection.tsx | 68 +++++++++++++------ .../Components/Modules/Settings/Profile.tsx | 7 ++ 2 files changed, 54 insertions(+), 21 deletions(-) diff --git a/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx b/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx index e194235475..419156f63b 100644 --- a/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx +++ b/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx @@ -1,36 +1,62 @@ import React, { useMemo } from "react" import { useLanguageContext } from "../../../Contexts/LanguageContext" import { MenuDropdown } from "@chainsafe/common-components" +import { createStyles, makeStyles } from "@chainsafe/common-theme" +import { CSFTheme } from "../../../Themes/types" + +const useStyles = makeStyles( + ({ constants, palette }: CSFTheme) => { + return createStyles({ + root: { + border: `1px solid ${palette.additional["gray"][6]}`, + minWidth: 145, + backgroundColor: palette.additional["gray"][1] + }, + options: { + backgroundColor: constants.header.optionsBackground, + color: constants.header.optionsTextColor, + border: `1px solid ${constants.header.optionsBorder}` + }, + icon: { + position: "absolute", + right: constants.generalUnit * 2, + "& svg": { + fill: constants.header.iconColor + } + } + }) + } +) const LanguageSelection = () => { + const classes = useStyles() const { availableLanguages, selectedLanguage, setActiveLanguage } = useLanguageContext() const currentLanguage = useMemo( () => availableLanguages.find((land) => land.id === selectedLanguage)?.label , [availableLanguages, selectedLanguage] ) - console.log("availableLanguages", availableLanguages) - console.log("selectedLanguage", selectedLanguage) return ( -
- ( - { - contents: ( - - {lang.label} - - ), - onClick: () => setActiveLanguage(lang.id) - } - ))} - title={currentLanguage} - /> -
+ ( + { + contents: ( + + {lang.label} + + ), + onClick: () => setActiveLanguage(lang.id) + } + ))} + title={currentLanguage} + /> ) } diff --git a/packages/files-ui/src/Components/Modules/Settings/Profile.tsx b/packages/files-ui/src/Components/Modules/Settings/Profile.tsx index 1e6bfa5af2..39eb8c5943 100644 --- a/packages/files-ui/src/Components/Modules/Settings/Profile.tsx +++ b/packages/files-ui/src/Components/Modules/Settings/Profile.tsx @@ -365,6 +365,13 @@ const ProfileView = () => {
+ + Language + From ea32b85933835415f643d4fb02788a3e5c85c267 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Mon, 26 Apr 2021 11:44:47 +0100 Subject: [PATCH 3/8] done with translation --- .../src/Components/Modules/Settings/Plan.tsx | 2 +- packages/files-ui/src/locales/en/messages.po | 9 +- packages/files-ui/src/locales/fr/messages.mo | Bin 8964 -> 16349 bytes packages/files-ui/src/locales/fr/messages.po | 189 +++++++++--------- 4 files changed, 103 insertions(+), 97 deletions(-) diff --git a/packages/files-ui/src/Components/Modules/Settings/Plan.tsx b/packages/files-ui/src/Components/Modules/Settings/Plan.tsx index cf4c35db7b..f863d05244 100644 --- a/packages/files-ui/src/Components/Modules/Settings/Plan.tsx +++ b/packages/files-ui/src/Components/Modules/Settings/Plan.tsx @@ -102,7 +102,7 @@ const PlanView: React.FC = () => { component="p" className={clsx(classes.margins, classes.subtitle)} > - + Lorem ipsum aenean et rutrum magna. Morbi nec placerat erat. Nunc elementum sed libero sit amet convallis. Quisque non arcu vitae ex fringilla molestie. diff --git a/packages/files-ui/src/locales/en/messages.po b/packages/files-ui/src/locales/en/messages.po index fd5e3323ab..aabd634fb4 100644 --- a/packages/files-ui/src/locales/en/messages.po +++ b/packages/files-ui/src/locales/en/messages.po @@ -259,6 +259,9 @@ msgstr "Info" msgid "I’m done saving my backup phrase" msgstr "I’m done saving my backup phrase" +msgid "Language" +msgstr "Language" + msgid "Learn more" msgstr "Learn more" @@ -277,6 +280,9 @@ msgstr "Loading preview" msgid "Looks like you’re signing in from a new browser. Please choose one of the following to continue:" msgstr "Looks like you’re signing in from a new browser. Please choose one of the following to continue:" +msgid "Lorem ipsum aenean et rutrum magna. Morbi nec placerat erat. Nunc elementum sed libero sit amet convallis. Quisque non arcu vitae ex fringilla molestie." +msgstr "Lorem ipsum aenean et rutrum magna. Morbi nec placerat erat. Nunc elementum sed libero sit amet convallis. Quisque non arcu vitae ex fringilla molestie." + msgid "Move" msgstr "Move" @@ -624,6 +630,3 @@ msgstr "on" msgid "recovered successfully" msgstr "recovered successfully" - -msgid "storage-plan-desc" -msgstr "Lorem ipsum aenean et rutrum magna. Morbi nec placerat erat. Nunc elementum sed libero sit amet convallis. Quisque non arcu vitae ex fringilla molestie." diff --git a/packages/files-ui/src/locales/fr/messages.mo b/packages/files-ui/src/locales/fr/messages.mo index 94bc25cf8865a356cba17de1becbd75c973aae85..70febed150e348b7d9c96650865908790c580efe 100644 GIT binary patch literal 16349 zcmd6t3y>vMdB+@XxB$kg$ozs2qom~+t zm8#s@Z~lF{PoMLh?|iTG_5Q<&N4_)Q_f6>O&}*L<1ScO61P>phyFu`R6N2Dqa16W= zybL@K{2q7|c=U-u@EY)V@L2FhQ1@>Gp8|f=;}^hj+V_Hw2Twl9jr%n4D%$6OF9Q#P zr-9!GVI}xAcpMl!)#35rnKVQ23E&1${A~s`?>Go+!5;8ba2DiW@G5`*Mo|4f44wjh z4CG&MkH^0UpGNy%Q2brUX6gRrAX5gD zp!mB6l$;KLPX=EPs^5*E=Dig>2!0k^1zyNa@q4AmtHE<<*FeeXdQftHE2wqc0!m(= z0X6Aae6)g>i%)QeLAT1oDFKfp68!$ z12yk%P;#3Cp9N;%B+A^$@39V?;UfNYo7t?{neoEU*OvtLGir<)ckuu zy&r=bKlkl}p!j_YDEYk;RR7yS?Z@Xpjq?B~J|6Pz?}A$QkHHZ938?puV>7gWXM@`3 zwV?Lzxge?+T<)JGmd!zI+SRI6nd<*Pnut#}k?KU%|6M$?ZunDS4a@ir+#0 zNH2DPo4{ER)eb%i?g8%wwLfRVtmJeqcqDi+C_Y~RJ`UUlYTnDhBaT2XLGe>V7@r24 zAVUS`APl{?4SX*+0gBIuLCy1o^W1ul1*I=%f?L5gpvIdA#s5L@<=~sa>%pIZl22!~ z)0?-0N7KH=<89y?+INDQ|2zKv55XtVei)P-egSHn6Q1qlFanCd%Ru$3fwIFUD7|}~ z$M=AkPVfovDDXj0_V5s>`F;dyJr8?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uicgx!5O4aVF577gTKUbWs-$vnL<5UaVxs^8~JjIUO}hq0A^%xJkjTl z(3|7fgE!!MdhJrZjt8*|Jw@d#v>m8H+o?l4*o@Vfe3pzAeu5l?a2lI&06VdQTHLiK z(T;qLR(LM@6P8mRK|4@Luf1P_)?1D)**vtKdUP*sL0(CQH^_{R2x&9)pi|u+9Y)Xl z1+)Ws)aIHNpbeIxBPx$p#rrGKrAr{6uz@ez*@n!1=)z*p|6wvV{3TlPcSu`dWb^@E zqPr!OXQS8a(LJ&Wow3)@_jV(z6W&4hMjzgRgV=$24Br9lLr=#cEb{yxBXb=Npd%eY zM>c_iQ#l#kT+`7C79e$o#qoXucT#RgXYL}p`^QtM@8w1-&<@w3Gtq=e8)_p%n_)8^ z#$D*KtK@APT!mKHi00`PZP_C2Z#p3CAx<&`Oc%n zEyPN~ePVio_QNB@Lxh{Ef~Y3^@vx_+B4Puvir7pnB<2%tvRcB;>)B4Hdt;_KIu}Oo{mf$Ah?pRJ!LS`}XAW=rReCf0(oxxVZ zy)cJZ>-aOtJWiNA4Q?dUohe3tMBGHCI-;0ZPTWe|Puxzl6NLmn8R0R)W9!*ZCpWLj z%{-5&A*zURRy><<*P9Y4LTT@U+@)FFZ%zHQ_xplrnZ1db-)48Oo^z(Rui{kZe{mtx A^Z)<= diff --git a/packages/files-ui/src/locales/fr/messages.po b/packages/files-ui/src/locales/fr/messages.po index 3aa2a78ceb..3198680493 100644 --- a/packages/files-ui/src/locales/fr/messages.po +++ b/packages/files-ui/src/locales/fr/messages.po @@ -260,6 +260,9 @@ msgstr "Info" msgid "I’m done saving my backup phrase" msgstr "Phrase de sauvegarde enregistrée" +msgid "Language" +msgstr "Langue de l'interface" + msgid "Learn more" msgstr "En apprendre plus" @@ -278,6 +281,9 @@ msgstr "Chargement de l’aperçu" msgid "Looks like you’re signing in from a new browser. Please choose one of the following to continue:" msgstr "Connectez à partir d'un nouveau navigateur. Choisis une des options suivantes pour continuer:" +msgid "Lorem ipsum aenean et rutrum magna. Morbi nec placerat erat. Nunc elementum sed libero sit amet convallis. Quisque non arcu vitae ex fringilla molestie." +msgstr "Lorem ipsum aenean et rutrum magna. Morbi nec placerat erat. Nunc elementum sed libero sit amet convallis. Quisque non arcu vitae ex fringilla molestie." + msgid "Move" msgstr "Déplacer" @@ -357,274 +363,271 @@ msgid "Preview" msgstr "Aperçu" msgid "Previous" -msgstr "" +msgstr "Précédent" msgid "Privacy Policy" -msgstr "" +msgstr "Politique de Confidentialité" msgid "Profile and Display" -msgstr "" +msgstr "Profil et Affichage" msgid "Profile updated" -msgstr "" +msgstr "Profile mis à jour" msgid "Recover" -msgstr "" +msgstr "Récupérer" msgid "Recover with passphrase" -msgstr "" +msgstr "Récupérer avec un mot de passe" msgid "Reject" -msgstr "" +msgstr "Refuser" msgid "Reject all" -msgstr "" +msgstr "Refuser tous" msgid "Remind me later" -msgstr "" +msgstr "Plus tard" msgid "Rename" -msgstr "" +msgstr "Renommer" msgid "Rename File/Folder" -msgstr "" +msgstr "Renommer Ficher/Dossier" msgid "Requested from" -msgstr "" +msgstr "Envoyé par" msgid "Resources" -msgstr "" +msgstr "Ressources" msgid "Restore with backup phrase" -msgstr "" +msgstr "Récupérer avec la phrase de sauvegarde" msgid "Save changes" -msgstr "" +msgstr "Enregistrer les changements" msgid "Save this browser for next time?" -msgstr "" +msgstr "Enregistrer ce navigateur?" msgid "Saved" -msgstr "" +msgstr "Enregistré" msgid "Saved Browser" -msgstr "" +msgstr "Navigateur enregistré" msgid "Saved Browsers" -msgstr "" +msgstr "Navigateurs enregistrés" msgid "Saved browser" -msgstr "" +msgstr "Navigateur enregistré" msgid "Saved on:" -msgstr "" +msgstr "Enregistré sur:" msgid "Search results" -msgstr "" +msgstr "Résultats de recherche" msgid "Search..." -msgstr "" +msgstr "Rechercher..." msgid "Security" -msgstr "" +msgstr "Sécurité" msgid "Select a wallet" -msgstr "" +msgstr "Sélectionner un wallet" msgid "Send Feedback" -msgstr "" +msgstr "Envoyer des commentaires" msgid "Set Password" -msgstr "" +msgstr "Définir un Mot de Passe" msgid "Set it up now" -msgstr "" +msgstr "Définir" msgid "Set up" -msgstr "" +msgstr "Définir" msgid "Set up a password" -msgstr "" +msgstr "Définir un mot de passe" msgid "Set up password" -msgstr "" +msgstr "Définir un mot de passe" msgid "Set up sign in methods" -msgstr "" +msgstr "Définir les méthodes d'authentifiction" msgid "Settings" -msgstr "" +msgstr "Paramètres" msgid "Share" -msgstr "" +msgstr "Partager" msgid "Sign Out" -msgstr "" +msgstr "Se Déconnecter" msgid "Sign in" -msgstr "" +msgstr "Se connecter" msgid "Sign in with a different account" -msgstr "" +msgstr "Se connecter avec un autre compte" msgid "Sign-in methods" -msgstr "" +msgstr "Méthodes de connections" msgid "Sign-in with {0}" -msgstr "" +msgstr "Se connecter avec {0}" msgid "Size" -msgstr "" +msgstr "Taille" msgid "Social Sign-in Wallet" -msgstr "" +msgstr "Connecté avec un réseau social ou wallet" msgid "Social Sign-in or Wallet" -msgstr "" +msgstr "Connecté avec un réseau social ou wallet" msgid "Social sign in or wallet" -msgstr "" +msgstr "Connecté avec un réseau social ou wallet" msgid "Something went wrong. We couldn't upload your file" -msgstr "" +msgstr "Un problème est survenu. Nous n'avons pas pu uploader votre fichier" msgid "Start Upload" -msgstr "" +msgstr "Démarrer l'upload" msgid "Storage Plan" -msgstr "" +msgstr "Plan de stockage" msgid "Stored by miner" -msgstr "" +msgstr "Sauvegardé par le mineur" msgid "Technical" -msgstr "" +msgstr "Technique" msgid "Terms and Conditions" -msgstr "" +msgstr "Termes et conditions" msgid "Thanks for taking care of that. You can <0/> adjust these anytime in security settings." -msgstr "" +msgstr "Vous pouvez <0 /> les ajuster à tout moment dans les paramètres de sécurité." msgid "The authentication popup was closed" -msgstr "" +msgstr "Le popup d'authentification a été fermé" msgid "The system is undergoing maintenance, thank you for being patient." -msgstr "" +msgstr "Le système est en cours de maintenance, merci d'être patient." msgid "Theme" -msgstr "" +msgstr "Thème" msgid "There was an error authenticating" -msgstr "" +msgstr "Une erreur s'est produite lors de l'authentification" msgid "There was an error connecting your wallet" -msgstr "" +msgstr "Une erreur s'est produite lors de la connexion de votre wallet" msgid "There was an error creating this folder" -msgstr "" +msgstr "Une erreur s'est produite lors de la création de ce dossier" msgid "There was an error deleting this" -msgstr "" +msgstr "Une erreur s'est produite lors de la suppression" msgid "There was an error getting file info" -msgstr "" +msgstr "Une erreur s'est produite lors de l'obtention des informations sur le fichier" msgid "There was an error getting folder info" -msgstr "" +msgstr "Une erreur s'est produite lors de l'obtention des informations sur le dossier" msgid "There was an error getting search results" -msgstr "" +msgstr "Une erreur s'est produite lors de l'obtention des résultats de recherche" msgid "There was an error getting the preview." -msgstr "" +msgstr "Une erreur s'est produite lors de la génération de l’aperçu." msgid "There was an error moving this file" -msgstr "" +msgstr "Une erreur s'est produite lors du déplacement de ce fichier" msgid "There was an error recovering this" -msgstr "" +msgstr "Une erreur s'est produite lors de la récupération" msgid "There was an error renaming this file" -msgstr "" +msgstr "Une erreur s'est produite lors de renommage de ce fichier" msgid "Try again" -msgstr "" +msgstr "Essayer de nouveau" msgid "Try another method" -msgstr "" +msgstr "Essayer une autre méthode" msgid "Update" -msgstr "" +msgstr "Mettre à jour" msgid "Upload" -msgstr "" +msgstr "Uploader" msgid "Upload complete" -msgstr "" +msgstr "Upload terminé" msgid "Use a different login method" -msgstr "" +msgstr "Utilisez une méthode de connexion différente" msgid "Use a saved browser" -msgstr "" +msgstr "Utiliser un navigateur enregistré" msgid "View folder" -msgstr "" +msgstr "Voir le dossier" msgid "Wallet address" -msgstr "" +msgstr "Addresse du wallet" msgid "Web3: {0}" -msgstr "" +msgstr "Web3: {0}" msgid "What a fine day it is." -msgstr "" +msgstr "Une belle journée." msgid "What a fine night it is." -msgstr "" +msgstr "Une belle nuit." msgid "Without setting up at least three authentication factors, you risk getting locked out of your account.<0/><1/>Remember, you need a minimum of two factors to sign in. If you only have one, you’ll lose access to your account forever." -msgstr "" +msgstr "Si vous ne configurez pas au moins trois facteurs d'authentification, vous risquez de ne plus pouvoir accéder à votre compte. <0 /> <1 /> N'oubliez pas que vous avez besoin d'au moins deux facteurs pour vous connecter. Si vous n'en avez qu'un, vous perdrez l'accès à votre compte pour toujours." msgid "Yes I understand" -msgstr "" +msgstr "Oui, je comprends" msgid "Yes, save it" -msgstr "" +msgstr "Oui, l'enregistrer" msgid "You are about to delete {0} file(s)." -msgstr "" +msgstr "Suppression de {0} fichier(s)." msgid "You can change this later." -msgstr "" +msgstr "Vous pouvez en changer plus tard." msgid "You will need to sign a message in your wallet to complete sign in." -msgstr "" +msgstr "Vous devrez signer un message avec votre wallet pour terminer la procédure connexion." msgid "Your Authentication Factors" -msgstr "" +msgstr "Vos Facteurs d'Authentification" msgid "Your recovery key can be used to restore your account in place of your backup phrase." -msgstr "" +msgstr "Votre clé de récupération peut être utilisée pour restaurer votre compte à la place de votre phrase de sauvegarde." msgid "copied !" -msgstr "" +msgstr "copié !" msgid "deleted successfully" -msgstr "" +msgstr "supprimé avec succès" msgid "file" -msgstr "" +msgstr "fichier" msgid "folder" -msgstr "" +msgstr "dossier" msgid "on" -msgstr "" +msgstr "le" msgid "recovered successfully" -msgstr "" - -msgid "storage-plan-desc" -msgstr "" +msgstr "récupéré avec succès" From a4374af11d29e1ba3401dcf79fdbaa0593d9394c Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Mon, 26 Apr 2021 12:15:52 +0100 Subject: [PATCH 4/8] nits here and there --- .../Modules/FileBrowsers/views/FilesTable.view.tsx | 2 +- .../Components/Modules/Settings/LanguageSelection.tsx | 6 +++++- packages/files-ui/src/locales/en/messages.po | 3 +++ packages/files-ui/src/locales/fr/messages.po | 9 ++++++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/files-ui/src/Components/Modules/FileBrowsers/views/FilesTable.view.tsx b/packages/files-ui/src/Components/Modules/FileBrowsers/views/FilesTable.view.tsx index f33f2a7fe9..c7ff3db4d6 100644 --- a/packages/files-ui/src/Components/Modules/FileBrowsers/views/FilesTable.view.tsx +++ b/packages/files-ui/src/Components/Modules/FileBrowsers/views/FilesTable.view.tsx @@ -770,7 +770,7 @@ const FilesTableView = ({ {uploadInProgress.noOfFiles > 1 - ? `Uploading ${uploadInProgress.noOfFiles} files` + ? t`Uploading ${uploadInProgress.noOfFiles} files` : uploadInProgress.fileName} diff --git a/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx b/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx index 419156f63b..4b29484a9e 100644 --- a/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx +++ b/packages/files-ui/src/Components/Modules/Settings/LanguageSelection.tsx @@ -23,6 +23,9 @@ const useStyles = makeStyles( "& svg": { fill: constants.header.iconColor } + }, + title: { + width: "100%" } }) } @@ -43,7 +46,8 @@ const LanguageSelection = () => { className={classes.root} classNames={{ icon: classes.icon, - options: classes.options + options: classes.options, + title: classes.title }} menuItems={availableLanguages.map((lang) => ( { diff --git a/packages/files-ui/src/locales/en/messages.po b/packages/files-ui/src/locales/en/messages.po index aabd634fb4..540790412b 100644 --- a/packages/files-ui/src/locales/en/messages.po +++ b/packages/files-ui/src/locales/en/messages.po @@ -568,6 +568,9 @@ msgstr "Upload" msgid "Upload complete" msgstr "Upload complete" +msgid "Uploading {0} files" +msgstr "Uploading {0} files" + msgid "Use a different login method" msgstr "Use a different login method" diff --git a/packages/files-ui/src/locales/fr/messages.po b/packages/files-ui/src/locales/fr/messages.po index 3198680493..cce427e85a 100644 --- a/packages/files-ui/src/locales/fr/messages.po +++ b/packages/files-ui/src/locales/fr/messages.po @@ -69,7 +69,7 @@ msgid "Change password" msgstr "Modifier" msgid "Click or drag to upload files" -msgstr "Clique ou faire glisser un ficher pour uploader" +msgstr "Cliquer ou faire glisser un ficher pour uploader" msgid "Close" msgstr "Fermer" @@ -405,7 +405,7 @@ msgid "Restore with backup phrase" msgstr "Récupérer avec la phrase de sauvegarde" msgid "Save changes" -msgstr "Enregistrer les changements" +msgstr "Enregistrer" msgid "Save this browser for next time?" msgstr "Enregistrer ce navigateur?" @@ -438,7 +438,7 @@ msgid "Select a wallet" msgstr "Sélectionner un wallet" msgid "Send Feedback" -msgstr "Envoyer des commentaires" +msgstr "Donner son avis" msgid "Set Password" msgstr "Définir un Mot de Passe" @@ -569,6 +569,9 @@ msgstr "Uploader" msgid "Upload complete" msgstr "Upload terminé" +msgid "Uploading {0} files" +msgstr "Upload de {0} fichiers" + msgid "Use a different login method" msgstr "Utilisez une méthode de connexion différente" From a10aebaf9512acb4d60df6a54d661eb9c5c8242e Mon Sep 17 00:00:00 2001 From: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> Date: Mon, 26 Apr 2021 14:41:35 +0200 Subject: [PATCH 5/8] Apply suggestions from code review Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com> --- packages/files-ui/src/Contexts/LanguageContext.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/files-ui/src/Contexts/LanguageContext.tsx b/packages/files-ui/src/Contexts/LanguageContext.tsx index 9e930d20ed..f9985285a4 100644 --- a/packages/files-ui/src/Contexts/LanguageContext.tsx +++ b/packages/files-ui/src/Contexts/LanguageContext.tsx @@ -42,19 +42,19 @@ const getLanguages = (prefered = ""): string[] => { if (Array.isArray(languages)) { // Dedupe array of languages const deduped = [...new Set(languages.map((l) => l.split("-")[0]))] - const preferedFirst = prefered - ? [prefered, ...deduped.filter((lang) => prefered !== lang)] + const preferredFirst = preferred + ? [preferred, ...deduped.filter((lang) => preferred !== lang)] : deduped - return preferedFirst + return preferredFirst } if (language) { - return [prefered, language.split("-")[0]] + return [preferred, language.split("-")[0]] } // If language not detected use english - return [prefered, DEFAULT_LANGUAGE] + return [preferred, DEFAULT_LANGUAGE] } const getLocales = (): string[] => { From 584a53ef1f9e74ed20682e3eb409b5a086ace680 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Mon, 26 Apr 2021 14:45:59 +0100 Subject: [PATCH 6/8] missing translations --- .../Components/Modules/Settings/Profile.tsx | 8 ++++---- packages/files-ui/src/locales/en/messages.po | 6 ++++++ packages/files-ui/src/locales/fr/messages.mo | Bin 16349 -> 16449 bytes packages/files-ui/src/locales/fr/messages.po | 6 ++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/files-ui/src/Components/Modules/Settings/Profile.tsx b/packages/files-ui/src/Components/Modules/Settings/Profile.tsx index 39eb8c5943..24860ba8b0 100644 --- a/packages/files-ui/src/Components/Modules/Settings/Profile.tsx +++ b/packages/files-ui/src/Components/Modules/Settings/Profile.tsx @@ -243,22 +243,22 @@ const ProfileView = () => { ) : null}
{/*
diff --git a/packages/files-ui/src/locales/en/messages.po b/packages/files-ui/src/locales/en/messages.po index 540790412b..3344a58282 100644 --- a/packages/files-ui/src/locales/en/messages.po +++ b/packages/files-ui/src/locales/en/messages.po @@ -208,6 +208,9 @@ msgstr "Files" msgid "Files uses device backups to save your browser." msgstr "Files uses device backups to save your browser." +msgid "First name" +msgstr "First name" + msgid "Folder" msgstr "Folder" @@ -262,6 +265,9 @@ msgstr "I’m done saving my backup phrase" msgid "Language" msgstr "Language" +msgid "Last name" +msgstr "Last name" + msgid "Learn more" msgstr "Learn more" diff --git a/packages/files-ui/src/locales/fr/messages.mo b/packages/files-ui/src/locales/fr/messages.mo index 70febed150e348b7d9c96650865908790c580efe..a602c61a711898941c1d5744989dc732d76ab8ab 100644 GIT binary patch delta 4587 zcmYk<2~^cp0>|;oB8UqhinvfbMU*F+n1ZHaripu^VT*}^JyaAQ3aGfypE7|q&2YiS zoh&ieUS*n=TbfR4jV-6~q|J;|r>Rq?#b%mgGxPnu|K*(dAAj$2@BjVZ{oj>NUpObL zLY!-H;p+|8ha{0~jxZ)ZgmP=$HD*B@W18baT!+gr6=ULziNt}p5{F?lp0W3@pqjX9 z{RSsc|0jmw$hN_D9W#bP9yccA3_OS(Ft(jB^u>5F2Ggy>@HXl>*bM!s4wj=jREhM_ ztilA`i2O4L?EN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DOPf z1NETcsI@LeR?o~tJ$Mb_&vGZ;lZn)T95q@ZT77iwuT@p&x7biMy)Dd>Um*=~c$$eU);P!Af0 zn)->T2hBk}V7YZIYATy?Dz;!F_PEmRz#i0$9YnSB3F`hIurtp$e^7|Qzfc_si6Om)JR)x{Tqy>eje3sBs)_BN=LPujXIx) zx^H|g^RGe`C$tHdT36W%)>(I+!b4{GmRj%s%#Cg3#GCY*;_ zvW3>IjxBtQ!};Q0jK}w-^_P}h^)cNred=ziS&8P-{#Tzi?TK7S>BeQL0;t*Vi zgYh$Df0}OBx&Iw^hTFnwEaZ#RI1Kycxi?fH+rqqv+-pvvI_RObWL<~RI07{z6Hqf! zioA)&hx|D)8}0dnsQZs219Hqa6ts!j?FHs~8VzCe7{~cMy006?Vk%BYO|gTw;xnjC z`Zq4XB&Iwm^@5$%pe6s9qc%cP}oJ(IW6HWM9&ZY=~OwDyiOh@v&mYbp3*-vhG^84MC+_gU(ZRA7pn!A}OalB2E34c+{U1Tb$ClzEGsUwSsj!`6(tS3vz zwd64}i2VN;Z%-6iOVCd?kw9=WQ|LwBBzF=W&15opoUA4tM?8foB!yIy9mGRM6CHDi zkF==5q2H~iRp7`Z{mESN6bT+$~Cx z=Pj$8QC(5)E3dx0uKsjRt7k;@{F-~qYrV7dU5!s)%$QSK9@v)~+BNX;;F`|=0on?> AtN;K2 diff --git a/packages/files-ui/src/locales/fr/messages.po b/packages/files-ui/src/locales/fr/messages.po index cce427e85a..1f689b57b4 100644 --- a/packages/files-ui/src/locales/fr/messages.po +++ b/packages/files-ui/src/locales/fr/messages.po @@ -209,6 +209,9 @@ msgstr "Fichiers" msgid "Files uses device backups to save your browser." msgstr "Files enregistre ce navigateur." +msgid "First name" +msgstr "Prénom" + msgid "Folder" msgstr "Dossier" @@ -263,6 +266,9 @@ msgstr "Phrase de sauvegarde enregistrée" msgid "Language" msgstr "Langue de l'interface" +msgid "Last name" +msgstr "Nom" + msgid "Learn more" msgstr "En apprendre plus" From efffa394ba0e34c76e899417b2bce911b29bcdbd Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Mon, 26 Apr 2021 15:00:25 +0100 Subject: [PATCH 7/8] add locale with dayjs --- .../files-ui/src/Contexts/LanguageContext.tsx | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/packages/files-ui/src/Contexts/LanguageContext.tsx b/packages/files-ui/src/Contexts/LanguageContext.tsx index f9985285a4..b9fcd1d17b 100644 --- a/packages/files-ui/src/Contexts/LanguageContext.tsx +++ b/packages/files-ui/src/Contexts/LanguageContext.tsx @@ -3,13 +3,13 @@ import { i18n } from "@lingui/core" import { I18nProvider } from "@lingui/react" import * as plurals from "make-plural/plurals" import { useLocalStorage } from "@chainsafe/browser-storage-hooks" +import dayjs from "dayjs" export type LanguageContext = { availableLanguages: Language[] selectedLanguage: string selectedLocale: string setActiveLanguage(newLanguage: string): void | Promise - formatLocaleDate(date: Date): string } type Language = { @@ -30,13 +30,12 @@ const defaultContext: LanguageContext = { availableLanguages: [], selectedLanguage: DEFAULT_LANGUAGE, selectedLocale: DEFAULT_LOCALE, - setActiveLanguage: () => {console.error("setActiveLanguage not implemented")}, - formatLocaleDate: () => {console.error("formatLocaleDate not implemented"); return ""} + setActiveLanguage: () => {console.error("setActiveLanguage not implemented")} } const LanguageContext = React.createContext(defaultContext) -const getLanguages = (prefered = ""): string[] => { +const getLanguages = (preferred = ""): string[] => { const { languages, language } = window.navigator if (Array.isArray(languages)) { @@ -96,6 +95,7 @@ const LanguageProvider = ({ children, availableLanguages }: LanguageProviderProp i18n.activate(newLanguage) setSelectedLanguage(newLanguage) setPrefered && localStorageSet(PREFERED_LANGUAGE_KEY, newLanguage) + dayjs.locale(newLanguage) }) .catch(console.error) }, [availableLanguages, localStorageSet]) @@ -115,29 +115,13 @@ const LanguageProvider = ({ children, availableLanguages }: LanguageProviderProp setLanguage(defaultLanguage, false) }, [availableLanguages, localStorageGet, setLanguage]) - const formatLocaleDate = (date: Date) => { - const result = new Intl.DateTimeFormat(userLocales[0], { - timeZone: "UTC", - timeZoneName: "short", - hour: "numeric", - minute: "numeric", - hour12: false, - month: "numeric", - day: "numeric", - year: "numeric" - }).format(date) - - return result - } - return ( {children} From ddc4dc6315ee33c8cc88cf0375550eba8d948195 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 27 Apr 2021 09:17:29 +0000 Subject: [PATCH 8/8] lingui extract --- packages/files-ui/src/locales/en/messages.po | 3 --- packages/files-ui/src/locales/fr/messages.po | 9 ++++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/files-ui/src/locales/en/messages.po b/packages/files-ui/src/locales/en/messages.po index 094aeeae85..a05b658a97 100644 --- a/packages/files-ui/src/locales/en/messages.po +++ b/packages/files-ui/src/locales/en/messages.po @@ -154,9 +154,6 @@ msgstr "Download recovery key" msgid "Drop to upload files" msgstr "Drop to upload files" -msgid "Encryption Password" -msgstr "Encryption Password" - msgid "Enter backup phrase:" msgstr "Enter backup phrase:" diff --git a/packages/files-ui/src/locales/fr/messages.po b/packages/files-ui/src/locales/fr/messages.po index 1f689b57b4..8334b009fa 100644 --- a/packages/files-ui/src/locales/fr/messages.po +++ b/packages/files-ui/src/locales/fr/messages.po @@ -155,9 +155,6 @@ msgstr "Télécharger la clé de sauvegarde" msgid "Drop to upload files" msgstr "Faire glisser pour uploader un fichier" -msgid "Encryption Password" -msgstr "Mot de passe de chiffrage" - msgid "Enter backup phrase:" msgstr "Phrase de sauvegarder:" @@ -248,6 +245,9 @@ msgstr "Retour" msgid "Great! You’re all done." msgstr "Génial! Vous avez terminé." +msgid "Hello again!" +msgstr "" + msgid "Hey! You only have two sign-in methods. If you lose that and have only one left, you will be locked out of your account forever." msgstr "Hey! Tu ne disposes que de deux méthodes d'authentification. Si tu en perds une, tu seras bloqué pour toujours et ne pourras plus te connecter à ton compte Files." @@ -593,6 +593,9 @@ msgstr "Addresse du wallet" msgid "Web3: {0}" msgstr "Web3: {0}" +msgid "We’ve got a new authentication system in place. All you need to do is enter your password again to migrate your credentials over to the new system." +msgstr "" + msgid "What a fine day it is." msgstr "Une belle journée."