i18n: wrap UI strings with __() (components/pages/modals)
This commit is contained in:
@@ -208,12 +208,12 @@ const canAddAssessments = () => {
|
||||
const getAssessmentColumns = () => {
|
||||
let columns = [
|
||||
{
|
||||
label: 'Assessment',
|
||||
label: __('Assessment'),
|
||||
key: 'title',
|
||||
width: '25rem',
|
||||
},
|
||||
{
|
||||
label: 'Type',
|
||||
label: __('Type'),
|
||||
key: 'assessment_type',
|
||||
width: '15rem',
|
||||
},
|
||||
@@ -221,7 +221,7 @@ const getAssessmentColumns = () => {
|
||||
|
||||
if (!user.data?.is_moderator) {
|
||||
columns.push({
|
||||
label: 'Status/Percentage',
|
||||
label: __('Status/Percentage'),
|
||||
key: 'status',
|
||||
align: 'left',
|
||||
width: '10rem',
|
||||
|
||||
@@ -453,9 +453,9 @@ const canModifyAssignment = computed(() => {
|
||||
|
||||
const submissionStatusOptions = computed(() => {
|
||||
return [
|
||||
{ label: 'Not Graded', value: 'Not Graded' },
|
||||
{ label: 'Pass', value: 'Pass' },
|
||||
{ label: 'Fail', value: 'Fail' },
|
||||
{ label: __('Not Graded'), value: 'Not Graded' },
|
||||
{ label: __('Pass'), value: 'Pass' },
|
||||
{ label: __('Fail'), value: 'Fail' },
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
@@ -116,17 +116,17 @@ const openCourseModal = () => {
|
||||
const getCoursesColumns = () => {
|
||||
return [
|
||||
{
|
||||
label: 'Title',
|
||||
label: __('Title'),
|
||||
key: 'title',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
label: 'Lessons',
|
||||
label: __('Lessons'),
|
||||
key: 'lessons',
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
label: 'Enrollments',
|
||||
label: __('Enrollments'),
|
||||
align: 'right',
|
||||
key: 'enrollments',
|
||||
},
|
||||
|
||||
@@ -231,19 +231,19 @@ const students = createResource({
|
||||
const getStudentColumns = () => {
|
||||
let columns = [
|
||||
{
|
||||
label: 'Full Name',
|
||||
label: __('Full Name'),
|
||||
key: 'full_name',
|
||||
width: '20rem',
|
||||
icon: 'user',
|
||||
},
|
||||
{
|
||||
label: 'Progress',
|
||||
label: __('Progress'),
|
||||
key: 'progress',
|
||||
width: '15rem',
|
||||
icon: 'activity',
|
||||
},
|
||||
{
|
||||
label: 'Last Active',
|
||||
label: __('Last Active'),
|
||||
key: 'last_active',
|
||||
width: '10rem',
|
||||
align: 'center',
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
v-if="groups.length == 0"
|
||||
class="mt-1.5 rounded-md px-2.5 py-1.5 text-base text-ink-gray-5"
|
||||
>
|
||||
No results found
|
||||
{{ __('No results found') }}
|
||||
</li>
|
||||
</ComboboxOptions>
|
||||
<div v-if="slots.footer" class="border-t p-1.5 pb-0.5">
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
"
|
||||
:options="[
|
||||
{
|
||||
label: 'Edit',
|
||||
label: __('Edit'),
|
||||
onClick() {
|
||||
reply.editable = true
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: __('Delete'),
|
||||
onClick() {
|
||||
deleteReply(reply)
|
||||
},
|
||||
|
||||
@@ -97,9 +97,9 @@ const addAssessment = (close) => {
|
||||
|
||||
const assessmentTypes = computed(() => {
|
||||
return [
|
||||
{ label: 'Quiz', value: 'LMS Quiz' },
|
||||
{ label: 'Assignment', value: 'LMS Assignment' },
|
||||
{ label: 'Programming Exercise', value: 'LMS Programming Exercise' },
|
||||
{ label: __('Quiz'), value: 'LMS Quiz' },
|
||||
{ label: __('Assignment'), value: 'LMS Assignment' },
|
||||
{ label: __('Programming Exercise'), value: 'LMS Programming Exercise' },
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -144,11 +144,11 @@ const saveAssignment = () => {
|
||||
|
||||
const assignmentOptions = computed(() => {
|
||||
return [
|
||||
{ label: 'PDF', value: 'PDF' },
|
||||
{ label: 'Image', value: 'Image' },
|
||||
{ label: 'Document', value: 'Document' },
|
||||
{ label: 'Text', value: 'Text' },
|
||||
{ label: 'URL', value: 'URL' },
|
||||
{ label: __('PDF'), value: 'PDF' },
|
||||
{ label: __('Image'), value: 'Image' },
|
||||
{ label: __('Document'), value: 'Document' },
|
||||
{ label: __('Text'), value: 'Text' },
|
||||
{ label: __('URL'), value: 'URL' },
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -139,15 +139,15 @@ const getTimezoneOptions = () => {
|
||||
const getRecordingOptions = () => {
|
||||
return [
|
||||
{
|
||||
label: 'No Recording',
|
||||
label: __('No Recording'),
|
||||
value: 'No Recording',
|
||||
},
|
||||
{
|
||||
label: 'Local',
|
||||
label: __('Local'),
|
||||
value: 'Local',
|
||||
},
|
||||
{
|
||||
label: 'Cloud',
|
||||
label: __('Cloud'),
|
||||
value: 'Cloud',
|
||||
},
|
||||
]
|
||||
|
||||
@@ -665,25 +665,25 @@ const markLessonProgress = () => {
|
||||
const getSubmissionColumns = () => {
|
||||
return [
|
||||
{
|
||||
label: 'No.',
|
||||
label: __('No.'),
|
||||
key: 'idx',
|
||||
},
|
||||
{
|
||||
label: 'Date',
|
||||
label: __('Date'),
|
||||
key: 'creation',
|
||||
},
|
||||
{
|
||||
label: 'Score',
|
||||
label: __('Score'),
|
||||
key: 'score',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
label: 'Score out of',
|
||||
label: __('Score out of'),
|
||||
key: 'score_out_of',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
label: 'Percentage',
|
||||
label: __('Percentage'),
|
||||
key: 'percentage',
|
||||
align: 'center',
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
>
|
||||
{{ branding.data?.app_name }}
|
||||
</span>
|
||||
<span v-else> Learning </span>
|
||||
<span v-else> {{ __('Learning') }} </span>
|
||||
</div>
|
||||
<div
|
||||
v-if="userResource.data"
|
||||
@@ -130,7 +130,7 @@ const userDropdownOptions = computed(() => {
|
||||
items: [
|
||||
{
|
||||
icon: User,
|
||||
label: 'My Profile',
|
||||
label: __('My Profile'),
|
||||
onClick: () => {
|
||||
router.push(`/user/${userResource.data?.username}`)
|
||||
},
|
||||
@@ -140,7 +140,7 @@ const userDropdownOptions = computed(() => {
|
||||
},
|
||||
{
|
||||
icon: theme.value === 'light' ? Moon : Sun,
|
||||
label: 'Toggle Theme',
|
||||
label: __('Toggle Theme'),
|
||||
onClick: () => {
|
||||
toggleTheme()
|
||||
},
|
||||
@@ -158,7 +158,7 @@ const userDropdownOptions = computed(() => {
|
||||
},
|
||||
{
|
||||
icon: Settings,
|
||||
label: 'Settings',
|
||||
label: __('Settings'),
|
||||
onClick: () => {
|
||||
settingsStore.isSettingsOpen = true
|
||||
},
|
||||
@@ -168,7 +168,7 @@ const userDropdownOptions = computed(() => {
|
||||
},
|
||||
{
|
||||
icon: FrappeCloudIcon,
|
||||
label: 'Login to Frappe Cloud',
|
||||
label: __('Login to Frappe Cloud'),
|
||||
onClick: () => {
|
||||
$dialog({
|
||||
title: __('Login to Frappe Cloud?'),
|
||||
@@ -196,7 +196,7 @@ const userDropdownOptions = computed(() => {
|
||||
},
|
||||
{
|
||||
icon: LogOut,
|
||||
label: 'Log out',
|
||||
label: __('Log out'),
|
||||
onClick: () => {
|
||||
logout.submit().then(() => {
|
||||
isLoggedIn = false
|
||||
@@ -208,7 +208,7 @@ const userDropdownOptions = computed(() => {
|
||||
},
|
||||
{
|
||||
icon: LogIn,
|
||||
label: 'Log in',
|
||||
label: __('Log in'),
|
||||
onClick: () => {
|
||||
window.location.href = '/login'
|
||||
},
|
||||
|
||||
@@ -166,23 +166,23 @@ const reloadSubmissions = () => {
|
||||
const submissionColumns = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: 'Member',
|
||||
label: __('Member'),
|
||||
key: 'member_name',
|
||||
width: 1,
|
||||
},
|
||||
{
|
||||
label: 'Assignment',
|
||||
label: __('Assignment'),
|
||||
key: 'assignment_title',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
label: 'Submitted',
|
||||
label: __('Submitted'),
|
||||
key: 'creation',
|
||||
width: 1,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: 'Status',
|
||||
label: __('Status'),
|
||||
key: 'status',
|
||||
width: 1,
|
||||
align: 'center',
|
||||
@@ -193,9 +193,9 @@ const submissionColumns = computed(() => {
|
||||
const statusOptions = computed(() => {
|
||||
return [
|
||||
{ label: '', value: '' },
|
||||
{ label: 'Pass', value: 'Pass' },
|
||||
{ label: 'Fail', value: 'Fail' },
|
||||
{ label: 'Not Graded', value: 'Not Graded' },
|
||||
{ label: __('Pass'), value: 'Pass' },
|
||||
{ label: __('Fail'), value: 'Fail' },
|
||||
{ label: __('Not Graded'), value: 'Not Graded' },
|
||||
]
|
||||
})
|
||||
|
||||
@@ -212,7 +212,7 @@ const getStatusTheme = (status) => {
|
||||
const breadcrumbs = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: 'Assignment Submissions',
|
||||
label: __('Assignment Submissions'),
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -256,34 +256,34 @@ const readOnlyMode = window.read_only_mode
|
||||
const tabs = computed(() => {
|
||||
let batchTabs = []
|
||||
batchTabs.push({
|
||||
label: __('Dashboard'),
|
||||
label: 'Dashboard',
|
||||
icon: LayoutDashboard,
|
||||
})
|
||||
|
||||
batchTabs.push({
|
||||
label: __('Courses'),
|
||||
label: 'Courses',
|
||||
icon: BookOpen,
|
||||
})
|
||||
|
||||
batchTabs.push({
|
||||
label: __('Classes'),
|
||||
label: 'Classes',
|
||||
icon: Laptop,
|
||||
})
|
||||
|
||||
if (user.data?.is_moderator) {
|
||||
batchTabs.push({
|
||||
label: __('Assessments'),
|
||||
label: 'Assessments',
|
||||
icon: BookOpenCheck,
|
||||
})
|
||||
}
|
||||
|
||||
batchTabs.push({
|
||||
label: __('Announcements'),
|
||||
label: 'Announcements',
|
||||
icon: Mail,
|
||||
})
|
||||
|
||||
batchTabs.push({
|
||||
label: __('Discussions'),
|
||||
label: 'Discussions',
|
||||
icon: MessageCircle,
|
||||
})
|
||||
return batchTabs
|
||||
|
||||
@@ -211,7 +211,7 @@ const getTabButtons = () => {
|
||||
const breadcrumbs = computed(() => {
|
||||
let crumbs = [
|
||||
{
|
||||
label: 'People',
|
||||
label: __('People'),
|
||||
},
|
||||
{
|
||||
label: profile.data?.full_name,
|
||||
|
||||
Reference in New Issue
Block a user