Skip to content

[WEB-3931] chore: maintenance page ux copy #7135

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

Merged
merged 3 commits into from
Jun 4, 2025

Conversation

anmolsinghbhatia
Copy link
Collaborator

@anmolsinghbhatia anmolsinghbhatia commented May 29, 2025

Description

This PR updates maintenance page ux copy.

Type of Change

  • Improvement

References

[WEB-3931]

Summary by CodeRabbit

  • New Features

    • Added multilingual support for maintenance messages related to self-hosted Plane instance startup issues, now available in multiple languages.
  • Refactor

    • Maintenance message display now uses dynamic translations, providing localized content based on user language settings.

Copy link
Contributor

coderabbitai bot commented May 29, 2025

"""

Walkthrough

This update introduces a new "self_hosted_maintenance_message" translation section containing two keys to all supported locale JSON files, providing messages for Plane service startup issues and troubleshooting instructions. The MaintenanceMessage React component is refactored to use these translation keys via a translation hook, enabling internationalization and dynamic language support.

Changes

Files/Groups Change Summary
packages/i18n/src/locales/*/translations.json Added "self_hosted_maintenance_message" section with two keys/messages about Plane startup failure and log advice.
web/ce/components/instance/maintenance-message.tsx Refactored component to use translations via useTranslation hook and MobX observer for i18n support.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MaintenanceMessage (Component)
    participant useTranslation (Hook)
    participant Locale JSON (Translations)

    User->>MaintenanceMessage: Render component
    MaintenanceMessage->>useTranslation: Request translation for key 1
    useTranslation->>Locale JSON: Fetch localized string for key 1
    useTranslation-->>MaintenanceMessage: Return localized string 1
    MaintenanceMessage->>useTranslation: Request translation for key 2
    useTranslation->>Locale JSON: Fetch localized string for key 2
    useTranslation-->>MaintenanceMessage: Return localized string 2
    MaintenanceMessage-->>User: Display translated messages
Loading

Suggested labels

🌟improvement, ready_to_merge

Suggested reviewers

  • prateekshourya29
  • vamsikrishnamathala
  • sriramveeraghanta

Poem

A message once in English, now travels far and wide,
With translations in its pocket, across the globe it rides.
From Tokyo to Madrid, from Warsaw to Saigon,
Plane’s maintenance advice is now truly multilingual—on!
🐇🌍✨
"""


📜 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 f683bb2 and c6e26d5.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • packages/i18n/src/locales/zh-CN/translations.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/i18n/src/locales/zh-CN/translations.json
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Analyze (python)

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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

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

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 generate sequence diagram to generate a sequence diagram of the changes in 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

makeplane bot commented May 29, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

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

🧹 Nitpick comments (13)
packages/i18n/src/locales/es/translations.json (1)

2467-2467: Translate “View Logs” and “logs” to Spanish
For a fully localized UX, convert the English terms to Spanish. For example:

- "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure":
-   "Selecciona View Logs desde setup.sh y los logs de Docker para estar seguro."
+ "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure":
+   "Selecciona 'Ver registros' desde setup.sh y los registros de Docker para estar seguro."
packages/i18n/src/locales/it/translations.json (1)

2463-2464: Suggest Refining Italian Copy

To make the Italian UX copy more idiomatic and avoid mixing English terms, consider the following tweaks:

-"plane_didnt_start_up_this_could_be_because_one-or-more_plane_services_failed_to_start": "Plane non si è avviato. Questo potrebbe essere dovuto al fatto che uno o più servizi Plane non sono riusciti ad avviarsi.",
-"choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Scegli View Logs da setup.sh e dai log Docker per essere sicuro."
+"plane_didnt_start_up_this_could_be_because_one-or-more_plane_services_failed_to_start": "Plane non si è avviato correttamente. Questo potrebbe dipendere dal fatto che uno o più servizi di Plane non siano riusciti a partire.",
+"choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Visualizza i log di setup.sh e quelli di Docker per ulteriori dettagli."
packages/i18n/src/locales/pl/translations.json (1)

2465-2466: Wrap UI element names in quotes for clarity.
Please consider quoting UI labels like "View Logs" and file references such as setup.sh to distinguish them from the surrounding text.

packages/i18n/src/locales/fr/translations.json (1)

2462-2467: Add self_hosted_maintenance_message French translations
The new translation keys mirror the updates in other locales and integrate correctly under the root object. Please verify that the JSON remains valid (no trailing commas) and that the key names exactly match those used in the component refactor.

Also, consider fully localizing the UI action “View Logs” into French for consistency. For example:

@@ -2465,2 +2465,2
-    "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Choisissez View Logs depuis setup.sh et les logs Docker pour en être sûr."
+    "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Sélectionnez « Afficher les logs » via setup.sh et consultez également les logs Docker pour vous en assurer."
packages/i18n/src/locales/ua/translations.json (1)

2465-2466: Refine Ukrainian copy for clarity.

Consider rephrasing and adding quotes for UI labels, for example:

"self_hosted_maintenance_message": {
  "plane_didnt_start_up_this_could_be_because_one_or_more_plane_services_failed_to_start":
    "Plane не запустився. Це може статися через те, що один або декілька сервісів Plane не змогли стартувати.",
  "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure":
    "Перегляньте «View Logs» у файлі setup.sh та Docker-логах, щоб упевнитися."
}
packages/i18n/src/locales/sk/translations.json (1)

2464-2467: Suggestion: Refine Slovak phrasing for clarity
The second message can be made more natural in Slovak. For example:

- "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Vyberte View Logs z setup.sh a Docker logov, aby ste si boli istí."
+ "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Pre istotu si skontrolujte logy zo skriptu setup.sh a z Dockeru."
packages/i18n/src/locales/de/translations.json (1)

2462-2465: Refine German UX copy for clarity

The English phrase “View Logs” remains untranslated and may confuse German users. Consider a more idiomatic translation, e.g.:

- "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Wählen Sie View Logs aus setup.sh und Docker-Logs, um sicherzugehen."
+ "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Rufen Sie die Protokolle von setup.sh und den Docker-Logs auf, um das Problem nachzuvollziehen."

This aligns the message with German localization guidelines.

packages/i18n/src/locales/ro/translations.json (1)

2458-2459: Verify UI label localization.
The string retains the English phrase “View Logs.” Please confirm whether this matches an existing UI label or if it should be translated for Romanian users (e.g., “Vizualizați jurnalele”) to maintain UX consistency.

packages/i18n/src/locales/pt-BR/translations.json (2)

2459-2462: Simplify translation key names for maintainability
The newly added keys under self_hosted_maintenance_message are very long and verbose. Consider adopting shorter, consistent identifiers (for example, service_start_failure and view_logs_instructions) to improve readability and align with existing naming patterns. Additionally, ensure these key names are exactly mirrored in the English source and all other locale files to prevent missing translations at runtime.


2461-2461: Localize the “View Logs” label
The UI label View Logs remains in English. To maintain full localization, translate it into Portuguese—e.g., Visualizar logs—or confirm it matches the actual interface text.

packages/i18n/src/locales/ja/translations.json (1)

2463-2467: Check translation consistency for UI labels.

The second message references the English term “View Logs” within the Japanese string. Please verify that the actual UI button or link uses this exact label so users can easily map from the text to the interface.

packages/i18n/src/locales/tr-TR/translations.json (1)

2445-2445: Remove HTML entity – use plain apostrophe in JSON string
The translation value includes &apos;, which is an HTML entity. In a JSON locale file, use a plain apostrophe (') instead. For example:

- "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Emin olmak için setup.sh ve Docker loglarından View Logs&apos;u seçin."
+ "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Emin olmak için setup.sh ve Docker loglarından View Logs'u seçin."
packages/i18n/src/locales/vi-VN/translations.json (1)

2462-2465: LGTM! Vietnamese translations are well-implemented.

The Vietnamese translations accurately convey the maintenance message about Plane services failing to start and directing users to check logs. The JSON structure is correct and properly formatted.

Consider using shorter, more maintainable translation keys:

"self_hosted_maintenance_message": {
-  "plane_didnt_start_up_this_could_be_because_one_or_more_plane_services_failed_to_start": "Plane không khởi động được. Điều này có thể do một hoặc nhiều dịch vụ Plane không khởi động được.",
-  "choose_view_logs_from_setup_sh_and_docker_logs_to_be_sure": "Chọn View Logs từ setup.sh và log Docker để chắc chắn."
+  "startup_failure": "Plane không khởi động được. Điều này có thể do một hoặc nhiều dịch vụ Plane không khởi động được.",
+  "check_logs_instruction": "Chọn View Logs từ setup.sh và log Docker để chắc chắn."
}

This would improve maintainability while keeping the same functionality.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 141cb17 and f683bb2.

📒 Files selected for processing (20)
  • packages/i18n/src/locales/cs/translations.json (1 hunks)
  • packages/i18n/src/locales/de/translations.json (1 hunks)
  • packages/i18n/src/locales/en/translations.json (1 hunks)
  • packages/i18n/src/locales/es/translations.json (1 hunks)
  • packages/i18n/src/locales/fr/translations.json (1 hunks)
  • packages/i18n/src/locales/id/translations.json (1 hunks)
  • packages/i18n/src/locales/it/translations.json (1 hunks)
  • packages/i18n/src/locales/ja/translations.json (1 hunks)
  • packages/i18n/src/locales/ko/translations.json (1 hunks)
  • packages/i18n/src/locales/pl/translations.json (1 hunks)
  • packages/i18n/src/locales/pt-BR/translations.json (1 hunks)
  • packages/i18n/src/locales/ro/translations.json (1 hunks)
  • packages/i18n/src/locales/ru/translations.json (1 hunks)
  • packages/i18n/src/locales/sk/translations.json (1 hunks)
  • packages/i18n/src/locales/tr-TR/translations.json (1 hunks)
  • packages/i18n/src/locales/ua/translations.json (1 hunks)
  • packages/i18n/src/locales/vi-VN/translations.json (1 hunks)
  • packages/i18n/src/locales/zh-CN/translations.json (1 hunks)
  • packages/i18n/src/locales/zh-TW/translations.json (1 hunks)
  • web/ce/components/instance/maintenance-message.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
web/ce/components/instance/maintenance-message.tsx (2)
packages/i18n/src/hooks/use-translation.ts (1)
  • useTranslation (23-35)
packages/i18n/src/store/index.ts (1)
  • t (211-232)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (20)
packages/i18n/src/locales/id/translations.json (1)

2456-2456: Trailing comma introduction
A comma was added after the closing brace of "description_versions" to enable insertion of the new block. The JSON syntax here is correct.

packages/i18n/src/locales/it/translations.json (2)

2461-2462: Structure Addition Approved

The new self_hosted_maintenance_message section is correctly appended—there’s a comma after the preceding block and no trailing comma after the last key, which keeps the JSON valid.


2462-2465:

✅ Verification successful

Verify Key Consistency Across Locales

Ensure the Italian locale uses exactly the same translation keys as the English (and other) locale files to avoid runtime missing‐key errors.


🏁 Script executed:

#!/bin/bash
# Verify that all locale files have identical keys under self_hosted_maintenance_message
for lang in en it de fr ja ko; do
  jq -r '.self_hosted_maintenance_message | keys[]' packages/i18n/src/locales/${lang}/translations.json | sort > /tmp/keys_${lang}.txt
done
diff /tmp/keys_en.txt /tmp/keys_it.txt

Length of output: 868


Self-hosted maintenance message keys are consistent
I’ve compared the self_hosted_maintenance_message keys in packages/i18n/src/locales/it/translations.json against the English source and found them to match exactly—no missing or extra entries.

packages/i18n/src/locales/pl/translations.json (1)

2464-2467: New translation entries for self-hosted maintenance messages look correct.
The keys match the ones added in other locales and the Polish strings accurately convey the intended meaning.

packages/i18n/src/locales/ru/translations.json (2)

2464-2464: Skip minor formatting change: trailing comma
The added comma after closing the description_versions object is syntactically correct and aligns with the expected JSON structure.


2469-2469: Skip minor formatting change: file closure
The closing brace for the root object is correctly placed.

packages/i18n/src/locales/ua/translations.json (1)

2464-2467: Ensure uniform updates across all locale files.

Verify that the new self_hosted_maintenance_message section and its keys are added identically in every supported locale (en, de, es, etc.) to maintain consistent internationalization.

packages/i18n/src/locales/cs/translations.json (1)

2462-2467:

✅ Verification successful

Ensure new translation keys are synchronized across all locales
The JSON structure and comma placement are correct, and the Czech copy reads well. Please verify that the same self_hosted_maintenance_message section (with identical key names) has been added to every translations.json under packages/i18n/src/locales.

Run this script from the repo root to list any locale files missing the new keys:


🏁 Script executed:

#!/bin/bash
# Verify all locale translation files include the new self_hosted_maintenance_message section
for file in packages/i18n/src/locales/*/translations.json; do
  if ! grep -q '"self_hosted_maintenance_message"' "$file"; then
    echo "Missing in: $file"
  fi
done

Length of output: 2921


All locales include self_hosted_maintenance_message
Verified that every translations.json under packages/i18n/src/locales contains the new self_hosted_maintenance_message section—no missing keys detected.

packages/i18n/src/locales/sk/translations.json (1)

2463-2468: Translation keys added correctly
The new self_hosted_maintenance_message section is well-formed and follows the existing JSON structure. It aligns with other locale files, enabling dynamic internationalization of the maintenance page UX copy.

packages/i18n/src/locales/de/translations.json (1)

2461-2466: Ensure JSON validity and comma placement

You’ve correctly added the trailing comma after the description_versions block (line 2461) to introduce the new self_hosted_maintenance_message section—this maintains valid JSON structure. Validate with your linter/formatter to ensure no syntax errors.

packages/i18n/src/locales/ro/translations.json (1)

2457-2461: Validate new translation section and key naming.
The addition of the top-level "self_hosted_maintenance_message" block correctly follows the existing snake_case conventions and indentation. Confirm that these keys are invoked by the refactored MaintenanceMessage component and that analogous sections exist in all other locale JSON files to ensure consistency. Also double-check JSON syntax around this block (no stray commas).

packages/i18n/src/locales/zh-CN/translations.json (2)

2443-2443: Valid JSON structure: Added separator comma
The comma after the closing brace of the description_versions block correctly separates that object from the newly introduced self_hosted_maintenance_message section, ensuring valid JSON.


2448-2448: No action needed on the file-level closing brace.

packages/i18n/src/locales/en/translations.json (1)

2299-2301:

✅ Verification successful

Verify the new translation section across all locales
Ensure self_hosted_maintenance_message and its two keys have been added to every supported locale JSON to avoid missing translations. You can run:


🏁 Script executed:

#!/bin/bash
# Check which locale files are missing the new section:
rg -L '"self_hosted_maintenance_message"' -g 'packages/i18n/src/locales/*/translations.json'

Length of output: 1743


🏁 Script executed:

#!/bin/bash
# List all locale directories
ls -1 packages/i18n/src/locales | sort > all_locales.txt

# List locales containing the new key
rg -l '"self_hosted_maintenance_message"' -g 'packages/i18n/src/locales/*/translations.json' \
  | sed 's|packages/i18n/src/locales/\([^/]*\)/translations.json|\1|' \
  | sort > has_key.txt

# Show locales missing the new translation section
echo "Locales missing \"self_hosted_maintenance_message\":"
comm -23 all_locales.txt has_key.txt

Length of output: 456


#!/bin/bash
# Gather all locale directories
find packages/i18n/src/locales -maxdepth 1 -mindepth 1 -type d | sort | xargs -n1 basename > all_locales.txt

# Gather locales containing the new key
rg -l '"self_hosted_maintenance_message"' -g 'packages/i18n/src/locales/*/translations.json' \
  | sed 's|.*/\([^/]*\)/translations.json|\1|' | sort > has_key.txt

# List any locales missing the translation section
echo "Locales missing \"self_hosted_maintenance_message\":"
grep -Fvx -f has_key.txt all_locales.txt || echo "None"

#!/bin/bash
set -euo pipefail

# Gather all locale directories under packages/i18n/src/locales
find packages/i18n/src/locales -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort > all_locales.txt

# Gather locales that contain the new key
grep -rl '"self_hosted_maintenance_message"' packages/i18n/src/locales/*/translations.json \
  | sed 's|.*/\([^/]*\)/translations.json|\1|' | sort > has_key.txt

# List any locales missing the translation section
echo "Locales missing \"self_hosted_maintenance_message\":"
grep -Fxv -f has_key.txt all_locales.txt || echo "None"

🏁 Script executed:

#!/usr/bin/env bash
echo "Locales missing \"self_hosted_maintenance_message\":"
for file in packages/i18n/src/locales/*/translations.json; do
  locale=$(basename "$(dirname "$file")")
  if ! grep -Fq '"self_hosted_maintenance_message"' "$file"; then
    echo "- $locale"
  fi
done

Length of output: 5224


All locales updated
Confirmed that self_hosted_maintenance_message (and its subkeys) exists in every translations.json under packages/i18n/src/locales/*. No missing translations remain.

packages/i18n/src/locales/zh-TW/translations.json (2)

2464-2465: Ensure valid JSON structure by closing the previous block with a comma
The comma after the closing brace of description_versions is required to introduce the new translation section without breaking the JSON.


2466-2470:

✅ Verification successful

Add self_hosted_maintenance_message translations
The new keys are well-named and the values accurately reflect the intended UX copy. To ensure all locales stay in sync, please verify that every other JSON under packages/i18n/src/locales/ has the same self_hosted_maintenance_message section with identical keys.


🏁 Script executed:

#!/bin/bash
# Verify that every locale file contains the new translation section
find packages/i18n/src/locales -name '*.json' | while read file; do
  if ! grep -q '"self_hosted_maintenance_message":' "$file"; then
    echo "Missing in $file"
  fi
done

Length of output: 6786


All locale translations.json files include self_hosted_maintenance_message – no action required
I ran:

rg '"self_hosted_maintenance_message":' -H packages/i18n/src/locales/*/translations.json

and confirmed the new section is present in every locale’s translations.json.

packages/i18n/src/locales/ja/translations.json (1)

2463-2467: Verify JSON syntax and placement of the new translation section.

The new self_hosted_maintenance_message block is correctly indented under the root object. Confirm that the closing brace for "description_versions" has its comma and that the final section does not introduce an extra trailing comma before the file’s closing brace.

web/ce/components/instance/maintenance-message.tsx (3)

1-2: Proper imports for internationalization.

Good addition of the necessary imports for MobX observer pattern and internationalization support.


8-16: Excellent internationalization implementation.

The component correctly uses the translation keys to replace hardcoded English text. The translation keys match the ones added to the locale files, and the component structure is preserved.

The line break (<br />) placement maintains the original visual formatting while now displaying localized content.


4-6:

✅ Verification successful

Verify the necessity of MobX observer wrapper.

The component is now wrapped with observer and uses the useTranslation hook correctly. This enables the component to reactively update when the language changes.

Please verify that the MobX observer wrapper is necessary for this component. Run the following script to check if the translation store uses MobX observables:


🏁 Script executed:

#!/bin/bash
# Description: Check if the translation store uses MobX observables that would require the observer wrapper

# Search for MobX observable usage in the translation store
rg -A 5 -B 5 "makeObservable|observable|action" packages/i18n/src/store/

Length of output: 74


I’m not finding a store folder or any MobX usage under packages/i18n. Let’s list the files in that package and locate the useTranslation hook to see how it’s wired:


🏁 Script executed:

#!/bin/bash
# 1. List files under packages/i18n/src
echo "=== files in packages/i18n/src ==="
find packages/i18n/src -maxdepth 2 -type f

# 2. Check for any MobX patterns in the entire i18n package
echo "=== MobX usage in packages/i18n ==="
rg -A 3 -B 3 "makeObservable|observable|action|@observable|@action|autorun|reaction|computed|@computed" packages/i18n || echo "→ no MobX patterns found"

# 3. Locate definition of useTranslation across the repo
echo "=== useTranslation definitions ==="
rg "useTranslation" -A 2 -B 2 -g "*.ts*" .

Length of output: 78493


Let’s inspect the translation hook, context and store implementations (plus the component) to confirm whether any MobX observables are accessed:


🏁 Script executed:

#!/bin/bash
# Show the MaintenanceMessage component wrapper
echo "=== web/ce/components/instance/maintenance-message.tsx ==="
sed -n '1,50p' web/ce/components/instance/maintenance-message.tsx || echo "→ file not found"

# Show the useTranslation hook
echo "=== packages/i18n/src/hooks/use-translation.ts ==="
sed -n '1,200p' packages/i18n/src/hooks/use-translation.ts || echo "→ file not found"

# Show the translation context provider
echo "=== packages/i18n/src/context/index.tsx ==="
sed -n '1,200p' packages/i18n/src/context/index.tsx || echo "→ file not found"

# Show any store logic
echo "=== packages/i18n/src/store/index.ts ==="
sed -n '1,200p' packages/i18n/src/store/index.ts || echo "→ file not found"

Length of output: 10282


Keep the MobX observer on MaintenanceMessage

The TranslationStore is made observable via makeAutoObservable, and the t method reads currentLocale and translations (both observables). Wrapping MaintenanceMessage with observer is required so it will re-render when the language (and thus its translations) change.

No changes needed here.

@sriramveeraghanta sriramveeraghanta merged commit b2ccca0 into preview Jun 4, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the chore-maintenance-ux-copy branch June 4, 2025 08:08
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.

5 participants