Add EHSAN favicon and localized browser tab titles (Task #21)
The browser tab previously showed a generic placeholder favicon and the
English title "EHSAN Closed Donation Loop". Per the reference, the tab now
shows the EHSAN logo mark and an Arabic platform title.
Changes:
- Favicon: copied the existing EHSAN logo (src/assets/ehsan-logo.png) to
public/favicon.png and pointed index.html at %BASE_URL%favicon.png
(base-path safe; verified it serves 200 image/png).
- Static head: index.html <title> and OG/Twitter titles + description now
use the Arabic platform name "منصة إحسان".
- Per-page titles: added a DocumentTitle component
(src/hooks/useDocumentTitle.ts) rendered in the Router that sets
document.title to "<page name> - <platform>" based on the current wouter
path and active language, reading from a new translations.meta section
(AR + EN). Home reads "الصفحة الرئيسية - منصة إحسان"; switches with language.
Approach note: titles are centralized in the router rather than edited into
each page file, keeping it DRY while covering all main routes.
Verified: tsc clean; e2e confirmed titles on /, /opportunities, /cart and
English fallback ("Home - EHSAN Platform"), plus favicon load.
This commit is contained in:
@@ -1,4 +1,20 @@
|
||||
export const en = {
|
||||
meta: {
|
||||
platform: "EHSAN Platform",
|
||||
home: "Home",
|
||||
opportunities: "Donation Opportunities",
|
||||
cart: "Your Donation Cart",
|
||||
about: "About EHSAN",
|
||||
track: "Track Case",
|
||||
donate: "Complete Donation",
|
||||
request: "Request Support",
|
||||
waqf: "Endowment",
|
||||
baraem: "EHSAN Buds",
|
||||
admin: "Admin Dashboard",
|
||||
whatsappLog: "WhatsApp Log",
|
||||
thankYou: "Submit Thank You",
|
||||
login: "Login",
|
||||
},
|
||||
common: {
|
||||
ehsan: "EHSAN",
|
||||
home: "Home",
|
||||
@@ -400,6 +416,22 @@ export const en = {
|
||||
};
|
||||
|
||||
export const ar = {
|
||||
meta: {
|
||||
platform: "منصة إحسان",
|
||||
home: "الصفحة الرئيسية",
|
||||
opportunities: "فرص التبرع",
|
||||
cart: "سلة تبرعاتك",
|
||||
about: "عن إحسان",
|
||||
track: "تتبع الحالة",
|
||||
donate: "إتمام التبرع",
|
||||
request: "طلب دعم",
|
||||
waqf: "الوقف",
|
||||
baraem: "براعم إحسان",
|
||||
admin: "لوحة الإدارة",
|
||||
whatsappLog: "سجل واتساب",
|
||||
thankYou: "إرسال شكر",
|
||||
login: "تسجيل الدخول",
|
||||
},
|
||||
common: {
|
||||
ehsan: "إحسان",
|
||||
home: "الرئيسية",
|
||||
|
||||
Reference in New Issue
Block a user