Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6f9fd5d3
Commit
6f9fd5d3
authored
Feb 04, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move JSON samples out of translated strings so translators can't make mistakes
parent
db8b61bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
common/lib/xmodule/xmodule/course_module.py
+9
-3
common/lib/xmodule/xmodule/modulestore/inheritance.py
+16
-8
No files found.
common/lib/xmodule/xmodule/course_module.py
View file @
6f9fd5d3
...
@@ -701,16 +701,22 @@ class CourseFields(object):
...
@@ -701,16 +701,22 @@ class CourseFields(object):
teams_configuration
=
Dict
(
teams_configuration
=
Dict
(
display_name
=
_
(
"Teams Configuration"
),
display_name
=
_
(
"Teams Configuration"
),
# Translators: please don't translate "id".
help
=
_
(
help
=
_
(
'Specify the maximum team size and topics for teams inside the provided set of curly braces. '
'Specify the maximum team size and topics for teams inside the provided set of curly braces. '
'Make sure that you enclose all of the sets of topic values within a set of square brackets, '
'Make sure that you enclose all of the sets of topic values within a set of square brackets, '
'with a comma after the closing curly brace for each topic, and another comma after the '
'with a comma after the closing curly brace for each topic, and another comma after the '
'closing square brackets. '
'closing square brackets. '
'For example, to specify that teams should have a maximum of 5 participants and provide a list of '
'For example, to specify that teams should have a maximum of 5 participants and provide a list of '
'2 topics, enter the configuration in this format: '
'2 topics, enter the configuration in this format: {example_format}. '
'{"topics": [{"name": "Topic1Name", "description": "Topic1Description", "id": "Topic1ID"}, '
'{"name": "Topic2Name", "description": "Topic2Description", "id": "Topic2ID"}], "max_team_size": 5}. '
'In "id" values, the only supported special characters are underscore, hyphen, and period.'
'In "id" values, the only supported special characters are underscore, hyphen, and period.'
)
.
format
(
# Put the sample JSON into a format variable so that translators
# don't muck with it.
example_format
=
(
'{"topics": [{"name": "Topic1Name", "description": "Topic1Description", "id": "Topic1ID"}, '
'{"name": "Topic2Name", "description": "Topic2Description", "id": "Topic2ID"}], "max_team_size": 5}'
),
),
),
scope
=
Scope
.
settings
,
scope
=
Scope
.
settings
,
)
)
...
...
common/lib/xmodule/xmodule/modulestore/inheritance.py
View file @
6f9fd5d3
...
@@ -169,12 +169,17 @@ class InheritanceMixin(XBlockMixin):
...
@@ -169,12 +169,17 @@ class InheritanceMixin(XBlockMixin):
video_bumper
=
Dict
(
video_bumper
=
Dict
(
display_name
=
_
(
"Video Pre-Roll"
),
display_name
=
_
(
"Video Pre-Roll"
),
help
=
_
(
help
=
_
(
"""Identify a video, 5-10 seconds in length, to play before course videos. Enter the video ID from"""
"Identify a video, 5-10 seconds in length, to play before course videos. Enter the video ID from "
""" the Video Uploads page and one or more transcript files in the following format:"""
"the Video Uploads page and one or more transcript files in the following format: {format}. "
""" {"video_id": "ID", "transcripts": {"language": "/static/filename.srt"}}."""
"For example, an entry for a video with two transcripts looks like this: {example}"
""" For example, an entry for a video with two transcripts looks like this:"""
)
.
format
(
""" {"video_id": "77cef264-d6f5-4cf2-ad9d-0178ab8c77be","""
format
=
'{"video_id": "ID", "transcripts": {"language": "/static/filename.srt"}}'
,
""" "transcripts": {"en": "/static/DemoX-D01_1.srt", "uk": "/static/DemoX-D01_1_uk.srt"}}"""
example
=
(
'{'
'"video_id": "77cef264-d6f5-4cf2-ad9d-0178ab8c77be", '
'"transcripts": {"en": "/static/DemoX-D01_1.srt", "uk": "/static/DemoX-D01_1_uk.srt"}'
'}'
),
),
),
scope
=
Scope
.
settings
scope
=
Scope
.
settings
)
)
...
@@ -183,8 +188,11 @@ class InheritanceMixin(XBlockMixin):
...
@@ -183,8 +188,11 @@ class InheritanceMixin(XBlockMixin):
default_reset_button
=
getattr
(
settings
,
reset_key
)
if
hasattr
(
settings
,
reset_key
)
else
False
default_reset_button
=
getattr
(
settings
,
reset_key
)
if
hasattr
(
settings
,
reset_key
)
else
False
show_reset_button
=
Boolean
(
show_reset_button
=
Boolean
(
display_name
=
_
(
"Show Reset Button for Problems"
),
display_name
=
_
(
"Show Reset Button for Problems"
),
help
=
_
(
"Enter true or false. If true, problems in the course default to always displaying a 'Reset' button. You can "
help
=
_
(
"override this in each problem's settings. All existing problems are affected when this course-wide setting is changed."
),
"Enter true or false. If true, problems in the course default to always displaying a 'Reset' button. "
"You can override this in each problem's settings. All existing problems are affected when "
"this course-wide setting is changed."
),
scope
=
Scope
.
settings
,
scope
=
Scope
.
settings
,
default
=
default_reset_button
default
=
default_reset_button
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment