Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic label for Programs & Events Dashboard #6061

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1021,7 +1021,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
Loading