Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
9d699a90
Commit
9d699a90
authored
Jun 01, 2017
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new Rake task to simplify the compilation of PO files
parent
1cd5c6d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
doc/development/i18n_guide.md
doc/development/i18n_guide.md
+1
-2
lib/tasks/gettext.rake
lib/tasks/gettext.rake
+8
-0
No files found.
doc/development/i18n_guide.md
View file @
9d699a90
...
@@ -233,8 +233,7 @@ Let's suppose you want to add translations for a new language, let's say French.
...
@@ -233,8 +233,7 @@ Let's suppose you want to add translations for a new language, let's say French.
containing the translations:
containing the translations:
```sh
```sh
bundle exec rake gettext:pack
bundle exec rake gettext:compile
bundle exec rake gettext:po_to_json
```
```
1.
In order to see the translated content we need to change our preferred language
1.
In order to see the translated content we need to change our preferred language
...
...
lib/tasks/gettext.rake
View file @
9d699a90
...
@@ -11,4 +11,12 @@ namespace :gettext do
...
@@ -11,4 +11,12 @@ namespace :gettext do
"{
#{
folders
}
}/**/*.{
#{
exts
}
}"
"{
#{
folders
}
}/**/*.{
#{
exts
}
}"
)
)
end
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
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