video preview version

This commit is contained in:
fahed
2026-02-08 22:51:42 +03:00
parent 5f7d922f92
commit 9b58e5e9aa
23 changed files with 890 additions and 544 deletions
+2 -20
View File
@@ -26,27 +26,9 @@ export function LanguageProvider({ children }) {
document.documentElement.lang = lang
}, [dir, lang])
// Translation function
// Translation function (flat dot-notation keys)
const t = (key) => {
const keys = key.split('.')
let value = translations[lang]
for (const k of keys) {
value = value?.[k]
if (value === undefined) break
}
// Fallback to English if translation not found
if (value === undefined) {
value = translations.en
for (const k of keys) {
value = value?.[k]
if (value === undefined) break
}
}
// Fallback to key itself if still not found
return value !== undefined ? value : key
return translations[lang]?.[key] ?? translations.en?.[key] ?? key
}
return (
+11
View File
@@ -106,6 +106,9 @@
"posts.approve": "اعتماد",
"posts.schedule": "جدولة",
"posts.publish": "نشر",
"posts.attachFromAssets": "إرفاق من الأصول",
"posts.selectAssets": "اختر أصلاً لإرفاقه",
"posts.noAssetsFound": "لا توجد أصول",
"posts.status.draft": "مسودة",
"posts.status.in_review": "قيد المراجعة",
@@ -232,6 +235,14 @@
"login.forgotPassword": "نسيت كلمة المرور؟",
"login.defaultCreds": "بيانات الدخول الافتراضية:",
"comments.title": "النقاش",
"comments.noComments": "لا توجد تعليقات بعد. ابدأ المحادثة.",
"comments.placeholder": "اكتب تعليقاً...",
"comments.justNow": "الآن",
"comments.minutesAgo": "منذ {n} دقيقة",
"comments.hoursAgo": "منذ {n} ساعة",
"comments.daysAgo": "منذ {n} يوم",
"profile.completeYourProfile": "أكمل ملفك الشخصي",
"profile.completeDesc": "يرجى إكمال ملفك الشخصي للوصول إلى جميع الميزات ومساعدة فريقك في العثور عليك.",
"profile.completeProfileBtn": "إكمال الملف",
+11
View File
@@ -106,6 +106,9 @@
"posts.approve": "Approve",
"posts.schedule": "Schedule",
"posts.publish": "Publish",
"posts.attachFromAssets": "Attach from Assets",
"posts.selectAssets": "Select an asset to attach",
"posts.noAssetsFound": "No assets found",
"posts.status.draft": "Draft",
"posts.status.in_review": "In Review",
@@ -232,6 +235,14 @@
"login.forgotPassword": "Forgot password?",
"login.defaultCreds": "Default credentials:",
"comments.title": "Discussion",
"comments.noComments": "No comments yet. Start the conversation.",
"comments.placeholder": "Write a comment...",
"comments.justNow": "Just now",
"comments.minutesAgo": "{n}m ago",
"comments.hoursAgo": "{n}h ago",
"comments.daysAgo": "{n}d ago",
"profile.completeYourProfile": "Complete Your Profile",
"profile.completeDesc": "Please complete your profile to access all features and help your team find you.",
"profile.completeProfileBtn": "Complete Profile",