Skip to content

Commit

Permalink
fix eslint errors in admin quick actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JiyaGupta-cs committed Feb 25, 2025
1 parent c9369c7 commit 2f98e4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { updateCourse } from '@actions/course_actions.js';
// Helper Functions
const DetailsText = ({ flags }) => (
<p>
Last Reviewed:&nbsp;
{I18n.t('courses.last_reviewed')}:&nbsp;
<strong>
{flags.last_reviewed.username}
</strong>&nbsp;on
</strong>&nbsp;{I18n.t('courses.on')}
<br />
<strong>
{format(toDate(parseISO(flags.last_reviewed.timestamp)), 'PPPP p')}
Expand All @@ -26,8 +26,7 @@ const isCourseClosed = flags => !!(flags && flags.closed_date);

const NoDetailsText = () => (
<p>
This course has not yet been marked as having been reviewed by a staff member.
Click below to mark it as reviewed!
{I18n.t('courses.no_details')}
</p>
);

Expand All @@ -49,7 +48,7 @@ export const AdminQuickActions = ({ course, current_user, persistCourse, greetSt
{isCourseClosed(course.flags) && (
<div style={{ marginBottom: '15px' }}>
<p>
<strong>This course was closed on:</strong>&nbsp;
<strong>{I18n.t('courses.closed_on')}:</strong>&nbsp;
{format(toDate(parseISO(course.flags.closed_date)), 'PPPP')}.
</p>
</div>
Expand All @@ -74,7 +73,7 @@ export const AdminQuickActions = ({ course, current_user, persistCourse, greetSt
persistCourse(course.slug);
}}
>
Mark as Reviewed
{I18n.t('courses.mark_as_reviewed')}
</button>
<br />
<br />
Expand Down
5 changes: 5 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ en:
Your course has been cloned, including the elements of the timeline
(weeks and blocks). Be sure to add the dates, which are not carried over.
Has anything else about your course changed? Feel free to update it now.
closed_on: This course was closed on
copy_successful_details: >
Your course has been copied, including the elements of the timeline
(weeks and blocks). Be sure to add the dates, which are not carried over.
Expand Down Expand Up @@ -719,10 +720,12 @@ en:
invalid_sync: Enrollment in this event is controlled by Wikimedia Event Center. It cannot be joined from the Dashboard.
join_details: To join this course, you need to get the passcode — or an enrollment link that includes the passcode — from the instructor. If you haven't received this, contact your instructor.
join_no_passcode: Are you sure you want to join this course?
last_reviewed: Last Reviewed
launch_wizard: Launch the Wizard
leave_confirmation: Are you sure you want to leave this course?
leave_course: Leave course
loading: Loading…
mark_as_reviewed: Mark as Reviewed
milestones_none: This course does not currently have any milestones.
my_articles: My Articles
my_articles_wikidata: My Items
Expand Down Expand Up @@ -751,6 +754,7 @@ en:
new_account_submitted_admin: >
Your request for an account has been created. Please inform your students to check
their email inbox to get their new password
no_details: This course has not yet been marked as having been reviewed by a staff member. Click below to mark it as reviewed!
no_campaign: To make this program active and allow users to join, it must be added to a campaign. If you're unsure of which campaign to add, use 'Miscellanea'.
nocourses: You are not participating in any courses.
nocourse: has not participated in any courses.
Expand All @@ -760,6 +764,7 @@ en:
This will post a reminder on the talk pages for all students who overdue
for completing assigned training modules. Are you sure you want to do this?
no_available_actions: No available actions
on: on
online_volunteers_enabled: Online Volunteers enabled
online_volunteers_tooltip: Enabling Online Volunteers allows user editors to join as a volunteer. Their edits will not be tracked.
ores_plot: ORES
Expand Down

0 comments on commit 2f98e4a

Please sign in to comment.