diff options
author | Mykhailo Formus <mikeformus@gmail.com> | 2018-07-12 09:55:01 +0000 |
---|---|---|
committer | Mykhailo Formus <mikeformus@gmail.com> | 2018-07-12 09:55:01 +0000 |
commit | 7a21f39df92baaa88f9533316e7b19c9c70bd91e (patch) | |
tree | 090f49a7edc682c31ac29465205c16201bdbe03d /lib/tasks/gettext.rake | |
parent | 331f8d71b2c778f10b926114caeb718bce7294d6 (diff) | |
parent | 767ccaa1725048cd2b27fbf1081cba3ba89d2926 (diff) | |
download | gitlab-ce-mikeformus/gitlab-ce-qa-264.tar.gz |
Merge branch 'master' into qa-264mikeformus/gitlab-ce-qa-264
Diffstat (limited to 'lib/tasks/gettext.rake')
-rw-r--r-- | lib/tasks/gettext.rake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake index 6df7fe81437..f431352b61e 100644 --- a/lib/tasks/gettext.rake +++ b/lib/tasks/gettext.rake @@ -20,16 +20,22 @@ namespace :gettext do end task :regenerate do + pot_file = 'locale/gitlab.pot' # Remove all translated files, this speeds up finding FileUtils.rm Dir['locale/**/gitlab.*'] # remove the `pot` file to ensure it's completely regenerated - FileUtils.rm_f 'locale/gitlab.pot' + FileUtils.rm_f pot_file Rake::Task['gettext:find'].invoke # leave only the required changes. `git checkout -- locale/*/gitlab.po` + # Remove timestamps from the pot file + pot_content = File.read pot_file + pot_content.gsub!(/^"POT?\-(?:Creation|Revision)\-Date\:.*\n/, '') + File.write pot_file, pot_content + puts <<~MSG All done. Please commit the changes to `locale/gitlab.pot`. |