i18n : wrap core IU stringg with __() (nav, button, tabs, breadcrumbs )
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
"
|
"
|
||||||
:value="query"
|
:value="query"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="Search"
|
:placeholder="__('Search')"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
class="absolute right-1.5 inline-flex h-7 w-7 items-center justify-center"
|
class="absolute right-1.5 inline-flex h-7 w-7 items-center justify-center"
|
||||||
|
|||||||
@@ -256,34 +256,34 @@ const readOnlyMode = window.read_only_mode
|
|||||||
const tabs = computed(() => {
|
const tabs = computed(() => {
|
||||||
let batchTabs = []
|
let batchTabs = []
|
||||||
batchTabs.push({
|
batchTabs.push({
|
||||||
label: 'Dashboard',
|
label: __('Dashboard'),
|
||||||
icon: LayoutDashboard,
|
icon: LayoutDashboard,
|
||||||
})
|
})
|
||||||
|
|
||||||
batchTabs.push({
|
batchTabs.push({
|
||||||
label: 'Courses',
|
label: __('Courses'),
|
||||||
icon: BookOpen,
|
icon: BookOpen,
|
||||||
})
|
})
|
||||||
|
|
||||||
batchTabs.push({
|
batchTabs.push({
|
||||||
label: 'Classes',
|
label: __('Classes'),
|
||||||
icon: Laptop,
|
icon: Laptop,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (user.data?.is_moderator) {
|
if (user.data?.is_moderator) {
|
||||||
batchTabs.push({
|
batchTabs.push({
|
||||||
label: 'Assessments',
|
label: __('Assessments'),
|
||||||
icon: BookOpenCheck,
|
icon: BookOpenCheck,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
batchTabs.push({
|
batchTabs.push({
|
||||||
label: 'Announcements',
|
label: __('Announcements'),
|
||||||
icon: Mail,
|
icon: Mail,
|
||||||
})
|
})
|
||||||
|
|
||||||
batchTabs.push({
|
batchTabs.push({
|
||||||
label: 'Discussions',
|
label: __('Discussions'),
|
||||||
icon: MessageCircle,
|
icon: MessageCircle,
|
||||||
})
|
})
|
||||||
return batchTabs
|
return batchTabs
|
||||||
@@ -317,10 +317,10 @@ const batch = createResource({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let crumbs = [{ label: 'Batches', route: { name: 'Batches' } }]
|
let crumbs = [{ label: __('Batches'), route: { name: 'Batches' } }]
|
||||||
if (!isStudent.value) {
|
if (!isStudent.value) {
|
||||||
crumbs.push({
|
crumbs.push({
|
||||||
label: 'Details',
|
label: __('Details'),
|
||||||
route: {
|
route: {
|
||||||
name: 'BatchDetail',
|
name: 'BatchDetail',
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const courses = createResource({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let items = [{ label: 'Batches', route: { name: 'Batches' } }]
|
let items = [{ label: __('Batches'), route: { name: 'Batches' } }]
|
||||||
items.push({
|
items.push({
|
||||||
label: batch?.data?.title,
|
label: batch?.data?.title,
|
||||||
route: { name: 'BatchDetail', params: { batchName: batch?.data?.name } },
|
route: { name: 'BatchDetail', params: { batchName: batch?.data?.name } },
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ watch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let items = [{ label: 'Courses', route: { name: 'Courses' } }]
|
let items = [{ label: __('Courses'), route: { name: 'Courses' } }]
|
||||||
items.push({
|
items.push({
|
||||||
label: course?.data?.title,
|
label: course?.data?.title,
|
||||||
route: { name: 'CourseDetail', params: { courseName: course?.data?.name } },
|
route: { name: 'CourseDetail', params: { courseName: course?.data?.name } },
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ const progress = createResource({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let items = [{ label: 'Courses', route: { name: 'Courses' } }]
|
let items = [{ label: __('Courses'), route: { name: 'Courses' } }]
|
||||||
items.push({
|
items.push({
|
||||||
label: lesson?.data?.course_title,
|
label: lesson?.data?.course_title,
|
||||||
route: { name: 'CourseDetail', params: { courseName: props.courseName } },
|
route: { name: 'CourseDetail', params: { courseName: props.courseName } },
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
<TabButtons
|
<TabButtons
|
||||||
class="inline-block"
|
class="inline-block"
|
||||||
:buttons="[{ label: 'Unread', active: true }, { label: 'Read' }]"
|
:buttons="[{ label: __('Unread'), active: true }, { label: __('Read') }]"
|
||||||
v-model="activeTab"
|
v-model="activeTab"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -195,14 +195,14 @@ const isSessionUser = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getTabButtons = () => {
|
const getTabButtons = () => {
|
||||||
let buttons = [{ label: 'About' }, { label: 'Certificates' }]
|
let buttons = [{ label: __('About') }, { label: __('Certificates') }]
|
||||||
if ($user.data?.is_moderator) buttons.push({ label: 'Roles' })
|
if ($user.data?.is_moderator) buttons.push({ label: __('Roles') })
|
||||||
if (
|
if (
|
||||||
isSessionUser() &&
|
isSessionUser() &&
|
||||||
($user.data?.is_evaluator || $user.data?.is_moderator)
|
($user.data?.is_evaluator || $user.data?.is_moderator)
|
||||||
) {
|
) {
|
||||||
buttons.push({ label: 'Slots' })
|
buttons.push({ label: __('Slots') })
|
||||||
buttons.push({ label: 'Schedule' })
|
buttons.push({ label: __('Schedule') })
|
||||||
}
|
}
|
||||||
|
|
||||||
return buttons
|
return buttons
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ export function getUserTimezone() {
|
|||||||
export function getSidebarLinks() {
|
export function getSidebarLinks() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: 'Courses',
|
label: __('Courses'),
|
||||||
icon: 'BookOpen',
|
icon: 'BookOpen',
|
||||||
to: 'Courses',
|
to: 'Courses',
|
||||||
activeFor: [
|
activeFor: [
|
||||||
@@ -415,25 +415,25 @@ export function getSidebarLinks() {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Batches',
|
label: __('Batches'),
|
||||||
icon: 'Users',
|
icon: 'Users',
|
||||||
to: 'Batches',
|
to: 'Batches',
|
||||||
activeFor: ['Batches', 'BatchDetail', 'Batch', 'BatchForm'],
|
activeFor: ['Batches', 'BatchDetail', 'Batch', 'BatchForm'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Certified Members',
|
label: __('Certified Members'),
|
||||||
icon: 'GraduationCap',
|
icon: 'GraduationCap',
|
||||||
to: 'CertifiedParticipants',
|
to: 'CertifiedParticipants',
|
||||||
activeFor: ['CertifiedParticipants'],
|
activeFor: ['CertifiedParticipants'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Jobs',
|
label: __('Jobs'),
|
||||||
icon: 'Briefcase',
|
icon: 'Briefcase',
|
||||||
to: 'Jobs',
|
to: 'Jobs',
|
||||||
activeFor: ['Jobs', 'JobDetail'],
|
activeFor: ['Jobs', 'JobDetail'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Statistics',
|
label: __('Statistics'),
|
||||||
icon: 'TrendingUp',
|
icon: 'TrendingUp',
|
||||||
to: 'Statistics',
|
to: 'Statistics',
|
||||||
activeFor: ['Statistics'],
|
activeFor: ['Statistics'],
|
||||||
|
|||||||
Reference in New Issue
Block a user