summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-07-10 17:08:20 +0000
committerRémy Coutable <remy@rymai.me>2018-07-10 17:08:20 +0000
commit5bd8bfb66caa58c821ead2c6442faf13628ce36a (patch)
treeba7246361597f244e95af5336e95690d047881eb
parent49d7f92fd7476b4fb10e44ff92f36be99de0df49 (diff)
parentf6d22ec11ef3427f1295f6552e94a7e9e6324d32 (diff)
downloadgitlab-ce-5bd8bfb66caa58c821ead2c6442faf13628ce36a.tar.gz
Merge branch 'bvl-remove-pot-timestamps' into 'master'
Remove timestamps from `locale/gitlab.pot` Closes #49077 See merge request gitlab-org/gitlab-ce!20533
-rw-r--r--lib/tasks/gettext.rake8
-rw-r--r--locale/gitlab.pot2
2 files changed, 7 insertions, 3 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`.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 77cfe4ee84e..83ff735580e 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8,8 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-07-10 17:09+0300\n"
-"PO-Revision-Date: 2018-07-10 17:09+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"