lang bugfix
All checks were successful
Build & Push Docker Image / docker (push) Successful in 1m54s

This commit is contained in:
Ahmed Darrazi 2025-12-17 23:19:17 +01:00
parent c7c6a4b987
commit d1515064dd
12 changed files with 159 additions and 81 deletions

View File

@ -192,15 +192,6 @@ class LanguageService extends MediaService
function setLanguageProperties(string $locale): void function setLanguageProperties(string $locale): void
{ {
$defaultLocale = $this->getDefaultLocale();
if ($locale === $defaultLocale) {
$lines = $this->buildTranslationsFromFiles($locale);
Lang::addLines($lines, $locale);
return;
}
$cacheKey = $this->getCacheKey($locale); $cacheKey = $this->getCacheKey($locale);
$cached = Cache::rememberForever($cacheKey, function () use ($locale) { $cached = Cache::rememberForever($cacheKey, function () use ($locale) {
@ -227,6 +218,10 @@ class LanguageService extends MediaService
return $translations; return $translations;
}); });
if (empty($cached)) {
$cached = $this->buildTranslationsFromFiles($locale);
}
Lang::addLines($cached, $locale); Lang::addLines($cached, $locale);
} }

View File

@ -65,9 +65,11 @@ class HandleInertiaRequests extends Middleware
if (Schema::hasTable('languages')) { if (Schema::hasTable('languages')) {
$langs = Language::where('is_active', true)->orderBy('is_default', 'desc')->get(); $langs = Language::where('is_active', true)->orderBy('is_default', 'desc')->get();
$default = $langs->where('is_default', true)->first()->code; $defaultLang = $langs->firstWhere('is_default', true);
$default = $defaultLang?->code ?? config('app.locale', 'en');
config(['app.locale' => $default]); config(['app.locale' => $default]);
$locale = Cookie::get('locale', $default); $requestedLocale = Cookie::get('locale', $default);
$locale = $langs->contains('code', $requestedLocale) ? $requestedLocale : $default;
App::setLocale($locale); App::setLocale($locale);
$this->languageService->setLanguageProperties($locale); $this->languageService->setLanguageProperties($locale);

View File

@ -132,18 +132,21 @@ return [
'back' => 'Zurück', 'back' => 'Zurück',
'show_full' => 'Alles anzeigen', 'show_full' => 'Alles anzeigen',
'show_less' => 'Weniger anzeigen', 'show_less' => 'Weniger anzeigen',
'dashboard' => 'Dashboard', 'dashboard' => 'Armaturenbrett',
'main_menu' => 'Hauptmenü', 'main_menu' => 'Hauptmenü',
'categories' => 'Kategorien', 'categories' => 'Kategorien',
'courses' => 'Kurse', 'courses' => 'Kurse',
'exams' => 'Prüfungen',
'enrollments' => 'Einschreibungen', 'enrollments' => 'Einschreibungen',
'instructors' => 'Dozenten', 'instructors' => 'Dozenten',
'payout_report' => 'Auszahlungsbericht', 'payout_report' => 'Auszahlungsbericht',
'payment_report' => 'Zahlungsbericht',
'payouts' => 'Auszahlungen', 'payouts' => 'Auszahlungen',
'job_circulars' => 'Stellenausschreibungen', 'job_circulars' => 'Stellenausschreibungen',
'blogs' => 'Blogs', 'blogs' => 'Blogs',
'newsletters' => 'Newsletter', 'newsletters' => 'Newsletter',
'all_users' => 'Alle Nutzer', 'all_users' => 'Alle Nutzer',
'certificates' => 'Zertifikate',
'settings' => 'Einstellungen', 'settings' => 'Einstellungen',
'my_courses' => 'Meine Kurse', 'my_courses' => 'Meine Kurse',
'wishlist' => 'Wunschliste', 'wishlist' => 'Wunschliste',
@ -153,6 +156,14 @@ return [
'profile_update' => 'Profil aktualisieren', 'profile_update' => 'Profil aktualisieren',
'manage_courses' => 'Kurse verwalten', 'manage_courses' => 'Kurse verwalten',
'create_course' => 'Kurs erstellen', 'create_course' => 'Kurs erstellen',
'course_coupons' => 'Kursgutscheine',
'manage_exams' => 'Prüfungen verwalten',
'create_exam' => 'Prüfung erstellen',
'exam_coupons' => 'Prüfungsgutscheine',
'course_enrollments' => 'Kurseinschreibungen',
'exam_enrollments' => 'Prüfungseinschreibungen',
'online_payments' => 'Online-Zahlungen',
'offline_payments' => 'Offline-Zahlungen',
'manage_enrollments' => 'Einschreibungen verwalten', 'manage_enrollments' => 'Einschreibungen verwalten',
'add_new_enrollment' => 'Neue Einschreibung hinzufügen', 'add_new_enrollment' => 'Neue Einschreibung hinzufügen',
'add_new_instructor' => 'Neuen Dozenten hinzufügen', 'add_new_instructor' => 'Neuen Dozenten hinzufügen',
@ -174,6 +185,7 @@ return [
'smtp' => 'SMTP', 'smtp' => 'SMTP',
'auth0' => 'Auth0', 'auth0' => 'Auth0',
'maintenance' => 'Wartung', 'maintenance' => 'Wartung',
'marksheet' => 'Notenblatt',
'become_instructor' => 'Dozent werden', 'become_instructor' => 'Dozent werden',
'overview' => 'Übersicht', 'overview' => 'Übersicht',
'curriculum' => 'Lehrplan', 'curriculum' => 'Lehrplan',

View File

@ -163,14 +163,17 @@ return [
'main_menu' => 'Main Menu', 'main_menu' => 'Main Menu',
'categories' => 'Categories', 'categories' => 'Categories',
'courses' => 'Courses', 'courses' => 'Courses',
'exams' => 'Exams',
'enrollments' => 'Enrollments', 'enrollments' => 'Enrollments',
'instructors' => 'Instructors', 'instructors' => 'Instructors',
'payout_report' => 'Payout Report', 'payout_report' => 'Payout Report',
'payment_report' => 'Payment Report',
'payouts' => 'Payouts', 'payouts' => 'Payouts',
'job_circulars' => 'Job Circulars', 'job_circulars' => 'Job Circulars',
'blogs' => 'Blogs', 'blogs' => 'Blogs',
'newsletters' => 'Newsletters', 'newsletters' => 'Newsletters',
'all_users' => 'All Users', 'all_users' => 'All Users',
'certificates' => 'Certificates',
'settings' => 'Settings', 'settings' => 'Settings',
'my_courses' => 'My Courses', 'my_courses' => 'My Courses',
'wishlist' => 'Wishlist', 'wishlist' => 'Wishlist',
@ -180,6 +183,14 @@ return [
'profile_update' => 'Profile Update', 'profile_update' => 'Profile Update',
'manage_courses' => 'Manage Courses', 'manage_courses' => 'Manage Courses',
'create_course' => 'Create Course', 'create_course' => 'Create Course',
'course_coupons' => 'Course Coupons',
'manage_exams' => 'Manage Exams',
'create_exam' => 'Create Exam',
'exam_coupons' => 'Exam Coupons',
'course_enrollments' => 'Course Enrollments',
'exam_enrollments' => 'Exam Enrollments',
'online_payments' => 'Online Payments',
'offline_payments' => 'Offline Payments',
'manage_enrollments' => 'Manage Enrollments', 'manage_enrollments' => 'Manage Enrollments',
'add_new_enrollment' => 'Add New Enrollment', 'add_new_enrollment' => 'Add New Enrollment',
'add_new_instructor' => 'Add New Instructor', 'add_new_instructor' => 'Add New Instructor',
@ -201,6 +212,7 @@ return [
'smtp' => 'SMTP', 'smtp' => 'SMTP',
'auth0' => 'Auth0', 'auth0' => 'Auth0',
'maintenance' => 'Maintenance', 'maintenance' => 'Maintenance',
'marksheet' => 'Marksheet',
// ================================================== // ==================================================
// 08. Sub Navigation Buttons // 08. Sub Navigation Buttons

View File

@ -7,12 +7,13 @@ import { usePage } from '@inertiajs/react';
import { GitCompareArrows } from 'lucide-react'; import { GitCompareArrows } from 'lucide-react';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import NavMainItem from './nav-main-item'; import NavMainItem from './nav-main-item';
import routes from './routes'; import getRoutes from './routes';
export function NavMain() { export function NavMain() {
const page = usePage<SharedData>(); const page = usePage<SharedData>();
const { auth, system } = page.props; const { auth, system, translate } = page.props;
const [openAccordions, setOpenAccordions] = useState<string>(''); const [openAccordions, setOpenAccordions] = useState<string>('');
const routes = getRoutes(translate);
// Set initial accordion state based on URL // Set initial accordion state based on URL
useEffect(() => { useEffect(() => {
@ -47,7 +48,7 @@ export function NavMain() {
<SidebarMenuButton asChild className={cn('h-9')}> <SidebarMenuButton asChild className={cn('h-9')}>
<a target="_blank" href={route('system.maintenance')}> <a target="_blank" href={route('system.maintenance')}>
<GitCompareArrows className="h-4 w-4" /> <GitCompareArrows className="h-4 w-4" />
<span>Maintenance</span> <span>{translate.button.maintenance}</span>
</a> </a>
</SidebarMenuButton> </SidebarMenuButton>
</SidebarMenuItem> </SidebarMenuItem>

View File

@ -1,14 +1,19 @@
import { routeLastSegment } from '@/lib/route'; import { routeLastSegment } from '@/lib/route';
import { Award, Book, Briefcase, CassetteTape, CreditCard, LayoutDashboard, Newspaper, Receipt, School, Settings, Users } from 'lucide-react'; import { Award, Book, Briefcase, CassetteTape, CreditCard, LayoutDashboard, Newspaper, Receipt, School, Settings, Users } from 'lucide-react';
const dashboardRoutes: DashboardRoute[] = [ const label = (value: unknown, fallback: string): string => (typeof value === 'string' && value.length ? value : fallback);
export default function getDashboardRoutes(translate: LanguageTranslations): DashboardRoute[] {
const { button, settings } = translate;
return [
{ {
title: 'Main Menu', title: label(button.main_menu, 'Main Menu'),
slug: 'main-menu', slug: 'main-menu',
pages: [ pages: [
{ {
Icon: LayoutDashboard, Icon: LayoutDashboard,
name: 'Dashboard', name: label(button.dashboard, 'Dashboard'),
path: route('dashboard'), path: route('dashboard'),
slug: routeLastSegment(route('dashboard')), slug: routeLastSegment(route('dashboard')),
active: true, active: true,
@ -17,32 +22,32 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: School, Icon: School,
name: 'Courses', name: label(button.courses, 'Courses'),
path: '', path: '',
slug: 'courses', slug: 'courses',
active: true, active: true,
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Categories', name: label(button.categories, 'Categories'),
path: route('categories.index'), path: route('categories.index'),
slug: routeLastSegment(route('categories.index')), slug: routeLastSegment(route('categories.index')),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Manage Courses', name: label(button.manage_courses, 'Manage Courses'),
slug: routeLastSegment(route('courses.index')), slug: routeLastSegment(route('courses.index')),
path: route('courses.index'), path: route('courses.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Create Course', name: label(button.create_course, 'Create Course'),
slug: routeLastSegment(route('courses.create')), slug: routeLastSegment(route('courses.create')),
path: route('courses.create'), path: route('courses.create'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Course Coupons', name: label(button.course_coupons, 'Course Coupons'),
slug: routeLastSegment(route('course-coupons.index')), slug: routeLastSegment(route('course-coupons.index')),
path: route('course-coupons.index'), path: route('course-coupons.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
@ -51,32 +56,32 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Book, Icon: Book,
name: 'Exams', name: label(button.exams, 'Exams'),
path: '', path: '',
slug: 'exams', slug: 'exams',
active: true, active: true,
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Categories', name: label(button.categories, 'Categories'),
slug: routeLastSegment(route('exam-categories.index')), slug: routeLastSegment(route('exam-categories.index')),
path: route('exam-categories.index'), path: route('exam-categories.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Manage Exams', name: label(button.manage_exams, 'Manage Exams'),
slug: routeLastSegment(route('exams.index')), slug: routeLastSegment(route('exams.index')),
path: route('exams.index'), path: route('exams.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Create Exam', name: label(button.create_exam, 'Create Exam'),
slug: routeLastSegment(route('exams.create')), slug: routeLastSegment(route('exams.create')),
path: route('exams.create'), path: route('exams.create'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Exam Coupons', name: label(button.exam_coupons, 'Exam Coupons'),
slug: routeLastSegment(route('exam-coupons.index')), slug: routeLastSegment(route('exam-coupons.index')),
path: route('exam-coupons.index'), path: route('exam-coupons.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
@ -85,20 +90,20 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: CassetteTape, Icon: CassetteTape,
name: 'Enrollments', name: label(button.enrollments, 'Enrollments'),
path: '', path: '',
slug: 'enrollments', slug: 'enrollments',
active: true, active: true,
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Course Enrollments', name: label(button.course_enrollments, 'Course Enrollments'),
slug: routeLastSegment(route('course-enrollments.index')), slug: routeLastSegment(route('course-enrollments.index')),
path: route('course-enrollments.index'), path: route('course-enrollments.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Exam Enrollments', name: label(button.exam_enrollments, 'Exam Enrollments'),
slug: routeLastSegment(route('exam-enrollments.index')), slug: routeLastSegment(route('exam-enrollments.index')),
path: route('exam-enrollments.index'), path: route('exam-enrollments.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
@ -107,26 +112,26 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Users, Icon: Users,
name: 'Instructors', name: label(button.instructors, 'Instructors'),
path: '', path: '',
slug: 'instructors', slug: 'instructors',
active: true, active: true,
access: ['admin', 'collaborative'], access: ['admin', 'collaborative'],
children: [ children: [
{ {
name: 'Manage Instructors', name: label(button.manage_instructors, 'Manage Instructors'),
slug: routeLastSegment(route('instructors.index')), slug: routeLastSegment(route('instructors.index')),
path: route('instructors.index'), path: route('instructors.index'),
access: ['admin', 'collaborative'], access: ['admin', 'collaborative'],
}, },
{ {
name: 'Create Instructor', name: label(button.create_instructor, 'Create Instructor'),
slug: routeLastSegment(route('instructors.create')), slug: routeLastSegment(route('instructors.create')),
path: route('instructors.create'), path: route('instructors.create'),
access: ['admin', 'collaborative'], access: ['admin', 'collaborative'],
}, },
{ {
name: 'Applications', name: label(button.applications, 'Applications'),
slug: routeLastSegment(route('instructors.applications')), slug: routeLastSegment(route('instructors.applications')),
path: route('instructors.applications', { path: route('instructors.applications', {
status: 'pending', status: 'pending',
@ -137,20 +142,20 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Receipt, Icon: Receipt,
name: 'Payouts', name: label(button.payouts, 'Payouts'),
path: '', path: '',
slug: 'payouts', slug: 'payouts',
active: true, active: true,
access: ['instructor', 'collaborative'], access: ['instructor', 'collaborative'],
children: [ children: [
{ {
name: 'Withdraw', name: label(button.withdraw, 'Withdraw'),
slug: routeLastSegment(route('payouts.index')), slug: routeLastSegment(route('payouts.index')),
path: route('payouts.index'), path: route('payouts.index'),
access: ['instructor', 'collaborative'], access: ['instructor', 'collaborative'],
}, },
{ {
name: 'Settings', name: label(button.settings, 'Settings'),
slug: routeLastSegment(route('payouts.settings.index')), slug: routeLastSegment(route('payouts.settings.index')),
path: route('payouts.settings.index'), path: route('payouts.settings.index'),
access: ['instructor', 'collaborative'], access: ['instructor', 'collaborative'],
@ -159,20 +164,20 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Receipt, Icon: Receipt,
name: 'Payout Report', name: label(button.payout_report, 'Payout Report'),
path: '', path: '',
slug: 'payouts', slug: 'payouts',
active: true, active: true,
access: ['admin', 'collaborative'], access: ['admin', 'collaborative'],
children: [ children: [
{ {
name: 'Payout Request', name: label(button.payout_request, 'Payout Request'),
slug: routeLastSegment(route('payouts.request.index')), slug: routeLastSegment(route('payouts.request.index')),
path: route('payouts.request.index'), path: route('payouts.request.index'),
access: ['admin', 'collaborative'], access: ['admin', 'collaborative'],
}, },
{ {
name: 'Payout History', name: label(button.payout_history, 'Payout History'),
slug: routeLastSegment(route('payouts.history.index')), slug: routeLastSegment(route('payouts.history.index')),
path: route('payouts.history.index'), path: route('payouts.history.index'),
access: ['admin', 'collaborative'], access: ['admin', 'collaborative'],
@ -181,20 +186,20 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: CreditCard, Icon: CreditCard,
name: 'Payment Report', name: label(button.payment_report, 'Payment Report'),
path: '', path: '',
slug: 'payment-reports', slug: 'payment-reports',
active: true, active: true,
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Online Payments', name: label(button.online_payments, 'Online Payments'),
slug: routeLastSegment(route('payment-reports.online.index')), slug: routeLastSegment(route('payment-reports.online.index')),
path: route('payment-reports.online.index'), path: route('payment-reports.online.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Offline Payments', name: label(button.offline_payments, 'Offline Payments'),
slug: routeLastSegment(route('payment-reports.offline.index')), slug: routeLastSegment(route('payment-reports.offline.index')),
path: route('payment-reports.offline.index'), path: route('payment-reports.offline.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
@ -203,20 +208,20 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Briefcase, Icon: Briefcase,
name: 'Job Circulars', name: label(button.job_circulars, 'Job Circulars'),
path: '', path: '',
slug: 'job-circulars', slug: 'job-circulars',
active: true, active: true,
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'All Jobs', name: label(button.all_jobs, 'All Jobs'),
slug: routeLastSegment(route('job-circulars.index')), slug: routeLastSegment(route('job-circulars.index')),
path: route('job-circulars.index'), path: route('job-circulars.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Create Job', name: label(button.create_job, 'Create Job'),
slug: routeLastSegment(route('job-circulars.create')), slug: routeLastSegment(route('job-circulars.create')),
path: route('job-circulars.create'), path: route('job-circulars.create'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
@ -225,26 +230,26 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Book, Icon: Book,
name: 'Blogs', name: label(button.blogs, 'Blogs'),
path: '', path: '',
slug: 'blogs', slug: 'blogs',
active: true, active: true,
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Categories', name: label(button.categories, 'Categories'),
slug: routeLastSegment(route('blogs.categories.index')), slug: routeLastSegment(route('blogs.categories.index')),
path: route('blogs.categories.index'), path: route('blogs.categories.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Create Blog', name: label(button.create_blog, 'Create Blog'),
slug: routeLastSegment(route('blogs.create')), slug: routeLastSegment(route('blogs.create')),
path: route('blogs.create'), path: route('blogs.create'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'Manage Blog', name: label(button.manage_blog, 'Manage Blog'),
slug: routeLastSegment(route('blogs.index')), slug: routeLastSegment(route('blogs.index')),
path: route('blogs.index'), path: route('blogs.index'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
@ -253,7 +258,7 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Newspaper, Icon: Newspaper,
name: 'Newsletters', name: label(button.newsletters, 'Newsletters'),
path: route('newsletters.index'), path: route('newsletters.index'),
slug: routeLastSegment(route('newsletters.index')), slug: routeLastSegment(route('newsletters.index')),
active: true, active: true,
@ -262,7 +267,7 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Users, Icon: Users,
name: 'All Users', name: label(button.all_users, 'All Users'),
path: route('users.index'), path: route('users.index'),
slug: routeLastSegment(route('users.index')), slug: routeLastSegment(route('users.index')),
active: true, active: true,
@ -271,20 +276,20 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Award, Icon: Award,
name: 'Certificates', name: label(button.certificates, 'Certificates'),
path: '', path: '',
slug: 'certification', slug: 'certification',
active: true, active: true,
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Certificate', name: label(button.certificate, 'Certificate'),
slug: routeLastSegment(route('certificate.templates.index')), slug: routeLastSegment(route('certificate.templates.index')),
path: route('certificate.templates.index'), path: route('certificate.templates.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Marksheet', name: label(button.marksheet, 'Marksheet'),
slug: routeLastSegment(route('marksheet.templates.index')), slug: routeLastSegment(route('marksheet.templates.index')),
path: route('marksheet.templates.index'), path: route('marksheet.templates.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
@ -293,62 +298,62 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
{ {
Icon: Settings, Icon: Settings,
name: 'Settings', name: label(button.settings, 'Settings'),
path: '', path: '',
slug: 'settings', slug: 'settings',
active: true, active: true,
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
children: [ children: [
{ {
name: 'Account', name: label(button.account, 'Account'),
slug: routeLastSegment(route('settings.account')), slug: routeLastSegment(route('settings.account')),
path: route('settings.account'), path: route('settings.account'),
access: ['admin', 'instructor', 'collaborative', 'administrative'], access: ['admin', 'instructor', 'collaborative', 'administrative'],
}, },
{ {
name: 'System', name: label(button.system, 'System'),
slug: routeLastSegment(route('settings.system')), slug: routeLastSegment(route('settings.system')),
path: route('settings.system'), path: route('settings.system'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Pages', name: label(button.pages, 'Pages'),
slug: routeLastSegment(route('settings.pages')), slug: routeLastSegment(route('settings.pages')),
path: route('settings.pages'), path: route('settings.pages'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Storage', name: label(button.storage, 'Storage'),
slug: routeLastSegment(route('settings.storage')), slug: routeLastSegment(route('settings.storage')),
path: route('settings.storage'), path: route('settings.storage'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Payment', name: label(button.payment, 'Payment'),
slug: routeLastSegment(route('settings.payment')), slug: routeLastSegment(route('settings.payment')),
path: route('settings.payment'), path: route('settings.payment'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'SMTP', name: label(button.smtp, 'SMTP'),
slug: routeLastSegment(route('settings.smtp')), slug: routeLastSegment(route('settings.smtp')),
path: route('settings.smtp'), path: route('settings.smtp'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Auth', name: label(button.auth0, 'Auth'),
slug: routeLastSegment(route('settings.auth0')), slug: routeLastSegment(route('settings.auth0')),
path: route('settings.auth0'), path: route('settings.auth0'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Live Class', name: label(button.live_class, 'Live Class'),
slug: routeLastSegment(route('settings.live-class')), slug: routeLastSegment(route('settings.live-class')),
path: route('settings.live-class'), path: route('settings.live-class'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
}, },
{ {
name: 'Translation', name: label(settings.translation_settings, 'Translation'),
slug: routeLastSegment(route('language.index')), slug: routeLastSegment(route('language.index')),
path: route('language.index'), path: route('language.index'),
access: ['admin', 'collaborative', 'administrative'], access: ['admin', 'collaborative', 'administrative'],
@ -357,6 +362,5 @@ const dashboardRoutes: DashboardRoute[] = [
}, },
], ],
}, },
]; ];
}
export default dashboardRoutes;

View File

@ -59,6 +59,7 @@ interface ButtonLang {
refresh_server: string; refresh_server: string;
backup_now: string; backup_now: string;
update_application: string; update_application: string;
set_default: string;
// ================================================== // ==================================================
// 03. Action Buttons // 03. Action Buttons
@ -161,14 +162,17 @@ interface ButtonLang {
main_menu: string; main_menu: string;
categories: string; categories: string;
courses: string; courses: string;
exams: string;
enrollments: string; enrollments: string;
instructors: string; instructors: string;
payout_report: string; payout_report: string;
payment_report: string;
payouts: string; payouts: string;
job_circulars: string; job_circulars: string;
blogs: string; blogs: string;
newsletters: string; newsletters: string;
all_users: string; all_users: string;
certificates: string;
settings: string; settings: string;
my_courses: string; my_courses: string;
wishlist: string; wishlist: string;
@ -178,6 +182,14 @@ interface ButtonLang {
profile_update: string; profile_update: string;
manage_courses: string; manage_courses: string;
create_course: string; create_course: string;
course_coupons: string;
manage_exams: string;
create_exam: string;
exam_coupons: string;
course_enrollments: string;
exam_enrollments: string;
online_payments: string;
offline_payments: string;
manage_enrollments: string; manage_enrollments: string;
add_new_enrollment: string; add_new_enrollment: string;
add_new_instructor: string; add_new_instructor: string;
@ -199,6 +211,7 @@ interface ButtonLang {
smtp: string; smtp: string;
auth0: string; auth0: string;
maintenance: string; maintenance: string;
marksheet: string;
// ================================================== // ==================================================
// 08. Sub Navigation Buttons // 08. Sub Navigation Buttons

View File

@ -10,6 +10,11 @@ interface SettingsLang {
smtp_settings: string; smtp_settings: string;
storage_settings: string; storage_settings: string;
language_settings: string; language_settings: string;
translation_settings: string;
add_language: string;
translation_scope_information: string;
translation_scope_dashboard: string;
translation_scope_public_pages: string;
language_properties: string; language_properties: string;
translate_language_properties: string; translate_language_properties: string;

View File

@ -60,6 +60,7 @@ return [
'refresh_server' => 'Refresh Server', 'refresh_server' => 'Refresh Server',
'backup_now' => 'Backup Now', 'backup_now' => 'Backup Now',
'update_application' => 'Update Application', 'update_application' => 'Update Application',
'set_default' => 'Set Default',
// ================================================== // ==================================================
// 03. Action Buttons // 03. Action Buttons
@ -162,14 +163,17 @@ return [
'main_menu' => 'Main Menu', 'main_menu' => 'Main Menu',
'categories' => 'Categories', 'categories' => 'Categories',
'courses' => 'Courses', 'courses' => 'Courses',
'exams' => 'Exams',
'enrollments' => 'Enrollments', 'enrollments' => 'Enrollments',
'instructors' => 'Instructors', 'instructors' => 'Instructors',
'payout_report' => 'Payout Report', 'payout_report' => 'Payout Report',
'payment_report' => 'Payment Report',
'payouts' => 'Payouts', 'payouts' => 'Payouts',
'job_circulars' => 'Job Circulars', 'job_circulars' => 'Job Circulars',
'blogs' => 'Blogs', 'blogs' => 'Blogs',
'newsletters' => 'Newsletters', 'newsletters' => 'Newsletters',
'all_users' => 'All Users', 'all_users' => 'All Users',
'certificates' => 'Certificates',
'settings' => 'Settings', 'settings' => 'Settings',
'my_courses' => 'My Courses', 'my_courses' => 'My Courses',
'wishlist' => 'Wishlist', 'wishlist' => 'Wishlist',
@ -179,6 +183,14 @@ return [
'profile_update' => 'Profile Update', 'profile_update' => 'Profile Update',
'manage_courses' => 'Manage Courses', 'manage_courses' => 'Manage Courses',
'create_course' => 'Create Course', 'create_course' => 'Create Course',
'course_coupons' => 'Course Coupons',
'manage_exams' => 'Manage Exams',
'create_exam' => 'Create Exam',
'exam_coupons' => 'Exam Coupons',
'course_enrollments' => 'Course Enrollments',
'exam_enrollments' => 'Exam Enrollments',
'online_payments' => 'Online Payments',
'offline_payments' => 'Offline Payments',
'manage_enrollments' => 'Manage Enrollments', 'manage_enrollments' => 'Manage Enrollments',
'add_new_enrollment' => 'Add New Enrollment', 'add_new_enrollment' => 'Add New Enrollment',
'add_new_instructor' => 'Add New Instructor', 'add_new_instructor' => 'Add New Instructor',
@ -200,6 +212,7 @@ return [
'smtp' => 'SMTP', 'smtp' => 'SMTP',
'auth0' => 'Auth0', 'auth0' => 'Auth0',
'maintenance' => 'Maintenance', 'maintenance' => 'Maintenance',
'marksheet' => 'Marksheet',
// ================================================== // ==================================================
// 08. Sub Navigation Buttons // 08. Sub Navigation Buttons

View File

@ -25,6 +25,9 @@ return [
'language_settings' => 'Language Settings', 'language_settings' => 'Language Settings',
'translation_settings' => 'Translation Settings', 'translation_settings' => 'Translation Settings',
'add_language' => 'Add Language', 'add_language' => 'Add Language',
'translation_scope_information' => 'Translation Scope Information',
'translation_scope_dashboard' => 'Translations will be applied to dashboard interfaces (admin, instructor, student).',
'translation_scope_public_pages' => 'Public pages are not affected by these translations as they are fully customizable through the page editor.',
// Common Settings // Common Settings
'account_settings' => 'Account Settings', 'account_settings' => 'Account Settings',

View File

@ -62,6 +62,7 @@ return [
'delete_class' => 'Delete Class', 'delete_class' => 'Delete Class',
'class_note' => 'Class Note', 'class_note' => 'Class Note',
'add_language' => 'Add Language', 'add_language' => 'Add Language',
'set_default' => 'Set Default',
'save_changes' => 'Save Changes', 'save_changes' => 'Save Changes',
'schedule_class' => 'Schedule Class', 'schedule_class' => 'Schedule Class',
'add_newsletter' => 'Add Newsletter', 'add_newsletter' => 'Add Newsletter',
@ -203,14 +204,17 @@ return [
'main_menu' => 'Main Menu', 'main_menu' => 'Main Menu',
'categories' => 'Categories', 'categories' => 'Categories',
'courses' => 'Courses', 'courses' => 'Courses',
'exams' => 'Exams',
'enrollments' => 'Enrollments', 'enrollments' => 'Enrollments',
'instructors' => 'Instructors', 'instructors' => 'Instructors',
'payout_report' => 'Payout Report', 'payout_report' => 'Payout Report',
'payment_report' => 'Payment Report',
'payouts' => 'Payouts', 'payouts' => 'Payouts',
'job_circulars' => 'Job Circulars', 'job_circulars' => 'Job Circulars',
'blogs' => 'Blogs', 'blogs' => 'Blogs',
'newsletters' => 'Newsletters', 'newsletters' => 'Newsletters',
'all_users' => 'All Users', 'all_users' => 'All Users',
'certificates' => 'Certificates',
'settings' => 'Settings', 'settings' => 'Settings',
'my_courses' => 'My Courses', 'my_courses' => 'My Courses',
'wishlist' => 'Wishlist', 'wishlist' => 'Wishlist',
@ -220,6 +224,12 @@ return [
'profile_update' => 'Profile Update', 'profile_update' => 'Profile Update',
'manage_courses' => 'Manage Courses', 'manage_courses' => 'Manage Courses',
'create_course' => 'Create Course', 'create_course' => 'Create Course',
'course_coupons' => 'Course Coupons',
'manage_exams' => 'Manage Exams',
'create_exam' => 'Create Exam',
'exam_coupons' => 'Exam Coupons',
'course_enrollments' => 'Course Enrollments',
'exam_enrollments' => 'Exam Enrollments',
'manage_enrollments' => 'Manage Enrollments', 'manage_enrollments' => 'Manage Enrollments',
'add_new_enrollment' => 'Add New Enrollment', 'add_new_enrollment' => 'Add New Enrollment',
'add_new_instructor' => 'Add New Instructor', 'add_new_instructor' => 'Add New Instructor',
@ -241,6 +251,9 @@ return [
'smtp' => 'SMTP', 'smtp' => 'SMTP',
'auth0' => 'Auth0', 'auth0' => 'Auth0',
'maintenance' => 'Maintenance', 'maintenance' => 'Maintenance',
'online_payments' => 'Online Payments',
'offline_payments' => 'Offline Payments',
'marksheet' => 'Marksheet',
], ],
], ],

View File

@ -27,6 +27,11 @@ return [
'smtp_settings' => 'SMTP Settings', 'smtp_settings' => 'SMTP Settings',
'storage_settings' => 'Storage Settings', 'storage_settings' => 'Storage Settings',
'language_settings' => 'Language Settings', 'language_settings' => 'Language Settings',
'translation_settings' => 'Translation Settings',
'add_language' => 'Add Language',
'translation_scope_information' => 'Translation Scope Information',
'translation_scope_dashboard' => 'Translations will be applied to dashboard interfaces (admin, instructor, student).',
'translation_scope_public_pages' => 'Public pages are not affected by these translations as they are fully customizable through the page editor.',
'language_properties' => 'Language Properties', 'language_properties' => 'Language Properties',
'translate_language_properties' => 'Translate Language Properties', 'translate_language_properties' => 'Translate Language Properties',
] ]