Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add french #447

Merged
merged 4 commits into from
Mar 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .linguirc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"locales": [
"en",
"es"
"es",
"fr"
],
"catalogs": [
{
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -86,3 +86,6 @@ To download strings
crowdin download

```

To add a new language first start an issue to check for public interest.
If the community decides to go forward with your preferred language follow [this pr](https://github.com/aave/interface/pull/447#issue-1165545965) to add support for a new language.
2 changes: 1 addition & 1 deletion crowdin.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
'api_token_env': 'CROWDIN_PERSONAL_TOKEN'
'base_path': '.'
'base_url': 'https://api.crowdin.com'
'export_languages': ['en', 'es']
'export_languages': ['en', 'es', 'fr']
#
# Choose file structure in Crowdin
# e.g. true or false
1 change: 1 addition & 0 deletions src/layouts/components/LanguageSwitcher.tsx
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ import { dynamicActivateLanguage } from '../../libs/LanguageProvider';
const langMap = {
en: t`English`,
es: t`Spanish`,
fr: t`French`,
};

interface LanguageListItemProps {
6 changes: 4 additions & 2 deletions src/libs/LanguageProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
// src/index.js
import { i18n } from '@lingui/core';
import { I18nProvider } from '@lingui/react';
import { en, es } from 'make-plural/plurals';
import { en, es, fr } from 'make-plural/plurals';
import React, { useEffect } from 'react';

import { messages } from '../locales/en/messages.js';

i18n.loadLocaleData({
en: { plurals: en },
es: { plurals: es },
fr: { plurals: fr },
});
i18n.load('en', messages);
i18n.activate('en');

export const DEFAULT_LOCALE = 'en';

export const SUPPORTED_LANGUAGES = ['en', 'es'];
export const SUPPORTED_LANGUAGES = ['en', 'es', 'fr'];
export const LANG_MAP = {
en: 'English',
es: 'Spanish',
fr: 'French',
};

/**
2 changes: 1 addition & 1 deletion src/locales/en/messages.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
@@ -562,6 +562,10 @@ msgstr "Faucet {0}"
msgid "Filter"
msgstr "Filter"

#: src/layouts/components/LanguageSwitcher.tsx
msgid "French"
msgstr "French"

#: src/modules/staking/StakingHeader.tsx
msgid "Funds in the Safety Module"
msgstr "Funds in the Safety Module"
1 change: 1 addition & 0 deletions src/locales/fr/messages.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/locales/fr/messages.po
Original file line number Diff line number Diff line change
@@ -567,6 +567,10 @@ msgstr "Faucet {0}"
msgid "Filter"
msgstr ""

#: src/layouts/components/LanguageSwitcher.tsx
msgid "French"
msgstr ""

#: src/modules/staking/StakingHeader.tsx
msgid "Funds in the Safety Module"
msgstr ""
@@ -1600,4 +1604,3 @@ msgstr ""
#: src/modules/staking/StakingPanel.tsx
msgid "{0} days"
msgstr ""