Skip to content

ECHO-378 text change for library not available message#263

Merged
ussaama merged 1 commit intomainfrom
library-text-change
Aug 12, 2025
Merged

ECHO-378 text change for library not available message#263
ussaama merged 1 commit intomainfrom
library-text-change

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Aug 12, 2025

Summary by CodeRabbit

  • Chores

    • Improved the in-app message shown when the library is unavailable, prompting users to request access to unlock the feature.
    • Updated translations to clearer, more descriptive copy across English, German, Spanish, French, and Dutch.
    • Standardized localization entries and removed outdated phrasing to keep messages consistent.
  • Style

    • Refined copy for the library-unavailable notice to be more actionable and user-friendly across supported languages.

@linear
Copy link
Copy Markdown

linear bot commented Aug 12, 2025

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 12, 2025

Walkthrough

Renamed translation key library.not.available to library.not.available.message across locales and updated the copy to “request access to unlock this feature.” Adjusted the usage in ProjectLibrary.tsx. Updated corresponding PO and TS locale files for de, en, es, fr, and nl.

Changes

Cohort / File(s) Summary
Component usage update
echo/frontend/src/routes/project/library/ProjectLibrary.tsx
Switched i18n key to library.not.available.message and updated message text to “request access to unlock this feature.”
Locale PO updates
echo/frontend/src/locales/en-US.po, .../de-DE.po, .../es-ES.po, .../fr-FR.po, .../nl-NL.po
Renamed key to library.not.available.message; added longer “request access” message; marked old key as obsolete.
Locale TS data updates
echo/frontend/src/locales/de-DE.ts, .../es-ES.ts, .../fr-FR.ts, .../nl-NL.ts, .../en-US.ts
Added/updated translation map entries for the new key (some files show data additions; en-US.ts appears formatting-only).

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Replace “Contact sales” with “Request access” messaging in library not available flow (ECHO-378)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Added legacy key library.not.available in fr-FR TS locale data (echo/frontend/src/locales/fr-FR.ts) Objective targets new “request access” messaging; adding the old key is unnecessary and not referenced.
Added legacy key library.not.available in nl-NL TS locale data (echo/frontend/src/locales/nl-NL.ts) Same as above; not required for the objective and may be dead data.

Possibly related PRs

Suggested labels

improvement

Suggested reviewers

  • spashii
  • ArindamRoy23
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch library-text-change

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@ussaama ussaama requested a review from spashii August 12, 2025 14:53
@ussaama ussaama enabled auto-merge August 12, 2025 14:53
@coderabbitai coderabbitai bot requested a review from ArindamRoy23 August 12, 2025 14:54
@ussaama ussaama added this pull request to the merge queue Aug 12, 2025
Merged via the queue into main with commit 61f3583 Aug 12, 2025
11 of 12 checks passed
@ussaama ussaama deleted the library-text-change branch August 12, 2025 14:58
Copy link
Copy Markdown
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: 4

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c562339 and fcf8d12.

📒 Files selected for processing (11)
  • echo/frontend/src/locales/de-DE.po (2 hunks)
  • echo/frontend/src/locales/de-DE.ts (1 hunks)
  • echo/frontend/src/locales/en-US.po (2 hunks)
  • echo/frontend/src/locales/en-US.ts (1 hunks)
  • echo/frontend/src/locales/es-ES.po (2 hunks)
  • echo/frontend/src/locales/es-ES.ts (1 hunks)
  • echo/frontend/src/locales/fr-FR.po (2 hunks)
  • echo/frontend/src/locales/fr-FR.ts (1 hunks)
  • echo/frontend/src/locales/nl-NL.po (2 hunks)
  • echo/frontend/src/locales/nl-NL.ts (1 hunks)
  • echo/frontend/src/routes/project/library/ProjectLibrary.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: ci-check-server
🔇 Additional comments (12)
echo/frontend/src/routes/project/library/ProjectLibrary.tsx (1)

227-230: LGTM - Clean translation key migration.

The translation key change from library.not.available to library.not.available.message is implemented correctly. The new key provides a more descriptive message that aligns perfectly with the PR objective to change from "Contact sales" to "Request Access". This 100x change will definitely improve user perception by making the feature feel more exclusive and valuable rather than transactional.

echo/frontend/src/locales/de-DE.ts (1)

1-1: LGTM - German localization properly updated.

The new translation key library.not.available.message has been added with appropriate German text: "Es scheint, dass die Bibliothek für Ihr Konto nicht verfügbar ist. Bitte fordern Sie Zugriff an, um dieses Feature zu entsperren." This maintains consistency across all locales and delivers the same improved UX messaging in German.

echo/frontend/src/locales/nl-NL.ts (1)

1-1: LGTM - Dutch localization follows the pattern.

The Dutch translation properly implements the new library.not.available.message key with the text: "Het lijkt erop dat de bibliotheek niet beschikbaar is voor uw account. Vraag om toegang om deze functionaliteit te ontgrendelen." Consistent with the other locales and maintains the "Request Access" messaging strategy.

echo/frontend/src/locales/es-ES.ts (1)

1-1: LGTM - Spanish localization properly implemented.

The Spanish translation correctly adds the new library.not.available.message key with: "Parece que la biblioteca no está disponible para tu cuenta. Por favor, solicita acceso para desbloquear esta funcionalidad." This maintains the consistent user experience across all supported languages.

echo/frontend/src/locales/es-ES.po (2)

61-65: LGTM - PO file properly handles key migration.

The PO file correctly marks the old library.not.available key as obsolete (line 63-64) while introducing the new library.not.available.message key. This is exactly how you handle translation key migrations - clean deprecation of the old key while adding the new one.


1243-1245: LGTM - New translation key properly added.

The new library.not.available.message key is properly implemented with the Spanish translation that conveys the "request access" messaging instead of "contact sales". This aligns perfectly with the ECHO-378 requirements to make users feel they're unlocking something valuable rather than starting a negotiation.

echo/frontend/src/locales/de-DE.po (1)

61-65: Deprecated key clean-up verified—no remaining runtime references
Search across non-locales code for library.not.available returned zero hits, confirming it’s safe to mark the key as obsolete. LGTM.

echo/frontend/src/locales/nl-NL.po (1)

61-65: No lingering references to library.not.available detected—LGTM.

echo/frontend/src/locales/en-US.ts (1)

1-1: Verified: no runtime references to the old key
Ripgrep scans returned zero hits for both library.not.available (excluding .message) and hard-coded “Contact sales” outside of the locales. The new key is in use everywhere—feel free to ship.

• Cleanup suggestion: remove the obsolete library.not.available entry on your next i18n extract to keep bundles lean.

echo/frontend/src/locales/fr-FR.ts (1)

1-1: No usage of deprecated localization keys found

  • The grep search returned no matches for library.not.available (excluding .message) or library.contact.sales outside the locales directory.
  • All components now reference the new .message suffix.
  • It’s safe to remove the old library.not.available key during the next locale cleanup.

LGTM.

echo/frontend/src/locales/en-US.po (1)

1285-1288: LGTM: library.not.available.message Verified Across All Locales

• echo/frontend/src/locales/de-DE.po
• echo/frontend/src/locales/en-US.po
• echo/frontend/src/locales/es-ES.po
• echo/frontend/src/locales/fr-FR.po
• echo/frontend/src/locales/nl-NL.po

Key is present and updated in every supported locale. No further action required.

echo/frontend/src/locales/fr-FR.po (1)

61-65: Obsoleting the old FR key is correct. LGTM.

library.not.available is properly marked obsolete.

Comment on lines 1239 to +1241
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available"
msgstr "Bibliothek nicht verfügbar"
msgid "library.not.available.message"
msgstr "Es scheint, dass die Bibliothek für Ihr Konto nicht verfügbar ist. Bitte fordern Sie Zugriff an, um dieses Feature zu entsperren."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

New key and German copy LGTM; tiny style nit (optional)

Text is clear and on-brand. Optional: consider “Funktion” instead of the anglicism “Feature” if you want stricter DE localization consistency.

-msgstr "Es scheint, dass die Bibliothek für Ihr Konto nicht verfügbar ist. Bitte fordern Sie Zugriff an, um dieses Feature zu entsperren."
+msgstr "Es scheint, dass die Bibliothek für Ihr Konto nicht verfügbar ist. Bitte fordern Sie Zugriff an, um diese Funktion zu entsperren."

Follow-up: The issue also states “inform the account manager to contact the user who clicked.” I don’t see code changes here wiring the Request Access button to any notification flow. If that’s intended, I can draft the minimal handler + API endpoint.

Do you want me to open an issue and provide a patch that posts an access-request event (e.g., Segment/PostHog/Slack/Webhook/Backend API) when the user clicks “Request Access”?

📝 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
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available"
msgstr "Bibliothek nicht verfügbar"
msgid "library.not.available.message"
msgstr "Es scheint, dass die Bibliothek für Ihr Konto nicht verfügbar ist. Bitte fordern Sie Zugriff an, um dieses Feature zu entsperren."
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available.message"
msgstr "Es scheint, dass die Bibliothek für Ihr Konto nicht verfügbar ist. Bitte fordern Sie Zugriff an, um diese Funktion zu entsperren."
🤖 Prompt for AI Agents
In echo/frontend/src/locales/de-DE.po around lines 1239-1241, the German msgstr
uses the anglicism "Feature" — replace it with "Funktion" for stricter DE
consistency; additionally, wire the "Request Access" flow referenced in
src/routes/project/library/ProjectLibrary.tsx line ~227: add a click handler on
the Request Access button that calls a new frontend API function which POSTs an
access-request event to a backend endpoint (or emits an analytics event to
Segment/PostHog/Slack webhook), create the minimal backend endpoint to accept
and forward/record the request (or integrate with chosen analytics), and ensure
the handler shows user feedback (success/error) and logs the request for the
account manager.

Comment on lines +61 to +65
#. js-lingui-explicit-id
#: src/routes/project/library/ProjectLibrary.tsx:227
#~ msgid "library.not.available"
#~ msgstr "It looks like the library is not available for your account. Please contact sales to unlock this feature."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Old key correctly deprecated; verify no remaining references in code. LGTM.

Marking library.not.available as obsolete is right. Let’s double-check there are no runtime references lingering outside .po files.


🏁 Script executed:

#!/bin/bash
# 1) Find any remaining usages of old key (exclude .po files)
rg -n "library\\.not\\.available" --glob '!**/*.po' | rg -v "library\\.not\\.available\\.message" || true

# 2) Ensure new key is referenced where expected
rg -n "library\\.not\\.available\\.message" -A 3 -B 3 || true

# 3) Ensure "Contact sales" copy is not used anymore (exclude .po files)
rg -n '"Contact sales"|Contact sales' --glob '!**/*.po' || true

# 4) Inspect usage of the Request Access button to confirm click handling exists
rg -n "library\\.request\\.access" --glob '!**/*.po' -A 8 -B 8 || true

Length of output: 280767


Remove leftover library.not.available key and old “Contact sales” copy

The ripgrep results show the deprecated key still lives in your JS messages bundle and no hook-up for the new “Request Access” button:

  • src/locales/en-US.ts: still defines
    "library.not.available": ["It looks like the library is not available for your account. Please contact sales to unlock this feature."]
    – remove this entry and its old copy.
  • Confirm no code is falling back to library.not.available at runtime.
  • There’s no usage of Trans id="library.request.access" in your UI – add or verify a “Request Access” button in ProjectLibrary.tsx that uses this key and wires up the click handler.

Please address these spots to fully retire the old key and hook up the new flow.

🤖 Prompt for AI Agents
In echo/frontend/src/locales/en-US.po around lines 61-65, remove the deprecated
library.not.available key and its old copy; then edit src/locales/en-US.ts to
delete the "library.not.available" entry so it no longer appears in the messages
bundle; search the codebase to ensure no components or fallbacks reference
"library.not.available" and update any remaining references to use the new
"library.request.access" key; finally, in
src/routes/project/library/ProjectLibrary.tsx ensure the UI renders a Trans
id="library.request.access" for the Request Access button and wire its onClick
to the existing request-access handler (or add a handler that dispatches the
request flow) so the new key is used at runtime.

Comment on lines 1243 to 1246
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available"
msgstr "Bibliothèque non disponible"
msgid "library.not.available.message"
msgstr "Il semble que la bibliothèque n'est pas disponible pour votre compte. Veuillez demander un accès pour débloquer cette fonctionnalité."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

FR phrasing nit: prefer “l'accès” over “un accès”.

Reads more natural and idiomatic in French.

Apply this minimal diff:

-msgstr "Il semble que la bibliothèque n'est pas disponible pour votre compte. Veuillez demander un accès pour débloquer cette fonctionnalité."
+msgstr "Il semble que la bibliothèque n'est pas disponible pour votre compte. Veuillez demander l'accès pour débloquer cette fonctionnalité."
📝 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
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available"
msgstr "Bibliothèque non disponible"
msgid "library.not.available.message"
msgstr "Il semble que la bibliothèque n'est pas disponible pour votre compte. Veuillez demander un accès pour débloquer cette fonctionnalité."
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available.message"
msgstr "Il semble que la bibliothèque n'est pas disponible pour votre compte. Veuillez demander l'accès pour débloquer cette fonctionnalité."
🤖 Prompt for AI Agents
In echo/frontend/src/locales/fr-FR.po around lines 1243 to 1246, the French
translation uses "un accès" which is less natural; update the msgstr to replace
"un accès" with "l'accès" so the string reads: "Il semble que la bibliothèque
n'est pas disponible pour votre compte. Veuillez demander l'accès pour débloquer
cette fonctionnalité." Apply this minimal change to the msgstr only.

Comment on lines 1397 to 1400
#: src/routes/project/library/ProjectLibrary.tsx:227
msgid "library.not.available"
msgstr "Bibliotheek niet beschikbaar"
msgid "library.not.available.message"
msgstr "Het lijkt erop dat de bibliotheek niet beschikbaar is voor uw account. Vraag om toegang om deze functionaliteit te ontgrendelen."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Align NL tone-of-voice and phrasing

Most NL strings use the informal “je/jij”. This one switches to formal “uw”. Also “Vraag om toegang” reads awkward—“Vraag toegang aan” is the usual phrasing. Recommend:

-msgstr "Het lijkt erop dat de bibliotheek niet beschikbaar is voor uw account. Vraag om toegang om deze functionaliteit te ontgrendelen."
+msgstr "Het lijkt erop dat de bibliotheek niet beschikbaar is voor je account. Vraag toegang aan om deze functionaliteit te ontgrendelen."
🤖 Prompt for AI Agents
In echo/frontend/src/locales/nl-NL.po around lines 1397 to 1400, the Dutch
string uses formal "uw" and an awkward phrase; change it to the informal tone
and natural phrasing. Replace the msgstr with a version using "je/jij" and
"Vraag toegang aan", for example: "Het lijkt erop dat de bibliotheek niet
beschikbaar is voor je account. Vraag toegang aan om deze functionaliteit te
ontgrendelen." Ensure punctuation matches existing file style.

spashii pushed a commit that referenced this pull request Nov 18, 2025
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Improved the in-app message shown when the library is unavailable,
prompting users to request access to unlock the feature.
* Updated translations to clearer, more descriptive copy across English,
German, Spanish, French, and Dutch.
* Standardized localization entries and removed outdated phrasing to
keep messages consistent.

* **Style**
* Refined copy for the library-unavailable notice to be more actionable
and user-friendly across supported languages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants