Skip to content

Conversation

@dylanbox
Copy link
Contributor

Overview

The Default Device Data Tab (in view library 1) has a little blurb about connecting devices. To avoid confusion the text should be made generic so that if a device type isn't turned on for a project, it wouldn't confuse a participant

Issue: https://github.com/CareEvolution/Product/issues/476

Security

REMINDER: All file contents are public.

  • I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.
    • Please verify that you double checked that .storybook/preview.js does not contain your participant access key details.
    • There are no temporary testing changes committed such as API base URLs, access tokens, print/log statements, etc.
  • These changes do not introduce any security risks, or any such risks have been properly mitigated.

Describe briefly what security risks you considered, why they don't apply, or how they've been mitigated.

Checklist

Testing

Documentation

  • I have added relevant Storybook updates to this PR as well.
  • If this feature requires a developer doc update, tag @CareEvolution/api-docs.

Consider "Squash and merge" as needed to keep the commit history reasonable on main.

Reviewers

Assign to the appropriate reviewer(s). Minimally, a second set of eyes is needed ensure no non-public information is published. Consider also including:

  • Subject-matter experts
  • Style/editing reviewers
  • Others requested by the content owner

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2025

Walkthrough

The pull request updates translation strings across several language files (German, English, Spanish, French, Italian, Dutch, Polish, and Portuguese) for the key "device-data-no-data". In each file, the message originally specified particular health platforms (Apple Health, Google Fit, Fitbit, or Garmin) and has been revised to refer generally to "your device." This change simplifies the instruction provided to users regarding when they can view their data after connecting a device. No changes were made to the application’s control flow, logic, or the declarations of exported or public entities; the modifications focus solely on the textual message displayed to the user.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f3cd331 and 7626788.

📒 Files selected for processing (8)
  • src/helpers/strings-de.ts (1 hunks)
  • src/helpers/strings-en.ts (1 hunks)
  • src/helpers/strings-es.ts (1 hunks)
  • src/helpers/strings-fr.ts (1 hunks)
  • src/helpers/strings-it.ts (1 hunks)
  • src/helpers/strings-nl.ts (1 hunks)
  • src/helpers/strings-pl.ts (1 hunks)
  • src/helpers/strings-pt.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • src/helpers/strings-nl.ts
  • src/helpers/strings-en.ts
  • src/helpers/strings-es.ts
  • src/helpers/strings-pt.ts
  • src/helpers/strings-pl.ts
  • src/helpers/strings-fr.ts
  • src/helpers/strings-de.ts
  • src/helpers/strings-it.ts

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 or @coderabbitai title 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

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9517ed2 and d8ea2d6.

📒 Files selected for processing (7)
  • src/helpers/strings-de.ts (1 hunks)
  • src/helpers/strings-en.ts (1 hunks)
  • src/helpers/strings-es.ts (1 hunks)
  • src/helpers/strings-fr.ts (1 hunks)
  • src/helpers/strings-it.ts (1 hunks)
  • src/helpers/strings-nl.ts (1 hunks)
  • src/helpers/strings-pl.ts (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • src/helpers/strings-de.ts
  • src/helpers/strings-it.ts
  • src/helpers/strings-en.ts
🔇 Additional comments (3)
src/helpers/strings-nl.ts (1)

81-81: LGTM! The Dutch translation is clear and aligns with the objective.

The translation is grammatically correct and successfully conveys the generic device message while maintaining a natural flow.

src/helpers/strings-pl.ts (1)

81-81: LGTM! The Polish translation is clear and aligns with the objective.

The translation is grammatically correct and successfully conveys the generic device message while maintaining a natural flow.

src/helpers/strings-fr.ts (1)

81-81: LGTM! The translation change aligns with the PR objectives.

The updated French translation "Si vous avez connecté votre appareil, revenez plus tard pour consulter vos données." (If you have connected your device, come back later to view your data) successfully:

  • Makes the text more generic by removing specific platform references
  • Maintains clarity and proper French grammar
  • Aligns with the goal of reducing user confusion when specific device types aren't activated

"external-account-refresh": "Actualizar",
"external-account-remove": "Eliminar",
"device-data-no-data": "Si ha conectado Apple Health, Google Fit, Fitbit o Garmin, vuelva más tarde para ver sus datos.",
"device-data-no-data": "Si ha conectado tu dispositivo, vuelva más tarde para ver sus datos.",
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 21, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix pronoun agreement in Spanish translation.

The current translation mixes formal and informal pronouns ("ha conectado" with "tu"). For consistency, it should use either:

Informal style (preferred as the rest of the file uses informal "tu"):

-    "device-data-no-data": "Si ha conectado tu dispositivo, vuelva más tarde para ver sus datos.",
+    "device-data-no-data": "Si has conectado tu dispositivo, vuelve más tarde para ver tus datos.",

Or formal style:

-    "device-data-no-data": "Si ha conectado tu dispositivo, vuelva más tarde para ver sus datos.",
+    "device-data-no-data": "Si ha conectado su dispositivo, vuelva más tarde para ver sus datos.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"device-data-no-data": "Si ha conectado tu dispositivo, vuelva más tarde para ver sus datos.",
"device-data-no-data": "Si has conectado tu dispositivo, vuelve más tarde para ver tus datos.",

Copy link
Contributor

Choose a reason for hiding this comment

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

Had to consult LLM on this one.

However, there’s a small inconsistency in the Spanish translation. The original version used a formal tone ("ha conectado") but the updated string switches to the informal possessive ("tu dispositivo"). You might want to adjust it to either use the formal possessive ("su dispositivo") or change the conjugation to match the informal register.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bxh You're absolutely right! There's an inconsistency in the Spanish translation where formal and informal registers are mixed in the same sentence. The updated string uses "ha conectado" (formal) with "tu dispositivo" (informal).

To fix this, you can either:

  1. Use consistent formal register:
"device-data-no-data": "Si ha conectado su dispositivo, vuelva más tarde para ver sus datos.",
  1. Use consistent informal register:
"device-data-no-data": "Si has conectado tu dispositivo, vuelve más tarde para ver tus datos.",

The informal option (#2) tends to be more common in modern applications and creates a friendlier tone, but either option would resolve the inconsistency.

@dylanbox dylanbox force-pushed the dylan/device-connection-text branch from d8ea2d6 to f3cd331 Compare February 21, 2025 19:32
"external-account-refresh": "Refresh",
"external-account-remove": "Remove",
"device-data-no-data": "If you have connected Apple Health, Google Fit, Fitbit, or Garmin, check back later to view your data.",
"device-data-no-data": "If you connected your device, check back later to view your data.",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this reads slightly better with "have connected" as it was before. Several of the other languages still seem to be using "have connected" as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lynnfaraday Done!

@dylanbox dylanbox force-pushed the dylan/device-connection-text branch from f3cd331 to 7626788 Compare February 24, 2025 18:36
Copy link
Contributor

@lynnfaraday lynnfaraday left a comment

Choose a reason for hiding this comment

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

Probably want to update to latest main to get PT-PT in there.

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.

3 participants