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

fix(suite-data): fix wallet connect source keys for translations #17601

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

MiroslavProchazka
Copy link
Contributor

This pull request focuses on correcting a typo in the key names related to WalletConnect across multiple translation files and source code files. The primary change involves replacing "WALLTCONNECT" with "WALLETCONNECT" to ensure consistency and accuracy.

Key changes include:

Translation Files:

  • Corrected the key names from TR_WALLTCONNECT_NEW_CONNECTION_URL to TR_WALLETCONNECT_NEW_CONNECTION_URL and from TR_WALLTCONNECT_SESSIONS to TR_WALLETCONNECT_SESSIONS in multiple translation files:
    • packages/suite-data/files/translations/cs.json
    • packages/suite-data/files/translations/de.json
    • packages/suite-data/files/translations/en.json
    • packages/suite-data/files/translations/es.json
    • packages/suite-data/files/translations/fr.json
    • packages/suite-data/files/translations/it.json
    • packages/suite-data/files/translations/ja.json
    • packages/suite-data/files/translations/lol.json
    • packages/suite-data/files/translations/pt.json
    • packages/suite-data/files/translations/tr.json
    • packages/suite-data/files/translations/zh.json

Source Code Files:

  • Updated the keys in the defineMessages function within packages/suite/src/support/messages.ts
  • Adjusted the placeholder and title translations in the WalletConnect component within packages/suite/src/views/settings/SettingsDebug/WalletConnect.tsx

@martykan martykan added the no-project This label is used to specify that PR doesn't need to be added to a project label Mar 12, 2025
@MiroslavProchazka MiroslavProchazka marked this pull request as ready for review March 12, 2025 10:33
Copy link

coderabbitai bot commented Mar 12, 2025

Walkthrough

This pull request corrects typographical errors in naming conventions across various parts of the codebase. The translation JSON files for multiple languages (including Czech, German, English, Spanish, French, Italian, Japanese, Portuguese, Turkish, Chinese, and others) have been updated to change the keys from TR_WALLTCONNECT_NEW_CONNECTION_URL to TR_WALLETCONNECT_NEW_CONNECTION_URL and from TR_WALLTCONNECT_SESSIONS to TR_WALLETCONNECT_SESSIONS. In addition, corresponding updates have been made in message definition files and a UI component to reflect these changes. No other logic or functionality modifications are present, as the updates solely ensure consistency in the naming of keys related to the WalletConnect feature.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate docstrings to generate docstrings for this 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

@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: 0

🧹 Nitpick comments (1)
packages/suite-data/files/translations/zh.json (1)

2174-2175: Corrected WalletConnect Key Names

The keys have been updated from the misspelled versions (e.g. "TR_WALLTCONNECT_NEW_CONNECTION_URL") to the correct ones ("TR_WALLETCONNECT_NEW_CONNECTION_URL" and "TR_WALLETCONNECT_SESSIONS"). This change ensures consistency across the translation files and aligns with the updated naming conventions used elsewhere in the project. Everything looks good here.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b2aebd and c464c8b.

📒 Files selected for processing (13)
  • packages/suite-data/files/translations/cs.json (1 hunks)
  • packages/suite-data/files/translations/de.json (1 hunks)
  • packages/suite-data/files/translations/en.json (1 hunks)
  • packages/suite-data/files/translations/es.json (1 hunks)
  • packages/suite-data/files/translations/fr.json (1 hunks)
  • packages/suite-data/files/translations/it.json (1 hunks)
  • packages/suite-data/files/translations/ja.json (1 hunks)
  • packages/suite-data/files/translations/lol.json (1 hunks)
  • packages/suite-data/files/translations/pt.json (1 hunks)
  • packages/suite-data/files/translations/tr.json (1 hunks)
  • packages/suite-data/files/translations/zh.json (1 hunks)
  • packages/suite/src/support/messages.ts (1 hunks)
  • packages/suite/src/views/settings/SettingsDebug/WalletConnect.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
packages/suite/src/views/settings/SettingsDebug/WalletConnect.tsx (1)
Learnt from: martykan
PR: trezor/trezor-suite#15803
File: packages/suite/src/views/settings/SettingsDebug/WalletConnect.tsx:30-34
Timestamp: 2025-02-12T12:23:23.445Z
Learning: WalletConnect connection URLs can be either direct WalletConnect URLs starting with 'wc:' or deeplink URLs starting with 'trezorsuite://walletconnect'.
⏰ Context from checks skipped due to timeout of 90000ms (17)
  • GitHub Check: e2e-test-suite-web (@group=wallet)
  • GitHub Check: e2e-test-suite-web (@group=other)
  • GitHub Check: e2e-test-suite-web (@group=metadata2)
  • GitHub Check: e2e-test-suite-web (@group=metadata1)
  • GitHub Check: e2e-test-suite-web (@group=settings)
  • GitHub Check: e2e-test-suite-web (@group=device-management)
  • GitHub Check: e2e-test-suite-web (@group=suite)
  • GitHub Check: Linting and formatting
  • GitHub Check: Unit Tests
  • GitHub Check: Type Checking
  • GitHub Check: run-desktop-tests (@group=wallet, trezor-user-env-unix bitcoin-regtest)
  • GitHub Check: run-desktop-tests (@group=other, trezor-user-env-unix)
  • GitHub Check: run-desktop-tests (@group=passphrase, trezor-user-env-unix)
  • GitHub Check: run-desktop-tests (@group=settings, trezor-user-env-unix bitcoin-regtest)
  • GitHub Check: run-desktop-tests (@group=device-management, trezor-user-env-unix)
  • GitHub Check: run-desktop-tests (@group=suite, trezor-user-env-unix)
  • GitHub Check: Analyze with CodeQL (javascript)
🔇 Additional comments (15)
packages/suite-data/files/translations/de.json (1)

2173-2174: Typographical Correction of WalletConnect Keys

The keys have been updated from the misspelled "TR_WALLTCONNECT_NEW_CONNECTION_URL" and "TR_WALLTCONNECT_SESSIONS" to the correct "TR_WALLETCONNECT_NEW_CONNECTION_URL" and "TR_WALLETCONNECT_SESSIONS". This change ensures consistency across translation files and aligns with the corrected naming convention for WalletConnect. Please verify that similar corrections are applied in all other language files for uniformity.

packages/suite/src/views/settings/SettingsDebug/WalletConnect.tsx (2)

40-40: Updated Translation Key in Input Placeholder

The placeholder now correctly uses the updated key TR_WALLETCONNECT_NEW_CONNECTION_URL. This change aligns with the PR objectives by fixing the typo and ensuring consistency across translation keys.


48-48: Updated Translation Key for Text Column Title

The title in the <TextColumn> now correctly references the key TR_WALLETCONNECT_SESSIONS. This update meets the intended corrections for WalletConnect translation keys.

packages/suite-data/files/translations/lol.json (1)

2183-2184: Corrected WalletConnect keys for consistency
The keys on these lines have been updated to use the correct "WALLETCONNECT" nomenclature instead of the typographical error "WALLTCONNECT". This change aligns with the intended naming convention and is consistent with similar changes across other translation files.

packages/suite-data/files/translations/en.json (2)

2174-2174: Typo Correction for Connection URL Key

The key has been updated from the incorrect "TR_WALLTCONNECT_NEW_CONNECTION_URL" to the correctly spelled "TR_WALLETCONNECT_NEW_CONNECTION_URL". This change ensures consistency with the naming conventions used elsewhere in the codebase.


2175-2175: Typo Correction for Sessions Key

The key has been updated from the incorrect "TR_WALLTCONNECT_SESSIONS" to the correct "TR_WALLETCONNECT_SESSIONS". This consistent naming further aligns this translation with the rest of the WalletConnect references in the project.

packages/suite-data/files/translations/pt.json (1)

2173-2174: WalletConnect key spelling corrected.
The keys have been updated from the previous typo (“WALLTCONNECT”) to the correct “WALLETCONNECT” in both instances, ensuring consistency for the WalletConnect feature across translations. Please verify that similar corrections have been applied to all affected translation files.

packages/suite-data/files/translations/cs.json (1)

2173-2174: Key names correctly updated to fix typo

The key names have been properly updated from "WALLTCONNECT" to "WALLETCONNECT", fixing the typo while maintaining the correct Czech translations. This change improves consistency in naming across the codebase.

packages/suite-data/files/translations/ja.json (1)

2174-2175: Correct typo fix in WalletConnect translation keys

The translation keys have been properly fixed from "WALLTCONNECT" to "WALLETCONNECT" which correctly aligns with the WalletConnect feature naming convention. This change matches the PR's objective of fixing the typo in the key names.

packages/suite-data/files/translations/es.json (1)

2173-2174: Corrected WalletConnect Translation Keys

The typo has been successfully fixed by replacing the incorrect keys with the correct ones. The keys now read "TR_WALLETCONNECT_NEW_CONNECTION_URL": "Nueva URL de conexión" and "TR_WALLETCONNECT_SESSIONS": "Sesiones", which improves consistency with the rest of the codebase.

packages/suite-data/files/translations/tr.json (1)

2173-2174: Correct WalletConnect key naming.

The keys on these lines have been updated from the incorrect "WALLTCONNECT" prefix to the proper "WALLETCONNECT" term. This ensures consistency with the naming conventions in other translation files and prevents any potential confusion in the application.

packages/suite/src/support/messages.ts (1)

9609-9614: Fixed typo in WalletConnect key names

The PR correctly changes TR_WALLTCONNECT_NEW_CONNECTION_URL to TR_WALLETCONNECT_NEW_CONNECTION_URL and TR_WALLTCONNECT_SESSIONS to TR_WALLETCONNECT_SESSIONS, fixing the typo by replacing "WALLT" with "WALLET" in these message IDs. This change ensures consistency across the application and translation files.

packages/suite-data/files/translations/it.json (1)

2173-2174: Typo Correction in WalletConnect Translation Keys

The keys have been updated from the incorrect "WALLTCONNECT" format to the correct "WALLETCONNECT" naming. Specifically, "TR_WALLETCONNECT_NEW_CONNECTION_URL" and "TR_WALLETCONNECT_SESSIONS" now correctly reflect the intended naming convention, improving consistency across translation files and related source code.

packages/suite-data/files/translations/fr.json (2)

2173-2173: Correct WalletConnect Key for New Connection URL

The key has been updated from the misspelled version ("TR_WALLTCONNECT_NEW_CONNECTION_URL") to the correct "TR_WALLETCONNECT_NEW_CONNECTION_URL". This change aligns with the PR objectives to ensure consistency and accuracy across translation keys.


2174-2174: Correct WalletConnect Key for Sessions

The key for sessions has been corrected from the typo ("TR_WALLTCONNECT_SESSIONS") to the accurate "TR_WALLETCONNECT_SESSIONS". This update ensures that the naming convention is consistent across all translation files.

@martykan martykan merged commit 5c0da71 into develop Mar 12, 2025
29 of 32 checks passed
@martykan martykan deleted the fix-strings branch March 12, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-project This label is used to specify that PR doesn't need to be added to a project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants