From c23eaf1630dfd59f9c1c02adf582808f1e33e493 Mon Sep 17 00:00:00 2001 From: Tiffany Yeung Date: Fri, 8 Nov 2024 23:12:49 -0800 Subject: [PATCH] chore: swap translated strings notation from template literal to function style (#2535) * [SRO] swap from template literal to function notation for affected SRO pages & components * [GO] swap notation for artifact-related pages & components * [GO] swap notation for character-related pages & components * [GO] swap notation for weapon-related pages & components * [GO] swap notation for main teams page and related components * [GO] swap notation for teams page, character display * [GO] swap notation for teams page, tabs * [GO] swap notation for teams, team settings * [GO] swap notation for home & settings page * [GO] swap notation for components --- libs/gi/page-artifacts/src/DupModal.tsx | 6 +- libs/gi/page-artifacts/src/index.tsx | 10 +++- libs/gi/page-characters/src/index.tsx | 4 +- libs/gi/page-home/src/InventoryCard.tsx | 14 ++--- libs/gi/page-home/src/QuickLinksCard.tsx | 16 ++--- libs/gi/page-home/src/TeamCard.tsx | 24 ++++---- libs/gi/page-home/src/VidGuideCard.tsx | 4 +- libs/gi/page-home/src/index.tsx | 4 +- libs/gi/page-settings/src/SillyCard.tsx | 6 +- libs/gi/page-team/src/BuildDropdown.tsx | 6 +- libs/gi/page-team/src/CharProfileCard.tsx | 2 +- .../page-team/src/CharProfileCharEditor.tsx | 2 +- .../CharacterDisplay/Build/BuildEquipped.tsx | 8 +-- .../src/CharacterDisplay/Build/BuildReal.tsx | 10 ++-- .../src/CharacterDisplay/Build/BuildTc.tsx | 8 +-- .../src/CharacterDisplay/CompareBtn.tsx | 18 +++--- .../src/CharacterDisplay/Content.tsx | 8 +-- .../CustomMultiTargetCard.tsx | 19 +++--- .../CustomMultiTargetImportBtn.tsx | 16 ++--- .../CustomMultiTarget/MTargetEditor.tsx | 14 +++-- .../CustomMultiTarget/index.tsx | 8 ++- .../src/CharacterDisplay/FormulaModal.tsx | 2 +- .../LoadoutSettingElement.tsx | 14 ++--- .../src/CharacterDisplay/StatModal.tsx | 8 +-- .../Components/ArtifactSetConfig.tsx | 34 ++++++----- .../TabOptimize/Components/BonusStatsCard.tsx | 6 +- .../Components/ChartCard/CustomTooltip.tsx | 2 +- .../Components/ChartCard/index.tsx | 18 +++--- .../TabOptimize/Components/ExcludeArt.tsx | 22 ++++--- .../Components/MainStatSelectionCard.tsx | 4 +- .../TabOptimize/Components/StatFilterCard.tsx | 8 +-- .../Components/TargetSelectorModal.tsx | 2 +- .../TabOptimize/Components/UseEquipped.tsx | 6 +- .../TabOptimize/Components/UseTeammateArt.tsx | 6 +- .../Tabs/TabOptimize/index.tsx | 60 ++++++++++--------- .../Tabs/TabOverview/EquipmentSection.tsx | 4 +- .../src/CharacterDisplay/Tabs/TabTalent.tsx | 2 +- .../ArtifactAllSubstatEditor.tsx | 10 ++-- .../ArtifactSubCard/ArtifactSubstatEditor.tsx | 2 +- .../Tabs/TabTheorycraft/index.tsx | 4 +- .../Tabs/TabUpgradeOpt/LevelFilter.tsx | 8 +-- .../TabUpgradeOpt/UpgradeOptChartCard.tsx | 24 ++++---- .../Tabs/TabUpgradeOpt/index.tsx | 4 +- libs/gi/page-team/src/LoadoutDropdown.tsx | 20 +++---- .../page-team/src/TeamCharacterSelector.tsx | 10 ++-- .../src/TeamSetting/ResonanceDisplay.tsx | 2 +- .../src/TeamSetting/TeamComponents.tsx | 4 +- .../src/TeamSetting/TeamExportModal.tsx | 19 +++--- libs/gi/page-team/src/TeamSetting/index.tsx | 12 ++-- libs/gi/page-team/src/index.tsx | 4 +- libs/gi/page-teams/src/index.tsx | 20 +++---- libs/gi/page-weapons/src/WeaponFilter.tsx | 8 +-- libs/gi/ui/src/components/EnemyEditor.tsx | 8 +-- libs/gi/ui/src/components/HitModeEditor.tsx | 4 +- .../src/components/artifact/ArtifactCard.tsx | 16 +++-- .../artifact/ArtifactFilterDisplay.tsx | 6 +- .../artifact/ArtifactLevelSlider.tsx | 2 +- .../artifact/ArtifactRarityDropdown.tsx | 4 +- .../artifact/ArtifactSlotDropdown.tsx | 2 +- .../components/artifact/ArtifactSwapModal.tsx | 6 +- .../gi/ui/src/components/artifact/RVSlide.tsx | 2 +- .../artifact/SetInclusionButton.tsx | 8 ++- .../artifact/editor/SubstatInput.tsx | 17 +++--- .../editor/UploadExplainationModal.tsx | 2 +- .../src/components/artifact/editor/index.tsx | 46 ++++++++------ libs/gi/ui/src/components/build/BuildCard.tsx | 10 ++-- .../src/components/build/BuildDisplayItem.tsx | 28 +++++---- .../src/components/build/EquipBuildModal.tsx | 10 ++-- .../character/CharacterMultiAutocomplete.tsx | 2 +- .../src/components/character/EquippedGrid.tsx | 12 ++-- .../character/LocationAutocomplete.tsx | 2 +- .../LocationFilterMultiAutocomplete.tsx | 2 +- .../card/CharacterCardEquipmentRow.tsx | 2 +- .../character/card/CharacterCardStats.tsx | 2 +- .../components/character/editor/Content.tsx | 2 +- .../character/editor/LoadoutCard.tsx | 2 +- .../character/editor/LoadoutEditor.tsx | 24 ++++---- .../character/editor/LoadoutHeaderContent.tsx | 8 +-- .../character/editor/RemoveLoadout.tsx | 20 +++---- .../src/components/database/DatabaseCard.tsx | 16 ++--- .../ui/src/components/database/UploadCard.tsx | 20 +++---- .../ui/src/components/team/TeamDelModal.tsx | 6 +- .../ui/src/components/weapon/WeaponCard.tsx | 2 +- .../src/components/weapon/WeaponSwapModal.tsx | 2 +- .../src/Optimize/GeneratedBuildsDisplay.tsx | 16 ++--- .../page-team/src/Optimize/StatFilterCard.tsx | 8 +-- .../page-team/src/TeamCharacterSelector.tsx | 8 +-- .../Relic/RelicEditor/RelicRarityDropdown.tsx | 4 +- .../ui/src/Relic/RelicEditor/SubstatInput.tsx | 16 ++--- libs/sr/ui/src/Settings/DatabaseCard.tsx | 20 +++---- libs/sr/ui/src/Settings/UploadCard.tsx | 14 ++--- 91 files changed, 503 insertions(+), 434 deletions(-) diff --git a/libs/gi/page-artifacts/src/DupModal.tsx b/libs/gi/page-artifacts/src/DupModal.tsx index 4faf747fa2..9e631b2aaf 100644 --- a/libs/gi/page-artifacts/src/DupModal.tsx +++ b/libs/gi/page-artifacts/src/DupModal.tsx @@ -38,7 +38,7 @@ export default function DupModal({ alignItems="center" > - {t`showDup`} + {t('showDup')} } action={ @@ -111,7 +111,9 @@ function DupContent({ ))} {!dupList.length && ( - {t`noDupAlert`} + + {t('noDupAlert')} + )} ) diff --git a/libs/gi/page-artifacts/src/index.tsx b/libs/gi/page-artifacts/src/index.tsx index 3b5caf8367..cb76fac7a4 100644 --- a/libs/gi/page-artifacts/src/index.tsx +++ b/libs/gi/page-artifacts/src/index.tsx @@ -139,7 +139,7 @@ export default function PageArtifact() { @@ -176,7 +176,9 @@ export default function PageArtifact() { onClick={() => setArtifactIdToEdit('new')} color="info" startIcon={} - >{t`addNew`} + > + {t('addNew')} + + > + {t('showDup')} + setnewCharacter(true)} color="info" startIcon={} - >{t`addNew`} + > + {t('addNew')} + {t`inventoryCard.title`}} + title={{t('inventoryCard.title')}} avatar={} /> @@ -108,7 +108,7 @@ export default function InventoryCard() { - {t(`ui:tabs.characters`)} {characterTotal} + {t('ui:tabs.characters')} {characterTotal} } icon={} @@ -145,7 +145,7 @@ export default function InventoryCard() { - {t(`ui:tabs.weapons`)} {weaponTotal} + {t('ui:tabs.weapons')} {weaponTotal} } icon={} @@ -182,7 +182,7 @@ export default function InventoryCard() { - {t(`ui:tabs.artifacts`)} {artifactTotal} + {t('ui:tabs.artifacts')} {artifactTotal} } icon={} @@ -222,7 +222,7 @@ export default function InventoryCard() { icon={} label={ - {t(`ui:tabs.teams`)} {numTeams} + {t('ui:tabs.teams')} {numTeams} } /> @@ -232,7 +232,7 @@ export default function InventoryCard() { icon={} label={ - {t(`ui:tabs.loadouts`)} {numLoadout} + {t('ui:tabs.loadouts')} {numLoadout} } /> @@ -242,7 +242,7 @@ export default function InventoryCard() { icon={} label={ - {t(`ui:tabs.builds`)} {numBuilds} + {t('ui:tabs.builds')} {numBuilds} } /> diff --git a/libs/gi/page-home/src/QuickLinksCard.tsx b/libs/gi/page-home/src/QuickLinksCard.tsx index 9da8ae3834..7ae2702283 100644 --- a/libs/gi/page-home/src/QuickLinksCard.tsx +++ b/libs/gi/page-home/src/QuickLinksCard.tsx @@ -40,12 +40,12 @@ const genshin_optimizer_links = [ url: process.env['NX_URL_GITHUB_GO'], }, { - title: (t: TFunction) => t`quickLinksCard.buttons.patchNotes.title`, + title: (t: TFunction) => t('quickLinksCard.buttons.patchNotes.title'), icon: , url: `${process.env['NX_URL_GITHUB_GO']}/releases`, }, { - title: (t: TFunction) => t`quickLinksCard.buttons.tyGuide.title`, + title: (t: TFunction) => t('quickLinksCard.buttons.tyGuide.title'), icon: , url: process.env['NX_URL_YOUTUBE_TUTPL'], }, @@ -76,22 +76,22 @@ const frzyc_links = [ const other_links = [ { - title: (t: TFunction) => t`quickLinksCard.buttons.scanners.title`, + title: (t: TFunction) => t('quickLinksCard.buttons.scanners.title'), icon: , to: '/scanner', }, { - title: (t: TFunction) => t`quickLinksCard.buttons.kqm.title`, + title: (t: TFunction) => t('quickLinksCard.buttons.kqm.title'), icon: , url: process.env['NX_URL_WEBSITE_KQM'], }, { - title: (t: TFunction) => t`quickLinksCard.buttons.devDiscord.title`, + title: (t: TFunction) => t('quickLinksCard.buttons.devDiscord.title'), icon: , url: process.env['NX_URL_DISCORD_GDEV'], }, { - title: (t: TFunction) => t`quickLinksCard.buttons.good.title`, + title: (t: TFunction) => t('quickLinksCard.buttons.good.title'), icon:
, to: '/doc', }, @@ -102,7 +102,9 @@ export default function QuickLinksCard() { return ( {t`quickLinksCard.title`}} + title={ + {t('quickLinksCard.title')} + } avatar={} /> diff --git a/libs/gi/page-home/src/TeamCard.tsx b/libs/gi/page-home/src/TeamCard.tsx index 72339d5b69..795b8dec1d 100644 --- a/libs/gi/page-home/src/TeamCard.tsx +++ b/libs/gi/page-home/src/TeamCard.tsx @@ -26,77 +26,77 @@ const team = [ { name: 'frzyc', img: frzyc, - title: (t) => t`teamCard.jobTitle.leadDev`, + title: (t) => t('teamCard.jobTitle.leadDev'), subtitle: 'Insomniac in Chief', url: process.env.NX_URL_GITHUB_FRZYC, }, { name: 'Lantua', img: lantua, - title: (t) => t`teamCard.jobTitle.dev`, + title: (t) => t('teamCard.jobTitle.dev'), subtitle: 'Copium Calculator', url: process.env.NX_URL_GITHUB_LANTUA, }, { name: 'Van', img: van, - title: (t) => t`teamCard.jobTitle.dev`, + title: (t) => t('teamCard.jobTitle.dev'), subtitle: 'Waverider Stowaway', url: process.env.NX_URL_GITHUB_VAN, }, { name: '✦ Sin ✦', img: sin, - title: (t) => t`teamCard.jobTitle.admin`, + title: (t) => t('teamCard.jobTitle.admin'), subtitle: 'Ohh, shiny.', url: '', }, { name: 'Stain', img: stain, - title: (t) => t`teamCard.jobTitle.admin`, + title: (t) => t('teamCard.jobTitle.admin'), subtitle: 'Australia Man', url: '', }, { name: 'yae!', img: yae, - title: (t) => t`teamCard.jobTitle.dev`, + title: (t) => t('teamCard.jobTitle.dev'), subtitle: 'eeeqeee', url: '', }, { name: 'tooflesswulf', img: toofless, - title: (t) => t`teamCard.jobTitle.dev`, + title: (t) => t('teamCard.jobTitle.dev'), subtitle: 'Mad Mathematician', url: '', }, { name: 'Qbe', img: qbe, - title: (t) => t`teamCard.jobTitle.dev`, + title: (t) => t('teamCard.jobTitle.dev'), subtitle: 'Irminsul Debugger', url: '', }, { name: 'Polomo', img: polomo, - title: (t) => t`teamCard.jobTitle.translator`, + title: (t) => t('teamCard.jobTitle.translator'), subtitle: 'Director of Text', url: '', }, { name: 'Vlad', img: vlad, - title: (t) => t`teamCard.jobTitle.TC`, + title: (t) => t('teamCard.jobTitle.TC'), subtitle: 'Spreadsheet Renegade', url: '', }, { name: 'D1firehail', img: d1, - title: (t) => t`teamCard.jobTitle.mod`, + title: (t) => t('teamCard.jobTitle.mod'), subtitle: 'Scanner Spy', url: '', }, @@ -107,7 +107,7 @@ export default function TeamCard() { return ( {t`teamCard.title`}} + title={{t('teamCard.title')}} avatar={} /> diff --git a/libs/gi/page-home/src/VidGuideCard.tsx b/libs/gi/page-home/src/VidGuideCard.tsx index d6409466c7..66a1c22c8e 100644 --- a/libs/gi/page-home/src/VidGuideCard.tsx +++ b/libs/gi/page-home/src/VidGuideCard.tsx @@ -27,7 +27,9 @@ export default function VidGuideCard() { href={process.env.NX_URL_YOUTUBE_TUTPL} target="_blank" rel="noopener" - >{t`vidGuideCard.title`} + > + {t('vidGuideCard.title')} + } avatar={} /> diff --git a/libs/gi/page-home/src/index.tsx b/libs/gi/page-home/src/index.tsx index 50a6805fdb..6f356f6b57 100644 --- a/libs/gi/page-home/src/index.tsx +++ b/libs/gi/page-home/src/index.tsx @@ -114,7 +114,9 @@ function PatchNotesCard() { {t`quickLinksCard.buttons.patchNotes.title`} + + {t('quickLinksCard.buttons.patchNotes.title')} + } avatar={} /> diff --git a/libs/gi/page-settings/src/SillyCard.tsx b/libs/gi/page-settings/src/SillyCard.tsx index a4e4a98a6b..7bd4f33bd3 100644 --- a/libs/gi/page-settings/src/SillyCard.tsx +++ b/libs/gi/page-settings/src/SillyCard.tsx @@ -22,7 +22,7 @@ export default function SillyCard() { - {t`sillyPageTitle`} + {t('sillyPageTitle')} @@ -40,8 +40,8 @@ export default function SillyCard() { color={silly ? 'success' : 'secondary'} > {silly - ? t`settings:sillyCard.toggle.enabled` - : t`settings:sillyCard.toggle.disabled`} + ? t('settings:sillyCard.toggle.enabled') + : t('settings:sillyCard.toggle.disabled')} diff --git a/libs/gi/page-team/src/CharProfileCharEditor.tsx b/libs/gi/page-team/src/CharProfileCharEditor.tsx index 3cdacf2365..c4dd131efe 100644 --- a/libs/gi/page-team/src/CharProfileCharEditor.tsx +++ b/libs/gi/page-team/src/CharProfileCharEditor.tsx @@ -103,7 +103,7 @@ function Content({ onClose }: { onClose?: () => void }) { }) }} > - {t`buildTcCharOverride.btn`} + {t('buildTcCharOverride.btn')} )} diff --git a/libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx b/libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx index f3a537eefd..d3e7601910 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx @@ -27,7 +27,7 @@ export function BuildEquipped({ active = false }: { active?: boolean }) { }) const onDupe = () => database.teamChars.newBuild(teamCharId, { - name: t`buildEqCard.copy.nameReal`, + name: t('buildEqCard.copy.nameReal'), artifactIds: equippedArtifacts, weaponId: equippedWeapon, }) @@ -42,14 +42,14 @@ export function BuildEquipped({ active = false }: { active?: boolean }) { if (!newBuildTcId) return // copy over name database.buildTcs.set(newBuildTcId, { - name: t`buildEqCard.copy.nameTc`, - description: t`buildEqCard.copy.desc`, + name: t('buildEqCard.copy.nameTc'), + description: t('buildEqCard.copy.desc'), }) } return ( @@ -246,14 +246,14 @@ function BuildEditor({ setName(e.target.value)} /> setDesc(e.target.value)} multiline diff --git a/libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx b/libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx index f051c49da8..4c7aaae2bb 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx @@ -271,7 +271,7 @@ function BuildTcEditor({ return ( @@ -282,14 +282,14 @@ function BuildTcEditor({ setName(e.target.value)} /> setDesc(e.target.value)} multiline diff --git a/libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx b/libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx index 340d019d90..f5fd88ba78 100644 --- a/libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx @@ -41,11 +41,11 @@ export default function CompareBtn({ {database.buildTcs.get(compareBuildTcId)?.name ?? ''}{' '} - {t`compareBtn.tcBadge`} + {t('compareBtn.tcBadge')} ) : ( - t`compareBtn.equipped` + t('compareBtn.equipped') ) const current = (compareType === 'equipped' && buildType === 'equipped') || @@ -66,7 +66,7 @@ export default function CompareBtn({ }) } > - {t`compareBtn.compare`} + {t('compareBtn.compare')} - {t`compareBtn.crrBadge`} + {t('compareBtn.crrBadge')} )} @@ -88,10 +88,10 @@ export default function CompareBtn({ }) } > - {t`compareBtn.equipped`} + {t('compareBtn.equipped')} {buildType === 'equipped' && ( - {t`compareBtn.crrBadge`} + {t('compareBtn.crrBadge')} )} @@ -109,7 +109,7 @@ export default function CompareBtn({ {database.builds.get(bId)!.name}{' '} {buildType === 'real' && bId === buildId && ( - {t`compareBtn.crrBadge`} + {t('compareBtn.crrBadge')} )} @@ -126,11 +126,11 @@ export default function CompareBtn({ > {database.buildTcs.get(bTcId)?.name ?? ''}{' '} - {t`compareBtn.tcBadge`} + {t('compareBtn.tcBadge')} {buildType === 'tc' && bTcId === buildTcId && ( - {t`compareBtn.crrBadge`} + {t('compareBtn.crrBadge')} )} diff --git a/libs/gi/page-team/src/CharacterDisplay/Content.tsx b/libs/gi/page-team/src/CharacterDisplay/Content.tsx index b49127a14a..177bac1cc8 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Content.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Content.tsx @@ -156,7 +156,7 @@ function TabNav({ - {t`loadout.editNameDesc`} + {t('loadout.editNameDesc')} {!!teamChar.description && ( @@ -209,7 +209,7 @@ function TabNav({ setEditMode(false)}> } titleTypographyProps={{ variant: 'h6' }} action={ @@ -227,13 +227,13 @@ function TabNav({ sx={{ mt: 2 }} > () => { if ( Object.values(target.targets[index].bonusStats).length && - !window.confirm(t`multiTarget.confirm`) + !window.confirm(t('multiTarget.confirm')) ) return const targets = [...target.targets] @@ -124,7 +124,7 @@ export default function CustomMultiTargetCard({ const copyToClipboard = () => navigator.clipboard .writeText(JSON.stringify(target)) - .then(() => alert(t`multiTarget.copyMsg`)) + .then(() => alert(t('multiTarget.copyMsg'))) .catch(console.error) const customTargetDisplays = useMemo( @@ -192,7 +192,7 @@ export default function CustomMultiTargetCard({ > setTarget((target) => ({ @@ -204,7 +204,7 @@ export default function CustomMultiTargetCard({ {description && descIsJson && } { setDescIsJson( @@ -243,7 +243,7 @@ export default function CustomMultiTargetCard({ startIcon={} sx={{ flexGrow: 1 }} > - {t`multiTarget.export`} + {t('multiTarget.export')} + - + - {t`mTargetImport.desc`} + {t('mTargetImport.desc')} setData(e.target.value)} multiline @@ -67,7 +67,7 @@ export default function CustomMultiTargetImportBtn({ disabled={!data} onClick={importData} > - {t`mTargetImport.import`} + {t('mTargetImport.import')} diff --git a/libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx b/libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx index ed626cf15c..0bbb3a91a7 100644 --- a/libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx @@ -146,7 +146,9 @@ export default function MTargetEditor({ }} onClick={() => setcollapse((c) => !c)} > - {t`loadout:mTargetEditor.title`} + + {t('loadout:mTargetEditor.title')} + {collapse ? : } {isMobile - ? t`loadout:mTargetEditor.rankMobile` - : t`loadout:mTargetEditor.rank`} + ? t('loadout:mTargetEditor.rankMobile') + : t('loadout:mTargetEditor.rank')} ), }} @@ -288,7 +290,7 @@ export default function MTargetEditor({ setCustomTarget({ ...customTarget, description }) @@ -340,12 +342,12 @@ function ReactionDropdown({ ) ) : ( - t`noReaction` + t('noReaction') ) return ( setReactionMode()}> - {t`loadout:mTargetEditor.noReaction`} + {t('loadout:mTargetEditor.noReaction')} {reactions.map((rm) => ( - {t`multiTarget.title`} + {t('multiTarget.title')} {customMultiTargets.length} @@ -171,7 +171,7 @@ export function CustomMultiTargetButton({ title={ - {t`multiTarget.title`} + {t('multiTarget.title')} @@ -221,7 +221,9 @@ export function CustomMultiTargetButton({ fullWidth onClick={addNewCustomMultiTarget} startIcon={} - >{t`multiTarget.addNewMTarget`} + > + {t('multiTarget.addNewMTarget')} + diff --git a/libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx b/libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx index f9bf8383a1..085f7fd9be 100644 --- a/libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx @@ -112,7 +112,7 @@ function BuildManagementContent() { title={ - {t`loadoutSettings.title`} + {t('loadoutSettings.title')} } /> @@ -128,14 +128,14 @@ function BuildManagementContent() { - {t`loadoutSettings.builds`} + {t('loadoutSettings.builds')} @@ -156,7 +156,7 @@ function BuildManagementContent() { - {t`loadoutSettings.tcBuilds`} + {t('loadoutSettings.tcBuilds')} @@ -203,7 +203,7 @@ function DetailStatButton({ buttonProps = {} }: { buttonProps?: ButtonProps }) { onClick={onOpen} {...buttonProps} > - {t`addStats.title`} + {t('addStats.title')} {!!bStatsNum && ( {bStatsNum} @@ -224,7 +224,7 @@ function FormulasButton({ buttonProps = {} }: { buttonProps?: ButtonProps }) { onClick={onModalOpen} {...buttonProps} > - {t`showFormulas.button`} + {t('showFormulas.button')} ) } diff --git a/libs/gi/page-team/src/CharacterDisplay/StatModal.tsx b/libs/gi/page-team/src/CharacterDisplay/StatModal.tsx index c6a64726e8..4c6b73b46f 100644 --- a/libs/gi/page-team/src/CharacterDisplay/StatModal.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/StatModal.tsx @@ -57,7 +57,7 @@ export default function StatModal({ title={ - {t`addStats.title`} + {t('addStats.title')} } action={ @@ -215,7 +215,7 @@ function MainStatsCards() { - + - + {!!miscStatReadNodes.length && ( - + diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx index 037e47ab61..dddc725c30 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx @@ -190,31 +190,31 @@ export default function ArtifactSetConfig({ - {t`artSetConfig.title`} + {t('artSetConfig.title')} - {t`artSetConfig.setEffCond`}{' '} + {t('artSetConfig.setEffCond')}{' '} {artifactCondCount} {t('artSetConfig.enabled')} - {t`sheet:2set`}{' '} + {t('sheet:2set')}{' '} {allowTotals['2']} {' '} {t('artSetConfig.allowed')} - {t`sheet:4set`}{' '} + {t('sheet:4set')}{' '} {allowTotals['4']} {' '} {t('artSetConfig.allowed')} - {t`artSetConfig.2rainbow`}{' '} + {t('artSetConfig.2rainbow')}{' '} {allowRainbow2 ? ( @@ -225,7 +225,7 @@ export default function ArtifactSetConfig({ - {t`artSetConfig.4rainbow`}{' '} + {t('artSetConfig.4rainbow')}{' '} {allowRainbow4 ? ( @@ -251,7 +251,7 @@ export default function ArtifactSetConfig({ - {t`artSetConfig.title`} + {t('artSetConfig.title')} @@ -262,7 +262,7 @@ export default function ArtifactSetConfig({ - {t`artSetConfig.modal.setCond.title`} + {t('artSetConfig.modal.setCond.title')} @@ -274,9 +274,11 @@ export default function ArtifactSetConfig({ onClick={resetArtConds} color="error" startIcon={} - >{t`artSetConfig.modal.setCond.reset`} + > + {t('artSetConfig.modal.setCond.reset')} + - {t`artSetConfig.modal.setCond.text`} + {t('artSetConfig.modal.setCond.text')} @@ -462,7 +464,9 @@ export default function ArtifactSetConfig({ endIcon={ allowRainbow2 ? : } - >{t`artSetConfig.2rainbow`} + > + {t('artSetConfig.2rainbow')} + + > + {t('artSetConfig.4rainbow')} + @@ -657,7 +663,7 @@ function ArtifactSetCard({ > - {t`2set`} + {t('2set')} - {t`4set`} + {t('4set')} - {t`bonusStats.title`} + + {t('bonusStats.title')} + diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx index 9cd4440ff7..8826af6ded 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx @@ -133,7 +133,7 @@ export default function CustomTooltip({ )} {activeBuild && ( - {t`activeBuild`} + {t('activeBuild')} )} {generLabel && {generLabel}} diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx index 9518557e31..6b6788c8f8 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx @@ -218,7 +218,7 @@ export default function ChartCard({ - {t`tcGraph.vs`} + {t('tcGraph.vs')} : } color={showMin ? 'success' : 'secondary'} onClick={() => setshowMin(!showMin)} - >{t`tcGraph.showStatThr`} + > + {t('tcGraph.showStatThr')} + )} {!!downloadData && ( @@ -281,7 +283,9 @@ export default function ChartCard({ color="info" startIcon={} onClick={() => setshowDownload(!showDownload)} - >{t`tcGraph.downloadData`} + > + {t('tcGraph.downloadData')} + )} @@ -436,7 +440,7 @@ function Chart({ ? [ { id: 'min', - value: t`tcGraph.statReqThr`, + value: t('tcGraph.statReqThr'), type: 'line' as LegendType, color: lineColor, }, @@ -444,19 +448,19 @@ function Chart({ : []), { id: 'trueY', - value: t`tcGraph.generatedBuilds`, + value: t('tcGraph.generatedBuilds'), type: 'circle', color: optTargetColor, }, { id: 'highlighted', - value: t`tcGraph.highlightedBuilds`, + value: t('tcGraph.highlightedBuilds'), type: 'square', color: highlightedColor, }, { id: 'current', - value: t`tcGraph.currentBuild`, + value: t('tcGraph.currentBuild'), type: 'diamond', color: currentColor, }, diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx index 502249f99d..6ddabf1c5c 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx @@ -108,9 +108,13 @@ export default function ExcludeArt({ - {t`excludeArt.title_exclude`} + + {t('excludeArt.title_exclude')} + {t`excludeArt.title_tooltip`}} + title={ + {t('excludeArt.title_tooltip')} + } /> } @@ -136,10 +140,14 @@ export default function ExcludeArt({ color="info" sx={{ mb: 1 }} startIcon={} - >{t`excludeArt.addExc`} + > + {t('excludeArt.addExc')} + {!!numExcludedArt && ( - {t`excludeArt.deSelectExc`} + + {t('excludeArt.deSelectExc')} + )} } > - {t`optExcludeModal.excludeBtn`} + {t('optExcludeModal.excludeBtn')} {numExclude} @@ -267,7 +275,7 @@ function ExcludeArtRedButtons({ onClick={includeArtifacts} startIcon={} > - {t`optExcludeModal.includeBtn`} + {t('optExcludeModal.includeBtn')} {numInclude} @@ -341,7 +349,7 @@ function ArtifactSelectModal({ > diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx index 09cd465328..cb702be1fc 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx @@ -90,7 +90,7 @@ export default function MainStatSelectionCard({ {t(`slotName.flower`)}} + title={{t('slotName.flower')}} > @@ -106,7 +106,7 @@ export default function MainStatSelectionCard({ {t(`slotName.plume`)}} + title={{t('slotName.plume')}} > diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx index ce63313da9..34e1270e10 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx @@ -39,11 +39,11 @@ export default function StatFilterCard({ }} > - {t`constraintFilter.title`} + + {t('constraintFilter.title')} + {t`constraintFilter.tooltip`}} + title={{t('constraintFilter.tooltip')}} /> diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx index 19c7b495a4..f333375343 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx @@ -76,7 +76,7 @@ export function TargetSelectorModal({ diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx index 2851b9a9cf..1592106068 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx @@ -303,7 +303,7 @@ export default function UseEquipped({ {/* Header */} @@ -359,7 +359,7 @@ export default function UseEquipped({ diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx index df7093c1eb..23363433e6 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx @@ -454,7 +454,7 @@ export default function TabBuild() { if (results && notificationRef.current) { audio.play() if (!tabFocused.current) - setTimeout(() => window.alert(t`buildCompleted`), 1) + setTimeout(() => window.alert(t('buildCompleted')), 1) } }, 100) } catch (e) { @@ -573,9 +573,9 @@ export default function TabBuild() { {/* Main Stat Filters */} - {t`mainStat.title`} + + {t('mainStat.title')} + @@ -594,8 +594,12 @@ export default function TabBuild() { - {t`mainStat.levelAssTooltip.title`} - {t`mainStat.levelAssTooltip.desc`} + + {t('mainStat.levelAssTooltip.title')} + + + {t('mainStat.levelAssTooltip.desc')} + } /> @@ -629,7 +633,7 @@ export default function TabBuild() { } disabled={generatingBuilds} > - {t`allowPartial`} + {t('allowPartial')} @@ -712,7 +716,7 @@ export default function TabBuild() { ))} - + @@ -868,7 +872,7 @@ const LevelFilter = memo(function LevelFilter({ return ( - {t`levelFilter`} + {t('levelFilter')} {levelTotal} @@ -1028,13 +1032,13 @@ function CopyTcButton({ build }: { build: GeneratedBuild }) { startIcon={} onClick={onShowTcPrompt} > - {t`createBuildTc.button`} + {t('createBuildTc.button')} {/* TODO: Dialog Wanted to use a Dialog here, but was having some weird issues with closing out of it */} @@ -1045,21 +1049,21 @@ function CopyTcButton({ build }: { build: GeneratedBuild }) { - {t`createBuildTc.desc`} + {t('createBuildTc.desc')} setName(e.target.value)} autoFocus margin="dense" - label={t`createBuildTc.label`} + label={t('createBuildTc.label')} fullWidth /> - + @@ -1099,7 +1103,7 @@ function CopyBuildButton({ startIcon={} onClick={onShowPrompt} > - {t`createBuildReal.button`} + {t('createBuildReal.button')} {/* TODO: Dialog Wanted to use a Dialog here, but was having some weird issues with closing out of it */} @@ -1120,22 +1124,22 @@ function CopyBuildButton({ - {t`createBuildReal.desc`} + {t('createBuildReal.desc')}
setName(e.target.value)} autoFocus margin="dense" - label={t`createBuildReal.label`} + label={t('createBuildReal.label')} fullWidth /> - + diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx index be57c784c4..74eb0bc979 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx @@ -177,7 +177,9 @@ function ArtifactSectionCard() { onClick={unequipArts} fullWidth sx={{ borderBottomRightRadius: 0, borderBottomLeftRadius: 0 }} - >{t`tabEquip.unequipArts`} + > + {t('tabEquip.unequipArts')} + )} diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx index c04cf0bceb..34e51ff194 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx @@ -355,7 +355,7 @@ export function ConstellationDropdown() { }) } > - {t(`constellationLvl`, { level: i })} + {t('constellationLvl', { level: i })} ))} diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx index c6bc60ce7f..5f2bd3f842 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx @@ -133,9 +133,9 @@ export function ArtifactAllSubstatEditor({ }} InputProps={{ startAdornment: ( - {t`tabTheorycraft.all.rolls`} + + {t('tabTheorycraft.all.rolls')} + ), }} focused @@ -152,7 +152,9 @@ export function ArtifactAllSubstatEditor({ }} InputProps={{ startAdornment: ( - {t`tabTheorycraft.all.max`} + + {t('tabTheorycraft.all.max')} + ), }} focused diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx index 8305b21215..523c30c67f 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx @@ -239,7 +239,7 @@ export function ArtifactSubstatEditor({ InputProps={{ startAdornment: ( - {t`tabTheorycraft.substat.max`} + {t('tabTheorycraft.substat.max')} ), }} diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx index 8e787be005..35d6629ba0 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx @@ -315,7 +315,7 @@ export default function TabTheorycraft() { value={distributedSubstats} disabled={!optimizationTarget || solving} onChange={(v) => v !== undefined && setDistributedSubstats(v)} - endAdornment={t`tabTheorycraft.distInput`} + endAdornment={t('tabTheorycraft.distInput')} sx={{ borderRadius: 1, px: 1, @@ -343,7 +343,7 @@ export default function TabTheorycraft() { color="success" startIcon={} > - {t`tabTheorycraft.distribute`} + {t('tabTheorycraft.distribute')} ) : ( ) } @@ -531,7 +531,7 @@ export default function TabUpopt() { /> {!upOptCalc?.artifacts.length && ( - {t`upOptNoResults`} + {t('upOptNoResults')} )} setNewName(e.target.value)} /> setNewDesc(e.target.value)} multiline @@ -86,7 +86,7 @@ export function LoadoutDropdown({ />
@@ -115,7 +115,7 @@ export function LoadoutDropdown({ > {label ? ( - {t`loDropdown.label`} + {t('loDropdown.label')} {name} ) : ( @@ -125,7 +125,7 @@ export function LoadoutDropdown({ } {...dropdownBtnProps} > - onShow()}>{t`loDropdown.create`} + onShow()}>{t('loDropdown.create')} {teamCharIds.map((tcId) => { const { name, buildIds, buildTcIds, customMultiTargets } = database.teamChars.get(tcId)! @@ -141,15 +141,15 @@ export function LoadoutDropdown({ color={buildIds.length ? 'primary' : 'secondary'} sx={{ marginLeft: 'auto' }} > - {t(`loDropdown.builds`, { count: buildIds.length })} + {t('loDropdown.builds', { count: buildIds.length })} - {t(`loDropdown.tcs`, { count: buildTcIds.length })} + {t('loDropdown.tcs', { count: buildTcIds.length })} - {t(`loDropdown.multi`, { count: customMultiTargets.length })} + {t('loDropdown.multi', { count: customMultiTargets.length })} ) diff --git a/libs/gi/page-team/src/TeamCharacterSelector.tsx b/libs/gi/page-team/src/TeamCharacterSelector.tsx index bf9a126a35..c070a03505 100644 --- a/libs/gi/page-team/src/TeamCharacterSelector.tsx +++ b/libs/gi/page-team/src/TeamCharacterSelector.tsx @@ -133,7 +133,7 @@ export default function TeamCharacterSelector({ > - {t`team.editNameDesc`} + {t('team.editNameDesc')} {!!team.description && ( @@ -164,7 +164,7 @@ export default function TeamCharacterSelector({ setEditMode(false)}> } titleTypographyProps={{ variant: 'h6' }} action={ @@ -177,13 +177,13 @@ export default function TeamCharacterSelector({ handleName(teamName)} autoFocus /> handleDesc(teamDesc)} multiline @@ -203,7 +203,7 @@ export default function TeamCharacterSelector({ icon={} iconPosition="start" value={'team'} - label={t`teamSettings.tab.team`} + label={t('teamSettings.tab.team')} onClick={() => navigate(`/teams/${teamId}/`)} /> {loadoutData.map((loadoutDatum, ind) => { diff --git a/libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx b/libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx index 3ae7beeb11..ebea390a16 100644 --- a/libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx +++ b/libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx @@ -51,7 +51,7 @@ export function ResonanceDisplay({ {' '} {t`tabTeambuff.resonance_tip`}} + title={{t('tabTeambuff.resonance_tip')}} /> } diff --git a/libs/gi/page-team/src/TeamSetting/TeamComponents.tsx b/libs/gi/page-team/src/TeamSetting/TeamComponents.tsx index 5027d92d38..3d72c86d37 100644 --- a/libs/gi/page-team/src/TeamSetting/TeamComponents.tsx +++ b/libs/gi/page-team/src/TeamSetting/TeamComponents.tsx @@ -72,7 +72,7 @@ export function TeamBuffDisplay() { > }> - {t`teamComponents.teamBuffs`} + {t('teamComponents.teamBuffs')} {nodes.length} @@ -208,7 +208,7 @@ function TcEquipmentRow({ gap: 1, }} > - {t`teamComponents.tcBadge`} + {t('teamComponents.tcBadge')} {Object.entries(sets).map(([setKey, number]) => ( alert(t`exportModal.msg`)) + .then(() => alert(t('exportModal.msg'))) .catch(console.error) } const [selAll, setSelAll] = useState(true) @@ -135,7 +135,7 @@ export default function TeamExportModal({ @@ -164,7 +164,7 @@ export default function TeamExportModal({ color="info" onClick={selAll ? onSelAll : onUnselAll} > - {selAll ? t`exportModal.selAll` : t`exportModal.unselAll`} + {selAll ? t('exportModal.selAll') : t('exportModal.unselAll')} @@ -197,7 +197,7 @@ export default function TeamExportModal({ sx={{ display: 'flex', gap: 2, justifyContent: 'flex-end' }} >
@@ -267,7 +267,7 @@ function LoadoutSetting({ sx={{ display: 'flex', gap: 1, alignItems: 'center' }} > - {t`exportModal.target`} + {t('exportModal.target')} - {t`exportModal.mTargets`} + {t('exportModal.mTargets')}
@@ -335,7 +335,7 @@ function LoadoutSetting({ - {t`exportModal.builds`} + {t('exportModal.builds')} @@ -351,7 +351,7 @@ function LoadoutSetting({ tabIndex={-1} disableRipple /> - + {buildIds.map((buildId) => { @@ -404,7 +404,8 @@ function LoadoutSetting({ - {buildTc.name} {t`exportModal.tcBadge`} + {buildTc.name}{' '} + {t('exportModal.tcBadge')} } /> diff --git a/libs/gi/page-team/src/TeamSetting/index.tsx b/libs/gi/page-team/src/TeamSetting/index.tsx index 08f61a1452..8480c7ce19 100644 --- a/libs/gi/page-team/src/TeamSetting/index.tsx +++ b/libs/gi/page-team/src/TeamSetting/index.tsx @@ -74,7 +74,7 @@ export default function TeamSetting({ disabled={noChars} onClick={onShow} > - {t`teamSettings.exportBtn`} + {t('teamSettings.exportBtn')} } > - {t`teamSettings.deleteBtn`} + {t('teamSettings.deleteBtn')} @@ -285,7 +285,7 @@ function TeamEditor({ disabled={!!ind && !loadoutData.some((id) => id)} startIcon={} > - {t`teamSettings.addCharBtn`} + {t('teamSettings.addCharBtn')} )} @@ -370,11 +370,11 @@ function CharSelButton({ /> {index ? ( ) : ( )} {dataContextValue && ( diff --git a/libs/gi/page-team/src/index.tsx b/libs/gi/page-team/src/index.tsx index 96b109b9dd..15063b7cdc 100644 --- a/libs/gi/page-team/src/index.tsx +++ b/libs/gi/page-team/src/index.tsx @@ -138,11 +138,11 @@ function Page({ teamId }: { teamId: string }) { silly ? 'sillyWisher_charNames' : 'charNames_gen' }:${charKeyToLocGenderedCharKey(characterKey, gender)}` ) - : t`page_team:teamSettings.tab.team` + : t('page_team:teamSettings.tab.team') const tabName = tab ? t(`page_character:tabs.${tab}`) : characterKey - ? t`page_character:tabs.setting` + ? t('page_character:tabs.setting') : tab return tabName ? `${team.name} - ${charName} - ${tabName}` diff --git a/libs/gi/page-teams/src/index.tsx b/libs/gi/page-teams/src/index.tsx index 05300f3a6e..0492c116b7 100644 --- a/libs/gi/page-teams/src/index.tsx +++ b/libs/gi/page-teams/src/index.tsx @@ -69,10 +69,10 @@ export default function PageTeams() { try { const dataObj = JSON.parse(data) if (!database.teams.import(dataObj)) - window.alert(t`importForm.error.verifi`) + window.alert(t('importForm.error.verifi')) onHideImport() } catch (e) { - window.alert(t`importForm.error.import` + `\n${e}`) + window.alert(t('importForm.error.import') + `\n${e}`) return } @@ -154,7 +154,7 @@ export default function PageTeams() { onChange={(e: ChangeEvent) => setSearchTerm(e.target.value) } - label={t`searchLabel.team`} + label={t('searchLabel.team')} // size="small" sx={{ height: '100%', flexGrow: 1 }} InputProps={{ @@ -178,20 +178,20 @@ export default function PageTeams() { - + - {t`importForm.desc`} + {t('importForm.desc')} setData(e.target.value)} multiline @@ -202,7 +202,7 @@ export default function PageTeams() { disabled={!data} onClick={importData} > - {t`importForm.importBtn`} + {t('importForm.importBtn')} @@ -213,7 +213,7 @@ export default function PageTeams() { color="info" startIcon={} > - {t`importTeamBtn`} + {t('importTeamBtn')} - {t`weaponFilterTitle`} + {t('weaponFilterTitle')} - {t`weaponInInv`}{' '} + {t('weaponInInv')}{' '} - {t`equippedWeapon`}{' '} + {t('equippedWeapon')}{' '} diff --git a/libs/gi/ui/src/components/EnemyEditor.tsx b/libs/gi/ui/src/components/EnemyEditor.tsx index fc9f6e4c7c..eb5d787d2a 100644 --- a/libs/gi/ui/src/components/EnemyEditor.tsx +++ b/libs/gi/ui/src/components/EnemyEditor.tsx @@ -69,7 +69,7 @@ export function EnemyExpandCard({ teamId }: { teamId: string }) { color="success" label={ - {t`enemyEditor.enemyLevel`} + {t('enemyEditor.enemyLevel')} {enemyLevel} } @@ -157,7 +157,7 @@ export function EnemyEditor({ target="_blank" rel="noreferrer" > - {t`enemyEditor.announceBtn`} + {t('enemyEditor.announceBtn')} @@ -225,7 +225,7 @@ export function EnemyEditor({ ) } > - {t`enemyEditor.immunity`} + {t('enemyEditor.immunity')} @@ -262,7 +262,7 @@ export function EnemyEditor({ /> - {t`enemyEditor.note`} + {t('enemyEditor.note')} ) diff --git a/libs/gi/ui/src/components/HitModeEditor.tsx b/libs/gi/ui/src/components/HitModeEditor.tsx index 7ea4c7127a..9e791d496a 100644 --- a/libs/gi/ui/src/components/HitModeEditor.tsx +++ b/libs/gi/ui/src/components/HitModeEditor.tsx @@ -133,7 +133,9 @@ export function ReactionToggle(props: ReactionToggleProps) { disabled={!teamCharId} {...props} > - {t`noReaction`} + + {t('noReaction')} + {reactions.map((rm) => ( {([...allAmpReactionKeys] as string[]).includes(rm) ? ( diff --git a/libs/gi/ui/src/components/artifact/ArtifactCard.tsx b/libs/gi/ui/src/components/artifact/ArtifactCard.tsx index 29a72826b3..2fb7385a78 100644 --- a/libs/gi/ui/src/components/artifact/ArtifactCard.tsx +++ b/libs/gi/ui/src/components/artifact/ArtifactCard.tsx @@ -312,10 +312,9 @@ export function ArtifactCardObj({ variant="caption" sx={{ display: 'flex', gap: 1, alignItems: 'center' }} > - {t`artifact:editor.curSubEff`} + + {t('artifact:editor.curSubEff')} + {currentEfficiency !== maxEfficiency && ( - {t`artifact:editor.maxSubEff`} + + {t('artifact:editor.maxSubEff')} + {!!onEdit && ( {t`artifact:edit`}} + title={{t('artifact:edit')}} placement="top" arrow > diff --git a/libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx b/libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx index eecd6b8ded..b40fbcef35 100644 --- a/libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx +++ b/libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx @@ -335,7 +335,7 @@ export function ArtifactFilterDisplay({ filterOptionDispatch({ showInventory: !showInventory }) } > - {t`artInInv`}{' '} + {t('artInInv')}{' '} - {t`equippedArt`}{' '} + {t('equippedArt')}{' '} diff --git a/libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx b/libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx index 48e43d29dc..cef736db9b 100644 --- a/libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx +++ b/libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx @@ -64,7 +64,7 @@ export function ArtifactLevelSlider({ backgroundColor: 'rgb(30,120,200)', }} > - {t`levelSliderTitle`} + {t('levelSliderTitle')} diff --git a/libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx b/libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx index a8c33c592e..f7ba219f3a 100644 --- a/libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx +++ b/libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx @@ -20,7 +20,9 @@ export function ArtifactRarityDropdown({ return ( : t`editor.rarity`} + title={ + rarity ? : t('editor.rarity') + } color={rarity ? 'success' : 'primary'} > {([5, 4, 3] as ArtifactRarity[]).map((rarity) => ( diff --git a/libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx b/libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx index 629f2257e2..a6065fc6d9 100644 --- a/libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx +++ b/libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx @@ -36,7 +36,7 @@ export function ArtifactSlotDropdown({ - {t`ui:unselect`} + {t('ui:unselect')} )} {hasUnselect && } diff --git a/libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx b/libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx index 02c4b262d6..1ed1367c86 100644 --- a/libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx +++ b/libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx @@ -164,7 +164,7 @@ export function ArtifactSwapModal({ > {slotKey ? : null}{' '} - {t`tabEquip.swapArt`} + {t('tabEquip.swapArt')} @@ -241,7 +241,9 @@ export function ArtifactSwapModal({ }} > - {t`artifact:button.unequipArtifact`} + + {t('artifact:button.unequipArtifact')} +
diff --git a/libs/gi/ui/src/components/artifact/RVSlide.tsx b/libs/gi/ui/src/components/artifact/RVSlide.tsx index 6bbafcceb2..13047392be 100644 --- a/libs/gi/ui/src/components/artifact/RVSlide.tsx +++ b/libs/gi/ui/src/components/artifact/RVSlide.tsx @@ -68,7 +68,7 @@ export function RVSlide({ color: 'rgba(255,255,255,0.9)', }} > - {MRV_RV ? t`rvSliderBtn.maximum` : t`rvSliderBtn.current`} + {MRV_RV ? t('rvSliderBtn.maximum') : t('rvSliderBtn.current')} diff --git a/libs/gi/ui/src/components/artifact/SetInclusionButton.tsx b/libs/gi/ui/src/components/artifact/SetInclusionButton.tsx index 0595294c6a..2e839b28fa 100644 --- a/libs/gi/ui/src/components/artifact/SetInclusionButton.tsx +++ b/libs/gi/ui/src/components/artifact/SetInclusionButton.tsx @@ -41,7 +41,9 @@ export function SetInclusionButton({ } color={exclude2 ? 'secondary' : 'success'} endIcon={exclude2 ? : } - >{t`2set`} + > + {t('2set')} + + > + {t('4set')} + ) } diff --git a/libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx b/libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx index a93d298139..ee8183f4e1 100644 --- a/libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx +++ b/libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx @@ -71,7 +71,8 @@ export function SubstatInput({ } const rollOffset = 7 - rollData.length - if (!rollNum && key && value) error = error || t`editor.substat.error.noCalc` + if (!rollNum && key && value) + error = error || t('editor.substat.error.noCalc') if (allowedRolls < 0) error = error || @@ -108,7 +109,9 @@ export function SubstatInput({ {key && ( setSubstat(index, { key: '', value: 0 })} - >{t`editor.substat.noSubstat`} + > + {t('editor.substat.noSubstat')} + )} {allSubstatKeys .filter((key) => mainStatKey !== key) @@ -139,7 +142,7 @@ export function SubstatInput({ }, }} float={unit === '%'} - placeholder={t`editor.substat.selectSub`} + placeholder={t('editor.substat.selectSub')} value={key ? value : 0} onChange={(value) => setSubstat(index, { key, value: value ?? 0 })} disabled={!key} @@ -149,7 +152,7 @@ export function SubstatInput({ }} /> {!!rollData.length && ( - {t`editor.substat.nextRolls`} + {t('editor.substat.nextRolls')} )} {rollData.map((v, i) => { let newValue = artDisplayValue(accurateValue + v, unit) @@ -183,7 +186,7 @@ export function SubstatInput({ {error ? ( - {t`ui:error`} + {t('ui:error')} ) : ( @@ -196,7 +199,7 @@ export function SubstatInput({ > {rollNum ? t('editor.substat.RollCount', { count: rollNum }) - : t`editor.substat.noRoll`} + : t('editor.substat.noRoll')} @@ -230,7 +233,7 @@ export function SubstatInput({ value={ efficiency ? efficiency - : (t`editor.substat.noStat` as string) + : (t('editor.substat.noStat') as string) } /> diff --git a/libs/gi/ui/src/components/artifact/editor/UploadExplainationModal.tsx b/libs/gi/ui/src/components/artifact/editor/UploadExplainationModal.tsx index b92124d12f..7205aa3d0f 100644 --- a/libs/gi/ui/src/components/artifact/editor/UploadExplainationModal.tsx +++ b/libs/gi/ui/src/components/artifact/editor/UploadExplainationModal.tsx @@ -28,7 +28,7 @@ export function UploadExplainationModal({ - {t`editor.uploadExp.title`} + {t('editor.uploadExp.title')} diff --git a/libs/gi/ui/src/components/artifact/editor/index.tsx b/libs/gi/ui/src/components/artifact/editor/index.tsx index e2806370c7..34b20b9ea2 100644 --- a/libs/gi/ui/src/components/artifact/editor/index.tsx +++ b/libs/gi/ui/src/components/artifact/editor/index.tsx @@ -312,7 +312,7 @@ export function ArtifactEditor({ ) const isValid = !errors.length const canClearArtifact = (): boolean => - window.confirm(t`editor.clearPrompt` as string) + window.confirm(t('editor.clearPrompt') as string) const { rarity = 5, level = 0 } = artifact ?? {} // Same as above when assigning newValue.slotKey in update. const slotKey = useMemo(() => { @@ -326,7 +326,7 @@ export function ArtifactEditor({ if ( !artifactIdToEdit && (queueTotal || artifact) && - !window.confirm(t`editor.clearPrompt` as string) + !window.confirm(t('editor.clearPrompt') as string) ) { e?.preventDefault() return @@ -464,7 +464,7 @@ export function ArtifactEditor({ ) : ( - t`editor.unknownPieceName` + t('editor.unknownPieceName') )} @@ -552,7 +552,7 @@ export function ArtifactEditor({ {artifact ? ( ) : ( - t`mainStat` + t('mainStat') )} } @@ -578,7 +578,7 @@ export function ArtifactEditor({ rarity, level ) - : t`mainStat`} + : t('mainStat')} @@ -745,9 +745,9 @@ export function ArtifactEditor({ > {oldType !== 'edit' ? oldType === 'duplicate' - ? t`editor.dupArt` - : t`editor.upArt` - : t`editor.beforeEdit`} + ? t('editor.dupArt') + : t('editor.upArt') + : t('editor.beforeEdit')}
@@ -772,7 +772,9 @@ export function ArtifactEditor({ py={1} variant="h6" color="text.secondary" - >{t`editor.preview`} + > + {t('editor.preview')} + {cArtifact && }
@@ -803,7 +805,7 @@ export function ArtifactEditor({ disabled={!artifact || !isValid} color="primary" > - {t`editor.btnSave`} + {t('editor.btnSave')} ) : ( )} {allowEmpty && ( @@ -830,7 +832,9 @@ export function ArtifactEditor({ canClearArtifact() && reset() }} color="error" - >{t`editor.btnClear`} + > + {t('editor.btnClear')} + )} {process.env['NODE_ENV'] === 'development' && ( + > + {t('editor.btnRandom')} + )} {old && oldType !== 'edit' && ( + > + {t('editor.btnUpdate')} + )} {!!removeId && ( + > + {t('editor.delete')} + )} diff --git a/libs/gi/ui/src/components/build/BuildCard.tsx b/libs/gi/ui/src/components/build/BuildCard.tsx index 932645e545..abc9d5c37b 100644 --- a/libs/gi/ui/src/components/build/BuildCard.tsx +++ b/libs/gi/ui/src/components/build/BuildCard.tsx @@ -88,7 +88,7 @@ export function BuildCard({ }} > {t`buildCardTip.edit`}} + title={{t('buildCardTip.edit')}} placement="top" arrow > @@ -104,7 +104,7 @@ export function BuildCard({ {t`buildCardTip.copyTc`}} + title={{t('buildCardTip.copyTc')}} placement="top" arrow > @@ -118,7 +118,7 @@ export function BuildCard({ {t`buildCardTip.duplicate`}} + title={{t('buildCardTip.duplicate')}} placement="top" arrow > @@ -132,7 +132,7 @@ export function BuildCard({ {t`buildCardTip.equip`}} + title={{t('buildCardTip.equip')}} placement="top" arrow > @@ -146,7 +146,7 @@ export function BuildCard({ {t`buildCardTip.delete`}} + title={{t('buildCardTip.delete')}} placement="top" arrow > diff --git a/libs/gi/ui/src/components/build/BuildDisplayItem.tsx b/libs/gi/ui/src/components/build/BuildDisplayItem.tsx index 20e2e64a80..d97ff7acf1 100644 --- a/libs/gi/ui/src/components/build/BuildDisplayItem.tsx +++ b/libs/gi/ui/src/components/build/BuildDisplayItem.tsx @@ -346,7 +346,7 @@ export const BuildDisplayItem = memo(function BuildDisplayItem({ {label} {currentlyEquipped && ( - {t`buildDisplay.equippedBadge`} + {t('buildDisplay.equippedBadge')} )} @@ -362,7 +362,9 @@ export const BuildDisplayItem = memo(function BuildDisplayItem({ )?.name } - {isActiveBuild && {t`buildDisplay.currentBadge`}} + {isActiveBuild && ( + {t('buildDisplay.currentBadge')} + )} {sameAsBuildIds.length > 1 && ( } > - {t`buildDisplay.equipToCrr`} + {t('buildDisplay.equipToCrr')} {extraButtonsRight} @@ -480,12 +482,12 @@ function CompareWeaponModal({ - {t`buildDisplay.oldWeapon`} + {t('buildDisplay.oldWeapon')} {oldId === 'tc' ? ( - {t`buildDisplay.tcWeapon`} + {t('buildDisplay.tcWeapon')} ) : ( @@ -502,7 +504,7 @@ function CompareWeaponModal({ - {t`buildDisplay.newWeapon`} + {t('buildDisplay.newWeapon')} @@ -565,12 +567,12 @@ function CompareArtifactModal({ - {t`compareArtModal.oldArt`} + {t('compareArtModal.oldArt')} {oldId === 'tc' ? ( - {t`compareArtModal.tcArt`} + {t('compareArtModal.tcArt')} ) : ( - {t`compareArtModal.newArt`} + {t('compareArtModal.newArt')}
)} @@ -661,7 +663,7 @@ function ArtInclusionButton({ id }: { id: string }) { - {t`excludeArt.includeArtifactTip`} + {t('excludeArt.includeArtifactTip')} } placement="top" @@ -673,7 +675,7 @@ function ArtInclusionButton({ id }: { id: string }) { size="small" startIcon={excluded ? : } > - {t`excludeArt.includeArtifactButton`} + {t('excludeArt.includeArtifactButton')} ) @@ -710,7 +712,7 @@ function ExcludeEquipButton({ startIcon={excluded ? : } > - {t`excludeChar.allowEquip`}{' '} + {t('excludeChar.allowEquip')}{' '} diff --git a/libs/gi/ui/src/components/build/EquipBuildModal.tsx b/libs/gi/ui/src/components/build/EquipBuildModal.tsx index 9b2c89c9ea..34185e8f54 100644 --- a/libs/gi/ui/src/components/build/EquipBuildModal.tsx +++ b/libs/gi/ui/src/components/build/EquipBuildModal.tsx @@ -129,7 +129,9 @@ function Content(props: Props) { }} > {/* Confirmation Message */} - {t`equipBuildModal.desc`} + + {t('equipBuildModal.desc')} + {teamCharId && ( setName(e.target.value)} @@ -167,10 +169,10 @@ function Content(props: Props) { }} > {/* Active Build */} diff --git a/libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx b/libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx index f6fd9a8f7a..442e89fa2d 100644 --- a/libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx +++ b/libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx @@ -134,7 +134,7 @@ export function CharacterMultiAutocomplete({ return ( }> {t`tabEquip.swapArt`}} + title={{t('tabEquip.swapArt')}} placement="top" arrow > @@ -286,7 +286,7 @@ function WeaponSwapButton({ return ( <> {t`tabEquip.swapWeapon`}} + title={{t('tabEquip.swapWeapon')}} placement="top" arrow > @@ -317,11 +317,9 @@ function LargeWeaponSwapButton({ const [show, onOpen, onClose] = useBoolState() return ( <> - + [ { key: '', - label: t`artifact:filterLocation.inventory`, + label: t('artifact:filterLocation.inventory'), }, ...Array.from( new Set( diff --git a/libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx b/libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx index 0dce6d5c16..69b7b5b454 100644 --- a/libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx +++ b/libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx @@ -111,7 +111,7 @@ export function LocationFilterMultiAutocomplete({ toImg={toImg} toExLabel={toExLabel} toExItemLabel={toExItemLabel} - label={t`artifact:filterLocation.location`} + label={t('artifact:filterLocation.location')} chipProps={{ variant: 'outlined' }} /> diff --git a/libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx b/libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx index fe1dbeaa97..0541a1f9a8 100644 --- a/libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx +++ b/libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx @@ -77,7 +77,7 @@ export function CharacterCardEquipmentRowTC({ }} > - {t`tcBuild`} + {t('tcBuild')} diff --git a/libs/gi/ui/src/components/character/card/CharacterCardStats.tsx b/libs/gi/ui/src/components/character/card/CharacterCardStats.tsx index 232f0e63c4..874cd47cc7 100644 --- a/libs/gi/ui/src/components/character/card/CharacterCardStats.tsx +++ b/libs/gi/ui/src/components/character/card/CharacterCardStats.tsx @@ -20,7 +20,7 @@ export function CharacterCardStats({ bgt }: { bgt?: CardBackgroundColor }) { {name && ( - {t`specialized`} + {t('specialized')} {icon} {name} diff --git a/libs/gi/ui/src/components/character/editor/Content.tsx b/libs/gi/ui/src/components/character/editor/Content.tsx index 24810c8e33..398435f411 100644 --- a/libs/gi/ui/src/components/character/editor/Content.tsx +++ b/libs/gi/ui/src/components/character/editor/Content.tsx @@ -275,7 +275,7 @@ function InTeam() { variant="outlined" sx={{ backgroundColor: 'contentLight.main' }} > - {t`charContentModal.addLoAndTeam`} + {t('charContentModal.addLoAndTeam')} diff --git a/libs/gi/ui/src/components/character/editor/LoadoutCard.tsx b/libs/gi/ui/src/components/character/editor/LoadoutCard.tsx index 5677221ad8..e73ea23f5c 100644 --- a/libs/gi/ui/src/components/character/editor/LoadoutCard.tsx +++ b/libs/gi/ui/src/components/character/editor/LoadoutCard.tsx @@ -72,7 +72,7 @@ export function LoadoutCard({ color="info" startIcon={} > - {t`charContentModal.addTeam`} + {t('charContentModal.addTeam')} diff --git a/libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx b/libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx index c784cc7130..dc8d270c05 100644 --- a/libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx +++ b/libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx @@ -124,14 +124,14 @@ export function LoadoutEditor({ database.teamChars.set(teamCharId, { name })} /> database.teamChars.set(teamCharId, { description }) @@ -148,7 +148,7 @@ export function LoadoutEditor({ fullWidth startIcon={} > - {t`loadoutEditor.dupBtn`} + {t('loadoutEditor.dupBtn')} @@ -166,7 +166,7 @@ export function LoadoutEditor({ color="error" onClick={onShowRemoval} > - {t`loadoutEditor.delBtn`} + {t('loadoutEditor.delBtn')} @@ -192,7 +192,7 @@ export function LoadoutEditor({ }} > - {t`loadoutEditor.optTarget`} + {t('loadoutEditor.optTarget')} } /> @@ -220,7 +220,7 @@ export function LoadoutEditor({ - {t`loadoutEditor.conditionals`} + {t('loadoutEditor.conditionals')} {conditionalCount} @@ -234,7 +234,7 @@ export function LoadoutEditor({ title={ - {t`loadoutEditor.builds`} + {t('loadoutEditor.builds')} } /> @@ -270,7 +270,7 @@ export function LoadoutEditor({ title={ - {t`loadoutEditor.teams`} + {t('loadoutEditor.teams')} } /> @@ -298,7 +298,7 @@ export function LoadoutEditor({ color="info" startIcon={} > - {t`loadoutEditor.addNewTeam`} + {t('loadoutEditor.addNewTeam')} @@ -326,7 +326,7 @@ function BonusStatsCard({ }} > - {t`loadoutEditor.bonusStats`} + {t('loadoutEditor.bonusStats')} } titleTypographyProps={{ variant: 'h6' }} @@ -365,7 +365,7 @@ function MultiTargetCard({ }} > - {t`loadoutEditor.mltTargets`} + {t('loadoutEditor.mltTargets')} } titleTypographyProps={{ variant: 'h6' }} diff --git a/libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx b/libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx index dc4b39bbd2..f76eb1adf4 100644 --- a/libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx +++ b/libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx @@ -48,21 +48,21 @@ export function LoadoutHeaderContent({ - {t`loadoutHeader.builds`} + {t('loadoutHeader.builds')} {buildIds.length} - {t`loadoutHeader.tcBuilds`} + {t('loadoutHeader.tcBuilds')} {buildTcIds.length} - {t`loadoutHeader.mltTargets`} + {t('loadoutHeader.mltTargets')} {customMultiTargets.length} @@ -70,7 +70,7 @@ export function LoadoutHeaderContent({ {optimizationTarget && ( - {t`loadoutHeader.optTarget`} + {t('loadoutHeader.optTarget')} {description} )} - {t`loadoutDelModal.desc`} + {t('loadoutDelModal.desc')} {!!buildIds.length && ( - {t`loadoutDelModal.builds`} + {t('loadoutDelModal.builds')} {buildIds.length}{' '} - {t`loadoutDelModal.tcBuilds`} + {t('loadoutDelModal.tcBuilds')} {buildTcIds.length}{' '} - {t`loadoutDelModal.mTargets`} + {t('loadoutDelModal.mTargets')} {customMultiTargets.length}{' '} - {t`loadoutDelModal.bonus`} + {t('loadoutDelModal.bonus')} {Object.keys(bonusStats).length} )} {!!conditionalCount && ( - {t`loadoutDelModal.condi`} + {t('loadoutDelModal.condi')} {conditionalCount} )} - {t`loadoutDelModal.optConfig`} + {t('loadoutDelModal.optConfig')} {!!teamIds.length && ( - {t`loadoutDelModal.affected`} + {t('loadoutDelModal.affected')} {teamIds.length} @@ -224,14 +224,14 @@ export function RemoveLoadout({ diff --git a/libs/gi/ui/src/components/database/DatabaseCard.tsx b/libs/gi/ui/src/components/database/DatabaseCard.tsx index d342c29458..34c99238ab 100644 --- a/libs/gi/ui/src/components/database/DatabaseCard.tsx +++ b/libs/gi/ui/src/components/database/DatabaseCard.tsx @@ -27,7 +27,7 @@ export function DatabaseCard({ readOnly = false }: { readOnly?: boolean }) { return ( - {t`DatabaseCard.title`} + {t('DatabaseCard.title')} @@ -147,14 +147,16 @@ function DataCard({ index, readOnly }: { index: number; readOnly: boolean }) { onClick={onSwap} color="warning" disabled={readOnly} - >{t`DatabaseCard.button.swap`} + > + {t('DatabaseCard.button.swap')} + )} @@ -209,7 +211,7 @@ function DataCard({ index, readOnly }: { index: number; readOnly: boolean }) { onClick={onOpen} disabled={readOnly} > - {t`DatabaseCard.button.upload`} + {t('DatabaseCard.button.upload')} @@ -219,7 +221,7 @@ function DataCard({ index, readOnly }: { index: number; readOnly: boolean }) { onClick={download} startIcon={} > - {t`DatabaseCard.button.download`} + {t('DatabaseCard.button.download')} @@ -230,7 +232,7 @@ function DataCard({ index, readOnly }: { index: number; readOnly: boolean }) { onClick={onDelete} startIcon={} > - {t`DatabaseCard.button.delete`} + {t('DatabaseCard.button.delete')} diff --git a/libs/gi/ui/src/components/database/UploadCard.tsx b/libs/gi/ui/src/components/database/UploadCard.tsx index 38a54b3070..5430937eba 100644 --- a/libs/gi/ui/src/components/database/UploadCard.tsx +++ b/libs/gi/ui/src/components/database/UploadCard.tsx @@ -125,11 +125,9 @@ export function UploadCard({ type="file" onChange={onUpload} /> - + @@ -154,8 +152,8 @@ export function UploadCard({ title={ {ignoreDups - ? t`uploadCard.tooltip.ignoreDup` - : t`uploadCard.tooltip.detectdup`} + ? t('uploadCard.tooltip.ignoreDup') + : t('uploadCard.tooltip.detectdup')} } placement="top" @@ -169,7 +167,7 @@ export function UploadCard({ onClick={() => setIgnoreDups(!ignoreDups)} startIcon={ignoreDups ? : } > - {t`uploadCard.buttons.detectDups`} + {t('uploadCard.buttons.detectDups')} @@ -177,8 +175,8 @@ export function UploadCard({ title={ {keepNotInImport - ? t`uploadCard.tooltip.keepNotInImport` - : t`uploadCard.tooltip.delNotInImport`} + ? t('uploadCard.tooltip.keepNotInImport') + : t('uploadCard.tooltip.delNotInImport')} } placement="top" @@ -194,7 +192,7 @@ export function UploadCard({ keepNotInImport ? : } > - {t`uploadCard.buttons.delNotInImport`} + {t('uploadCard.buttons.delNotInImport')} diff --git a/libs/gi/ui/src/components/team/TeamDelModal.tsx b/libs/gi/ui/src/components/team/TeamDelModal.tsx index 00dce246a9..7388c3e5b0 100644 --- a/libs/gi/ui/src/components/team/TeamDelModal.tsx +++ b/libs/gi/ui/src/components/team/TeamDelModal.tsx @@ -80,7 +80,7 @@ export function TeamDelModal({ alignItems: 'center', }} > - {t`teamDelModal.teamName`} + {t('teamDelModal.teamName')} {name} {description && ( @@ -123,7 +123,7 @@ export function TeamDelModal({ startIcon={} onClick={onDelete} > - {t`teamDelModal.delBtn`} + {t('teamDelModal.delBtn')} @@ -167,7 +167,7 @@ function LoadoutDisplay({ {inTeams.length === 1 - ? t`teamDelModal.onlyCrrTeam` + ? t('teamDelModal.onlyCrrTeam') : t('teamDelModal.usingMltTeams', { count: inTeams.length })} diff --git a/libs/gi/ui/src/components/weapon/WeaponCard.tsx b/libs/gi/ui/src/components/weapon/WeaponCard.tsx index 885a0b0c50..1fc9f1face 100644 --- a/libs/gi/ui/src/components/weapon/WeaponCard.tsx +++ b/libs/gi/ui/src/components/weapon/WeaponCard.tsx @@ -233,7 +233,7 @@ export function WeaponCardObj({ > {!!onEdit && ( {t`page_weapon:edit`}} + title={{t('page_weapon:edit')}} placement="top" arrow > diff --git a/libs/gi/ui/src/components/weapon/WeaponSwapModal.tsx b/libs/gi/ui/src/components/weapon/WeaponSwapModal.tsx index da592194b3..6fcc123095 100644 --- a/libs/gi/ui/src/components/weapon/WeaponSwapModal.tsx +++ b/libs/gi/ui/src/components/weapon/WeaponSwapModal.tsx @@ -187,7 +187,7 @@ export function WeaponSwapModal({ {weaponTypeKey ? ( ) : null} - {t`page_character:tabEquip.swapWeapon`} + {t('page_character:tabEquip.swapWeapon')} } action={ diff --git a/libs/sr/page-team/src/Optimize/GeneratedBuildsDisplay.tsx b/libs/sr/page-team/src/Optimize/GeneratedBuildsDisplay.tsx index 3353c11940..63fd2a2f72 100644 --- a/libs/sr/page-team/src/Optimize/GeneratedBuildsDisplay.tsx +++ b/libs/sr/page-team/src/Optimize/GeneratedBuildsDisplay.tsx @@ -110,7 +110,7 @@ function NewBuildButton({ startIcon={} onClick={onShowPrompt} > - {t`createBuildReal.button`} + {t('createBuildReal.button')} {/* TODO: Dialog Wanted to use a Dialog here, but was having some weird issues with closing out of it */} @@ -131,7 +131,7 @@ function NewBuildButton({ - {t`createBuildReal.desc`} + {t('createBuildReal.desc')} setName(e.target.value)} autoFocus margin="dense" - label={t`createBuildReal.label`} + label={t('createBuildReal.label')} fullWidth /> - + diff --git a/libs/sr/page-team/src/Optimize/StatFilterCard.tsx b/libs/sr/page-team/src/Optimize/StatFilterCard.tsx index 956f9b1406..77ac92751a 100644 --- a/libs/sr/page-team/src/Optimize/StatFilterCard.tsx +++ b/libs/sr/page-team/src/Optimize/StatFilterCard.tsx @@ -34,11 +34,11 @@ export function StatFilterCard({ disabled = false }: { disabled?: boolean }) { }} > - {t`constraintFilter.title`} + + {t('constraintFilter.title')} + {t`constraintFilter.tooltip`}} + title={{t('constraintFilter.tooltip')}} /> diff --git a/libs/sr/page-team/src/TeamCharacterSelector.tsx b/libs/sr/page-team/src/TeamCharacterSelector.tsx index 933afd118e..3633c13848 100644 --- a/libs/sr/page-team/src/TeamCharacterSelector.tsx +++ b/libs/sr/page-team/src/TeamCharacterSelector.tsx @@ -80,7 +80,7 @@ export function TeamCharacterSelector({ - {t`team.editNameDesc`} + {t('team.editNameDesc')} {!!team.description && ( @@ -117,7 +117,7 @@ export function TeamCharacterSelector({ setEditMode(false)}> } titleTypographyProps={{ variant: 'h6' }} action={ @@ -130,13 +130,13 @@ export function TeamCharacterSelector({ handleName(teamName)} autoFocus /> handleDesc(teamDesc)} multiline diff --git a/libs/sr/ui/src/Relic/RelicEditor/RelicRarityDropdown.tsx b/libs/sr/ui/src/Relic/RelicEditor/RelicRarityDropdown.tsx index 891b0948af..f40bb99285 100644 --- a/libs/sr/ui/src/Relic/RelicEditor/RelicRarityDropdown.tsx +++ b/libs/sr/ui/src/Relic/RelicEditor/RelicRarityDropdown.tsx @@ -23,7 +23,9 @@ export default function RelicRarityDropdown({ return ( : t`editor.rarity`} + title={ + rarity ? : t('editor.rarity') + } color={rarity ? 'success' : 'primary'} > {allRelicRarityKeys.map((rarity) => ( diff --git a/libs/sr/ui/src/Relic/RelicEditor/SubstatInput.tsx b/libs/sr/ui/src/Relic/RelicEditor/SubstatInput.tsx index 57715213cf..11abcb0c9c 100644 --- a/libs/sr/ui/src/Relic/RelicEditor/SubstatInput.tsx +++ b/libs/sr/ui/src/Relic/RelicEditor/SubstatInput.tsx @@ -69,7 +69,7 @@ export default function SubstatInput({ } const rollOffset = 7 - rollData.length - // if (!rollNum && key && value) error = error || t`editor.substat.error.noCalc` + // if (!rollNum && key && value) error = error || t('editor.substat.error.noCalc') if (allowedRolls < 0) error = error || @@ -106,7 +106,9 @@ export default function SubstatInput({ {key && ( setSubstat(index, { key: '', value: 0 })} - >{t`editor.substat.noSubstat`} + > + {t('editor.substat.noSubstat')} + )} {allRelicSubStatKeys .filter((key) => mainStatKey !== key) @@ -131,7 +133,7 @@ export default function SubstatInput({ > {!!rollData.length && ( - {t`editor.substat.nextRolls`} + {t('editor.substat.nextRolls')} )} {/* {rollData.map((v, i) => { let newValue = artDisplayValue(accurateValue + v, unit) @@ -193,7 +195,7 @@ export default function SubstatInput({ {error ? ( - {t`ui:error`} + {t('ui:error')} ) : ( {/* @@ -206,7 +208,7 @@ export default function SubstatInput({ > {rollNum ? t('editor.substat.RollCount', { count: rollNum }) - : t`editor.substat.noRoll`} + : t('editor.substat.noRoll')} */} @@ -241,7 +243,7 @@ export default function SubstatInput({ value={ efficiency ? efficiency - : (t`editor.substat.noStat` as string) + : (t('editor.substat.noStat') as string) } /> */} {efficiency} diff --git a/libs/sr/ui/src/Settings/DatabaseCard.tsx b/libs/sr/ui/src/Settings/DatabaseCard.tsx index 260f74a403..72c9dcc49c 100644 --- a/libs/sr/ui/src/Settings/DatabaseCard.tsx +++ b/libs/sr/ui/src/Settings/DatabaseCard.tsx @@ -27,7 +27,7 @@ export function DatabaseCard() { return ( - {t`DatabaseCard.title`} + {t('DatabaseCard.title')} @@ -140,19 +140,17 @@ function DataCard({ index }: { index: number }) { onKeyDown={onKeyDown} /> {!current && ( - + )} @@ -203,7 +201,7 @@ function DataCard({ index }: { index: number }) { startIcon={} onClick={onOpen} > - {t`DatabaseCard.button.upload`} + {t('DatabaseCard.button.upload')} @@ -213,7 +211,7 @@ function DataCard({ index }: { index: number }) { onClick={download} startIcon={} > - {t`DatabaseCard.button.download`} + {t('DatabaseCard.button.download')} @@ -224,7 +222,7 @@ function DataCard({ index }: { index: number }) { onClick={onDelete} startIcon={} > - {t`DatabaseCard.button.delete`} + {t('DatabaseCard.button.delete')} diff --git a/libs/sr/ui/src/Settings/UploadCard.tsx b/libs/sr/ui/src/Settings/UploadCard.tsx index 0a19d5cb06..0da6403fd8 100644 --- a/libs/sr/ui/src/Settings/UploadCard.tsx +++ b/libs/sr/ui/src/Settings/UploadCard.tsx @@ -123,7 +123,7 @@ export function UploadCard({ onChange={onUpload} /> @@ -149,8 +149,8 @@ export function UploadCard({ title={ {ignoreDups - ? t`uploadCard.tooltip.ignoreDup` - : t`uploadCard.tooltip.detectdup`} + ? t('uploadCard.tooltip.ignoreDup') + : t('uploadCard.tooltip.detectdup')} } placement="top" @@ -164,7 +164,7 @@ export function UploadCard({ onClick={() => setIgnoreDups(!ignoreDups)} startIcon={ignoreDups ? : } > - {t`uploadCard.buttons.detectDups`} + {t('uploadCard.buttons.detectDups')} @@ -172,8 +172,8 @@ export function UploadCard({ title={ {keepNotInImport - ? t`uploadCard.tooltip.keepNotInImport` - : t`uploadCard.tooltip.delNotInImport`} + ? t('uploadCard.tooltip.keepNotInImport') + : t('uploadCard.tooltip.delNotInImport')} } placement="top" @@ -189,7 +189,7 @@ export function UploadCard({ keepNotInImport ? : } > - {t`uploadCard.buttons.delNotInImport`} + {t('uploadCard.buttons.delNotInImport')}