-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[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
Conversation
""" WalkthroughThis 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 Changes
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
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
There was a problem hiding this 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 CopyTo 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 assetup.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 clarityThe 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 underself_hosted_maintenance_message
are very long and verbose. Consider adopting shorter, consistent identifiers (for example,service_start_failure
andview_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 labelView 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'
, 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'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
📒 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 ApprovedThe 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.txtLength of output: 868
Self-hosted maintenance message keys are consistent
I’ve compared theself_hosted_maintenance_message
keys inpackages/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 thedescription_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 sameself_hosted_maintenance_message
section (with identical key names) has been added to everytranslations.json
underpackages/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 doneLength of output: 2921
All locales include
self_hosted_maintenance_message
Verified that everytranslations.json
underpackages/i18n/src/locales
contains the newself_hosted_maintenance_message
section—no missing keys detected.packages/i18n/src/locales/sk/translations.json (1)
2463-2468
: Translation keys added correctly
The newself_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 placementYou’ve correctly added the trailing comma after the
description_versions
block (line 2461) to introduce the newself_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 refactoredMaintenanceMessage
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 thedescription_versions
block correctly separates that object from the newly introducedself_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
Ensureself_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.txtLength 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 doneLength of output: 5224
All locales updated
Confirmed thatself_hosted_maintenance_message
(and its subkeys) exists in everytranslations.json
underpackages/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 ofdescription_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 underpackages/i18n/src/locales/
has the sameself_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 doneLength 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 theuseTranslation
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 underpackages/i18n
. Let’s list the files in that package and locate theuseTranslation
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 viamakeAutoObservable
, and thet
method readscurrentLocale
andtranslations
(both observables). WrappingMaintenanceMessage
withobserver
is required so it will re-render when the language (and thus its translations) change.No changes needed here.
Description
This PR updates maintenance page ux copy.
Type of Change
References
[WEB-3931]
Summary by CodeRabbit
New Features
Refactor