feat: Initialize frontend with React, Vite, and Tailwind CSS
- Set up main entry point for React application. - Create About, Home, NotFound, Privacy, and Terms pages with SEO support. - Implement API service for file uploads and task management. - Add global styles using Tailwind CSS. - Create utility functions for SEO and text processing. - Configure Vite for development and production builds. - Set up Nginx configuration for serving frontend and backend. - Add scripts for cleanup of expired files and sitemap generation. - Implement deployment script for production environment.
This commit is contained in:
96
frontend/src/i18n/ar.json
Normal file
96
frontend/src/i18n/ar.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "SaaS-PDF",
|
||||
"tagline": "أدوات ملفات مجانية على الإنترنت",
|
||||
"upload": "رفع ملف",
|
||||
"download": "تحميل",
|
||||
"processing": "جاري المعالجة...",
|
||||
"dragDrop": "اسحب الملف وأفلته هنا، أو اضغط للاختيار",
|
||||
"maxSize": "الحد الأقصى لحجم الملف: {{size}} ميجابايت",
|
||||
"tryOtherTools": "جرب أدوات أخرى",
|
||||
"error": "خطأ",
|
||||
"success": "تم بنجاح",
|
||||
"loading": "جاري التحميل...",
|
||||
"startOver": "ابدأ من جديد",
|
||||
"home": "الرئيسية",
|
||||
"about": "عن الموقع",
|
||||
"privacy": "سياسة الخصوصية",
|
||||
"terms": "شروط الاستخدام",
|
||||
"language": "اللغة",
|
||||
"allTools": "كل الأدوات"
|
||||
},
|
||||
"home": {
|
||||
"hero": "حوّل ملفاتك فوراً",
|
||||
"heroSub": "أدوات مجانية لمعالجة ملفات PDF والصور والفيديو والنصوص. بدون تسجيل.",
|
||||
"popularTools": "الأدوات الشائعة",
|
||||
"pdfTools": "أدوات PDF",
|
||||
"imageTools": "أدوات الصور",
|
||||
"videoTools": "أدوات الفيديو",
|
||||
"textTools": "أدوات النصوص"
|
||||
},
|
||||
"tools": {
|
||||
"pdfToWord": {
|
||||
"title": "PDF إلى Word",
|
||||
"description": "حوّل ملفات PDF إلى مستندات Word قابلة للتعديل مجاناً.",
|
||||
"shortDesc": "PDF → Word"
|
||||
},
|
||||
"wordToPdf": {
|
||||
"title": "Word إلى PDF",
|
||||
"description": "حوّل مستندات Word (DOC, DOCX) إلى صيغة PDF مجاناً.",
|
||||
"shortDesc": "Word → PDF"
|
||||
},
|
||||
"compressPdf": {
|
||||
"title": "ضغط PDF",
|
||||
"description": "قلّل حجم ملف PDF مع الحفاظ على الجودة. اختر مستوى الضغط.",
|
||||
"shortDesc": "ضغط PDF",
|
||||
"qualityLow": "أقصى ضغط",
|
||||
"qualityMedium": "متوازن",
|
||||
"qualityHigh": "جودة عالية"
|
||||
},
|
||||
"imageConvert": {
|
||||
"title": "محوّل الصور",
|
||||
"description": "حوّل الصور بين صيغ JPG و PNG و WebP فوراً.",
|
||||
"shortDesc": "تحويل الصور"
|
||||
},
|
||||
"videoToGif": {
|
||||
"title": "فيديو إلى GIF",
|
||||
"description": "أنشئ صور GIF متحركة من مقاطع الفيديو. خصّص وقت البداية والمدة والجودة.",
|
||||
"shortDesc": "فيديو → GIF",
|
||||
"startTime": "وقت البداية (ثوانٍ)",
|
||||
"duration": "المدة (ثوانٍ)",
|
||||
"fps": "إطارات في الثانية",
|
||||
"width": "العرض (بكسل)"
|
||||
},
|
||||
"wordCounter": {
|
||||
"title": "عدّاد الكلمات",
|
||||
"description": "عُد الكلمات والحروف والجمل والفقرات في نصك فوراً.",
|
||||
"shortDesc": "عد الكلمات",
|
||||
"words": "كلمات",
|
||||
"characters": "حروف",
|
||||
"sentences": "جمل",
|
||||
"paragraphs": "فقرات",
|
||||
"placeholder": "اكتب أو الصق نصك هنا..."
|
||||
},
|
||||
"textCleaner": {
|
||||
"title": "منظّف النصوص",
|
||||
"description": "أزل المسافات الزائدة، حوّل حالة الحروف، ونظّف نصك فوراً.",
|
||||
"shortDesc": "تنظيف النص",
|
||||
"removeSpaces": "إزالة المسافات الزائدة",
|
||||
"toUpperCase": "أحرف كبيرة",
|
||||
"toLowerCase": "أحرف صغيرة",
|
||||
"toTitleCase": "حروف العنوان",
|
||||
"toSentenceCase": "حالة الجملة",
|
||||
"removeDiacritics": "إزالة التشكيل العربي",
|
||||
"copyResult": "نسخ النتيجة"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"conversionComplete": "اكتمل التحويل!",
|
||||
"compressionComplete": "اكتمل الضغط!",
|
||||
"originalSize": "الحجم الأصلي",
|
||||
"newSize": "الحجم الجديد",
|
||||
"reduction": "نسبة التقليل",
|
||||
"downloadReady": "ملفك جاهز للتحميل.",
|
||||
"linkExpiry": "رابط التحميل ينتهي خلال 30 دقيقة."
|
||||
}
|
||||
}
|
||||
96
frontend/src/i18n/en.json
Normal file
96
frontend/src/i18n/en.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "SaaS-PDF",
|
||||
"tagline": "Free Online File Tools",
|
||||
"upload": "Upload File",
|
||||
"download": "Download",
|
||||
"processing": "Processing...",
|
||||
"dragDrop": "Drag & drop your file here, or click to browse",
|
||||
"maxSize": "Maximum file size: {{size}}MB",
|
||||
"tryOtherTools": "Try Other Tools",
|
||||
"error": "Error",
|
||||
"success": "Success",
|
||||
"loading": "Loading...",
|
||||
"startOver": "Start Over",
|
||||
"home": "Home",
|
||||
"about": "About",
|
||||
"privacy": "Privacy Policy",
|
||||
"terms": "Terms of Service",
|
||||
"language": "Language",
|
||||
"allTools": "All Tools"
|
||||
},
|
||||
"home": {
|
||||
"hero": "Transform Your Files Instantly",
|
||||
"heroSub": "Free online tools for PDF, image, video, and text processing. No registration required.",
|
||||
"popularTools": "Popular Tools",
|
||||
"pdfTools": "PDF Tools",
|
||||
"imageTools": "Image Tools",
|
||||
"videoTools": "Video Tools",
|
||||
"textTools": "Text Tools"
|
||||
},
|
||||
"tools": {
|
||||
"pdfToWord": {
|
||||
"title": "PDF to Word",
|
||||
"description": "Convert PDF files to editable Word documents online for free.",
|
||||
"shortDesc": "PDF → Word"
|
||||
},
|
||||
"wordToPdf": {
|
||||
"title": "Word to PDF",
|
||||
"description": "Convert Word documents (DOC, DOCX) to PDF format online for free.",
|
||||
"shortDesc": "Word → PDF"
|
||||
},
|
||||
"compressPdf": {
|
||||
"title": "Compress PDF",
|
||||
"description": "Reduce PDF file size while maintaining quality. Choose your compression level.",
|
||||
"shortDesc": "Compress PDF",
|
||||
"qualityLow": "Maximum Compression",
|
||||
"qualityMedium": "Balanced",
|
||||
"qualityHigh": "High Quality"
|
||||
},
|
||||
"imageConvert": {
|
||||
"title": "Image Converter",
|
||||
"description": "Convert images between JPG, PNG, and WebP formats instantly.",
|
||||
"shortDesc": "Convert Images"
|
||||
},
|
||||
"videoToGif": {
|
||||
"title": "Video to GIF",
|
||||
"description": "Create animated GIFs from video clips. Customize start time, duration, and quality.",
|
||||
"shortDesc": "Video → GIF",
|
||||
"startTime": "Start Time (seconds)",
|
||||
"duration": "Duration (seconds)",
|
||||
"fps": "Frames Per Second",
|
||||
"width": "Width (pixels)"
|
||||
},
|
||||
"wordCounter": {
|
||||
"title": "Word Counter",
|
||||
"description": "Count words, characters, sentences, and paragraphs in your text instantly.",
|
||||
"shortDesc": "Count Words",
|
||||
"words": "Words",
|
||||
"characters": "Characters",
|
||||
"sentences": "Sentences",
|
||||
"paragraphs": "Paragraphs",
|
||||
"placeholder": "Type or paste your text here..."
|
||||
},
|
||||
"textCleaner": {
|
||||
"title": "Text Cleaner",
|
||||
"description": "Remove extra spaces, convert text case, and clean up your text instantly.",
|
||||
"shortDesc": "Clean Text",
|
||||
"removeSpaces": "Remove Extra Spaces",
|
||||
"toUpperCase": "UPPER CASE",
|
||||
"toLowerCase": "lower case",
|
||||
"toTitleCase": "Title Case",
|
||||
"toSentenceCase": "Sentence case",
|
||||
"removeDiacritics": "Remove Arabic Diacritics",
|
||||
"copyResult": "Copy Result"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"conversionComplete": "Conversion Complete!",
|
||||
"compressionComplete": "Compression Complete!",
|
||||
"originalSize": "Original Size",
|
||||
"newSize": "New Size",
|
||||
"reduction": "Reduction",
|
||||
"downloadReady": "Your file is ready for download.",
|
||||
"linkExpiry": "Download link expires in 30 minutes."
|
||||
}
|
||||
}
|
||||
27
frontend/src/i18n/index.ts
Normal file
27
frontend/src/i18n/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
import en from './en.json';
|
||||
import ar from './ar.json';
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources: {
|
||||
en: { translation: en },
|
||||
ar: { translation: ar },
|
||||
},
|
||||
fallbackLng: 'en',
|
||||
supportedLngs: ['en', 'ar'],
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
detection: {
|
||||
order: ['querystring', 'cookie', 'localStorage', 'navigator'],
|
||||
caches: ['localStorage', 'cookie'],
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user