diff --git a/components/common/MentionTypeahead/index.tsx b/components/common/MentionTypeahead/index.tsx index f0c85faa..ba948814 100644 --- a/components/common/MentionTypeahead/index.tsx +++ b/components/common/MentionTypeahead/index.tsx @@ -1,5 +1,7 @@ import { useState } from 'react' import { getCookie } from 'cookies-next' +import { useTranslation } from 'next-i18next' + import type { Option, RenderTokenProps, @@ -47,6 +49,7 @@ const MentionTypeahead = ({ exclusions, ...props }: Props) => { + const { t } = useTranslation('common') const locale = getCookie('NEXT_LOCALE') ? (getCookie('NEXT_LOCALE') as string) : 'en' @@ -100,7 +103,11 @@ const MentionTypeahead = ({ function renderMenu(results: Option[], menuProps: RenderMenuProps) { return ( - + {results.map((option, index) => ( {renderMenuItemChild(option)} @@ -163,8 +170,8 @@ const MentionTypeahead = ({ useCache={false} placeholder={placeholder} positionFixed={true} - promptText={'Start typing...'} - searchText={'Searching...'} + promptText={t('modals.filters.prompts.type')} + searchText={t('modals.filters.prompts.searching')} renderMenu={renderMenu} renderMenuItemChildren={renderMenuItemChild} renderToken={renderToken} diff --git a/components/filters/FilterModal/index.tsx b/components/filters/FilterModal/index.tsx index a697ead6..7e2e21de 100644 --- a/components/filters/FilterModal/index.tsx +++ b/components/filters/FilterModal/index.tsx @@ -456,22 +456,16 @@ const FilterModal = (props: Props) => { {filterNotice()}
-

Team items

-

- Show or hide teams that have specific characters, weapons, or - summons -

+

{t('modals.filters.headers.items.name')}

+

{t('modals.filters.headers.items.description')}

{inclusionField} {exclusionField}
-

Team details

-

- Filter teams by various properties, like full auto or button - presses -

+

{t('modals.filters.headers.details.name')}

+

{t('modals.filters.headers.details.description')}

{chargeAttackField()} {fullAutoField()} diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 815d14da..d40113bc 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -252,6 +252,16 @@ }, "filters": { "title": "Advanced filters", + "headers": { + "items": { + "name": "Filter items", + "description": "Show or hide teams that have specific characters, weapons, or summons" + }, + "details": { + "name": "Filter details", + "description": "Filter teams by various properties, like full auto or button presses" + } + }, "labels": { "charge_attack": "Charge Attack", "full_auto": "Full Auto", @@ -264,8 +274,8 @@ "name_quality": "Hide untitled teams", "user_quality": "Hide anonymous users", "original_only": "Hide remixed teams", - "inclusion": "Including items", - "exclusion": "Excluding items" + "inclusion": "Show teams with these items", + "exclusion": "Hide teams with these items" }, "notice": "Filters set on user profiles and in your saved teams will not be saved", "options": { @@ -274,8 +284,13 @@ "on_and_off": "On and Off" }, "placeholders": { - "inclusion": "Parties that have...", - "exclusion": "Parties that don't have..." + "inclusion": "Teams that have...", + "exclusion": "Teams that don't have..." + }, + "prompts": { + "type": "Start typing...", + "searching": "Searching...", + "not_found": "No results found" }, "buttons": { "confirm": "Save filters", diff --git a/public/locales/ja/common.json b/public/locales/ja/common.json index 99cc2cda..c4ae05b7 100644 --- a/public/locales/ja/common.json +++ b/public/locales/ja/common.json @@ -249,6 +249,16 @@ }, "filters": { "title": "フィルター設定", + "headers": { + "items": { + "name": "アイテムをフィルター", + "description": "キャラクター・武器・召喚石が編成に包含・除外されているかに基づいて表示する" + }, + "details": { + "name": "詳細をフィルター", + "description": "フルオートやポチなどの編成詳細に基づいて表示する" + } + }, "labels": { "charge_attack": "奥義", "full_auto": "フルオート", @@ -261,8 +271,8 @@ "name_quality": "無題の編成なし", "user_quality": "無名のユーザーなし", "original_only": "リミックスなし", - "inclusion": "アイテムを包含", - "exclusion": "アイテムを除外" + "inclusion": "包含されているアイテム", + "exclusion": "除外されているアイテムめn" }, "notice": "フィルターは保存した編成ユーザープロフィールには保存されません", "options": { @@ -274,6 +284,11 @@ "inclusion": "〇〇が入っている", "exclusion": "〇〇が入っていない" }, + "prompts": { + "type": "入力してください", + "searching": "検索中...", + "not_found": "見つかりませんでした" + }, "buttons": { "confirm": "フィルターを保存する", "clear": "保存したフィルターをリセット"