From 6067d31916ed57238d76343723ffa78283a63734 Mon Sep 17 00:00:00 2001 From: lelenei Date: Wed, 2 Mar 2022 11:16:45 +0800 Subject: [PATCH 1/4] fix: typo --- packages/mask/shared-ui/locales/en-US.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index aed2bbdc6446..e9424d3cfbcd 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -401,7 +401,7 @@ "plugin_red_packet_expired": "Expired", "plugin_red_packet_indivisible": "The minimum amount for each share is {{amount}} {{symbol}}", "plugin_nft_red_packet_data_broken": "The Lucky Drop can’t be sent due to data damage.", - "plugin_gitcoin_readme": "By using this service, you will also be contributing 5% of your contribution to the Gitcoin grants development fund.", + "plugin_gitcoin_readme": "By using this service, you will also be contributing 5% of your contributions to the Gitcoin grants development fund.", "plugin_gitcoin_readme_fund_link": "https://gitcoin.co/grants/86/gitcoin-sustainability-fund", "plugin_gitcoin_select_a_token": "Select a token", "plugin_gitcoin_enter_an_amount": "Enter an amount", From a077bed053fbc5d2a193b8e0383b9adad416ec34 Mon Sep 17 00:00:00 2001 From: lelenei Date: Wed, 2 Mar 2022 15:05:08 +0800 Subject: [PATCH 2/4] fix: typo --- packages/mask/shared-ui/locales/en-US.json | 2 +- .../plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx | 5 ++++- packages/plugins/RSS3/src/locales/en-US.json | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index e9424d3cfbcd..aed2bbdc6446 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -401,7 +401,7 @@ "plugin_red_packet_expired": "Expired", "plugin_red_packet_indivisible": "The minimum amount for each share is {{amount}} {{symbol}}", "plugin_nft_red_packet_data_broken": "The Lucky Drop can’t be sent due to data damage.", - "plugin_gitcoin_readme": "By using this service, you will also be contributing 5% of your contributions to the Gitcoin grants development fund.", + "plugin_gitcoin_readme": "By using this service, you will also be contributing 5% of your contribution to the Gitcoin grants development fund.", "plugin_gitcoin_readme_fund_link": "https://gitcoin.co/grants/86/gitcoin-sustainability-fund", "plugin_gitcoin_select_a_token": "Select a token", "plugin_gitcoin_enter_an_amount": "Enter an amount", diff --git a/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx b/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx index 19125c848569..4714c26a107e 100644 --- a/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx +++ b/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx @@ -2,6 +2,7 @@ import { makeStyles, MaskColorVar } from '@masknet/theme' import { Typography } from '@mui/material' import classnames from 'classnames' import { HTMLProps, Fragment } from 'react' +import { useI18N } from '../../locales' export interface DonationCardProps extends HTMLProps { imageUrl: string @@ -69,6 +70,7 @@ export const DonationCard = ({ ...rest }: DonationCardProps) => { const { classes } = useStyles() + const t = useI18N() return (
{name} @@ -85,7 +87,8 @@ export const DonationCard = ({
{contribCount} - Contrib + + {t.contribution({ count: contribCount })}
{contribDetails.map((contrib, i) => ( diff --git a/packages/plugins/RSS3/src/locales/en-US.json b/packages/plugins/RSS3/src/locales/en-US.json index 6ac93b454708..60a31471fa11 100644 --- a/packages/plugins/RSS3/src/locales/en-US.json +++ b/packages/plugins/RSS3/src/locales/en-US.json @@ -3,5 +3,7 @@ "no_activity_time": "No activity time", "attended": "attended", "no_data": "No data", - "total_grants": "Total {{count}} Grants" + "total_grants": "Total {{count}} Grants", + "contribution": " Contribution", + "contribution_other": " Contributions" } From 01904621aad869f059118980235f7e9b151c266c Mon Sep 17 00:00:00 2001 From: lelenei Date: Wed, 2 Mar 2022 20:24:53 +0800 Subject: [PATCH 3/4] fix: update @magic-works/i18n-codegen --- package.json | 2 +- packages/plugins/RSS3/src/locales/en-US.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d638ce31c16c..ad0b09287d0a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@dimensiondev/eslint-plugin": "^0.0.1-20220117062517-fd3cb01", "@dimensiondev/patch-package": "^6.5.0", "@jest/globals": "^28.0.0-alpha.3", - "@magic-works/i18n-codegen": "^0.0.6", + "@magic-works/i18n-codegen": "^0.1.0", "@masknet/cli": "workspace:*", "@masknet/serializer": "workspace:^0.0.0", "@nice-labs/git-rev": "^3.5.0", diff --git a/packages/plugins/RSS3/src/locales/en-US.json b/packages/plugins/RSS3/src/locales/en-US.json index 60a31471fa11..628d7371952c 100644 --- a/packages/plugins/RSS3/src/locales/en-US.json +++ b/packages/plugins/RSS3/src/locales/en-US.json @@ -4,6 +4,6 @@ "attended": "attended", "no_data": "No data", "total_grants": "Total {{count}} Grants", - "contribution": " Contribution", + "contribution": "Contribution", "contribution_other": " Contributions" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0718afdf62ce..ddb707503b10 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,7 +20,7 @@ importers: '@emotion/styled': ^11.6.0 '@emotion/utils': ^1.0.0 '@jest/globals': ^28.0.0-alpha.3 - '@magic-works/i18n-codegen': ^0.0.6 + '@magic-works/i18n-codegen': ^0.1.0 '@masknet/cli': workspace:* '@masknet/serializer': workspace:^0.0.0 '@mui/icons-material': 5.4.2 @@ -94,7 +94,7 @@ importers: '@dimensiondev/eslint-plugin': 0.0.1-20220120054224-6673363_eslint@8.9.0 '@dimensiondev/patch-package': 6.5.0 '@jest/globals': 28.0.0-alpha.3 - '@magic-works/i18n-codegen': 0.0.6_typescript@4.6.1-rc + '@magic-works/i18n-codegen': 0.1.0_typescript@4.6.1-rc '@masknet/cli': link:packages/scripts '@masknet/serializer': link:packages/test-serializer '@nice-labs/git-rev': 3.5.0 @@ -4994,17 +4994,17 @@ packages: '@json-rpc-tools/types': 1.7.6 dev: false - /@magic-works/i18n-codegen/0.0.6_typescript@4.6.1-rc: - resolution: {integrity: sha512-vM8DzT7zcmCDk2KBoeyUgGzkW/4MaKIdDTTh67cJT0/VVXu7fQd2tjRglJwOunowTCwPxwIHWjoCD/DIN4iPXQ==} + /@magic-works/i18n-codegen/0.1.0_typescript@4.6.1-rc: + resolution: {integrity: sha512-zmn7RjagUULc4dnCGPNSlFj8YDkzJkm0zU9PWHrDSr8u0WttggiTzFB3wej6KlxoNem/GQMPGVzYx8QacSFtdA==} hasBin: true peerDependencies: typescript: ^4 dependencies: - chokidar: 3.5.2 + chokidar: 3.5.3 i18next-translation-parser: 1.0.1 source-map: 0.7.3 typescript: 4.6.1-rc - yargs: 16.2.0 + yargs: 17.3.1 dev: true /@mdx-js/loader/1.6.22_react@18.0.0-rc.0: @@ -9821,7 +9821,7 @@ packages: engines: {node: '>= 8'} dependencies: normalize-path: 3.0.0 - picomatch: 2.3.0 + picomatch: 2.3.1 /app-root-dir/1.0.2: resolution: {integrity: sha1-OBh+wt6nV3//Az/8sSFyaS/24Rg=} @@ -18375,7 +18375,7 @@ packages: /jsonfile/4.0.0: resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=} optionalDependencies: - graceful-fs: 4.2.9 + graceful-fs: 4.2.8 /jsonfile/6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -20592,11 +20592,11 @@ packages: /picomatch/2.3.0: resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} engines: {node: '>=8.6'} + dev: true /picomatch/2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: true /pify/2.3.0: resolution: {integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=} @@ -21789,7 +21789,7 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: - picomatch: 2.3.0 + picomatch: 2.3.1 /receptacle/1.3.2: resolution: {integrity: sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==} From 920fff13e5cb65d74b37b122b8949b8f1d84031f Mon Sep 17 00:00:00 2001 From: lelenei Date: Thu, 3 Mar 2022 16:24:12 +0800 Subject: [PATCH 4/4] fix: reply review --- .../plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx | 1 - packages/plugins/RSS3/src/locales/en-US.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx b/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx index 4714c26a107e..3e6b365975ee 100644 --- a/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx +++ b/packages/plugins/RSS3/src/SNSAdaptor/components/DonationCard.tsx @@ -87,7 +87,6 @@ export const DonationCard = ({
{contribCount} - {t.contribution({ count: contribCount })}
diff --git a/packages/plugins/RSS3/src/locales/en-US.json b/packages/plugins/RSS3/src/locales/en-US.json index 628d7371952c..757d0d9437f0 100644 --- a/packages/plugins/RSS3/src/locales/en-US.json +++ b/packages/plugins/RSS3/src/locales/en-US.json @@ -5,5 +5,5 @@ "no_data": "No data", "total_grants": "Total {{count}} Grants", "contribution": "Contribution", - "contribution_other": " Contributions" + "contribution_other": "Contributions" }