Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
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
cs_comments_service
Commits
d4b8bc99
Commit
d4b8bc99
authored
Feb 13, 2014
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #86 from edx/gprice/rake-i18n-tasks
Add rake tasks for dealing with translations
parents
86e4f2a6
f1d94a63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
README.rst
+7
-4
Rakefile
+23
-0
No files found.
README.rst
View file @
d4b8bc99
...
@@ -25,15 +25,18 @@ found in the locale/ directory.
...
@@ -25,15 +25,18 @@ found in the locale/ directory.
__ https://github.com/edx/edx-platform
__ https://github.com/edx/edx-platform
edX uses Transifex to host translations. To use the Transifex client, be sure
edX uses Transifex to host translations. To use the Transifex client, be sure
it is installed (``pip install
-r requirements.tx
t`` will do this for you), and
it is installed (``pip install
transifex-clien
t`` will do this for you), and
follow the instructions here__ to set up your ``.transifexrc`` file.
follow the instructions here__ to set up your ``.transifexrc`` file.
__ http://support.transifex.com/customer/portal/articles/1000855-configuring-the-client
__ http://support.transifex.com/customer/portal/articles/1000855-configuring-the-client
To upload translations: ``tx push -s``
To upload strings to Transifex for translation when you change the set
of translatable strings: ``bundle exec rake i18n:push``
To download translations: ``tx pull -l <locale>``, where ``<language>``
To fetch the latest translations from Transifex: ``bundle exec rake i18n:pull``
indicates the desired language for the transifex resource(s).
The repository includes some translations so they will be available
upon deployment. To commit an update to these: ``bundle exec rake i18n:commit``
License
License
-------
-------
...
...
Rakefile
View file @
d4b8bc99
...
@@ -376,3 +376,26 @@ namespace :jobs do
...
@@ -376,3 +376,26 @@ namespace :jobs do
Delayed
::
Worker
.
new
(
:min_priority
=>
ENV
[
'MIN_PRIORITY'
],
:max_priority
=>
ENV
[
'MAX_PRIORITY'
],
:queues
=>
(
ENV
[
'QUEUES'
]
||
ENV
[
'QUEUE'
]
||
''
).
split
(
','
),
:quiet
=>
false
).
start
Delayed
::
Worker
.
new
(
:min_priority
=>
ENV
[
'MIN_PRIORITY'
],
:max_priority
=>
ENV
[
'MAX_PRIORITY'
],
:queues
=>
(
ENV
[
'QUEUES'
]
||
ENV
[
'QUEUE'
]
||
''
).
split
(
','
),
:quiet
=>
false
).
start
end
end
end
end
namespace
:i18n
do
desc
"Push source strings to Transifex for translation"
task
:push
do
sh
(
"tx push -s"
)
end
desc
"Pull translated strings from Transifex"
task
:pull
do
sh
(
"tx pull --mode=reviewed --all --minimum-perc=1"
)
end
desc
"Clean the locale directory"
task
:clean
do
sh
(
"git clean -f locale/"
)
end
desc
"Commit translated strings to the repository"
task
:commit
=>
[
"i18n:clean"
,
"i18n:pull"
]
do
sh
(
"git add locale"
)
sh
(
"git commit -m 'Updated translations (autogenerated message)'"
)
end
end
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