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

chore: swap translated strings notation from template literal to function style #2535

Merged
merged 10 commits into from
Nov 9, 2024

Conversation

tiffanynwyeung
Copy link
Collaborator

@tiffanynwyeung tiffanynwyeung commented Nov 8, 2024

Describe your changes

As discussed in #2471 (comment), it'd be nice to have a consistent style used for translated strings in the codebase, and function notation was agreed upon. This PR converts all string instances using template literal notation to function notation across GO and SRO.

There's a lot of files so I tried to chunk it in the commits as much as possible.

Issue or discord link

#2471 (comment)

Testing/validation

Validated through manual checking of frontend and sr-frontend for the relevant strings. There should not be any changes visible to the frontend of either project.

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced localization consistency across various components by standardizing translation function calls from template literals to function calls.
  • Bug Fixes

    • Corrected translation function syntax in multiple components to ensure proper rendering of localized strings.
  • Chores

    • Updated numerous components to improve code maintainability and readability through consistent translation handling.

Copy link

coderabbitai bot commented Nov 8, 2024

Walkthrough

The changes in this pull request primarily focus on standardizing the syntax for translation function calls across various components in the codebase. The updates involve replacing template literal syntax (e.g., tkey``) with standard function call syntax (e.g., t('key')). This adjustment is applied consistently across multiple files and components, ensuring uniformity in how translations are accessed. The overall functionality and logic of the components remain unchanged, with no significant alterations to control flow or error handling.

Changes

File Path Change Summary
libs/gi/page-artifacts/src/DupModal.tsx Updated translation calls from template literals to function calls for CardHeader and Alert components.
libs/gi/page-artifacts/src/index.tsx Changed translation syntax for PageArtifact component props from template literals to function calls.
libs/gi/page-characters/src/index.tsx Updated button text translation calls from template literals to function calls.
libs/gi/page-home/src/InventoryCard.tsx Modified translation calls for UI element titles and labels from template literals to function calls.
libs/gi/page-home/src/QuickLinksCard.tsx Changed translation syntax for various titles from template literals to function calls.
libs/gi/page-home/src/TeamCard.tsx Updated title property for team members from template literals to function calls.
libs/gi/page-home/src/VidGuideCard.tsx Changed translation call syntax for the title from template literals to function calls.
libs/gi/page-home/src/index.tsx Updated translation syntax in PatchNotesCard from template literals to function calls.
libs/gi/page-settings/src/SillyCard.tsx Modified translation calls from template literals to function calls for title and toggle text.
libs/gi/page-team/src/BuildDropdown.tsx Updated translation syntax for dropdown titles and menu items from template literals to function calls.
libs/gi/page-team/src/CharProfileCard.tsx Changed translation call syntax for button label from template literals to function calls.
libs/gi/page-team/src/CharProfileCharEditor.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx Changed translation calls from template literals to function calls for various props.
libs/gi/page-team/src/CharacterDisplay/Build/BuildReal.tsx Updated translation syntax for various properties from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx Updated translation calls from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Content.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/CustomMultiTargetCard.tsx Updated translation syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/CustomMultiTargetImportBtn.tsx Changed translation calls from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx Updated translation calls from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/index.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/FormulaModal.tsx Updated title translation calls from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx Modified translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/StatModal.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/BonusStatsCard.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseTeammateArt.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/LevelFilter.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/UpgradeOptChartCard.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/index.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/LoadoutDropdown.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/TeamCharacterSelector.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/TeamSetting/TeamComponents.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/TeamSetting/TeamExportModal.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-team/src/TeamSetting/index.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-team/src/index.tsx Changed translation call syntax from template literals to function calls.
libs/gi/page-teams/src/index.tsx Updated translation call syntax from template literals to function calls.
libs/gi/page-weapons/src/WeaponFilter.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/EnemyEditor.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/HitModeEditor.tsx Changed translation call syntax for noReaction text from template literals to function calls.
libs/gi/ui/src/components/artifact/ArtifactCard.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/RVSlide.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/SetInclusionButton.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/editor/UploadExplainationModal.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/artifact/editor/index.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/build/BuildCard.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/build/BuildDisplayItem.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/build/EquipBuildModal.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/EquippedGrid.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/LocationAutocomplete.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/card/CharacterCardStats.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/editor/Content.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/editor/LoadoutCard.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/character/editor/RemoveLoadout.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/database/DatabaseCard.tsx Changed translation call syntax from template literals to function calls.
libs/gi/ui/src/components/database/UploadCard.tsx Updated translation call syntax from template literals to function calls.
libs/gi/ui/src/components/team/TeamDelModal.tsx Changed translation call syntax from template literals to function calls.

Possibly related PRs

  • [XS][1648] Add noWrap to team name display in TeamCharacterSelector #2518: This PR modifies the TeamCharacterSelector component to include a noWrap property for the team name display, which relates to the overall theme of improving text handling and display consistency in the UI, similar to the changes made in the main PR regarding translation string access.
  • fix: 🐛 fixed typography on localization #2527: This PR addresses typography issues in localization, specifically correcting a spelling error in the localization strings. While it does not directly relate to the translation method changes in the main PR, it is focused on improving the localization aspect of the application, which is a relevant area of concern.

Suggested reviewers

  • frzyc

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Nov 8, 2024

[sr-frontend] [Fri Nov 8 21:47:17 UTC 2024] - Deployed 01a2d8a to https://genshin-optimizer-prs.github.io/pr/2535/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Fri Nov 8 21:47:54 UTC 2024] - Deployed 01a2d8a to https://genshin-optimizer-prs.github.io/pr/2535/frontend (Takes 3-5 minutes after this completes to be available)

[Sat Nov 9 07:13:23 UTC 2024] - Deleted deployment

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (16)
libs/gi/page-settings/src/SillyCard.tsx (1)

43-44: LGTM with a minor formatting suggestion.

The translation calls have been correctly updated to function notation. Consider improving readability by aligning the ternary operator branches:

-              ? t('settings:sillyCard.toggle.enabled')
-              : t('settings:sillyCard.toggle.disabled')}
+            ? t('settings:sillyCard.toggle.enabled')
+            : t('settings:sillyCard.toggle.disabled')}
libs/gi/page-home/src/TeamCard.tsx (1)

110-110: Consider using type-safe translation keys.

While the translation function call is correct, consider using type-safe translation keys if your i18n setup supports it. This would help catch missing translations at compile time.

libs/gi/page-home/src/QuickLinksCard.tsx (1)

105-107: Consider adding explicit type annotation for destructured translation function

While the implementation is correct, consider adding explicit type annotation for better type safety:

- const { t } = useTranslation(['page_home', 'ui'])
+ const { t }: { t: TFunction } = useTranslation(['page_home', 'ui'])
libs/gi/page-teams/src/index.tsx (1)

72-72: Consider using template string interpolation for error message.

While the translation function calls are correct, the error message concatenation on line 75 could be improved by using template string interpolation within the translation.

Consider updating the error message handling:

-      window.alert(t('importForm.error.import') + `\n${e}`)
+      window.alert(t('importForm.error.import_with_message', { error: e }))

This assumes you add a new translation key importForm.error.import_with_message with appropriate interpolation in your translation files.

Also applies to: 75-75

libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx (1)

236-236: Consider removing unnecessary type casting

The translation is being cast to string using as string, which is unnecessary since the t function already returns a string.

-                        : (t('editor.substat.noStat') as string)
+                        : t('editor.substat.noStat')
libs/gi/ui/src/components/database/DatabaseCard.tsx (1)

158-159: Consider using translation parameters instead of string concatenation.

While the translation function calls are correct, using string concatenation with template literals for the database index could be replaced with translation parameters for better maintainability.

Consider refactoring to:

-              : `${t('DatabaseCard.title')} ${database.dbIndex}`
+              : t('DatabaseCard.titleWithIndex', { index: database.dbIndex })

This approach would require adding a new translation key with a parameter, but it would be more maintainable and allow for different word orders in different languages.

libs/gi/ui/src/components/EnemyEditor.tsx (1)

Line range hint 160-267: Consider adding validation for enemy resistance values

While the translation changes look good, consider adding validation for enemy resistance values to prevent invalid inputs. Currently, there's no explicit validation beyond what's provided by the StatInput component.

Consider adding validation before updating the database:

  onValueChange={(value) =>
+   if (value >= -100 && value <= 100) {
      database.teams.set(teamId, (team) => {
        team.enemyOverride[statKey] = value
      })
+   } else {
+     console.warn(`Invalid resistance value: ${value}. Value must be between -100 and 100.`)
+   }
  }
libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx (1)

Line range hint 274-298: Consider adding error handling for database operations

The BuildTcEditor component handles database operations in useEffect hooks but doesn't include error handling. Consider adding try-catch blocks to handle potential database errors gracefully.

Example implementation:

  useEffect(() => {
+   try {
      database.buildTcs.set(buildTcId, (build) => {
        build.name = nameDeferred
      })
+   } catch (error) {
+     console.error('Failed to update build name:', error);
+     // Consider showing a user-friendly error message
+   }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [database, nameDeferred])
libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx (1)

345-345: Consider adding namespace to translation key

While the translation call has been updated to function notation, the key 'noReaction' lacks a namespace prefix unlike other translations in this file (e.g., 'loadout:mTargetEditor.title'). Consider updating it for consistency.

-    t('noReaction')
+    t('loadout:mTargetEditor.noReaction')
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx (2)

274-276: Fix indentation while maintaining translation update

While the translation call has been correctly updated to use function notation, the indentation appears inconsistent with the surrounding code.

-              >
-                {t('tcGraph.showStatThr')}
-              </Button>
+            >
+              {t('tcGraph.showStatThr')}
+            </Button>

286-288: Fix indentation while maintaining translation update

While the translation call has been correctly updated to use function notation, the indentation appears inconsistent with the surrounding code.

-              >
-                {t('tcGraph.downloadData')}
-              </Button>
+            >
+              {t('tcGraph.downloadData')}
+            </Button>
libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx (1)

228-228: Use translation key for "Excluded" text

The text "Excluded" is hardcoded while other similar strings use translation keys.

Consider using the translation key:

-                {allowRainbow4 ? t('artSetConfig.allowed') : 'Excluded'}
+                {allowRainbow4 ? t('artSetConfig.allowed') : t('artSetConfig.excluded')}
libs/gi/ui/src/components/artifact/editor/index.tsx (4)

315-315: Remove unnecessary type assertions and consolidate duplicate code.

The explicit as string type assertions are unnecessary since the t function already returns a string. Additionally, the same translation key is used in multiple places.

Consider extracting the translation call into a constant:

+const clearPrompt = t('editor.clearPrompt')
-window.confirm(t('editor.clearPrompt') as string)
+window.confirm(clearPrompt)

Also applies to: 329-329


314-316: Optimize performance by memoizing the confirmation callback.

The canClearArtifact function is recreated on every render. Consider using useCallback to memoize it.

-const canClearArtifact = (): boolean =>
-  window.confirm(t('editor.clearPrompt') as string)
+const canClearArtifact = useCallback((): boolean => {
+  return window.confirm(t('editor.clearPrompt'))
+}, [t])

Line range hint 613-640: Enhance error handling for file uploads.

The file upload functionality lacks proper error handling for cases such as invalid file types or failed uploads.

Consider adding error handling:

 <InputInvis
   accept="image/*"
   id="contained-button-file"
   multiple
   type="file"
-  onChange={onUpload}
+  onChange={(e) => {
+    try {
+      onUpload(e)
+    } catch (error) {
+      console.error('Failed to upload file:', error)
+      // Show error message to user
+    }
+  }}
 />

870-875: Improve delete confirmation UX.

The current delete confirmation uses a basic browser confirm dialog. Consider using a more user-friendly approach with a Material-UI dialog.

Consider using Material-UI's Dialog component for a better user experience:

+const [showDeleteDialog, setShowDeleteDialog] = useState(false)
+
 <Button
   startIcon={<DeleteForeverIcon />}
-  onClick={() => {
-    if (!window.confirm(t('editor.confirmDelete'))) return
-    database.arts.remove(removeId)
-    reset()
-    if (!allowEmpty) setShow(false)
-  }}
+  onClick={() => setShowDeleteDialog(true)}
   disabled={!artifact || !isValid}
   color="error"
 >
   {t('editor.delete')}
 </Button>
+<Dialog
+  open={showDeleteDialog}
+  onClose={() => setShowDeleteDialog(false)}
+>
+  <DialogTitle>{t('editor.confirmDelete')}</DialogTitle>
+  <DialogActions>
+    <Button onClick={() => setShowDeleteDialog(false)}>
+      {t('common.cancel')}
+    </Button>
+    <Button
+      onClick={() => {
+        database.arts.remove(removeId)
+        reset()
+        if (!allowEmpty) setShow(false)
+        setShowDeleteDialog(false)
+      }}
+      color="error"
+      autoFocus
+    >
+      {t('common.delete')}
+    </Button>
+  </DialogActions>
+</Dialog>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 12298ec and 81d9b58.

📒 Files selected for processing (82)
  • libs/gi/page-artifacts/src/DupModal.tsx (2 hunks)
  • libs/gi/page-artifacts/src/index.tsx (2 hunks)
  • libs/gi/page-characters/src/index.tsx (1 hunks)
  • libs/gi/page-home/src/InventoryCard.tsx (7 hunks)
  • libs/gi/page-home/src/QuickLinksCard.tsx (3 hunks)
  • libs/gi/page-home/src/TeamCard.tsx (2 hunks)
  • libs/gi/page-home/src/VidGuideCard.tsx (1 hunks)
  • libs/gi/page-home/src/index.tsx (1 hunks)
  • libs/gi/page-settings/src/SillyCard.tsx (2 hunks)
  • libs/gi/page-team/src/BuildDropdown.tsx (3 hunks)
  • libs/gi/page-team/src/CharProfileCard.tsx (1 hunks)
  • libs/gi/page-team/src/CharProfileCharEditor.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Build/BuildReal.tsx (3 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx (5 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Content.tsx (3 hunks)
  • libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/CustomMultiTargetCard.tsx (6 hunks)
  • libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/CustomMultiTargetImportBtn.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx (3 hunks)
  • libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/index.tsx (3 hunks)
  • libs/gi/page-team/src/CharacterDisplay/FormulaModal.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx (6 hunks)
  • libs/gi/page-team/src/CharacterDisplay/StatModal.tsx (3 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx (9 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/BonusStatsCard.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx (4 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx (5 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseTeammateArt.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx (13 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx (2 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/LevelFilter.tsx (1 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/UpgradeOptChartCard.tsx (6 hunks)
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/index.tsx (2 hunks)
  • libs/gi/page-team/src/LoadoutDropdown.tsx (4 hunks)
  • libs/gi/page-team/src/TeamCharacterSelector.tsx (4 hunks)
  • libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx (1 hunks)
  • libs/gi/page-team/src/TeamSetting/TeamComponents.tsx (2 hunks)
  • libs/gi/page-team/src/TeamSetting/TeamExportModal.tsx (9 hunks)
  • libs/gi/page-team/src/TeamSetting/index.tsx (5 hunks)
  • libs/gi/page-team/src/index.tsx (1 hunks)
  • libs/gi/page-teams/src/index.tsx (5 hunks)
  • libs/gi/page-weapons/src/WeaponFilter.tsx (4 hunks)
  • libs/gi/ui/src/components/EnemyEditor.tsx (4 hunks)
  • libs/gi/ui/src/components/HitModeEditor.tsx (1 hunks)
  • libs/gi/ui/src/components/artifact/ArtifactCard.tsx (3 hunks)
  • libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx (3 hunks)
  • libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx (1 hunks)
  • libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx (1 hunks)
  • libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx (1 hunks)
  • libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx (2 hunks)
  • libs/gi/ui/src/components/artifact/RVSlide.tsx (1 hunks)
  • libs/gi/ui/src/components/artifact/SetInclusionButton.tsx (2 hunks)
  • libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx (7 hunks)
  • libs/gi/ui/src/components/artifact/editor/UploadExplainationModal.tsx (1 hunks)
  • libs/gi/ui/src/components/artifact/editor/index.tsx (14 hunks)
  • libs/gi/ui/src/components/build/BuildCard.tsx (5 hunks)
  • libs/gi/ui/src/components/build/BuildDisplayItem.tsx (11 hunks)
  • libs/gi/ui/src/components/build/EquipBuildModal.tsx (3 hunks)
  • libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx (1 hunks)
  • libs/gi/ui/src/components/character/EquippedGrid.tsx (3 hunks)
  • libs/gi/ui/src/components/character/LocationAutocomplete.tsx (1 hunks)
  • libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx (1 hunks)
  • libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx (1 hunks)
  • libs/gi/ui/src/components/character/card/CharacterCardStats.tsx (1 hunks)
  • libs/gi/ui/src/components/character/editor/Content.tsx (1 hunks)
  • libs/gi/ui/src/components/character/editor/LoadoutCard.tsx (1 hunks)
  • libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx (10 hunks)
  • libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx (1 hunks)
  • libs/gi/ui/src/components/character/editor/RemoveLoadout.tsx (5 hunks)
  • libs/gi/ui/src/components/database/DatabaseCard.tsx (5 hunks)
  • libs/gi/ui/src/components/database/UploadCard.tsx (4 hunks)
  • libs/gi/ui/src/components/team/TeamDelModal.tsx (3 hunks)
⛔ Files not processed due to max files limit (9)
  • libs/gi/ui/src/components/weapon/WeaponCard.tsx
  • libs/gi/ui/src/components/weapon/WeaponSwapModal.tsx
  • libs/sr/page-team/src/Optimize/GeneratedBuildsDisplay.tsx
  • libs/sr/page-team/src/Optimize/StatFilterCard.tsx
  • libs/sr/page-team/src/TeamCharacterSelector.tsx
  • libs/sr/ui/src/Relic/RelicEditor/RelicRarityDropdown.tsx
  • libs/sr/ui/src/Relic/RelicEditor/SubstatInput.tsx
  • libs/sr/ui/src/Settings/DatabaseCard.tsx
  • libs/sr/ui/src/Settings/UploadCard.tsx
✅ Files skipped from review due to trivial changes (27)
  • libs/gi/page-team/src/CharacterDisplay/Build/BuildReal.tsx
  • libs/gi/page-team/src/CharacterDisplay/CompareBtn.tsx
  • libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/CustomMultiTargetImportBtn.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/CustomTooltip.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ExcludeArt.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/MainStatSelectionCard.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/StatFilterCard.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/TargetSelectorModal.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseEquipped.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTalent.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactAllSubstatEditor.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactSubCard/ArtifactSubstatEditor.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/index.tsx
  • libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/index.tsx
  • libs/gi/page-team/src/TeamSetting/TeamComponents.tsx
  • libs/gi/page-team/src/TeamSetting/index.tsx
  • libs/gi/page-weapons/src/WeaponFilter.tsx
  • libs/gi/ui/src/components/HitModeEditor.tsx
  • libs/gi/ui/src/components/artifact/ArtifactFilterDisplay.tsx
  • libs/gi/ui/src/components/artifact/ArtifactLevelSlider.tsx
  • libs/gi/ui/src/components/artifact/ArtifactRarityDropdown.tsx
  • libs/gi/ui/src/components/artifact/ArtifactSlotDropdown.tsx
  • libs/gi/ui/src/components/artifact/RVSlide.tsx
  • libs/gi/ui/src/components/artifact/SetInclusionButton.tsx
  • libs/gi/ui/src/components/character/CharacterMultiAutocomplete.tsx
  • libs/gi/ui/src/components/character/LocationAutocomplete.tsx
  • libs/gi/ui/src/components/character/editor/Content.tsx
🔇 Additional comments (168)
libs/gi/ui/src/components/character/card/CharacterCardStats.tsx (1)

23-23: LGTM! Translation syntax updated correctly.

The change from template literal to function call syntax for the translation of 'specialized' aligns with the PR's standardization objective.

Let's verify the consistent usage of this translation key across the codebase:

✅ Verification successful

Translation key 'specialized' appears to be used consistently

The verification confirms:

  • No template literal syntax (t\specialized``) found in the codebase
  • Single usage of t('specialized') in CharacterCardStats.tsx, which is the file being reviewed
  • The change aligns with the standardization effort and maintains consistency
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining template literal translation calls for 'specialized'
# and verify the translation key usage

# Test 1: Search for any remaining template literal usage
echo "Checking for remaining template literal translations..."
rg "t\`specialized\`"

# Test 2: Verify consistent usage of the 'specialized' translation key
echo "Verifying translation key usage..."
rg "t\('specialized'\)"

Length of output: 365

libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/BonusStatsCard.tsx (1)

28-30: LGTM! Translation syntax updated correctly.

The change from template literal to function call notation for translations aligns with the PR objectives and maintains consistent styling across the codebase.

Let's verify the translation key exists:

✅ Verification successful

Let me gather more information to verify if the translation key might be present in a different format or location.


The search results show that the translation key 'bonusStats.title' exists in multiple translation files across different languages in the codebase:

  1. English: libs/gi/localization/assets/locales/en/page_character_optimize.json
  2. Chinese Traditional: libs/gi/localization/assets/locales/cht/page_character_optimize.json
  3. French: libs/gi/localization/assets/locales/fr/page_character_optimize.json
  4. Portuguese: libs/gi/localization/assets/locales/pt/page_character_optimize.json
  5. Japanese: libs/gi/localization/assets/locales/ja/page_character_optimize.json
  6. Chinese Simplified: libs/gi/localization/assets/locales/chs/page_character_optimize.json

Translation key exists and is properly used.

The translation key 'bonusStats.title' is correctly implemented across multiple language files in the expected location for the page_character_optimize translations. The change to use the translation function is consistent with the codebase standards.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the translation key exists in the translation files
# Expected: Find occurrences of the 'bonusStats.title' key in translation files

# Search for the translation key in JSON/YAML/TS files
rg -t json -t yaml -t ts '"bonusStats.title"' || echo "Warning: Translation key not found"

Length of output: 126


Script:

#!/bin/bash
# Search for variations of the translation key
rg -t json -t yaml -t ts "bonusStats" -A 2 -B 2

# Also check for any translation files specifically
fd "translation|i18n|locale" -e json -e yaml -e ts

Length of output: 34418

libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/LevelFilter.tsx (2)

27-29: LGTM: Translation call properly updated in Typography component

The conversion from template literal to function call syntax for the translation is correct and aligns with the standardization effort.


31-31: LGTM: Translation call properly updated in Tooltip component

The translation call in the Tooltip's title prop has been correctly updated to use the function call syntax.

libs/gi/page-home/src/VidGuideCard.tsx (1)

30-32: LGTM! Translation syntax successfully standardized.

The change from template literal to function call style for the translation is correctly implemented and aligns with the PR's standardization objectives.

libs/gi/ui/src/components/character/editor/LoadoutCard.tsx (1)

75-75: LGTM! Translation syntax successfully standardized.

The change from template literal to function call notation for the translation key follows the agreed-upon convention and maintains the same functionality.

libs/gi/page-settings/src/SillyCard.tsx (2)

25-25: LGTM! Translation call updated to function notation.

The change follows the agreed-upon standard for translation calls.


25-25: Verify translation keys exist in locale files.

Let's ensure the translation keys are properly defined in the locale files to prevent any runtime issues.

Also applies to: 43-44

✅ Verification successful

Translation keys are properly defined in locale files

All required translation keys are present and properly defined:

  • sillyPageTitle exists in the UI namespace across all language files
  • sillyCard.toggle.enabled and sillyCard.toggle.disabled exist in the settings namespace for all supported languages
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the translation keys exist in the locale files

# Search for the translation keys in the locale files
echo "Checking for translation keys..."
rg -g "*.json" "sillyPageTitle" 
rg -g "*.json" "sillyCard\.toggle\.enabled"
rg -g "*.json" "sillyCard\.toggle\.disabled"

Length of output: 1297


Script:

#!/bin/bash
# Let's check for the toggle translations in a different way since the escaped dots might be causing issues
echo "Checking for sillyCard toggle translations..."
rg -g "*.json" "sillyCard" -A 5 -B 5

Length of output: 11975

libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx (2)

80-80: LGTM! Translation call updated to function style.

The change from template literal to function call syntax for the translation is correct and aligns with the PR objectives.


Line range hint 1-91: Verify other translation calls in this file.

Let's verify that no other translation calls using template literal syntax were missed in this file.

✅ Verification successful

No template literal translation calls found in this file

The file only contains one standard translation call using parentheses syntax: t('tcBuild'), and it's already using the correct format. No template literal syntax (t\...``) is used for translations in this file.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining template literal translation calls in this file
# Pattern: Looking for backtick usage with 't' prefix

rg "t\`" "libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx"

# Also search for other translation function calls to ensure consistency
rg "useTranslation|[^a-zA-Z]t\(" "libs/gi/ui/src/components/character/card/CharacterCardEquipmentRow.tsx"

Length of output: 325

libs/gi/page-team/src/BuildDropdown.tsx (1)

33-33: LGTM! Translation function calls successfully standardized.

The changes consistently convert template literal notation to function call notation for translations, aligning with the PR's objective to standardize translation string handling across the codebase.

Also applies to: 44-44, 74-74

libs/gi/page-team/src/CharacterDisplay/Build/BuildEquipped.tsx (3)

30-30: LGTM: Translation key follows the new standard

The translation key follows the new function call notation and maintains a clear hierarchical structure.


45-46: LGTM: Translation keys maintain consistency

Both translation keys follow the new function call notation and maintain consistent naming hierarchy with related translations.


52-52: LGTM: Translation key properly standardized

The BuildCard name translation follows the new function call notation.

Let's verify the translation key usage across the codebase:

✅ Verification successful

Translation key properly standardized and verified

The translation key 'buildEqCard.name' is:

  • Correctly defined in the localization file at libs/common/localization/assets/locales/en/build.json
  • Consistently used with the new function call notation t('buildEqCard.name') throughout the codebase
  • No legacy template literal syntax found
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining template literal usage of this translation key
rg "t\`buildEqCard\.name\`" 

# Verify consistent usage of the new function style
rg "t\('buildEqCard\.name'\)" 

Length of output: 163


Script:

#!/bin/bash
# Search for any usage of buildEqCard translation key to ensure consistency
rg "buildEqCard" -A 2 -B 2

# Search for translation files to verify key definition
fd "translation|i18n|locale" --type f --exec rg "buildEqCard"

Length of output: 1928

libs/gi/page-team/src/CharProfileCard.tsx (1)

41-41: LGTM! Translation call successfully standardized.

The template literal notation has been correctly converted to the function call style, aligning with the PR's objective to establish consistent translation string notation across the codebase.

libs/gi/ui/src/components/character/editor/LoadoutHeaderContent.tsx (4)

51-53: LGTM: Translation call properly standardized

The translation function call has been correctly updated to use the function notation while maintaining the proper JSX structure.


58-60: LGTM: Consistent translation update

The translation function call has been standardized in a manner consistent with other changes.


65-67: LGTM: Translation standardization maintained

The translation function call has been updated consistently with the established pattern.


73-73: LGTM: Translation properly standardized

The translation function call has been correctly updated while maintaining the conditional rendering structure.

libs/gi/page-team/src/TeamSetting/ResonanceDisplay.tsx (1)

54-54: LGTM! Translation syntax updated as per standard.

The change from template literal to function call syntax aligns with the project's standardization goals discussed in PR #2471.

Let's verify the translation key usage across the codebase:

libs/gi/ui/src/components/character/LocationFilterMultiAutocomplete.tsx (1)

114-114: LGTM! Translation call format is consistent.

The change from template literal to function call syntax for the translation is correct and aligns with the PR objectives. The translation key format 'artifact:filterLocation.location' follows the established namespacing pattern used elsewhere in the file.

Let's verify the consistency of translation call patterns in related files:

libs/gi/page-artifacts/src/DupModal.tsx (3)

41-41: LGTM: Translation syntax updated correctly

The template literal syntax has been properly converted to function call syntax, maintaining consistency with the project's standardization goals.


114-116: LGTM: Alert translation updated correctly

The translation syntax has been properly updated while maintaining the Alert component's structure and functionality.


Line range hint 1-116: Verify all translation instances have been updated

The changes look good, but let's verify that we haven't missed any other translation calls in this file that need to be updated to the new function call syntax.

✅ Verification successful

All translation calls are properly implemented

The verification shows that all translation calls in the file are using the correct function call syntax t('key'). There are only two translation keys used in this file:

  • t('showDup')
  • t('noDupAlert')

Both are properly implemented using the function call syntax, and there are no template literal translations remaining.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining template literal translation patterns in the file
rg "t\`[^`]+\`" "libs/gi/page-artifacts/src/DupModal.tsx"

# Also search for other translation function calls to ensure consistency
rg "t\('[^']+'\)" "libs/gi/page-artifacts/src/DupModal.tsx"

Length of output: 93


Script:

#!/bin/bash
# Search for any translation patterns in the file
rg -A 1 "useTranslation" "libs/gi/page-artifacts/src/DupModal.tsx"

# Search for all t() function calls
rg "t\(" "libs/gi/page-artifacts/src/DupModal.tsx"

Length of output: 835

libs/gi/page-home/src/index.tsx (2)

117-119: LGTM! Translation syntax updated correctly.

The change from template literal to function call syntax aligns with the PR objective of standardizing translation calls.


117-119: Verify translation key organization.

The translation key 'quickLinksCard.buttons.patchNotes.title' appears to be under the namespace of a different component. Consider organizing translation keys to match the component hierarchy.

Let's verify the translation key usage:

✅ Verification successful

Translation key organization is correct

The translation key 'quickLinksCard.buttons.patchNotes.title' is correctly organized as it is used within both the QuickLinksCard component (for the quick links section) and the PatchNotesCard component (which is related to the same feature). The key follows a logical hierarchy matching the component structure where both components share the same functionality for patch notes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for translation key usage and organization

# Search for the translation key usage
echo "Searching for translation key usage..."
rg "quickLinksCard\.buttons\.patchNotes\.title"

# Search for translation files to verify key organization
echo "Checking translation files..."
fd -e json -e yaml ".*translations.*" --exec grep -l "quickLinksCard"

Length of output: 482


Script:

#!/bin/bash
# Let's check the component structure and usage

# Check QuickLinksCard component content
echo "Checking QuickLinksCard component..."
cat libs/gi/page-home/src/QuickLinksCard.tsx

# Check index.tsx to understand the component hierarchy
echo -e "\nChecking index.tsx..."
cat libs/gi/page-home/src/index.tsx

Length of output: 9709

libs/gi/ui/src/components/build/BuildCard.tsx (1)

91-91: LGTM! Translation calls updated consistently.

The changes align with the PR objective of standardizing translation function calls from template literals to function notation. The translation keys follow a consistent pattern (buildCardTip.xyz) across all action tooltips.

Let's verify the translation key pattern consistency:

Also applies to: 107-107, 121-121, 135-135, 149-149

✅ Verification successful

Translation keys are properly defined and consistently used

The verification confirms that:

  • All buildCardTip translation keys used in the component (edit, copyTc, duplicate, equip, delete) are properly defined in the translation file at libs/common/localization/assets/locales/en/build.json
  • The keys follow a consistent naming pattern under the buildCardTip namespace
  • The translations are properly organized and structured in the JSON file
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the translation key pattern for buildCardTip
# Expected: All buildCardTip keys should follow the same pattern

# Search for buildCardTip usage across the codebase
rg "buildCardTip\." --type ts --type tsx

Length of output: 70


Script:

#!/bin/bash
# Let's try a different approach to search for buildCardTip translations
# First, let's find all translation files and then search for buildCardTip

# Search in all files (without file type restriction) as translation keys
# could be in various places
rg "buildCardTip" -A 2 -B 2

# Also search specifically in the BuildCard component to see all usages
rg "buildCardTip" "libs/gi/ui/src/components/build/BuildCard.tsx" -A 2 -B 2

Length of output: 3234


Script:

#!/bin/bash
# Let's check the translation file content to verify all buildCardTip keys
cat libs/common/localization/assets/locales/en/build.json

Length of output: 2295

libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/UseTeammateArt.tsx (3)

97-99: LGTM! Translation call properly updated

The conversion from template literal to function call notation for the 'tcBadge' translation is correct and aligns with the PR objectives.


127-127: LGTM! Translation call properly updated

The conversion from template literal to function call notation for the 'useTeamArts' translation is correct and aligns with the PR objectives.


97-99: Verify translation key usage across the codebase

Let's verify the consistent usage of these translation keys and ensure no conflicts exist.

Also applies to: 127-127

✅ Verification successful

Translation keys are used consistently across the codebase

The translation key 'tcBadge' is used consistently across multiple components with proper translation files in place:

  • Found in translation files: libs/common/localization/assets/locales/en/build.json, libs/gi/localization/assets/locales/en/page_team.json, and libs/gi/localization/assets/locales/en/page_character_optimize.json
  • Used consistently in components with the same pattern t('tcBadge') or with appropriate namespacing like t('buildDropdown.tcBadge')

The 'useTeamArts' key is also properly defined in libs/gi/localization/assets/locales/en/page_character_optimize.json and used correctly in the component.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent usage of translation keys and potential conflicts

# Search for all occurrences of these specific translation keys
echo "Checking usage of 'tcBadge' translation key:"
rg "tcBadge" --type ts --type tsx -A 2 -B 2

echo -e "\nChecking usage of 'useTeamArts' translation key:"
rg "useTeamArts" --type ts --type tsx -A 2 -B 2

# Look for any remaining template literal style translations
echo -e "\nChecking for any remaining template literal style translations:"
rg "t\`[^`]*\`" --type ts --type tsx

Length of output: 609


Script:

#!/bin/bash
# Let's try a different approach using ripgrep with correct file type specifications

# Search for all occurrences of these specific translation keys
echo "Checking usage of 'tcBadge' translation key:"
rg "tcBadge" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts -A 2 -B 2

echo -e "\nChecking usage of 'useTeamArts' translation key:"
rg "useTeamArts" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts -A 2 -B 2

# Look for translation files that might contain these keys
echo -e "\nChecking translation files for these keys:"
fd -e json -e yaml -e yml | xargs rg "tcBadge|useTeamArts"

# Look for any remaining template literal style translations
echo -e "\nChecking for any remaining template literal style translations:"
rg "t\`[^']*\`" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts

Length of output: 9459

libs/gi/page-home/src/TeamCard.tsx (2)

29-29: LGTM! Translation function calls are consistently updated.

The conversion from template literals to function calls for team member titles is implemented correctly and consistently across all team members.

Also applies to: 36-36, 43-43, 50-50, 57-57, 64-64, 71-71, 78-78, 85-85, 92-92, 99-99


Line range hint 29-110: Verify translation key definitions.

Let's verify that all translation keys used in this file are properly defined in the translation files.

✅ Verification successful

All translation keys are properly defined and used correctly

The verification confirms that:

  1. All teamCard.jobTitle.* keys used in TeamCard.tsx are properly defined in the English translation file (page_home.json)
  2. The translation namespace ('page_home') is correctly imported in the component
  3. The translation keys are used consistently throughout the component
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for translation key definitions in translation files
echo "Searching for teamCard translation keys..."
rg "teamCard" "libs/gi/page-home/src/locales/"

# Verify no template literal translation syntax remains
echo "Checking for any remaining template literal translations..."
rg "t\`[^`]*\`" "libs/gi/page-home/src/"

Length of output: 433


Script:

#!/bin/bash
# First, let's find the correct location of translation files
echo "Finding translation files..."
fd "en.json|en-US.json" --type f

# Then search for teamCard related translations
echo "Searching for teamCard translations in found files..."
fd "en.json|en-US.json" --type f --exec rg "teamCard" {}

# Also check the import statement to see which translation files are actually used
echo "Checking translation imports in TeamCard.tsx..."
rg "useTranslation|import.*translation" "libs/gi/page-home/src/TeamCard.tsx"

# Look for any other files that might be using these translation keys
echo "Finding other files using teamCard translations..."
rg "teamCard\.jobTitle\." --type ts

Length of output: 20955


Script:

#!/bin/bash
# Let's find the actual translation files for page_home namespace
echo "Finding page_home translation files..."
fd "page_home.json" --type f

# Search for teamCard translations in these files
echo "Searching for teamCard translations in page_home files..."
fd "page_home.json" --type f --exec rg "teamCard" {}

# Check the actual translation import in TeamCard.tsx
echo "Checking translation setup in TeamCard.tsx..."
rg "useTranslation|import.*i18n" "libs/gi/page-home/src/TeamCard.tsx" -A 2

Length of output: 1505


Script:

#!/bin/bash
# Let's check the content of the English page_home translation file
echo "=== English page_home translations ==="
cat "libs/gi/localization/assets/locales/en/page_home.json"

# Let's also verify the specific teamCard.jobTitle usage
echo -e "\n=== TeamCard jobTitle usage ==="
rg "teamCard\.jobTitle\." "libs/gi/page-home/src/TeamCard.tsx" -A 1 -B 1

Length of output: 2818

libs/gi/page-team/src/LoadoutDropdown.tsx (5)

74-75: LGTM: TextField labels properly converted to function style

The translation calls for TextField labels and placeholders have been correctly converted to the new function style notation.

Also applies to: 81-81


89-89: LGTM: Modal button texts properly converted

The translation calls for modal buttons have been correctly converted to function style notation while maintaining their functionality.

Also applies to: 97-97


118-118: LGTM: Dropdown label properly converted

The translation call for the dropdown label has been correctly converted to function style notation while preserving the layout structure.


128-128: LGTM: Menu items and badges properly converted with count parameters

The translation calls for menu items and badges have been correctly converted to function style notation. The count parameters are properly passed in the new format, maintaining the dynamic content functionality.

Also applies to: 144-144, 147-147, 152-152


Line range hint 74-152: Verify translation keys exist

While the conversion to function style is correct, let's verify that all translation keys exist in the translation files to prevent any runtime issues.

libs/gi/page-team/src/CharacterDisplay/FormulaModal.tsx (1)

58-58: LGTM! Translation string notation updated correctly.

The change from template literal to function call notation aligns with the team's standardization effort.

Let's verify the translation key usage across the codebase:

✅ Verification successful

Let me verify the translation key usage in the translation files to ensure it's properly defined.


Let me check the specific translation key in the found translation file.


Translation key exists and is properly defined

The change from template literal to function call notation is correct, and the translation key 'showFormulas.title' is properly defined in the localization file with the value "Formulas & Calculations". No template literal usages remain in the codebase for this key.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of the translation key and ensure no template literals remain
# for this specific translation string.

# Test 1: Check for any remaining template literal usage of this key
rg "t\`showFormulas\.title\`"

# Test 2: Verify the translation key exists and is used consistently
rg "showFormulas\.title"

Length of output: 154


Script:

#!/bin/bash
# Search for the translation key in translation files
fd -e json -e yaml -e yml . | xargs rg "showFormulas" -A 1

Length of output: 229


Script:

#!/bin/bash
# Check the content of the translation file focusing on showFormulas section
cat libs/common/localization/assets/locales/en/loadout.json | jq '.showFormulas'

Length of output: 158

libs/gi/ui/src/components/team/TeamDelModal.tsx (4)

83-83: LGTM! Translation call updated to function style.

The change from template literal to function call style is consistent with the PR objectives.


126-126: LGTM! Translation call updated to function style.

The change from template literal to function call style is consistent with the PR objectives.


170-171: LGTM! Translation calls updated to function style with proper parameter handling.

The changes from template literals to function calls are consistent with the PR objectives. The parameter interpolation for the count is correctly implemented in the multi-team case.


83-83: Verify translation keys exist in locale files.

Let's ensure all the new translation keys are properly defined in the translation files:

  • teamDelModal.teamName
  • teamDelModal.delBtn
  • teamDelModal.onlyCrrTeam
  • teamDelModal.usingMltTeams

Also applies to: 126-126, 170-171

✅ Verification successful

Translation keys are properly defined in locale files

All the translation keys mentioned in the review are correctly defined in libs/gi/localization/assets/locales/en/page_team.json:

  • teamDelModal.teamName
  • teamDelModal.delBtn
  • teamDelModal.onlyCrrTeam
  • teamDelModal.usingMltTeams
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the translation keys exist in the locale files

# Test: Search for the translation keys in locale files
echo "Searching for translation keys in locale files..."
rg --type json "teamDelModal\.(teamName|delBtn|onlyCrrTeam|usingMltTeams)"

Length of output: 185


Script:

#!/bin/bash
# Let's first find all locale/translation files
echo "Finding translation files..."
fd -e json -e yaml locale
fd -e json -e yaml translation
fd -e json -e yaml i18n

# Then let's examine their content
echo -e "\nChecking content of translation files..."
for file in $(fd -e json -e yaml "locale|translation|i18n"); do
  echo -e "\n=== Content of $file ==="
  cat "$file"
done

Length of output: 298


Script:

#!/bin/bash
# Let's try a broader search for any JSON/YAML files that might contain these translations
echo "Searching for files containing 'teamDelModal'..."
rg -l "teamDelModal"

echo -e "\nSearching for translation-related imports..."
ast-grep --pattern 'import { $_ } from "$_/i18n"'
ast-grep --pattern 'import { $_ } from "$_/locale"'
ast-grep --pattern 'import { $_ } from "$_/translations"'

echo -e "\nLooking for translation setup or configuration..."
fd -e ts -e js -e json -e yaml . | xargs rg -l "i18n|translations|locale" 

Length of output: 2379


Script:

#!/bin/bash
# Let's examine the content of the locale file we found
echo "=== Content of page_team.json ==="
cat "libs/gi/localization/assets/locales/en/page_team.json"

# Also check for other language files in the same directory
echo -e "\n=== Looking for other language files ==="
ls -la libs/gi/localization/assets/locales/*/page_team.json

Length of output: 3844

libs/gi/page-home/src/QuickLinksCard.tsx (3)

43-48: LGTM: Translation calls properly standardized

The translation calls have been correctly updated to use function notation with proper TypeScript typing and hierarchical key structure.


79-94: LGTM: Consistent translation implementation

The translation calls in the other_links array maintain consistency with the established pattern and proper typing.


Line range hint 43-107: Verify translation key existence

Let's verify that all the translation keys used in this file exist in the translation files to prevent potential runtime issues.

libs/gi/page-team/src/CharProfileCharEditor.tsx (1)

106-106: LGTM! Translation style updated as per PR objectives.

The change from template literal to function notation aligns with the standardization effort discussed in PR #2471.

Let's verify the consistency of this translation key usage:

✅ Verification successful

Translation key usage is consistent and properly migrated

The verification confirms:

  • No template literal usage (t\buildTcCharOverride`) exists in the codebase
  • The translation key is used consistently in two places within the same component:
    • As buildTcCharOverride.tip with Trans component
    • As buildTcCharOverride.btn with t function
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining template literal translation calls and verify key existence
# Test 1: Search for any remaining template literal translation calls
rg "t\`buildTcCharOverride" 

# Test 2: Verify the translation key is consistently used
rg "'buildTcCharOverride" -A 2

Length of output: 669

libs/gi/page-artifacts/src/index.tsx (4)

142-142: LGTM: Translation function style updated correctly.

The template literal syntax has been properly converted to function call style while maintaining the same translation key.


179-181: LGTM: Translation function style updated correctly for Add New button.

The template literal syntax has been properly converted to function call style while maintaining the same translation key and button presentation.


189-191: LGTM: Translation function style updated correctly for Show Duplicates button.

The template literal syntax has been properly converted to function call style while maintaining the same translation key and button presentation.


142-142: Verify translation keys and syntax consistency.

Let's verify that the translation keys exist and that no template literal translation syntax remains in related files.

Also applies to: 179-181, 189-191

libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx (5)

115-115: LGTM: Translation call follows the new standard.

The translation function call follows the new function-style notation and uses a well-structured key.


131-131: LGTM: Translation calls are consistent.

Both translation function calls follow the new standard and maintain consistent namespace usage.

Also applies to: 138-138


159-159: LGTM: Translation calls maintain consistency across sections.

The translation function calls follow the new standard and maintain parallel structure with the regular builds section.

Also applies to: 168-168


227-227: LGTM: Translation call is appropriate.

The translation function call follows the new standard and uses the correct namespace.


206-206: Verify the translation namespace.

While the translation call follows the new function-style notation, it uses the 'page_character' namespace instead of 'loadoutSettings'. Please verify if this is intentional.

✅ Verification successful

Translation namespace usage is correct

The translation key addStats.title is correctly used with the page_character namespace in the DetailStatButton component. This is consistent with the component's purpose of displaying character-specific stats, and the same namespace and key combination is also used in the related StatModal component. No changes are needed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other usages of the 'addStats.title' translation key
rg "addStats\.title" --type ts --type tsx

Length of output: 71


Script:

#!/bin/bash
# Search for other usages of the 'addStats.title' translation key with correct file type
rg "addStats\.title"

# Also search for translation namespace declarations to understand the context
rg "useTranslation\(['\"].*['\"]\)" -A 1

Length of output: 36216


Script:

#!/bin/bash
# Search for translation namespace declarations in the specific file
rg -A 3 "useTranslation" libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx

# Search for the file content to understand the context
cat libs/gi/page-team/src/CharacterDisplay/LoadoutSettingElement.tsx

Length of output: 7864

libs/gi/page-team/src/CharacterDisplay/StatModal.tsx (5)

60-60: LGTM: Translation function call updated correctly.

The template literal to function call conversion is properly implemented for the modal title translation.


218-218: LGTM: Translation function call updated correctly.

The template literal to function call conversion is properly implemented for the main stats card title.


248-248: LGTM: Translation function call updated correctly.

The template literal to function call conversion is properly implemented for the other stats card title.


254-254: LGTM: Translation function call updated correctly.

The template literal to function call conversion is properly implemented for the misc stats card title.


60-60: Verify translation key consistency.

Let's verify that the translation keys are defined and used consistently across the codebase.

Also applies to: 218-218, 248-248, 254-254

✅ Verification successful

Let me verify the content of the translation files to ensure the specific keys being used are properly defined.


Translation keys are properly defined and used consistently

The verification shows that:

  • All addStats translation keys used in the code (title, main, other, misc) are properly defined in the English base translation file (libs/gi/localization/assets/locales/en/page_character.json).
  • The addStats namespace exists across all language files.
  • The usage in StatModal.tsx and LoadoutSettingElement.tsx aligns with the defined translation structure.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for the existence and usage of translation keys
# Look for translation files and verify the keys exist
rg -g "*.json" -g "*.yaml" -g "*.yml" '"addStats"' 

# Look for other usages of these translation keys
rg "addStats\.(title|main|other|misc)"

Length of output: 2008


Script:

#!/bin/bash
# Check the content of the English translation file which serves as the base
cat "libs/gi/localization/assets/locales/en/page_character.json"

# Also check a few other translation files to verify consistency
echo "=== Russian translation ==="
cat "libs/gi/localization/assets/locales/ru/page_character.json"

echo "=== German translation ==="
cat "libs/gi/localization/assets/locales/de/page_character.json"

Length of output: 7697

libs/gi/ui/src/components/character/editor/RemoveLoadout.tsx (6)

83-88: LGTM: Translation notation updated correctly

The conversion from template literal to function call notation is consistent with the PR objectives.


118-118: LGTM: TC builds translation updated correctly

The translation notation change is consistent with the standardization effort.


148-148: LGTM: Multi-targets translation updated correctly

The translation notation change maintains consistency with the new standard.


177-188: LGTM: Stats and configuration translations updated correctly

Multiple translation calls have been updated consistently to the new function call notation.


Line range hint 195-234: LGTM: Team affects and button translations updated correctly

The final set of translation notation changes maintains consistency throughout the component, including action buttons.


Line range hint 1-238: Overall implementation looks great!

All translation calls have been successfully converted from template literal notation to function call notation, maintaining consistency throughout the component. The changes are purely syntactic and don't affect the component's functionality.

libs/gi/page-team/src/TeamCharacterSelector.tsx (5)

136-136: LGTM: Translation syntax updated correctly

The template literal to function call conversion follows the agreed-upon style change.


167-167: LGTM: Translation syntax updated correctly

The template literal to function call conversion is consistent with the new style guidelines.


180-186: LGTM: Translation syntax updated correctly for form fields

The template literal to function call conversion is properly applied to both text field labels.


206-206: LGTM: Translation syntax updated correctly

The template literal to function call conversion follows the standardized approach for tab labels.


Line range hint 136-206: Verify translation keys exist in locale files

Let's ensure all translation keys used in this component are properly defined in the translation files.

libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/index.tsx (4)

157-157: LGTM: Translation call updated to function style.

The translation call has been properly updated to use function notation, maintaining consistency with the project's standardization efforts.


174-174: LGTM: Modal title translation updated consistently.

The translation call has been standardized to function style, and it appropriately reuses the same translation key as the button for consistency.


224-226: LGTM: Add button translation updated to function style.

The translation call has been properly updated to use function notation, maintaining consistency with the project's standardization efforts.


157-157: Verify translation keys exist in the translation files.

Let's verify that all the translation keys used in this component exist in the translation files to prevent any missing translations:

  • 'multiTarget.title'
  • 'multiTarget.info1'
  • 'multiTarget.info2'
  • 'multiTarget.addNewMTarget'

Also applies to: 174-174, 225-225

libs/gi/page-teams/src/index.tsx (1)

157-157: LGTM! Translation function calls are properly standardized.

The conversion from template literals to function calls for all UI text translations is consistent and well-implemented. The component correctly loads all required translation namespaces and applies translations to all user-facing strings.

Also applies to: 181-181, 185-185, 190-190, 193-194, 205-205, 216-216

libs/gi/ui/src/components/artifact/editor/SubstatInput.tsx (6)

74-75: LGTM: Error message translation properly converted to function style

The template literal syntax has been correctly converted to function call style while maintaining the same error message key.


112-114: LGTM: Dropdown text translation properly converted

The "no substat" option translation has been correctly converted to function call style.


145-145: LGTM: Placeholder translation properly converted

The input placeholder translation has been correctly converted to function call style.


155-155: LGTM: Button text translation properly converted

The "next rolls" button text translation has been correctly converted to function call style.


189-189: LGTM: Error badge translation properly converted

The error badge text translation has been correctly converted to function call style, maintaining the 'ui' namespace.


202-202: LGTM: Roll count translation properly converted

The roll count text translation has been correctly converted to function call style, maintaining the count parameter for pluralization.

libs/gi/ui/src/components/database/DatabaseCard.tsx (3)

30-30: LGTM! Translation syntax updated correctly.

The translation call has been properly converted to the new function-style notation.


214-214: LGTM! Action button translations updated consistently.

The translation calls for all action buttons have been properly converted to the new function-style notation, maintaining a consistent pattern across the component.

Also applies to: 224-224, 235-235


30-30: Verify translation key existence and consistency.

Let's ensure all the translation keys used in this component exist in the translation files and check for any potential duplicate or similar keys.

Also applies to: 151-151, 158-159, 214-214, 224-224, 235-235

✅ Verification successful

Translation keys are properly defined and consistent across the codebase

The verification shows that:

  • All DatabaseCard.* translation keys used in the component are properly defined in both GI and SR localization files
  • The keys are consistently translated across multiple languages (chs, cht, de, en, es, fr, id, ja, ko, pt, ru, th, vi)
  • The translation structure is uniform across all language files with the same hierarchy:
    "DatabaseCard": {
      "title": "...",
      "button": {
        "download": "...",
        "copy": "...",
        "delete": "...",
        "upload": "...",
        "swap": "..."
      },
      "currentDB": "..."
    }

No consolidation is needed as the keys are well-organized and there are no duplicates or similar keys that could be combined.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check translation keys in localization files
# Expected results: All DatabaseCard.* keys should be present in translation files

# Find all translation files
echo "Searching for translation files..."
fd -e json -e yaml settings

# Search for DatabaseCard translation keys
echo -e "\nChecking DatabaseCard translation keys..."
rg -i "DatabaseCard\." --type json --type yaml

# Look for potential similar keys that could be consolidated
echo -e "\nChecking for similar translation keys..."
rg -i "database.*title|database.*button" --type json --type yaml

Length of output: 1169


Script:

#!/bin/bash
# Let's check the actual content of translation files and the component usage

# First, let's look at the English translation file content
echo "=== English Translation File Content ==="
cat libs/gi/localization/assets/locales/en/settings.json

# Then, let's find all usages of DatabaseCard component and translation keys
echo -e "\n=== DatabaseCard Component Usage ==="
rg "DatabaseCard" -A 2 -B 2

# Let's also check if there are any database-related translations in a case-insensitive manner
echo -e "\n=== Database-related Translations ==="
rg -i "database" libs/gi/localization/assets/locales/en/settings.json

Length of output: 20955

libs/gi/ui/src/components/EnemyEditor.tsx (4)

72-74: LGTM: Translation call correctly converted

The translation call for the enemy level label has been properly converted to function style while maintaining the same functionality.


160-162: LGTM: Translation call correctly converted

The translation call for the announcement button text has been properly converted to function style while maintaining the same functionality.


228-230: LGTM: Translation call correctly converted

The translation call for the immunity button text has been properly converted to function style while maintaining the same functionality.


265-267: LGTM: Translation call correctly converted

The translation call for the editor note has been properly converted to function style while maintaining the same functionality.

libs/gi/page-home/src/InventoryCard.tsx (3)

91-91: LGTM: Translation format updated correctly

The translation call has been properly updated to use function notation instead of template literals.


111-111: LGTM: Translation namespace and format are correct

The translation call correctly uses the 'ui' namespace and has been properly updated to function notation.


148-148: LGTM: Consistent translation updates across tab labels

All tab label translations have been consistently updated to use function notation while maintaining proper namespace prefixes and count display formatting.

Also applies to: 185-185, 225-225, 235-235, 245-245

libs/gi/page-team/src/CharacterDisplay/Build/BuildTc.tsx (2)

274-274: LGTM: Translation call standardization

The translation call has been properly updated to use function notation, maintaining consistency with the new standard.


285-286: LGTM: Well-structured TextField components with optimized state management

The translation calls have been properly standardized, and the component demonstrates good practices:

  • Descriptive translation keys
  • Proper use of useDeferredValue for performance optimization
  • Clean TextField implementation with appropriate labels and placeholders

Also applies to: 292-292

libs/gi/ui/src/components/character/EquippedGrid.tsx (4)

256-256: LGTM: Translation notation updated correctly

The translation call has been properly updated to use function notation, maintaining consistency with the PR objective.


289-289: LGTM: Translation notation updated correctly

The translation call has been properly updated to use function notation, maintaining consistency with the PR objective.


320-322: LGTM: Translation notation updated correctly

The translation call has been properly updated to use function notation, maintaining consistency with the PR objective. Good reuse of the translation key between regular and large weapon swap buttons.


256-256: Verify translation key existence

Let's verify that the translation keys exist in the translation files to prevent any runtime issues.

Also applies to: 289-289, 321-321

✅ Verification successful

Translation key exists and is properly used

The verification shows that the translation key tabEquip.swapArt exists in multiple language files under the page_character namespace and is properly used in the codebase:

  1. The key exists in translation files:

    • English: "swapArt": "Swap Artifact"
    • And multiple other languages (vi, pt, ru, ko, ja, id, fr, es, cht, chs)
  2. The key is correctly used in the components:

    • EquippedGrid.tsx: Used in Tooltip component
    • ArtifactSwapModal.tsx: Used in Typography component

The translation system is working as expected with proper key organization and multilingual support.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the translation keys exist in the translation files
# Look for translation files and verify the keys

# Find translation files
echo "Searching for translation files containing these keys..."
rg -l "tabEquip.swapArt|tabEquip.swapWeapon" --type json

# Show the context of these keys in the translation files
echo "Showing context of the translation keys..."
rg -A 2 "tabEquip.swapArt|tabEquip.swapWeapon" --type json

Length of output: 337


Script:

#!/bin/bash
# Let's try a different approach to find translation files and their content

# First, let's find all JSON files that might contain translations
echo "Finding potential translation files..."
fd -e json

# Then let's look for files with common translation patterns
echo "\nSearching for files with common translation patterns..."
rg -l "\"page_character\":|\"character\":|\"tabEquip\":" --type json

# If we find any files, let's examine their content
echo "\nLooking for the specific translation key structure..."
rg "\"tabEquip\":" -A 10 -B 2 --type json

Length of output: 20955


Script:

#!/bin/bash
# Let's look for translation files specifically in the character-related namespace
echo "Searching for character-related translation files..."
fd -e json -p "character|page_character"

# Look for the specific translation key in these files
echo "\nSearching for tabEquip translation keys..."
rg "\"tabEquip\":|\"page_character\":" -A 10 -B 2 --type json

# Also check for any usage of this translation key in the codebase
echo "\nChecking usage of tabEquip translation key..."
rg "tabEquip.swapArt" -A 2 -B 2

Length of output: 48993

libs/gi/ui/src/components/artifact/ArtifactSwapModal.tsx (2)

167-167: LGTM: Translation function call properly converted to function notation.

The change from template literal to function notation is correct and aligns with the PR objectives.


244-246: LGTM: Translation function call properly converted to function notation.

The change from template literal to function notation is correct and maintains proper component structure.

libs/gi/page-team/src/index.tsx (2)

141-141: LGTM: Translation function call follows the new standard.

The translation function is correctly using parentheses syntax, aligning with the standardization objective.


145-145: LGTM: Translation function call follows the new standard.

The translation function is correctly using parentheses syntax, and the fallback logic for the tab name is maintained.

libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/CustomMultiTargetCard.tsx (5)

91-91: LGTM: Translation string notation updated correctly.

The translation call has been properly updated from template literal to function call syntax, maintaining the same functionality.


127-127: LGTM: Translation string notation updated correctly.

The translation call has been properly updated from template literal to function call syntax, maintaining the same functionality.


Line range hint 195-207: LGTM: Translation string notation updated correctly in form fields.

The translation calls in both TextFieldLazy components have been properly updated from template literal to function call syntax, maintaining the same functionality.


246-246: LGTM: Translation string notation updated correctly.

The translation call for the export button text has been properly updated from template literal to function call syntax.


299-301: LGTM: Translation string notation updated correctly in AddCustomTargetBtn.

The translation call for the "Add New Target" button text has been properly updated from template literal to function call syntax.

libs/gi/page-characters/src/index.tsx (1)

301-303: LGTM! Translation string notation standardized.

The change from template literal to function call notation for the translation key follows the agreed-upon standard from PR #2471.

Let's verify the translation key exists:

✅ Verification successful

Translation key 'addNew' is properly defined and localized

The translation key is correctly defined in all language files under libs/gi/localization/assets/locales/*/page_character.json with appropriate translations for each supported language (en, chs, pt, ru, ja, ko, id, fr, es, cht). The English translation is "Add Character" which matches the component's purpose.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the 'addNew' translation key exists in the translation files
# Note: Common locations for translation files in React i18n projects
rg -g '*.{json,ts,js,tsx,jsx}' '"addNew":\s*"' 

Length of output: 3171

libs/gi/page-team/src/CharacterDisplay/Content.tsx (5)

159-159: LGTM: Translation syntax updated correctly

The template literal to function call conversion for the tooltip text follows the new standardized approach.


212-212: LGTM: Translation syntax updated correctly

The template literal to function call conversion for the modal header text follows the new standardized approach and maintains consistency with the tooltip text.


230-230: LGTM: Translation syntax updated correctly

The template literal to function call conversion for the name input label follows the new standardized approach.


236-236: LGTM: Translation syntax updated correctly

The template literal to function call conversion for the description input label follows the new standardized approach.


Line range hint 159-236: Verify no remaining template literal translations

All translation function calls in this file have been updated to use the new function call syntax. Let's verify there are no remaining template literal translations.

✅ Verification successful

No template literal translations found in the file

Based on the search results, all translation function calls in the file are using the correct string literal syntax (e.g., t('loadout.editNameDesc')) and there are no instances of template literal translations. The changes have been properly implemented throughout the file.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining template literal translations in the file
# Pattern: Look for t followed by backticks, which would indicate template literal usage

rg "t\`[^`]*\`" "libs/gi/page-team/src/CharacterDisplay/Content.tsx"

# Also check for any other translation function patterns that might need updating
rg "(?:t|i18next\.t|i18n\.t)\s*\`" "libs/gi/page-team/src/CharacterDisplay/Content.tsx"

Length of output: 93


Script:

#!/bin/bash
# Let's try a different approach to check for template literals in translations
# First, let's check for any backtick usage with t function
rg "t`" "libs/gi/page-team/src/CharacterDisplay/Content.tsx"

# Check for general template literal usage
rg "\$\{.*?\}" "libs/gi/page-team/src/CharacterDisplay/Content.tsx"

# Check all t function usages to verify the syntax
rg "t\(" "libs/gi/page-team/src/CharacterDisplay/Content.tsx"

Length of output: 93


Script:

#!/bin/bash
# Search for translation function calls with template literals
rg -U "t\(`.*?\$\{.*?\}`" libs/gi/page-team/src/CharacterDisplay/Content.tsx

# Search for all translation function calls to verify proper syntax
rg -U "t\(['\"].*?['\"]" libs/gi/page-team/src/CharacterDisplay/Content.tsx

# Search for any remaining template literals in the file
rg -U "\`.*?\$\{.*?\}`" libs/gi/page-team/src/CharacterDisplay/Content.tsx

Length of output: 1512

libs/gi/page-team/src/CharacterDisplay/CustomMultiTarget/MTargetEditor.tsx (4)

149-151: LGTM: Translation syntax updated correctly

The translation call has been properly updated to use function notation, maintaining the correct namespace and key.


159-160: LGTM: Mobile/desktop translations properly handled

The translation calls for both mobile and desktop variants have been correctly updated to function notation, maintaining proper responsive behavior.


293-293: LGTM: Description label translation updated

The description label translation has been properly updated to function notation.


350-350: LGTM: Menu item translation properly namespaced

The translation call has been correctly updated to function notation with proper namespacing. This reinforces the suggestion to update line 345 to use the same namespaced key for consistency.

libs/gi/page-team/src/CharacterDisplay/Tabs/TabUpgradeOpt/UpgradeOptChartCard.tsx (7)

229-233: LGTM: Translation function properly handles interpolation

The translation implementation correctly uses function-style notation with proper parameter interpolation for the probability text.


Line range hint 235-242: LGTM: Consistent translation implementation

The average increase text follows the same pattern as the probability text, maintaining consistency in translation function usage.


267-269: LGTM: Equipment status translations properly implemented

The conditional rendering of equipment status text correctly uses the function-style translation calls.


296-298: LGTM: X-axis label translation properly implemented

The X-axis label correctly uses the function-style translation call within the Label component.


Line range hint 308-313: LGTM: Y-axis label translation properly implemented

The Y-axis label follows the same pattern as the X-axis label, maintaining consistency in translation implementation.


Line range hint 337-368: LGTM: Chart legend translations properly implemented

The chart legend elements correctly use function-style translation calls, including proper handling of nested translations with conditional text.


376-382: ```shell
#!/bin/bash

Search for translation keys in the codebase using ripgrep without file type restrictions

rg -A 2 "upOptChart.currentTarget"

Also search for ReferenceLine components to understand the context

rg -B 2 -A 2 "<ReferenceLine.*?name="


</details>
<details>
<summary>libs/gi/ui/src/components/character/editor/LoadoutEditor.tsx (4)</summary>

`127-128`: **LGTM: Translation notation updated correctly**

The conversion from template literals to function calls for text field labels follows the standardization goal and maintains consistent key naming.



Also applies to: 134-134

---

`151-151`: **LGTM: Button text translations standardized**

Translation calls for button texts have been successfully converted to function notation while maintaining consistent key naming patterns.



Also applies to: 169-169, 301-301

---

`195-195`: **LGTM: Card headers and titles updated consistently**

Translation calls for all section headers have been successfully converted to function notation while maintaining consistent key naming and preserving the visual layout with icons.



Also applies to: 223-223, 237-237, 273-273, 329-329, 368-368

---

Line range hint `127-368`: **Verify translation key existence**

While the conversion to function notation is correct, let's verify that all translation keys exist in the translation files to prevent runtime issues.

<details>
<summary>✅ Verification successful</summary>

**All translation keys are present and correctly structured**

The verification shows that all translation keys used in the LoadoutEditor component exist within the `loadoutEditor` section of the translation file at `libs/common/localization/assets/locales/en/loadout.json`. The initial `false` results from `jq` were due to checking at the root level instead of the nested structure. The actual file content shows all required keys are properly defined under the `loadoutEditor` namespace.



</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Check if all translation keys exist in the translation files
# Look for translation files in the repository
fd -e json -e yaml "loadout.*" | while read -r file; do
  echo "Checking translation file: $file"
  # Check for each key used in the component
  for key in "loadoutEditor.label" "loadoutEditor.placeholder" "loadoutEditor.desc" \
             "loadoutEditor.dupBtn" "loadoutEditor.delBtn" "loadoutEditor.optTarget" \
             "loadoutEditor.conditionals" "loadoutEditor.builds" "loadoutEditor.teams" \
             "loadoutEditor.addNewTeam" "loadoutEditor.bonusStats" "loadoutEditor.mltTargets"; do
    echo "Checking key: $key"
    if [[ "$file" =~ \.json$ ]]; then
      jq --arg key "$key" 'has($key)' "$file"
    else
      # For YAML files, use grep as a basic check
      grep -l "$key" "$file"
    fi
  done
done

Length of output: 7203


Script:

#!/bin/bash
# Let's check the actual content of the translation file to see if the keys might be nested
cat libs/common/localization/assets/locales/en/loadout.json

# Also let's check if there are any similar keys that might indicate a different structure
rg "loadoutEditor" libs/common/localization/assets/locales/en/loadout.json

Length of output: 2767

libs/gi/ui/src/components/build/EquipBuildModal.tsx (3)

132-134: LGTM: Translation notation updated correctly

The translation call has been properly updated to use function notation while maintaining the same translation key structure.


155-156: LGTM: Translation calls properly standardized

Both label and placeholder translations have been updated to use function notation while correctly maintaining parameter interpolation for the placeholder.


172-176: LGTM: Button translations updated consistently

Translation calls for both buttons have been properly updated to use function notation while maintaining the same translation keys.

libs/gi/page-team/src/TeamSetting/TeamExportModal.tsx (6)

97-97: LGTM: Translation call updated to function notation

The template literal notation has been correctly converted to function call notation while maintaining the same translation key.


138-138: LGTM: Modal text translations standardized

All modal text translations (title, buttons) have been consistently updated to use function call notation while preserving the original translation keys and functionality.

Also applies to: 167-167, 200-200


270-270: LGTM: Target section translation updated

The target section header translation has been properly converted to function call notation.


290-290: LGTM: Multi-target section translation updated

The multi-target section header translation has been correctly converted to function call notation while maintaining the strong emphasis.


338-338: LGTM: Builds section translations standardized

The builds section translations (header and equipped text) have been properly updated to use function call notation while maintaining the existing structure.

Also applies to: 354-354


407-408: LGTM: TC badge translation updated

The TC badge translation has been correctly converted to function call notation while properly maintaining the space character and badge component structure.

libs/gi/ui/src/components/database/UploadCard.tsx (6)

128-130: LGTM: Translation syntax updated correctly

The translation call has been properly updated to use function notation, maintaining consistency with the new standard.


155-156: LGTM: Conditional translations updated consistently

Both branches of the conditional translation have been properly updated to use function notation, maintaining the semantic meaning.


170-170: LGTM: Button text translation updated correctly

The button text translation has been properly updated to use function notation.


178-179: LGTM: Tooltip translations updated consistently

Both conditional tooltip translations have been properly updated to use function notation.


195-195: LGTM: Button text translation updated correctly

The button text translation has been properly updated to use function notation.


Line range hint 128-195: Verify translation keys existence

Let's verify that all the updated translation keys exist in the translation files to prevent any runtime issues.

libs/gi/ui/src/components/artifact/ArtifactCard.tsx (4)

315-317: LGTM: Translation notation updated correctly

The translation call for 'curSubEff' has been properly updated to use function notation while maintaining the correct namespace and key structure.


334-336: LGTM: Translation notation updated consistently

The translation call for 'maxSubEff' follows the same pattern as the previous change, maintaining consistency in the codebase.


392-392: LGTM: Translation notation updated appropriately

The translation call for the edit button tooltip has been properly updated to use function notation while maintaining proper component structure.


Line range hint 1-500: Verify all translation calls in the file

Let's ensure no template literal translation calls were missed in this file.

✅ Verification successful

Based on the search results, I can generate the final response as we have sufficient information. The ripgrep results show all translation calls in the file, and there are no template literal translations (`t`` or tk```) present. All translation calls use the proper function call syntax with quotes.

All translation calls in the file are using the correct syntax

The file consistently uses proper function call syntax with quotes for translations:

  • t('artifact:editor.curSubEff')
  • t('artifact:editor.maxSubEff')
  • t('artifact:edit')
  • t('artifact:cantDeleteLock')
  • t('slotName.${slotKey}')
  • tk(mainStatKey)
  • tk(stat.key)

No template literal translation calls were found, and all translation calls follow a consistent pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining template literal translation calls
# Pattern: looking for backticks following 't' or 'tk'
rg "t`|tk`" "libs/gi/ui/src/components/artifact/ArtifactCard.tsx"

# Also verify the current function call pattern is consistent
rg "t\(['\"]" "libs/gi/ui/src/components/artifact/ArtifactCard.tsx"

Length of output: 11369

libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ChartCard/index.tsx (3)

221-221: LGTM: Translation call standardization

The translation call has been correctly updated to use function notation.


443-443: LGTM: Legend labels translation standardization

The translation calls for all legend labels have been correctly updated to use function notation while maintaining the existing Legend configuration structure.

Also applies to: 451-451, 457-457, 463-463


221-221: Verify translation key consistency

Let's verify that the translation keys are defined and used consistently across the application.

Also applies to: 274-276, 286-288, 443-443, 451-451, 457-457, 463-463

libs/gi/ui/src/components/build/BuildDisplayItem.tsx (6)

349-349: LGTM: Badge translations updated correctly

The translations for equipped and current badges have been properly converted to use the translation function.

Also applies to: 365-367


403-403: LGTM: Button and label translations updated correctly

The translations for the "equipped" text and "equip to current" button have been properly converted to use the translation function.

Also applies to: 423-423


485-485: LGTM: Weapon modal translations updated correctly

The translations for weapon comparison modal titles and badges have been properly converted to use the translation function.

Also applies to: 490-490, 507-507


570-570: LGTM: Artifact modal translations updated correctly

The translations for artifact comparison modal titles and badges have been properly converted to use the translation function.

Also applies to: 575-575, 608-608


666-666: LGTM: Button translations updated correctly

The translations for artifact inclusion tooltip, button text, and equipment allowance text have been properly converted to use the translation function.

Also applies to: 678-678, 715-715


Line range hint 1-724: Verify translation key existence

While the conversion from template literals to function calls looks correct, we should verify that all the translation keys exist in the translation files to prevent runtime errors.

libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/Components/ArtifactSetConfig.tsx (3)

Line range hint 193-279: Translation calls updated correctly

The conversion from template literals to function calls for translations is implemented correctly, maintaining proper namespacing and key structure.


Line range hint 281-494: Complex translations implemented correctly

The conversion to function calls and usage of the Trans component for complex translations containing markup is implemented correctly.


Line range hint 666-681: Set effect translations updated correctly

The conversion to function calls for set effect translations is implemented correctly with proper namespace usage.

libs/gi/page-team/src/CharacterDisplay/Tabs/TabOptimize/index.tsx (9)

457-457: LGTM: Alert message translation updated correctly

The template literal notation has been correctly converted to function notation for the build completion alert message.


Line range hint 576-602: LGTM: Main stat section translations updated correctly

The translations for the main stat title and tooltip sections have been properly converted to function notation, maintaining a clear hierarchy with separate keys for title and tooltip sections.


636-636: LGTM: Allow partial button text updated

The translation for the allow partial toggle button has been correctly converted to function notation.


719-719: LGTM: Notification tooltip translation updated

The tooltip translation has been properly converted to function notation.


797-804: LGTM: Generated on and select character texts updated

Both the "generated on" timestamp text and the "select character" placeholder text have been correctly converted to function notation.


817-817: LGTM: Clear builds button text updated

The clear builds button text translation has been properly converted to function notation.


Line range hint 1035-1066: LGTM: Build template creation dialog texts updated

All translations in the build template creation dialog have been correctly converted to function notation, including:

  • Button text
  • Dialog title
  • Description
  • Input label
  • Action buttons

Line range hint 1106-1142: LGTM: Build creation dialog texts updated

All translations in the build creation dialog have been properly converted to function notation, including:

  • Button text
  • Dialog title
  • Description
  • Input label
  • Action buttons

Line range hint 1-1200: Overall: Translation updates are consistent and well-implemented

The conversion from template literal notation to function notation for translations has been implemented consistently throughout the file. The changes:

  • Maintain the existing functionality
  • Follow a consistent pattern
  • Are properly organized with clear translation keys
  • Cover all necessary UI text elements

This aligns well with the PR objective of standardizing the translation string notation across the codebase.

@@ -28,7 +28,7 @@ export function UploadExplainationModal({
<ModalWrapper open={modalShow} onClose={hide}>
<CardThemed>
<CardContent sx={{ py: 1, display: 'flex' }}>
<Typography variant="h6">{t`editor.uploadExp.title`}</Typography>
<Typography variant="h6">{t('editor.uploadExp.title')}</Typography>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Translation key 'editor.uploadExp.title' needs to be added to translation files

The key editor.uploadExp.title is used in the component but appears to be missing from the translation JSON files. This could lead to missing translations in the UI.

  • Add the translation key editor.uploadExp.title to the appropriate translation JSON files
  • Ensure translations are provided for all supported languages
🔗 Analysis chain

LGTM! Translation syntax update is consistent.

The change from template literal to function call syntax (t('editor.uploadExp.title')) aligns with the PR's standardization goals and maintains consistency with the Trans component usage elsewhere in the file.

Let's verify the translation key exists and is used consistently:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the translation key exists and check for any remaining template literal usage
# Test 1: Search for the translation key to ensure it exists
rg "editor\.uploadExp\.title" -g '*.{json,ts,tsx}'

# Test 2: Check for any remaining template literal translation usage in this directory
rg "t\`[^`]+\`" ./libs/gi/ui/src/components/artifact/

Length of output: 294


Script:

#!/bin/bash
# Let's verify the translation key in the translation files and check for any remaining template literals
# across the entire codebase for this specific key

# Check translation files for the key
rg "\"editor\.uploadExp\.title\"" -g "*.json"

# Check for any template literal usage of this specific key
rg "t\`editor\.uploadExp\.title\`" -g "*.{ts,tsx}"

# Check if there are any other usages of this translation key
rg "['\"']editor\.uploadExp\.title['\"']" -g "*.{ts,tsx}"

Length of output: 314

Comment on lines +180 to +182
>
{t('tabEquip.unequipArts')}
</Button>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Translation key needs to be updated to match available translations

The translation key tabEquip.unequipArts is not found in the translation files. The available keys under tabEquip namespace are:

  • tabEquip.swapWeapon
  • tabEquip.swapArt
  • tabEquip.compare

Please update the translation key to use one of the existing keys or add the missing translation.

🔗 Analysis chain

LGTM! Translation syntax updated correctly.

The change from template literal to function call syntax for translations aligns with the PR objectives and maintains consistent styling across the codebase.

Let's verify the translation key exists to prevent runtime issues:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the translation key exists in the translation files
# Expected: Find the translation key in the page_character translation namespace

# Search for the translation key in translation files
rg -g '*.json' '"tabEquip.unequipArts"'

Length of output: 41


Script:

#!/bin/bash
# Let's try a broader search to:
# 1. Find all JSON files that might contain translations
# 2. Look for similar translation keys to understand the pattern
# 3. Check the component's imports to identify the translation namespace

# Find all translation-related JSON files
echo "=== Translation files ==="
fd -e json -e yaml --full-path public/locales/ || fd -e json -e yaml translations || fd -e json -e yaml locales

# Search for similar translation keys
echo -e "\n=== Similar translation keys ==="
rg -g '*.json' -g '*.yaml' 'tabEquip' || rg -g '*.json' -g '*.yaml' 'unequip'

# Check the component's imports and usage of translation
echo -e "\n=== Translation setup in the component ==="
rg -A 5 -B 5 "import.*useTranslation" libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx

Length of output: 2359


Script:

#!/bin/bash
# Let's check the specific translation key in the page_character namespace
# since we found that the translations are in that file

# Check for the specific key in the English translation file
echo "=== English translation key ==="
rg -A 3 '"tabEquip": \{' libs/gi/localization/assets/locales/en/page_character.json

# Also check the component's translation namespace setup
echo -e "\n=== Translation namespace setup ==="
rg -B 10 -A 2 "useTranslation\(" libs/gi/page-team/src/CharacterDisplay/Tabs/TabOverview/EquipmentSection.tsx

Length of output: 754

@@ -88,7 +88,7 @@ export default function InventoryCard() {
return (
<CardThemed>
<CardHeader
title={<Typography variant="h5">{t`inventoryCard.title`}</Typography>}
title={<Typography variant="h5">{t('inventoryCard.title')}</Typography>}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Translation key exists but needs review

The inventoryCard.title translation key exists in multiple language files, but it's missing in some languages (e.g., English, German, Spanish). This could lead to fallback text or missing translations for users of those languages.

  • Missing translations for inventoryCard.title in:
    • English (en)
    • German (de)
    • Spanish (es)
    • Thai (th)
🔗 Analysis chain

Verify translation key existence

Let's verify that all translation keys exist in the translation files to prevent potential runtime issues.

Also applies to: 111-111, 148-148, 185-185, 225-225, 235-235, 245-245

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for translation key definitions in translation files
echo "Searching for translation keys..."
rg --type yaml "inventoryCard\.title:" public/locales/
rg --type yaml "tabs\.(characters|weapons|artifacts|teams|loadouts|builds):" public/locales/

Length of output: 340


Script:

#!/bin/bash
# First, let's find where translation files are located
fd -e json -e yaml "translation|locale|i18n|lang"

# Then search for the specific translation keys in those files
echo "=== Translation files found ==="

Length of output: 828


Script:

#!/bin/bash
# Now that we found the translation files location, let's search for our keys
echo "=== Searching for inventoryCard.title ==="
rg "inventoryCard.title" libs/gi/localization/assets/locales/

echo -e "\n=== Searching for tab translations ==="
rg "\"tabs\": \{" -A 10 libs/gi/localization/assets/locales/

Length of output: 20522


Script:

#!/bin/bash
# Let's check for the inventoryCard translations in all UI files
echo "=== Searching for inventoryCard translations ==="
rg "inventoryCard" libs/gi/localization/assets/locales/*/ui.json

# Also let's check the page-home translations since the component is from page-home
echo -e "\n=== Searching in page-home translations ==="
fd "page[-_]home" libs/gi/localization/assets/locales/ -x rg "inventoryCard" {}

Length of output: 1358

@tiffanynwyeung tiffanynwyeung changed the title [chore] swap translated strings notation from template literal to function style chore: swap translated strings notation from template literal to function style Nov 8, 2024
Copy link
Owner

@frzyc frzyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiffanynwyeung tiffanynwyeung merged commit c23eaf1 into master Nov 9, 2024
9 checks passed
@tiffanynwyeung tiffanynwyeung deleted the chore/swap-tl-string-notation branch November 9, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants