diff --git a/.i18n-codegen.json b/.i18n-codegen.json index f51efba6f577..5573e55ff345 100644 --- a/.i18n-codegen.json +++ b/.i18n-codegen.json @@ -311,6 +311,30 @@ "namespace": "com.maskbook.box", "trans": "Translate" } + }, + { + "input": "./packages/mask/src/plugins/Game/locales/en-US.json", + "output": "./packages/mask/src/plugins/Game/locales/i18n_generated", + "parser": { "type": "i18next", "contextSeparator": "$", "pluralSeparator": "_" }, + "generator": { + "type": "i18next/react-hooks", + "hooks": "useI18N", + "namespace": "com.maskbook.game", + "trans": "Translate", + "sourceMap": "inline" + } + }, + { + "input": "./packages/mask/src/plugins/Pets/locales/en-US.json", + "output": "./packages/mask/src/plugins/Pets/locales/i18n_generated", + "parser": { "type": "i18next", "contextSeparator": "$", "pluralSeparator": "_" }, + "generator": { + "type": "i18next/react-hooks", + "hooks": "useI18N", + "namespace": "com.maskbook.pets", + "trans": "Translate", + "sourceMap": "inline" + } } ] } diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index 21e8f35a7fbb..0c8e7d08ff5c 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -867,35 +867,7 @@ "plugin_furucombo_head_pools": "Pools", "plugin_furucombo_head_action": "Action", "plugin_pets_dialog_title": "Non-Fungible Friends", - "plugin_pets_name": "Non-F Friends", - "plugin_pets_description": "Explore the endless possibilities of NFTs.", - "plugin_pets_dialog_title_share": "Successful", - "plugin_pets_dialog_contract": "NFT Contract", - "plugin_pets_dialog_token": "Token ID", - "plugin_pets_dialog_msg": "Greeting message", - "plugin_pets_dialog_msg_optional": "Optional, 100 characters max.", - "plugin_pets_dialog_btn": "Confirm", - "plugin_pets_dialog_btn_share": "Share", - "plugin_pets_dialog_preview": "Preview", - "plugin_pets_dialog_unverified": " (unverified)", - "plugin_pets_dialog_created": "Created by NonFFriend", - "plugin_pets_dialog_powered": "Powered by RSS3", "powered_by": "Powered by", - "plugin_pets_dialog_success": "Your Non-Fungible Friend has been set up successfully", - "plugin_pets_dialog_fail": "Setting failed, please try later", - "plugin_pets_dialog_check_title": "Show NFT friends on the profile page.", - "plugin_pets_dialog_menu_change": "Change", - "plugin_pets_dialog_menu_ski": "Ski", - "plugin_pets_dialog_menu_about": "About us", - "plugin_game_name": "GAME", - "plugin_game_list_title": "GameList", - "plugin_game_list_rank": "Rank", - "plugin_game_list_play": "Play", - "plugin_game_list_play_error": "Please connect wallet", - "plugin_game_list_play_evm_error": "Please connect to EVM wallet", - "plugin_game_share_btn": "Share", - "plugin_game_share_title": "Share", - "plugin_game_dialog_info": "Share this game to twitter", "wallet_verify_persona_sign": "Persona Sign", "wallet_verify_has_bound": "The wallet has been bound. Please switch wallets.", "wallet_verify_persona_name": "{{personaName}} Sign", diff --git a/packages/mask/src/plugins/Game/SNSAdaptor/GameList.tsx b/packages/mask/src/plugins/Game/SNSAdaptor/GameList.tsx index fa4883725c97..871e63658399 100644 --- a/packages/mask/src/plugins/Game/SNSAdaptor/GameList.tsx +++ b/packages/mask/src/plugins/Game/SNSAdaptor/GameList.tsx @@ -4,7 +4,8 @@ import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown' import { makeStyles, useStylesExtends } from '@masknet/theme' import { NetworkPluginID } from '@masknet/web3-shared-base' import { useChainId } from '@masknet/plugin-infra/web3' -import { PluginWalletStatusBar, useI18N } from '../../../utils' +import { PluginWalletStatusBar } from '../../../utils' +import { useI18N } from '../locales' import { ChainBoundary } from '../../../web3/UI/ChainBoundary' import { useGameList } from '../hook' import type { GameInfo } from '../types' @@ -100,7 +101,7 @@ interface Props { } const GameList = (props: Props) => { - const { t } = useI18N() + const t = useI18N() const classes = useStylesExtends(useStyles(), {}) const gameList = useGameList() const chainId = useChainId(NetworkPluginID.PLUGIN_EVM) @@ -122,7 +123,7 @@ const GameList = (props: Props) => { return ( <> - {t('plugin_game_list_title')} + {t.plugin_game_list_title()}