Skip to content

Commit 55e6f07

Browse files
authored
feat: add french (#447)
* feat: add required configs for new locale * feat: initial extraction via 'yarn i18n:extract --locale fr' * feat: compile french * fix: add pr to contribution guidelines
1 parent 59209cf commit 55e6f07

9 files changed

+21
-6
lines changed

.linguirc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"locales": [
33
"en",
4-
"es"
4+
"es",
5+
"fr"
56
],
67
"catalogs": [
78
{

CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,6 @@ To download strings
8686
crowdin download
8787

8888
```
89+
90+
To add a new language first start an issue to check for public interest.
91+
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.

crowdin.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'api_token_env': 'CROWDIN_PERSONAL_TOKEN'
66
'base_path': '.'
77
'base_url': 'https://api.crowdin.com'
8-
'export_languages': ['en', 'es']
8+
'export_languages': ['en', 'es', 'fr']
99
#
1010
# Choose file structure in Crowdin
1111
# e.g. true or false

src/layouts/components/LanguageSwitcher.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { dynamicActivateLanguage } from '../../libs/LanguageProvider';
1717
const langMap = {
1818
en: t`English`,
1919
es: t`Spanish`,
20+
fr: t`French`,
2021
};
2122

2223
interface LanguageListItemProps {

src/libs/LanguageProvider.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
// src/index.js
22
import { i18n } from '@lingui/core';
33
import { I18nProvider } from '@lingui/react';
4-
import { en, es } from 'make-plural/plurals';
4+
import { en, es, fr } from 'make-plural/plurals';
55
import React, { useEffect } from 'react';
66

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

99
i18n.loadLocaleData({
1010
en: { plurals: en },
1111
es: { plurals: es },
12+
fr: { plurals: fr },
1213
});
1314
i18n.load('en', messages);
1415
i18n.activate('en');
1516

1617
export const DEFAULT_LOCALE = 'en';
1718

18-
export const SUPPORTED_LANGUAGES = ['en', 'es'];
19+
export const SUPPORTED_LANGUAGES = ['en', 'es', 'fr'];
1920
export const LANG_MAP = {
2021
en: 'English',
2122
es: 'Spanish',
23+
fr: 'French',
2224
};
2325

2426
/**

src/locales/en/messages.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

+4
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,10 @@ msgstr "Faucet {0}"
562562
msgid "Filter"
563563
msgstr "Filter"
564564

565+
#: src/layouts/components/LanguageSwitcher.tsx
566+
msgid "French"
567+
msgstr "French"
568+
565569
#: src/modules/staking/StakingHeader.tsx
566570
msgid "Funds in the Safety Module"
567571
msgstr "Funds in the Safety Module"

src/locales/fr/messages.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/fr/messages.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,10 @@ msgstr "Faucet {0}"
567567
msgid "Filter"
568568
msgstr ""
569569

570+
#: src/layouts/components/LanguageSwitcher.tsx
571+
msgid "French"
572+
msgstr ""
573+
570574
#: src/modules/staking/StakingHeader.tsx
571575
msgid "Funds in the Safety Module"
572576
msgstr ""
@@ -1600,4 +1604,3 @@ msgstr ""
16001604
#: src/modules/staking/StakingPanel.tsx
16011605
msgid "{0} days"
16021606
msgstr ""
1603-

0 commit comments

Comments
 (0)