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
fee0c41c
Commit
fee0c41c
authored
Aug 19, 2017
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XBlock fields with formatted-in values can now translate properly
parent
e00867cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
cms/djangoapps/models/settings/course_metadata.py
+7
-1
common/lib/xmodule/xmodule/course_module.py
+2
-1
common/lib/xmodule/xmodule/modulestore/inheritance.py
+2
-1
No files found.
cms/djangoapps/models/settings/course_metadata.py
View file @
fee0c41c
...
...
@@ -140,10 +140,16 @@ class CourseMetadata(object):
for
field
in
descriptor
.
fields
.
values
():
if
field
.
scope
!=
Scope
.
settings
:
continue
field_help
=
_
(
field
.
help
)
# pylint: disable=translation-of-non-string
help_args
=
field
.
runtime_options
.
get
(
'help_format_args'
)
if
help_args
is
not
None
:
field_help
=
field_help
.
format
(
**
help_args
)
result
[
field
.
name
]
=
{
'value'
:
field
.
read_json
(
descriptor
),
'display_name'
:
_
(
field
.
display_name
),
# pylint: disable=translation-of-non-string
'help'
:
_
(
field
.
help
),
# pylint: disable=translation-of-non-string
'help'
:
field_help
,
'deprecated'
:
field
.
runtime_options
.
get
(
'deprecated'
,
False
)
}
return
result
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
fee0c41c
...
...
@@ -732,7 +732,8 @@ class CourseFields(object):
'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: {example_format}. '
'In "id" values, the only supported special characters are underscore, hyphen, and period.'
)
.
format
(
),
help_format_args
=
dict
(
# Put the sample JSON into a format variable so that translators
# don't muck with it.
example_format
=
(
...
...
common/lib/xmodule/xmodule/modulestore/inheritance.py
View file @
fee0c41c
...
...
@@ -178,7 +178,8 @@ class InheritanceMixin(XBlockMixin):
"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: {format}. "
"For example, an entry for a video with two transcripts looks like this: {example}"
)
.
format
(
),
help_format_args
=
dict
(
format
=
'{"video_id": "ID", "transcripts": {"language": "/static/filename.srt"}}'
,
example
=
(
'{'
...
...
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