BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5cb8ad6c
Commit
5cb8ad6c
authored
Jun 01, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add-new-rake-task-for-gettext' into 'master'
Add new Rake task to simplify the compilation of PO files See merge request !11864
parents
6faa01e0
9d699a90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
i18n_guide.md
doc/development/i18n_guide.md
+1
-2
gettext.rake
lib/tasks/gettext.rake
+8
-0
No files found.
doc/development/i18n_guide.md
View file @
5cb8ad6c
...
...
@@ -233,8 +233,7 @@ Let's suppose you want to add translations for a new language, let's say French.
containing the translations:
```sh
bundle exec rake gettext:pack
bundle exec rake gettext:po_to_json
bundle exec rake gettext:compile
```
1.
In order to see the translated content we need to change our preferred language
...
...
lib/tasks/gettext.rake
View file @
5cb8ad6c
...
...
@@ -11,4 +11,12 @@ namespace :gettext do
"{
#{
folders
}
}/**/*.{
#{
exts
}
}"
)
end
task
:compile
do
# See: https://gitlab.com/gitlab-org/gitlab-ce/issues/33014#note_31218998
FileUtils
.
touch
(
File
.
join
(
Rails
.
root
,
'locale/gitlab.pot'
))
Rake
::
Task
[
'gettext:pack'
].
invoke
Rake
::
Task
[
'gettext:po_to_json'
].
invoke
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