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
8fffef77
Commit
8fffef77
authored
Jun 05, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3988 from louyihua/django-babel-underscore
Babel underscore extraction update according to @nedbat
parents
fa0dee17
12d8df97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
conf/locale/config.yaml
+4
-0
i18n/extract.py
+4
-6
No files found.
conf/locale/config.yaml
View file @
8fffef77
...
...
@@ -108,6 +108,9 @@ segment:
mako.po
:
mako-studio.po
:
-
cms/*
underscore.po
:
underscore-studio.po
:
-
cms/*
# How should the generate step merge files?
generate_merge
:
...
...
@@ -122,3 +125,4 @@ generate_merge:
-
djangojs-partial.po
-
djangojs-studio.po
-
underscore.po
-
underscore-studio.po
i18n/extract.py
View file @
8fffef77
...
...
@@ -63,16 +63,16 @@ def main(verbosity=1):
else
:
stderr
=
DEVNULL
babel_mako_cmd
=
'pybabel {verbosity} extract -F {config} -c "Translators:" . -o {output}'
babel_mako_cmd
=
babel_mako_cmd
.
format
(
babel_cmd_template
=
'pybabel {verbosity} extract -F {config} -c "Translators:" . -o {output}'
babel_mako_cmd
=
babel_cmd_template
.
format
(
verbosity
=
babel_verbosity
,
config
=
base
(
LOCALE_DIR
,
'babel_mako.cfg'
),
output
=
base
(
CONFIGURATION
.
source_messages_dir
,
'mako.po'
),
)
execute
(
babel_mako_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
stderr
)
babel_underscore_cmd
=
'pybabel {verbosity} extract -F {config} -c "Translators:" . -o {output}'
babel_underscore_cmd
=
babel_underscore_cmd
.
format
(
babel_underscore_cmd
=
babel_cmd_template
.
format
(
verbosity
=
babel_verbosity
,
config
=
base
(
LOCALE_DIR
,
'babel_underscore.cfg'
),
output
=
base
(
CONFIGURATION
.
source_messages_dir
,
'underscore.po'
),
...
...
@@ -108,8 +108,6 @@ def main(verbosity=1):
files_to_clean
=
set
()
files_to_clean
.
add
(
source_msgs_dir
/
"underscore.po"
)
# Extract strings from third-party applications.
for
app_name
in
CONFIGURATION
.
third_party
:
# Import the app to find out where it is. Then use pybabel to extract
...
...
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