Add Persian locale and QADR self-hosted deployment support#2562
Add Persian locale and QADR self-hosted deployment support#2562danialsamiei wants to merge 4 commits intokoala73:mainfrom
Conversation
- Add Jalali (Shamsi) calendar dates alongside Gregorian in time displays (items >1h old show "3 hours ago · 1404/01/10 14:30 IRST") - Add Tehran timezone (IRST) to time formatting on gantor.ir deploys - Add Tehran (TSE) to World Clock panel with market hours - Add Gantor sister service links: OpenHands (gantor.ir) and FreeGPT (freegpt.ir) in header, footer, and mobile menu (only visible on gantor.ir) - All Iran-specific features are gated by hostname check, invisible on worldmonitor.app - Install jalaali-js (~2KB) for Gregorian↔Jalali conversion https://claude.ai/code/session_01SbZ9vDK1su5v6tk7fYVzE8
|
@claude is attempting to deploy a commit to the Elie Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds a complete Persian locale ( However, several changes are applied unconditionally across all deployments rather than being gated behind
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Browser Request] --> B{isGantorDeploy?}
B -- "hostname ends with gantor.ir" --> C[Gantor Path]
B -- "other host" --> D[Standard Path]
C --> C1[Default cities: Tehran first]
C --> C2[enhanceWithIranTime: append Jalali + IRST]
C --> C3[Gantor services links in header/footer]
C --> C4[Cookie domain: .gantor.ir]
C --> C5[Sentry env: production]
D --> D1[Default cities: New York first]
D --> D2[formatTime: relative string only]
D --> D3[No Gantor links]
D --> D4["Cookie domain: .worldmonitor.app (or none)"]
E[getRemoteApiBaseUrl] --> F{WS_API_URL set?}
F -- yes --> G[Use VITE_WS_API_URL]
F -- no --> H{worldmonitor.app host?}
H -- yes --> I[api.worldmonitor.app]
H -- no --> J{Desktop runtime?}
J -- yes --> K[https://worldmonitor.app]
J -- no --> L[window.location.origin NEW]
style L fill:#f9a,stroke:#f00
style C1 fill:#bbf,stroke:#44f
style C2 fill:#bbf,stroke:#44f
style C3 fill:#bbf,stroke:#44f
style C4 fill:#bbf,stroke:#44f
style C5 fill:#bbf,stroke:#44f
|
| "filterGeopolitics": "ژئوپلیتیک", | ||
| "filterCyber": "سایبر" | ||
| }, | ||
| "investments": { |
There was a problem hiding this comment.
Malformed HTML in
techHubs.tooltip translation string
The middle activity-level bullet has a corrupted <span> tag. The string contains <span style=\"color: #ffcEpan80>>\" which is invalid HTML — the color value and closing quote/bracket are completely garbled. This will render as broken markup in the tooltip for Persian users.
The intended value appears to be a color like #ffcc80 or similar (matching the "elevated" color used in equivalent English tooltips). This needs to be corrected before the locale is usable.
Summary
This PR adds comprehensive Persian language support and infrastructure for the QADR self-hosted deployment at
monitor.gantor.ir. It includes a new Persian locale, Jalali calendar utilities for Iran-specific date formatting, RTL enhancements, Docker Compose configuration for QADR, and updated branding/metadata for the fork.Type of change
Affected areas
/api/*)Changes
Internationalization
src/locales/fa.json): Complete Persian translation with 2800+ stringssrc/utils/iran-date.ts): Utilities for converting Gregorian dates to Jalali (Shamsi) calendar and Tehran timezone formatting, active only ongantor.irdeploymentssrc/styles/main.css): Added Vazirmatn and Vazir fonts for improved Persian typographysrc/services/i18n.ts): Registered Persian as a supported language with lazy-loadingQADR Deployment
compose.qadr.yaml): Complete multi-service setup including WorldMonitor, AIS relay, Redis, and integration with existing QADR infrastructure (Caddy ingress, LiteLLM gateway)Dockerfile.qadr-prebuilt): Optimized image with Nginx, Supervisor, and precompiled assets for QADR.env.qadr.example): Configuration template for QADR deployment with LiteLLM, Redis, and optional upstream API keysdocs/qadr-deployment.md): Setup and customization guide for QADRBranding & Metadata
index.htmlmeta tags: Changed title to "Gantor WorldMonitor - Persian-First Global Monitoring Dashboard" and adjusted description/keywords for self-hosted contextsrc/config/variant-meta.ts: Reflected new branding in variant metadataREADME.md: Added Gantor fork section with deployment informationRuntime & API
src/services/runtime.ts): Prefers current web origin for API calls instead of always falling back to upstreamworldmonitor.appsrc/utils/cross-domain-storage.ts): Made cookie domain dynamic to support bothworldmonitor.appandgantor.irdeploymentssrc/services/widget-store.ts): Updated cookie domain logic for multi-deployment supportsrc/main.ts): Addedgantor.irto environment detection logicsrc/app/panel-layout.ts): Integrated Gantor deployment detection for conditional UI behaviorUI Enhancements
src/components/WorldClockPanel.ts): Added Tehran timezone support for Gantor deploymentssrc/styles/main.css): New CSS classes for Gantor-specific UI elementsDependencies
jalaali-js@^1.2.8for Jalali calendar conversionChecklist
.env.qadr.exampleis a template only)worldmonitor.appdeploymentsNotes
isGantorDeploy()checks or deployment-specific configurationhttps://claude.ai/code/session_01SbZ9vDK1su5v6tk7fYVzE8