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
35f41b7d
Commit
35f41b7d
authored
Mar 18, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow stderr if verbosity is off
parent
19b8b1de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
i18n/extract.py
+9
-4
No files found.
i18n/extract.py
View file @
35f41b7d
...
...
@@ -61,7 +61,12 @@ def main(verbosity=1):
config
=
base
(
LOCALE_DIR
,
'babel_mako.cfg'
),
output
=
base
(
CONFIGURATION
.
source_messages_dir
,
'mako.po'
),
)
execute
(
babel_mako_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
DEVNULL
)
if
verbosity
:
stderr
=
None
else
:
stderr
=
DEVNULL
execute
(
babel_mako_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
stderr
)
makemessages
=
"django-admin.py makemessages -l en -v{}"
.
format
(
verbosity
)
ignores
=
" "
.
join
(
'--ignore="{}/*"'
.
format
(
d
)
for
d
in
CONFIGURATION
.
ignore_dirs
)
...
...
@@ -70,11 +75,11 @@ def main(verbosity=1):
# Extract strings from django source files, including .py files.
make_django_cmd
=
makemessages
+
' --extension html'
execute
(
make_django_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
DEVNULL
)
execute
(
make_django_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
stderr
)
# Extract strings from Javascript source files.
make_djangojs_cmd
=
makemessages
+
' -d djangojs --extension js'
execute
(
make_djangojs_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
DEVNULL
)
execute
(
make_djangojs_cmd
,
working_directory
=
BASE_DIR
,
stderr
=
stderr
)
# makemessages creates 'django.po'. This filename is hardcoded.
# Rename it to django-partial.po to enable merging into django.po later.
...
...
@@ -108,7 +113,7 @@ def main(verbosity=1):
app
=
app_name
,
output
=
output_file
,
)
execute
(
babel_cmd
,
working_directory
=
app_dir
,
stderr
=
DEVNULL
)
execute
(
babel_cmd
,
working_directory
=
app_dir
,
stderr
=
stderr
)
# Segment the generated files.
segmented_files
=
segment_pofiles
(
"en"
)
...
...
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