diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-09 10:41:38 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-09 10:41:38 +0000 |
commit | d5b69f2589b73c90fb68e109f557bd7d6719c387 (patch) | |
tree | 4e8a7f5161e14d126b3e58529f019c2b26d243b3 | |
parent | 35b4ca37d6660f3ce6f2e8d1af77fcf271995bd1 (diff) | |
parent | 8d364ac991126bd266670cb6ab3af9d8f286219f (diff) | |
download | gitlab-ce-d5b69f2589b73c90fb68e109f557bd7d6719c387.tar.gz |
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
-rw-r--r-- | doc/development/i18n/externalization.md | 12 | ||||
-rw-r--r-- | lib/tasks/gettext.rake | 30 | ||||
-rw-r--r-- | locale/gitlab.pot | 147 |
3 files changed, 123 insertions, 66 deletions
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md index f7d703b8f0b..6323275426f 100644 --- a/doc/development/i18n/externalization.md +++ b/doc/development/i18n/externalization.md @@ -281,7 +281,7 @@ Now that the new content is marked for translation, we need to update the PO files with the following command: ```sh -bin/rake gettext:find +bin/rake gettext:regenerate ``` 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 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. -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 To make sure we keep our translation files up to date, there's a linter that is diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake index 21998dd2f5b..6df7fe81437 100644 --- a/lib/tasks/gettext.rake +++ b/lib/tasks/gettext.rake @@ -19,6 +19,23 @@ namespace :gettext do Rake::Task['gettext:po_to_json'].invoke 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/' task lint: :environment do require 'simple_po_parser' @@ -50,13 +67,12 @@ namespace :gettext do end task :updated_check do + pot_file = 'locale/gitlab.pot' # Removing all pre-translated files speeds up `gettext:find` as the # files don't need to be merged. # Having `LC_MESSAGES/gitlab.mo files present also confuses the output. FileUtils.rm Dir['locale/**/gitlab.*'] - - # Make sure we start out with a clean pot.file - `git checkout -- locale/gitlab.pot` + FileUtils.rm_f pot_file # `gettext:find` writes touches to temp files to `stderr` which would cause # `static-analysis` to report failures. We can ignore these. @@ -64,18 +80,18 @@ namespace :gettext do Rake::Task['gettext:find'].invoke 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 `git checkout -- locale` if pot_diff.present? 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: diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0385761de45..ca488053a1f 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-01 21:24+1000\n" -"PO-Revision-Date: 2018-07-01 21:24+1000\n" +"POT-Creation-Date: 2018-07-09 08:28+0200\n" +"PO-Revision-Date: 2018-07-09 08:28+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" @@ -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." msgstr "" +msgid "An error accured whilst committing your changes." +msgstr "" + msgid "An error occured creating the new branch." 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." msgstr "" @@ -390,6 +399,9 @@ msgstr "" msgid "An error occured whilst loading the merge request." msgstr "" +msgid "An error occured whilst loading the pipelines jobs." +msgstr "" + msgid "An error occurred previewing the blob" msgstr "" @@ -1085,9 +1097,6 @@ msgstr "" msgid "ClusterIntegration|Add Kubernetes cluster" msgstr "" -msgid "ClusterIntegration|Add an existing Kubernetes cluster" -msgstr "" - msgid "ClusterIntegration|Advanced options on this Kubernetes cluster's integration" msgstr "" @@ -1109,9 +1118,6 @@ msgstr "" msgid "ClusterIntegration|Certificate Authority bundle (PEM format)" 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." msgstr "" @@ -1139,18 +1145,6 @@ msgstr "" msgid "ClusterIntegration|Create Kubernetes cluster" 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" msgstr "" @@ -2150,15 +2144,9 @@ msgstr "" msgid "Error Reporting and Logging" msgstr "" -msgid "Error committing changes. Please try again." -msgstr "" - msgid "Error fetching contributors data." msgstr "" -msgid "Error fetching job trace" -msgstr "" - msgid "Error fetching labels." msgstr "" @@ -2177,6 +2165,9 @@ msgstr "" msgid "Error loading last commit." msgstr "" +msgid "Error loading markdown preview" +msgstr "" + msgid "Error loading merge requests." msgstr "" @@ -2234,6 +2225,9 @@ msgstr "" msgid "Expand sidebar" msgstr "" +msgid "Explore groups" +msgstr "" + msgid "Explore projects" msgstr "" @@ -2449,6 +2443,27 @@ msgstr "" msgid "Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}." 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." msgstr "" @@ -2631,7 +2646,7 @@ msgstr "" msgid "Introducing Cycle Analytics" msgstr "" -msgid "Issue Board" +msgid "Issue Boards" msgstr "" msgid "Issue events" @@ -2825,9 +2840,6 @@ msgstr "" msgid "Locked to current projects" msgstr "" -msgid "Login" -msgstr "" - msgid "Manage all notifications" msgstr "" @@ -2864,6 +2876,9 @@ msgstr "" msgid "Members" msgstr "" +msgid "Merge Request" +msgstr "" + msgid "Merge Request:" msgstr "" @@ -2906,12 +2921,42 @@ msgstr "" msgid "Messages" msgstr "" +msgid "Metrics" +msgstr "" + msgid "Metrics - Influx" msgstr "" msgid "Metrics - Prometheus" 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" msgstr "" @@ -2995,12 +3040,6 @@ msgid_plural "New Issues" msgstr[0] "" msgstr[1] "" -msgid "New Kubernetes Cluster" -msgstr "" - -msgid "New Kubernetes cluster" -msgstr "" - msgid "New Label" msgstr "" @@ -3217,6 +3256,9 @@ msgstr "" msgid "Only project members can comment." msgstr "" +msgid "Oops, are you sure?" +msgstr "" + msgid "Open in Xcode" msgstr "" @@ -3505,6 +3547,9 @@ msgstr "" msgid "Profiles|Account scheduled for removal." msgstr "" +msgid "Profiles|Add key" +msgstr "" + msgid "Profiles|Change username" msgstr "" @@ -3532,9 +3577,15 @@ msgstr "" msgid "Profiles|Path" 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:" msgstr "" +msgid "Profiles|Typically starts with \"ssh-rsa …\"" +msgstr "" + msgid "Profiles|Update username" msgstr "" @@ -3553,6 +3604,9 @@ msgstr "" msgid "Profiles|Your account is currently an owner in these groups:" msgstr "" +msgid "Profiles|e.g. My MacBook key" +msgstr "" + msgid "Profiles|your account" msgstr "" @@ -3640,9 +3694,6 @@ msgstr "" msgid "ProjectsDropdown|Sorry, no projects matched your search" msgstr "" -msgid "ProjectsDropdown|This feature requires browser localStorage support" -msgstr "" - msgid "PrometheusDashboard|Time" msgstr "" @@ -4528,12 +4579,6 @@ msgstr "" msgid "There are problems accessing Git storage: " 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." msgstr "" @@ -4814,6 +4859,9 @@ msgstr "" msgid "Tip:" msgstr "" +msgid "Title" +msgstr "" + msgid "To GitLab" msgstr "" @@ -5182,6 +5230,9 @@ msgstr "" msgid "Yes" msgstr "" +msgid "Yes, add it" +msgstr "" + msgid "You are going to remove %{group_name}. Removed groups CANNOT be restored! Are you ABSOLUTELY sure?" msgstr "" @@ -5441,6 +5492,9 @@ msgstr "" msgid "mrWidget|Merged by" msgstr "" +msgid "mrWidget|Open in Web IDE" +msgstr "" + msgid "mrWidget|Plain diff" msgstr "" @@ -5510,9 +5564,6 @@ msgstr "" msgid "mrWidget|This project is archived, write access has been disabled" msgstr "" -msgid "mrWidget|Web IDE" -msgstr "" - msgid "mrWidget|You can merge this merge request manually using the" msgstr "" |