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

DRAFT: I18n #59

Merged
merged 109 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
0f48096
update package-lock files
Atmosfearful Dec 10, 2021
6f03e90
update gitignores
Atmosfearful Dec 10, 2021
ecac179
i18n minimal
Dec 10, 2021
99f845c
Merge branch 'main' into staging
Dec 10, 2021
6b5dd34
Fixed newline add end of file in config files
Dec 10, 2021
19594f2
Trying to add a postinstall script to compile translations so the app…
Dec 11, 2021
5c3325b
Nicer localization menu
Dec 16, 2021
d51f2dc
Translated Home
Dec 16, 2021
44c2bf0
Save selected language in LocalStorage
Dec 16, 2021
785c176
add prettier and enhance eslint
Atmosfearful Dec 16, 2021
d49b7e5
prettier & eslint fixes
Atmosfearful Dec 16, 2021
7f45034
run prettier when building apps
Atmosfearful Dec 16, 2021
c267873
links on landing page according to specs (#47)
Vienio99 Dec 17, 2021
fd08669
Translation: Stake page
Dec 19, 2021
8744f25
Updated translation files
Dec 19, 2021
5f619a2
Optimized package.json dependencies
Dec 19, 2021
4555419
Rebased with klima/staging
Dec 19, 2021
7b49582
Made files pretty.
Dec 19, 2021
9d9f993
Commiting compiled translation files
Dec 19, 2021
b53df65
Merge branch 'staging' of https://github.com/KlimaDAO/klimadao into s…
Dec 19, 2021
5d6c900
Fixed merge of .prettierignore
Dec 19, 2021
343409e
Increase rounding precision of next rebase value (#53)
0xAurelius Dec 20, 2021
f807f45
Add Check URL banner (#50)
ladytrekker Dec 20, 2021
441bb19
upgrade to latest version of typescript
Atmosfearful Dec 20, 2021
a5af52c
Commited package-lock.json
Dec 21, 2021
67867fa
add redirect for /wrap hashroute
Atmosfearful Dec 28, 2021
88d36a9
Add format-all with prettier script (#51)
ladytrekker Dec 28, 2021
7433644
Translation framework (#43)
biwano Dec 28, 2021
e142e1b
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
1707622
use React state for checkURLBanner
Dec 31, 2021
dcb36a6
Translation framework (#43)
biwano Dec 28, 2021
852f96b
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
449a72e
Basic translation framework to the site module
Jan 2, 2022
a29be2e
Fixed time-delta types not being recognized
Jan 2, 2022
fe24b12
site module: Added locales menu
Jan 2, 2022
e8cec9a
site: Use nextjs router for localization
Jan 2, 2022
cca0c6e
Fixed errors on production builds
Jan 2, 2022
04a3bf3
bond trans_id tags added
sirthus01 Jan 3, 2022
06f7d6f
redeem trans_id tags added
sirthus01 Jan 3, 2022
998f82d
pklima trans_id tags added
sirthus01 Jan 3, 2022
1e755a3
pklima ClaimExceedModal trans_id tags added
sirthus01 Jan 3, 2022
1829ab9
Bond/AdvancedSettings trans_id tags added
sirthus01 Jan 3, 2022
8826a53
Wrap trans_id tags added
sirthus01 Jan 3, 2022
9bb1eb6
social media links open in new tab (#57)
Vienio99 Jan 3, 2022
cdd33d5
chore: add pr template (#60)
ladytrekker Jan 3, 2022
96f05eb
Translation framework (#43)
biwano Dec 28, 2021
ede9847
site/Home trans_id tags added
sirthus01 Jan 4, 2022
d4f2b14
Increase rounding precision of next rebase value (#53)
0xAurelius Dec 20, 2021
a68343f
Add Check URL banner (#50)
ladytrekker Dec 20, 2021
cf41cc4
upgrade to latest version of typescript
Atmosfearful Dec 20, 2021
874c10c
add redirect for /wrap hashroute
Atmosfearful Dec 28, 2021
1a27f5b
Add format-all with prettier script (#51)
ladytrekker Dec 28, 2021
7f4b100
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
43fa411
use React state for checkURLBanner
Dec 31, 2021
f8503a0
Translation framework (#43)
biwano Dec 28, 2021
78dfeca
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
9c3948f
Basic translation framework to the site module
Jan 2, 2022
9a0f3dc
Fixed time-delta types not being recognized
Jan 2, 2022
83df4f7
site module: Added locales menu
Jan 2, 2022
16f425e
site: Use nextjs router for localization
Jan 2, 2022
4bf4870
Fixed errors on production builds
Jan 2, 2022
4b4c014
Merge branch 'i18n' of https://github.com/biwano/klimadao into i18n
Jan 4, 2022
0c08aa8
i18n minimal
Dec 10, 2021
898ab30
Trying to add a postinstall script to compile translations so the app…
Dec 11, 2021
b4a372a
Nicer localization menu
Dec 16, 2021
a40c428
Translated Home
Dec 16, 2021
03f88b5
Translation: Stake page
Dec 19, 2021
03f3042
Updated translation files
Dec 19, 2021
4ee2b03
Optimized package.json dependencies
Dec 19, 2021
00d1789
Rebased with klima/staging
Dec 19, 2021
6167b0a
Made files pretty.
Dec 19, 2021
dd5bb18
Commiting compiled translation files
Dec 19, 2021
388dfc7
Commited package-lock.json
Dec 21, 2021
7cc4926
upgrade to latest version of typescript
Atmosfearful Dec 20, 2021
dd3626e
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
4e4ad40
use React state for checkURLBanner
Dec 31, 2021
1650162
Translation framework (#43)
biwano Dec 28, 2021
9946151
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
82a4588
Basic translation framework to the site module
Jan 2, 2022
7a2f4a7
Fixed time-delta types not being recognized
Jan 2, 2022
ff26e38
site module: Added locales menu
Jan 2, 2022
3d3893d
site: Use nextjs router for localization
Jan 2, 2022
63b377f
Fixed errors on production builds
Jan 2, 2022
c56cf36
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
62c8b11
Translation framework (#43)
biwano Dec 28, 2021
cc7a19d
Integrated time-delta to have localized prettifiedSeconds
Dec 31, 2021
6c8b9e6
Basic translation framework to the site module
Jan 2, 2022
4491cec
site module: Added locales menu
Jan 2, 2022
2c2ddd3
site: Use nextjs router for localization
Jan 2, 2022
de0ce80
Merge branch 'i18n' of https://github.com/biwano/klimadao into i18n
Jan 4, 2022
827a23f
Prevented i18nProvider from remounting the child components
Jan 4, 2022
03c9c51
Merge remote-tracking branch 'sirthus/sirthus' into merging_sirthus
Jan 5, 2022
149e3d5
Merged sirthus/sirthus
Jan 5, 2022
746b3cf
Added pseudo localization
Jan 5, 2022
26176ff
Complete tags in site/Home
Jan 5, 2022
f2fc6d4
Added tags to tour messages
Jan 5, 2022
acc66fb
Added app/ChooseBond tags
Jan 5, 2022
f6c7221
Added translation tags to app/pklima
Jan 5, 2022
d7e3581
Added tags to app/Bond
Jan 5, 2022
d0a5a83
Added more tags to app/Bond
Jan 5, 2022
d93217d
Hide language menu in production
Jan 5, 2022
d9d6571
Removed compiled locales from repository
Jan 5, 2022
824e56d
Removed dependency towards time-delta
Jan 5, 2022
e8c4093
Fixes for failing build
biwano Jan 6, 2022
21f5dd6
Updated texts regarding dates
biwano Jan 6, 2022
926d8ed
Fixed prettier issue in Bond/index.tsx
biwano Jan 6, 2022
f936c2d
Fixed import style of loadTranslations in site
biwano Jan 6, 2022
59afd72
Merge branch 'i18n' of https://github.com/KlimaDAO/klimadao into i18n
biwano Jan 12, 2022
574e000
Prettier fix
Jan 12, 2022
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ yarn-error.log*
*.tsbuildinfo

# compiled locales
# **/locale/*/*.js
**/locale/*/*.js
39 changes: 22 additions & 17 deletions app/.linguirc
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{
"locales": [
"en",
"fr"
],
"sourceLocale": "en",
"catalogs": [
{
"path": "<rootDir>/locale/{locale}/messages",
"include": [
"<rootDir>/"
],
"exclude": [
"**/node_modules/**"
]
}
]
}
"locales": [
"en",
"fr",
"pseudo"
],
"sourceLocale": "en",
"fallbackLocales": {
"default": "en"
},
"pseudoLocale": "pseudo",
"catalogs": [
{
"path": "<rootDir>/locale/{locale}/messages",
"include": [
"<rootDir>/"
],
"exclude": [
"**/node_modules/**"
]
}
]
}
5 changes: 4 additions & 1 deletion app/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
# production
node_modules/
out/
build/
build/

# translation files
locale/
9 changes: 9 additions & 0 deletions app/actions/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,12 @@ export const loadAppDetails = (params: {
}
};
};
export const setLocale = (locale: string): Thunk => {
return (dispatch) => {
dispatch(
setAppState({
locale,
})
);
};
};
32 changes: 21 additions & 11 deletions app/components/views/Bond/AdvancedSettings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { ChangeEventHandler, FC } from "react";
import t from "@klimadao/lib/theme/typography.module.css";
import styles from "./index.module.css";

// Copied from Stake view despite T/t
import T from "@klimadao/lib/theme/typography.module.css";
import styles from "components/views/Stake/index.module.css";
import { Trans, t, defineMessage } from "@lingui/macro";
import { i18n } from "@lingui/core";

interface Props {
slippage: number;
Expand All @@ -13,11 +17,13 @@ export const AdvancedSettings: FC<Props> = (props) => {
return (
<div className={styles.container}>
<form>
<h5 className={t.subtitle1}>Einstein–Rosen Bridge</h5>
<p className={t.caption}>
Use this bridge through space-time to direct the transaction to a
different recipient address. (default: your currently connected
address).
<h5 className={T.subtitle1}>Einstein–Rosen Bridge</h5>
<p className={T.caption}>
<Trans id="bond.esbridge">
Use this bridge through space-time to direct the transaction to a
different recipient address. (default: your currently connected
address).
</Trans>
</p>
<input
value={props.recipientAddress}
Expand All @@ -28,10 +34,14 @@ export const AdvancedSettings: FC<Props> = (props) => {
/>
</form>
<form>
<h5 className={t.subtitle1}>Slippage Tolerance</h5>
<h5 className={T.subtitle1}>
<Trans id="bond.slippage_tolerance">Slippage Tolerance</Trans>
</h5>
<p>
Transaction may revert if price changes by more than desired slippage
percentage.
<Trans id="bond.revert">
Transaction may revert if price changes by more than desired
slippage percentage.
</Trans>
</p>
<div className={styles.slippageInput}>
<input
Expand All @@ -42,7 +52,7 @@ export const AdvancedSettings: FC<Props> = (props) => {
max="100"
min="1"
/>
<div className={t.body1}>%</div>
<div className={T.body1}>%</div>
</div>
</form>
</div>
Expand Down
Loading