Commit 9d699a90 authored by Ruben Davila's avatar Ruben Davila

Add new Rake task to simplify the compilation of PO files

parent 1cd5c6d9
...@@ -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
......
...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment