Skip to content

Commit

Permalink
Generic label for Programs & Events Dashboard (#6061)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: bhushan354 <[email protected]>
  • Loading branch information
bhushan354 and bhushan354 authored Dec 17, 2024
1 parent d0b9ec4 commit 5220f4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';

const CourseDetails = ({ courses }) => {
const labelKey = Features.wikiEd ? 'courses.view_page' : 'courses_generic.view_page';
const elements = courses.map((course) => {
return (
<a className="course" key={`${course.course_slug}-${course.user_role}`} href={`/courses/${course.course_slug}`}>
<div className="button border">{I18n.t('courses.view_page')}</div>
<div className="button border">{I18n.t(labelKey)}</div>
<div className="course-title">{course.course_title}</div>
<div className="course-details">
<div className="col">
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ en:
uploads_none: This project has not contributed any images or other media files to Wikimedia Commons.
user_uploads_none: Selected users have not contributed any images or other media files to this project.
view_other: View other campaigns
view_page: View Program Page
view_page: View Page
word_count_doc: An estimate of the number of words added to mainspace articles by the program's editors during the program term
word_count_doc_wikidata: An estimate of the number of words added to mainspace items by the program's editors during the program term
yourcourses: Your Programs
Expand Down

0 comments on commit 5220f4e

Please sign in to comment.