Commit d5b69f25 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'bvl-gettext-updated-check-fix-ce' into 'master'

Updates to the `gettext:updated_check`

Closes #48952

See merge request gitlab-org/gitlab-ce!20433
parents 35b4ca37 8d364ac9
...@@ -281,7 +281,7 @@ Now that the new content is marked for translation, we need to update the PO ...@@ -281,7 +281,7 @@ Now that the new content is marked for translation, we need to update the PO
files with the following command: files with the following command:
```sh ```sh
bin/rake gettext:find bin/rake gettext:regenerate
``` ```
This command will update the `locale/gitlab.pot` file with the newly externalized This command will update the `locale/gitlab.pot` file with the newly externalized
...@@ -292,16 +292,6 @@ file in. Once the changes are on master, they will be picked up by ...@@ -292,16 +292,6 @@ file in. Once the changes are on master, they will be picked up by
If there are merge conflicts in the `gitlab.pot` file, you can delete the file If there are merge conflicts in the `gitlab.pot` file, you can delete the file
and regenerate it using the same command. Confirm that you are not deleting any strings accidentally by looking over the diff. and regenerate it using the same command. Confirm that you are not deleting any strings accidentally by looking over the diff.
The command also updates the translation files for each language: `locale/*/gitlab.po`
These changes can be discarded, the language files will be updated by Crowdin
automatically.
Discard all of them at once like this:
```sh
git checkout locale/*/gitlab.po
```
### Validating PO files ### Validating PO files
To make sure we keep our translation files up to date, there's a linter that is To make sure we keep our translation files up to date, there's a linter that is
......
...@@ -19,6 +19,23 @@ namespace :gettext do ...@@ -19,6 +19,23 @@ namespace :gettext do
Rake::Task['gettext:po_to_json'].invoke Rake::Task['gettext:po_to_json'].invoke
end end
task :regenerate do
# 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'
Rake::Task['gettext:find'].invoke
# leave only the required changes.
`git checkout -- locale/*/gitlab.po`
puts <<~MSG
All done. Please commit the changes to `locale/gitlab.pot`.
MSG
end
desc 'Lint all po files in `locale/' desc 'Lint all po files in `locale/'
task lint: :environment do task lint: :environment do
require 'simple_po_parser' require 'simple_po_parser'
...@@ -50,13 +67,12 @@ namespace :gettext do ...@@ -50,13 +67,12 @@ namespace :gettext do
end end
task :updated_check do task :updated_check do
pot_file = 'locale/gitlab.pot'
# Removing all pre-translated files speeds up `gettext:find` as the # Removing all pre-translated files speeds up `gettext:find` as the
# files don't need to be merged. # files don't need to be merged.
# Having `LC_MESSAGES/gitlab.mo files present also confuses the output. # Having `LC_MESSAGES/gitlab.mo files present also confuses the output.
FileUtils.rm Dir['locale/**/gitlab.*'] FileUtils.rm Dir['locale/**/gitlab.*']
FileUtils.rm_f pot_file
# Make sure we start out with a clean pot.file
`git checkout -- locale/gitlab.pot`
# `gettext:find` writes touches to temp files to `stderr` which would cause # `gettext:find` writes touches to temp files to `stderr` which would cause
# `static-analysis` to report failures. We can ignore these. # `static-analysis` to report failures. We can ignore these.
...@@ -64,18 +80,18 @@ namespace :gettext do ...@@ -64,18 +80,18 @@ namespace :gettext do
Rake::Task['gettext:find'].invoke Rake::Task['gettext:find'].invoke
end end
pot_diff = `git diff -- locale/gitlab.pot`.strip pot_diff = `git diff -- #{pot_file} | grep -E '^(\\+|-)msgid'`.strip
# reset the locale folder for potential next tasks # reset the locale folder for potential next tasks
`git checkout -- locale` `git checkout -- locale`
if pot_diff.present? if pot_diff.present?
raise <<~MSG raise <<~MSG
Newly translated strings found, please add them to `gitlab.pot` by running: Newly translated strings found, please add them to `#{pot_file}` by running:
rm locale/**/gitlab.*; bin/rake gettext:find; git checkout -- locale/*/gitlab.po bin/rake gettext:regenerate
Then commit and push the resulting changes to `locale/gitlab.pot`. Then commit and push the resulting changes to `#{pot_file}`.
The diff was: The diff was:
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-01 21:24+1000\n" "POT-Creation-Date: 2018-07-09 08:28+0200\n"
"PO-Revision-Date: 2018-07-01 21:24+1000\n" "PO-Revision-Date: 2018-07-09 08:28+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -369,9 +369,18 @@ msgstr "" ...@@ -369,9 +369,18 @@ msgstr ""
msgid "Alternatively, you can use a %{personal_access_token_link}. When you create your Personal Access Token, you will need to select the <code>repo</code> scope, so we can display a list of your public and private repositories which are available to import." msgid "Alternatively, you can use a %{personal_access_token_link}. When you create your Personal Access Token, you will need to select the <code>repo</code> scope, so we can display a list of your public and private repositories which are available to import."
msgstr "" msgstr ""
msgid "An error accured whilst committing your changes."
msgstr ""
msgid "An error occured creating the new branch." msgid "An error occured creating the new branch."
msgstr "" msgstr ""
msgid "An error occured whilst fetching the job trace."
msgstr ""
msgid "An error occured whilst fetching the latest pipline."
msgstr ""
msgid "An error occured whilst loading all the files." msgid "An error occured whilst loading all the files."
msgstr "" msgstr ""
...@@ -390,6 +399,9 @@ msgstr "" ...@@ -390,6 +399,9 @@ msgstr ""
msgid "An error occured whilst loading the merge request." msgid "An error occured whilst loading the merge request."
msgstr "" msgstr ""
msgid "An error occured whilst loading the pipelines jobs."
msgstr ""
msgid "An error occurred previewing the blob" msgid "An error occurred previewing the blob"
msgstr "" msgstr ""
...@@ -1085,9 +1097,6 @@ msgstr "" ...@@ -1085,9 +1097,6 @@ msgstr ""
msgid "ClusterIntegration|Add Kubernetes cluster" msgid "ClusterIntegration|Add Kubernetes cluster"
msgstr "" msgstr ""
msgid "ClusterIntegration|Add an existing Kubernetes cluster"
msgstr ""
msgid "ClusterIntegration|Advanced options on this Kubernetes cluster's integration" msgid "ClusterIntegration|Advanced options on this Kubernetes cluster's integration"
msgstr "" msgstr ""
...@@ -1109,9 +1118,6 @@ msgstr "" ...@@ -1109,9 +1118,6 @@ msgstr ""
msgid "ClusterIntegration|Certificate Authority bundle (PEM format)" msgid "ClusterIntegration|Certificate Authority bundle (PEM format)"
msgstr "" msgstr ""
msgid "ClusterIntegration|Choose how to set up Kubernetes cluster integration"
msgstr ""
msgid "ClusterIntegration|Choose which of your project's environments will use this Kubernetes cluster." msgid "ClusterIntegration|Choose which of your project's environments will use this Kubernetes cluster."
msgstr "" msgstr ""
...@@ -1139,18 +1145,6 @@ msgstr "" ...@@ -1139,18 +1145,6 @@ msgstr ""
msgid "ClusterIntegration|Create Kubernetes cluster" msgid "ClusterIntegration|Create Kubernetes cluster"
msgstr "" msgstr ""
msgid "ClusterIntegration|Create Kubernetes cluster on Google Kubernetes Engine"
msgstr ""
msgid "ClusterIntegration|Create a new Kubernetes cluster on Google Kubernetes Engine right from GitLab"
msgstr ""
msgid "ClusterIntegration|Create on Google Kubernetes Engine"
msgstr ""
msgid "ClusterIntegration|Enter the details for an existing Kubernetes cluster"
msgstr ""
msgid "ClusterIntegration|Enter the details for your Kubernetes cluster" msgid "ClusterIntegration|Enter the details for your Kubernetes cluster"
msgstr "" msgstr ""
...@@ -2150,15 +2144,9 @@ msgstr "" ...@@ -2150,15 +2144,9 @@ msgstr ""
msgid "Error Reporting and Logging" msgid "Error Reporting and Logging"
msgstr "" msgstr ""
msgid "Error committing changes. Please try again."
msgstr ""
msgid "Error fetching contributors data." msgid "Error fetching contributors data."
msgstr "" msgstr ""
msgid "Error fetching job trace"
msgstr ""
msgid "Error fetching labels." msgid "Error fetching labels."
msgstr "" msgstr ""
...@@ -2177,6 +2165,9 @@ msgstr "" ...@@ -2177,6 +2165,9 @@ msgstr ""
msgid "Error loading last commit." msgid "Error loading last commit."
msgstr "" msgstr ""
msgid "Error loading markdown preview"
msgstr ""
msgid "Error loading merge requests." msgid "Error loading merge requests."
msgstr "" msgstr ""
...@@ -2234,6 +2225,9 @@ msgstr "" ...@@ -2234,6 +2225,9 @@ msgstr ""
msgid "Expand sidebar" msgid "Expand sidebar"
msgstr "" msgstr ""
msgid "Explore groups"
msgstr ""
msgid "Explore projects" msgid "Explore projects"
msgstr "" msgstr ""
...@@ -2449,6 +2443,27 @@ msgstr "" ...@@ -2449,6 +2443,27 @@ msgstr ""
msgid "Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}." msgid "Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}."
msgstr "" msgstr ""
msgid "GroupsDropdown|Frequently visited"
msgstr ""
msgid "GroupsDropdown|Groups you visit often will appear here"
msgstr ""
msgid "GroupsDropdown|Loading groups"
msgstr ""
msgid "GroupsDropdown|Search your groups"
msgstr ""
msgid "GroupsDropdown|Something went wrong on our end."
msgstr ""
msgid "GroupsDropdown|Sorry, no groups matched your search"
msgstr ""
msgid "GroupsDropdown|This feature requires browser localStorage support"
msgstr ""
msgid "GroupsEmptyState|A group is a collection of several projects." msgid "GroupsEmptyState|A group is a collection of several projects."
msgstr "" msgstr ""
...@@ -2631,7 +2646,7 @@ msgstr "" ...@@ -2631,7 +2646,7 @@ msgstr ""
msgid "Introducing Cycle Analytics" msgid "Introducing Cycle Analytics"
msgstr "" msgstr ""
msgid "Issue Board" msgid "Issue Boards"
msgstr "" msgstr ""
msgid "Issue events" msgid "Issue events"
...@@ -2825,9 +2840,6 @@ msgstr "" ...@@ -2825,9 +2840,6 @@ msgstr ""
msgid "Locked to current projects" msgid "Locked to current projects"
msgstr "" msgstr ""
msgid "Login"
msgstr ""
msgid "Manage all notifications" msgid "Manage all notifications"
msgstr "" msgstr ""
...@@ -2864,6 +2876,9 @@ msgstr "" ...@@ -2864,6 +2876,9 @@ msgstr ""
msgid "Members" msgid "Members"
msgstr "" msgstr ""
msgid "Merge Request"
msgstr ""
msgid "Merge Request:" msgid "Merge Request:"
msgstr "" msgstr ""
...@@ -2906,12 +2921,42 @@ msgstr "" ...@@ -2906,12 +2921,42 @@ msgstr ""
msgid "Messages" msgid "Messages"
msgstr "" msgstr ""
msgid "Metrics"
msgstr ""
msgid "Metrics - Influx" msgid "Metrics - Influx"
msgstr "" msgstr ""
msgid "Metrics - Prometheus" msgid "Metrics - Prometheus"
msgstr "" msgstr ""
msgid "Metrics|Check out the CI/CD documentation on deploying to an environment"
msgstr ""
msgid "Metrics|Environment"
msgstr ""
msgid "Metrics|Learn about environments"
msgstr ""
msgid "Metrics|No deployed environments"
msgstr ""
msgid "Metrics|There was an error fetching the environments data, please try again"
msgstr ""
msgid "Metrics|There was an error getting deployment information."
msgstr ""
msgid "Metrics|There was an error getting environments information."
msgstr ""
msgid "Metrics|Unexpected deployment data response from prometheus endpoint"
msgstr ""
msgid "Metrics|Unexpected metrics data response from prometheus endpoint"
msgstr ""
msgid "Milestone" msgid "Milestone"
msgstr "" msgstr ""
...@@ -2995,12 +3040,6 @@ msgid_plural "New Issues" ...@@ -2995,12 +3040,6 @@ msgid_plural "New Issues"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "New Kubernetes Cluster"
msgstr ""
msgid "New Kubernetes cluster"
msgstr ""
msgid "New Label" msgid "New Label"
msgstr "" msgstr ""
...@@ -3217,6 +3256,9 @@ msgstr "" ...@@ -3217,6 +3256,9 @@ msgstr ""
msgid "Only project members can comment." msgid "Only project members can comment."
msgstr "" msgstr ""
msgid "Oops, are you sure?"
msgstr ""
msgid "Open in Xcode" msgid "Open in Xcode"
msgstr "" msgstr ""
...@@ -3505,6 +3547,9 @@ msgstr "" ...@@ -3505,6 +3547,9 @@ msgstr ""
msgid "Profiles|Account scheduled for removal." msgid "Profiles|Account scheduled for removal."
msgstr "" msgstr ""
msgid "Profiles|Add key"
msgstr ""
msgid "Profiles|Change username" msgid "Profiles|Change username"
msgstr "" msgstr ""
...@@ -3532,9 +3577,15 @@ msgstr "" ...@@ -3532,9 +3577,15 @@ msgstr ""
msgid "Profiles|Path" msgid "Profiles|Path"
msgstr "" msgstr ""
msgid "Profiles|This doesn't look like a public SSH key, are you sure you want to add it?"
msgstr ""
msgid "Profiles|Type your %{confirmationValue} to confirm:" msgid "Profiles|Type your %{confirmationValue} to confirm:"
msgstr "" msgstr ""
msgid "Profiles|Typically starts with \"ssh-rsa …\""
msgstr ""
msgid "Profiles|Update username" msgid "Profiles|Update username"
msgstr "" msgstr ""
...@@ -3553,6 +3604,9 @@ msgstr "" ...@@ -3553,6 +3604,9 @@ msgstr ""
msgid "Profiles|Your account is currently an owner in these groups:" msgid "Profiles|Your account is currently an owner in these groups:"
msgstr "" msgstr ""
msgid "Profiles|e.g. My MacBook key"
msgstr ""
msgid "Profiles|your account" msgid "Profiles|your account"
msgstr "" msgstr ""
...@@ -3640,9 +3694,6 @@ msgstr "" ...@@ -3640,9 +3694,6 @@ msgstr ""
msgid "ProjectsDropdown|Sorry, no projects matched your search" msgid "ProjectsDropdown|Sorry, no projects matched your search"
msgstr "" msgstr ""
msgid "ProjectsDropdown|This feature requires browser localStorage support"
msgstr ""
msgid "PrometheusDashboard|Time" msgid "PrometheusDashboard|Time"
msgstr "" msgstr ""
...@@ -4528,12 +4579,6 @@ msgstr "" ...@@ -4528,12 +4579,6 @@ msgstr ""
msgid "There are problems accessing Git storage: " msgid "There are problems accessing Git storage: "
msgstr "" msgstr ""
msgid "There was an error loading jobs"
msgstr ""
msgid "There was an error loading latest pipeline"
msgstr ""
msgid "There was an error loading users activity calendar." msgid "There was an error loading users activity calendar."
msgstr "" msgstr ""
...@@ -4814,6 +4859,9 @@ msgstr "" ...@@ -4814,6 +4859,9 @@ msgstr ""
msgid "Tip:" msgid "Tip:"
msgstr "" msgstr ""
msgid "Title"
msgstr ""
msgid "To GitLab" msgid "To GitLab"
msgstr "" msgstr ""
...@@ -5182,6 +5230,9 @@ msgstr "" ...@@ -5182,6 +5230,9 @@ msgstr ""
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
msgid "Yes, add it"
msgstr ""
msgid "You are going to remove %{group_name}. Removed groups CANNOT be restored! Are you ABSOLUTELY sure?" msgid "You are going to remove %{group_name}. Removed groups CANNOT be restored! Are you ABSOLUTELY sure?"
msgstr "" msgstr ""
...@@ -5441,6 +5492,9 @@ msgstr "" ...@@ -5441,6 +5492,9 @@ msgstr ""
msgid "mrWidget|Merged by" msgid "mrWidget|Merged by"
msgstr "" msgstr ""
msgid "mrWidget|Open in Web IDE"
msgstr ""
msgid "mrWidget|Plain diff" msgid "mrWidget|Plain diff"
msgstr "" msgstr ""
...@@ -5510,9 +5564,6 @@ msgstr "" ...@@ -5510,9 +5564,6 @@ msgstr ""
msgid "mrWidget|This project is archived, write access has been disabled" msgid "mrWidget|This project is archived, write access has been disabled"
msgstr "" msgstr ""
msgid "mrWidget|Web IDE"
msgstr ""
msgid "mrWidget|You can merge this merge request manually using the" msgid "mrWidget|You can merge this merge request manually using the"
msgstr "" msgstr ""
......
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