From 1ebcc96e3a14c5bee675df918cdecbe1a7d04b63 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 12 Apr 2017 22:41:46 -0500
Subject: [PATCH 01/42] Setup gettext libraries

---
 Gemfile                        |  4 ++++
 Gemfile.lock                   | 12 +++++++++++-
 locale/de/gitlab.edit.po       | 19 +++++++++++++++++++
 locale/de/gitlab.po            | 18 ++++++++++++++++++
 locale/de/gitlab.po.time_stamp |  0
 locale/en/gitlab.edit.po       | 19 +++++++++++++++++++
 locale/en/gitlab.po            | 18 ++++++++++++++++++
 locale/en/gitlab.po.time_stamp |  0
 locale/es/gitlab.edit.po       | 19 +++++++++++++++++++
 locale/es/gitlab.po            | 18 ++++++++++++++++++
 locale/es/gitlab.po.time_stamp |  0
 locale/gitlab.pot              | 19 +++++++++++++++++++
 12 files changed, 145 insertions(+), 1 deletion(-)
 create mode 100644 locale/de/gitlab.edit.po
 create mode 100644 locale/de/gitlab.po
 create mode 100644 locale/de/gitlab.po.time_stamp
 create mode 100644 locale/en/gitlab.edit.po
 create mode 100644 locale/en/gitlab.po
 create mode 100644 locale/en/gitlab.po.time_stamp
 create mode 100644 locale/es/gitlab.edit.po
 create mode 100644 locale/es/gitlab.po
 create mode 100644 locale/es/gitlab.po.time_stamp
 create mode 100644 locale/gitlab.pot

diff --git a/Gemfile b/Gemfile
index d4b2ade4243..e98c127d2f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -251,6 +251,10 @@ gem 'sentry-raven', '~> 2.4.0'
 
 gem 'premailer-rails', '~> 1.9.0'
 
+# I18n
+gem 'gettext_i18n_rails', '~> 1.8.0'
+gem 'gettext', '~> 3.2.2', require: false, group: :development
+
 # Metrics
 group :metrics do
   gem 'allocations', '~> 1.0', require: false, platform: :mri
diff --git a/Gemfile.lock b/Gemfile.lock
index 965c888ca79..eeec4b67764 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -200,6 +200,7 @@ GEM
     faraday_middleware-multi_json (0.0.6)
       faraday_middleware
       multi_json
+    fast_gettext (1.4.0)
     ffaker (2.4.0)
     ffi (1.9.10)
     flay (2.8.1)
@@ -253,6 +254,11 @@ GEM
     gemojione (3.0.1)
       json
     get_process_mem (0.2.0)
+    gettext (3.2.2)
+      locale (>= 2.0.5)
+      text (>= 1.3.0)
+    gettext_i18n_rails (1.8.0)
+      fast_gettext (>= 0.9.0)
     gherkin-ruby (0.3.2)
     gitaly (0.5.0)
       google-protobuf (~> 3.1)
@@ -422,6 +428,7 @@ GEM
     licensee (8.7.0)
       rugged (~> 0.24)
     little-plugger (1.1.4)
+    locale (2.1.2)
     logging (2.1.0)
       little-plugger (~> 1.1)
       multi_json (~> 1.10)
@@ -776,6 +783,7 @@ GEM
     temple (0.7.7)
     test_after_commit (1.1.0)
       activerecord (>= 3.2)
+    text (1.3.1)
     thin (1.7.0)
       daemons (~> 1.0, >= 1.0.9)
       eventmachine (~> 1.0, >= 1.0.4)
@@ -902,6 +910,8 @@ DEPENDENCIES
   fuubar (~> 2.0.0)
   gemnasium-gitlab-service (~> 0.2)
   gemojione (~> 3.0)
+  gettext (~> 3.2.2)
+  gettext_i18n_rails (~> 1.8.0)
   gitaly (~> 0.5.0)
   github-linguist (~> 4.7.0)
   gitlab-flowdock-git-hook (~> 1.0.1)
@@ -1035,4 +1045,4 @@ DEPENDENCIES
   wikicloth (= 0.8.1)
 
 BUNDLED WITH
-   1.14.5
+   1.14.6
diff --git a/locale/de/gitlab.edit.po b/locale/de/gitlab.edit.po
new file mode 100644
index 00000000000..70ac9a35be7
--- /dev/null
+++ b/locale/de/gitlab.edit.po
@@ -0,0 +1,19 @@
+# German translations for gitlab package.
+# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-12 22:36-0500\n"
+"PO-Revision-Date: 2017-04-12 22:37-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: German\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"\n"
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
new file mode 100644
index 00000000000..5eb4a86d528
--- /dev/null
+++ b/locale/de/gitlab.po
@@ -0,0 +1,18 @@
+# German translations for gitlab package.
+# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2017-04-12 22:37-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: German\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"\n"
diff --git a/locale/de/gitlab.po.time_stamp b/locale/de/gitlab.po.time_stamp
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/locale/en/gitlab.edit.po b/locale/en/gitlab.edit.po
new file mode 100644
index 00000000000..f9e8c3e6709
--- /dev/null
+++ b/locale/en/gitlab.edit.po
@@ -0,0 +1,19 @@
+# English translations for gitlab package.
+# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-12 22:36-0500\n"
+"PO-Revision-Date: 2017-04-12 22:36-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: English\n"
+"Language: en\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"\n"
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
new file mode 100644
index 00000000000..5dcd2983f30
--- /dev/null
+++ b/locale/en/gitlab.po
@@ -0,0 +1,18 @@
+# English translations for gitlab package.
+# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2017-04-12 22:36-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: English\n"
+"Language: en\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"\n"
diff --git a/locale/en/gitlab.po.time_stamp b/locale/en/gitlab.po.time_stamp
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/locale/es/gitlab.edit.po b/locale/es/gitlab.edit.po
new file mode 100644
index 00000000000..38a2d10f6e8
--- /dev/null
+++ b/locale/es/gitlab.edit.po
@@ -0,0 +1,19 @@
+# Spanish translations for gitlab package.
+# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-12 22:36-0500\n"
+"PO-Revision-Date: 2017-04-12 22:37-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Spanish\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"\n"
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
new file mode 100644
index 00000000000..893eb7e15a3
--- /dev/null
+++ b/locale/es/gitlab.po
@@ -0,0 +1,18 @@
+# Spanish translations for gitlab package.
+# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2017-04-12 22:37-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Spanish\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"\n"
diff --git a/locale/es/gitlab.po.time_stamp b/locale/es/gitlab.po.time_stamp
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
new file mode 100644
index 00000000000..7c4f303a5d0
--- /dev/null
+++ b/locale/gitlab.pot
@@ -0,0 +1,19 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gitlab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: gitlab 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-12 22:36-0500\n"
+"PO-Revision-Date: 2017-04-12 22:36-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-- 
GitLab


From acc807cd30a4b0005b552d67583b20538474a1f2 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 12 Apr 2017 23:04:26 -0500
Subject: [PATCH 02/42] Add preferred_language column to users

---
 ...170413035209_add_preferred_language_to_users.rb | 14 ++++++++++++++
 db/schema.rb                                       |  3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 db/migrate/20170413035209_add_preferred_language_to_users.rb

diff --git a/db/migrate/20170413035209_add_preferred_language_to_users.rb b/db/migrate/20170413035209_add_preferred_language_to_users.rb
new file mode 100644
index 00000000000..5dc128dbaea
--- /dev/null
+++ b/db/migrate/20170413035209_add_preferred_language_to_users.rb
@@ -0,0 +1,14 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddPreferredLanguageToUsers < ActiveRecord::Migration
+  include Gitlab::Database::MigrationHelpers
+
+  DOWNTIME = false
+
+  disable_ddl_transaction!
+
+  def change
+    add_column_with_default :users, :preferred_language, :string, default: 'en'
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 5689f7331dc..03ce1257088 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20170408033905) do
+ActiveRecord::Schema.define(version: 20170413035209) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -1304,6 +1304,7 @@ ActiveRecord::Schema.define(version: 20170408033905) do
     t.boolean "notified_of_own_activity"
     t.boolean "require_two_factor_authentication_from_group", default: false, null: false
     t.integer "two_factor_grace_period", default: 48, null: false
+    t.string "preferred_language"
   end
 
   add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
-- 
GitLab


From bd86796dd0edae7e5db2bfbb887d3196498ebd49 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 12 Apr 2017 23:23:02 -0500
Subject: [PATCH 03/42] Add support to change language in profile form

---
 app/controllers/profiles_controller.rb | 3 ++-
 app/views/profiles/show.html.haml      | 3 +++
 lib/gitlab/i18n.rb                     | 9 +++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 lib/gitlab/i18n.rb

diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 987b95e89b9..57e23cea00e 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -85,7 +85,8 @@ class ProfilesController < Profiles::ApplicationController
       :twitter,
       :username,
       :website_url,
-      :organization
+      :organization,
+      :preferred_language
     )
   end
 end
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index c74b3249a13..dc71a04cbf0 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -72,6 +72,9 @@
         = f.label :public_email, class: "label-light"
         = f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), { include_blank: 'Do not show on profile' }, class: "select2"
         %span.help-block This email will be displayed on your public profile.
+      .form-group
+        = f.label :preferred_language, class: "label-light"
+        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES, {}, class: "select2"
       .form-group
         = f.label :skype, class: "label-light"
         = f.text_field :skype, class: "form-control"
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
new file mode 100644
index 00000000000..8c578aa0b46
--- /dev/null
+++ b/lib/gitlab/i18n.rb
@@ -0,0 +1,9 @@
+module Gitlab
+  module I18n
+    AVAILABLE_LANGUAGES = [
+      [_('English'), 'en'],
+      [_('Spanish'), 'es'],
+      [_('Deutsch'), 'de']
+    ]
+  end
+end
-- 
GitLab


From 020e12a6ae99e9b9dfaa3cfbd640ecdf31d7424d Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 12 Apr 2017 23:24:29 -0500
Subject: [PATCH 04/42] Add missing initializer for FastGettext

---
 config/initializers/fast_gettext.rb | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 config/initializers/fast_gettext.rb

diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
new file mode 100644
index 00000000000..cfc3427b5ae
--- /dev/null
+++ b/config/initializers/fast_gettext.rb
@@ -0,0 +1,3 @@
+FastGettext.add_text_domain 'gitlab', path: 'locale', type: :po
+FastGettext.default_available_locales = ['en', 'es','de']
+FastGettext.default_text_domain = 'gitlab'
-- 
GitLab


From 73d0730d09b5f9a9b68f158cc72ad30c7a2b35d0 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 13 Apr 2017 01:03:47 -0500
Subject: [PATCH 05/42] Set locale through controller filter

---
 app/controllers/application_controller.rb |  6 ++++++
 app/controllers/profiles_controller.rb    |  1 +
 app/views/profiles/show.html.haml         |  3 ++-
 lib/gitlab/i18n.rb                        |  6 +++---
 locale/de/gitlab.edit.po                  | 11 ++++++++++-
 locale/de/gitlab.po                       |  9 +++++++++
 locale/en/gitlab.edit.po                  | 11 ++++++++++-
 locale/en/gitlab.po                       |  9 +++++++++
 locale/es/gitlab.edit.po                  | 17 +++++++++++++----
 locale/es/gitlab.po                       | 15 ++++++++++++---
 locale/gitlab.pot                         | 13 +++++++++++--
 11 files changed, 86 insertions(+), 15 deletions(-)

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e77094fe2a8..5a3bd4040cc 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -265,4 +265,10 @@ class ApplicationController < ActionController::Base
   def u2f_app_id
     request.base_url
   end
+
+  def set_locale
+    requested_locale = current_user&.preferred_language || request.env['HTTP_ACCEPT_LANGUAGE'] || I18n.default_locale
+    locale = FastGettext.set_locale(requested_locale)
+    I18n.locale = locale
+  end
 end
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 57e23cea00e..0f01bf7e706 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -3,6 +3,7 @@ class ProfilesController < Profiles::ApplicationController
 
   before_action :user
   before_action :authorize_change_username!, only: :update_username
+  before_action :set_locale, only: :show
   skip_before_action :require_email, only: [:show, :update]
 
   def show
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index dc71a04cbf0..d8ef64ceb72 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -74,7 +74,8 @@
         %span.help-block This email will be displayed on your public profile.
       .form-group
         = f.label :preferred_language, class: "label-light"
-        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES, {}, class: "select2"
+        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |lang| [_(lang[0]), lang[1]] },
+          {}, class: "select2"
       .form-group
         = f.label :skype, class: "label-light"
         = f.text_field :skype, class: "form-control"
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
index 8c578aa0b46..85e527afd71 100644
--- a/lib/gitlab/i18n.rb
+++ b/lib/gitlab/i18n.rb
@@ -1,9 +1,9 @@
 module Gitlab
   module I18n
     AVAILABLE_LANGUAGES = [
-      [_('English'), 'en'],
-      [_('Spanish'), 'es'],
-      [_('Deutsch'), 'de']
+      ['English', 'en'],
+      ['Spanish', 'es'],
+      ['Deutsch', 'de']
     ]
   end
 end
diff --git a/locale/de/gitlab.edit.po b/locale/de/gitlab.edit.po
index 70ac9a35be7..e4c8caef164 100644
--- a/locale/de/gitlab.edit.po
+++ b/locale/de/gitlab.edit.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-12 22:36-0500\n"
+"POT-Creation-Date: 2017-04-13 00:01-0500\n"
 "PO-Revision-Date: 2017-04-12 22:37-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: German\n"
@@ -17,3 +17,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
+
+msgid "Deutsch"
+msgstr ""
+
+msgid "English"
+msgstr ""
+
+msgid "Spanish"
+msgstr ""
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 5eb4a86d528..7f32771b80f 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -16,3 +16,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
+
+msgid "Deutsch"
+msgstr ""
+
+msgid "English"
+msgstr ""
+
+msgid "Spanish"
+msgstr ""
diff --git a/locale/en/gitlab.edit.po b/locale/en/gitlab.edit.po
index f9e8c3e6709..048f531de4b 100644
--- a/locale/en/gitlab.edit.po
+++ b/locale/en/gitlab.edit.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-12 22:36-0500\n"
+"POT-Creation-Date: 2017-04-13 00:01-0500\n"
 "PO-Revision-Date: 2017-04-12 22:36-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: English\n"
@@ -17,3 +17,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
+
+msgid "Deutsch"
+msgstr ""
+
+msgid "English"
+msgstr ""
+
+msgid "Spanish"
+msgstr ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 5dcd2983f30..f93f438b424 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -16,3 +16,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
+
+msgid "Deutsch"
+msgstr ""
+
+msgid "English"
+msgstr ""
+
+msgid "Spanish"
+msgstr ""
diff --git a/locale/es/gitlab.edit.po b/locale/es/gitlab.edit.po
index 38a2d10f6e8..b5b6c0a671f 100644
--- a/locale/es/gitlab.edit.po
+++ b/locale/es/gitlab.edit.po
@@ -7,13 +7,22 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-12 22:36-0500\n"
-"PO-Revision-Date: 2017-04-12 22:37-0500\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2017-04-13 00:07-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
-"\n"
+"POT-Creation-Date: 2017-04-13 00:01-0500\n"
+"Last-Translator: \n"
+"X-Generator: Poedit 2.0.1\n"
+
+msgid "Deutsch"
+msgstr "Alemán"
+
+msgid "English"
+msgstr "Inglés"
+
+msgid "Spanish"
+msgstr "Español"
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 893eb7e15a3..e2d03d88347 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,12 +7,21 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-12 22:37-0500\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2017-04-13 00:07-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
-"\n"
+"Last-Translator: \n"
+"X-Generator: Poedit 2.0.1\n"
+
+msgid "Deutsch"
+msgstr "Alemán"
+
+msgid "English"
+msgstr "Inglés"
+
+msgid "Spanish"
+msgstr "Español"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 7c4f303a5d0..a90fc69d94b 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: 2017-04-12 22:36-0500\n"
-"PO-Revision-Date: 2017-04-12 22:36-0500\n"
+"POT-Creation-Date: 2017-04-13 00:01-0500\n"
+"PO-Revision-Date: 2017-04-13 00:01-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -17,3 +17,12 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+msgid "Deutsch"
+msgstr ""
+
+msgid "English"
+msgstr ""
+
+msgid "Spanish"
+msgstr ""
-- 
GitLab


From 72fefba4c18e2464725231b3426ec2e3b0eda9c4 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 13 Apr 2017 01:08:44 -0500
Subject: [PATCH 06/42] Ignore some files required to the translation process

---
 .gitignore               |  3 +++
 locale/de/gitlab.edit.po | 28 ----------------------------
 locale/en/gitlab.edit.po | 28 ----------------------------
 locale/es/gitlab.edit.po | 28 ----------------------------
 4 files changed, 3 insertions(+), 84 deletions(-)
 delete mode 100644 locale/de/gitlab.edit.po
 delete mode 100644 locale/en/gitlab.edit.po
 delete mode 100644 locale/es/gitlab.edit.po

diff --git a/.gitignore b/.gitignore
index 51b4d06b01b..40948f2e89c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
 *.log
 *.swp
+*.mo
+*.edit.po
 .DS_Store
 .bundle
 .chef
@@ -53,3 +55,4 @@ eslint-report.html
 /shared/*
 /.gitlab_workhorse_secret
 /webpack-report/
+/locale/**/LC_MESSAGES
diff --git a/locale/de/gitlab.edit.po b/locale/de/gitlab.edit.po
deleted file mode 100644
index e4c8caef164..00000000000
--- a/locale/de/gitlab.edit.po
+++ /dev/null
@@ -1,28 +0,0 @@
-# German translations for gitlab package.
-# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the gitlab package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: gitlab 1.0.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-13 00:01-0500\n"
-"PO-Revision-Date: 2017-04-12 22:37-0500\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: German\n"
-"Language: de\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"\n"
-
-msgid "Deutsch"
-msgstr ""
-
-msgid "English"
-msgstr ""
-
-msgid "Spanish"
-msgstr ""
diff --git a/locale/en/gitlab.edit.po b/locale/en/gitlab.edit.po
deleted file mode 100644
index 048f531de4b..00000000000
--- a/locale/en/gitlab.edit.po
+++ /dev/null
@@ -1,28 +0,0 @@
-# English translations for gitlab package.
-# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the gitlab package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: gitlab 1.0.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-13 00:01-0500\n"
-"PO-Revision-Date: 2017-04-12 22:36-0500\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: English\n"
-"Language: en\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"\n"
-
-msgid "Deutsch"
-msgstr ""
-
-msgid "English"
-msgstr ""
-
-msgid "Spanish"
-msgstr ""
diff --git a/locale/es/gitlab.edit.po b/locale/es/gitlab.edit.po
deleted file mode 100644
index b5b6c0a671f..00000000000
--- a/locale/es/gitlab.edit.po
+++ /dev/null
@@ -1,28 +0,0 @@
-# Spanish translations for gitlab package.
-# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the gitlab package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: gitlab 1.0.0\n"
-"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-13 00:07-0500\n"
-"Language-Team: Spanish\n"
-"Language: es\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"POT-Creation-Date: 2017-04-13 00:01-0500\n"
-"Last-Translator: \n"
-"X-Generator: Poedit 2.0.1\n"
-
-msgid "Deutsch"
-msgstr "Alemán"
-
-msgid "English"
-msgstr "Inglés"
-
-msgid "Spanish"
-msgstr "Español"
-- 
GitLab


From 90ba69d224eb7ef3d91332f1b7944c68ad16affd Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Sat, 15 Apr 2017 16:07:31 +0100
Subject: [PATCH 07/42] Started internationalising cycyle analytics

---
 .eslintignore                           |  1 +
 Gemfile                                 |  1 +
 Gemfile.lock                            |  8 ++++++++
 app/assets/javascripts/locale/de/app.js |  1 +
 app/assets/javascripts/locale/en/app.js |  1 +
 app/assets/javascripts/locale/es/app.js |  1 +
 app/assets/javascripts/locale/index.js  | 15 +++++++++++++++
 app/views/layouts/_head.html.haml       |  1 +
 app/views/layouts/application.html.haml |  2 +-
 config/webpack.config.js                |  5 +++++
 package.json                            |  2 ++
 yarn.lock                               | 19 +++++++++++++++----
 12 files changed, 52 insertions(+), 5 deletions(-)
 create mode 100644 app/assets/javascripts/locale/de/app.js
 create mode 100644 app/assets/javascripts/locale/en/app.js
 create mode 100644 app/assets/javascripts/locale/es/app.js
 create mode 100644 app/assets/javascripts/locale/index.js

diff --git a/.eslintignore b/.eslintignore
index c742b08c005..1605e483e9e 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -7,3 +7,4 @@
 /vendor/
 karma.config.js
 webpack.config.js
+/app/assets/javascripts/locale/**/*.js
diff --git a/Gemfile b/Gemfile
index 6c1f6346071..736e3e3b578 100644
--- a/Gemfile
+++ b/Gemfile
@@ -256,6 +256,7 @@ gem 'premailer-rails', '~> 1.9.0'
 
 # I18n
 gem 'gettext_i18n_rails', '~> 1.8.0'
+gem 'gettext_i18n_rails_js', '~> 1.2.0'
 gem 'gettext', '~> 3.2.2', require: false, group: :development
 
 # Metrics
diff --git a/Gemfile.lock b/Gemfile.lock
index ca4084e18a2..94727810ac9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -259,6 +259,11 @@ GEM
       text (>= 1.3.0)
     gettext_i18n_rails (1.8.0)
       fast_gettext (>= 0.9.0)
+    gettext_i18n_rails_js (1.2.0)
+      gettext (>= 3.0.2)
+      gettext_i18n_rails (>= 0.7.1)
+      po_to_json (>= 1.0.0)
+      rails (>= 3.2.0)
     gherkin-ruby (0.3.2)
     gitaly (0.5.0)
       google-protobuf (~> 3.1)
@@ -534,6 +539,8 @@ GEM
       ast (~> 2.2)
     path_expander (1.0.1)
     pg (0.18.4)
+    po_to_json (1.0.1)
+      json (>= 1.6.0)
     poltergeist (1.9.0)
       capybara (~> 2.1)
       cliver (~> 0.3.1)
@@ -914,6 +921,7 @@ DEPENDENCIES
   gemojione (~> 3.0)
   gettext (~> 3.2.2)
   gettext_i18n_rails (~> 1.8.0)
+  gettext_i18n_rails_js (~> 1.2.0)
   gitaly (~> 0.5.0)
   github-linguist (~> 4.7.0)
   gitlab-flowdock-git-hook (~> 1.0.1)
diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
new file mode 100644
index 00000000000..643e82a90a0
--- /dev/null
+++ b/app/assets/javascripts/locale/de/app.js
@@ -0,0 +1 @@
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Deutsch":[""],"English":[""],"Spanish":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
new file mode 100644
index 00000000000..9070b519ff3
--- /dev/null
+++ b/app/assets/javascripts/locale/en/app.js
@@ -0,0 +1 @@
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Deutsch":[""],"English":[""],"Spanish":[""]}}};
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
new file mode 100644
index 00000000000..41f6ddef5b8
--- /dev/null
+++ b/app/assets/javascripts/locale/es/app.js
@@ -0,0 +1 @@
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-13 00:07-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Deutsch":["Alemán"],"English":["Inglés"],"Spanish":["Español"]}}};
diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
new file mode 100644
index 00000000000..0feb9eb5d43
--- /dev/null
+++ b/app/assets/javascripts/locale/index.js
@@ -0,0 +1,15 @@
+import Jed from 'jed';
+import de from './de/app';
+import es from './es/app';
+import en from './en/app';
+
+const locales = {
+  de,
+  es,
+  en,
+};
+
+const lang = document.querySelector('html').getAttribute('lang');
+
+export { lang };
+export default new Jed(locales[lang]);
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 19473b6ab27..7e198679489 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -31,6 +31,7 @@
   = webpack_bundle_tag "runtime"
   = webpack_bundle_tag "common"
   = webpack_bundle_tag "main"
+  = webpack_bundle_tag "locale"
 
   - if content_for?(:page_specific_javascripts)
     = yield :page_specific_javascripts
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 36543edc040..dc926a615c7 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,5 +1,5 @@
 !!! 5
-%html{ lang: "en", class: "#{page_class}" }
+%html{ lang: I18n.locale, class: "#{page_class}" }
   = render "layouts/head"
   %body{ class: @body_class, data: { page: body_data_page, project: "#{@project.path if @project}", group: "#{@group.path if @group}" } }
     = Gon::Base.render_data
diff --git a/config/webpack.config.js b/config/webpack.config.js
index ffb16190093..df7b43cf053 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -52,6 +52,7 @@ var config = {
     vue_pipelines:        './vue_pipelines_index/index.js',
     issue_show:           './issue_show/index.js',
     group:                './group.js',
+    locale:               './locale/index.js',
   },
 
   output: {
@@ -82,6 +83,10 @@ var config = {
         exclude: /node_modules/,
         loader: 'file-loader',
       },
+      {
+        test: /locale\/[a-z]+\/(.*)\.js$/,
+        loader: 'exports-loader?locales',
+      },
     ]
   },
 
diff --git a/package.json b/package.json
index a17399ddb8f..5cb07ddc3b7 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,9 @@
     "dropzone": "^4.2.0",
     "emoji-unicode-version": "^0.2.1",
     "eslint-plugin-html": "^2.0.1",
+    "exports-loader": "^0.6.4",
     "file-loader": "^0.11.1",
+    "jed": "^1.1.1",
     "jquery": "^2.2.1",
     "jquery-ujs": "^1.2.1",
     "js-cookie": "^2.1.3",
diff --git a/yarn.lock b/yarn.lock
index e16cd9c3673..b95df2d2383 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2143,6 +2143,13 @@ expand-range@^1.8.1:
   dependencies:
     fill-range "^2.1.0"
 
+exports-loader@^0.6.4:
+  version "0.6.4"
+  resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-0.6.4.tgz#d70fc6121975b35fc12830cf52754be2740fc886"
+  dependencies:
+    loader-utils "^1.0.2"
+    source-map "0.5.x"
+
 express@^4.13.3, express@^4.14.1:
   version "4.14.1"
   resolved "https://registry.yarnpkg.com/express/-/express-4.14.1.tgz#646c237f766f148c2120aff073817b9e4d7e0d33"
@@ -3080,6 +3087,10 @@ jasmine-jquery@^2.1.1:
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/jasmine-jquery/-/jasmine-jquery-2.1.1.tgz#d4095e646944a26763235769ab018d9f30f0d47b"
 
+jed@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/jed/-/jed-1.1.1.tgz#7a549bbd9ffe1585b0cd0a191e203055bee574b4"
+
 jodid25519@^1.0.0:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
@@ -5071,6 +5082,10 @@ source-map-support@^0.4.2:
   dependencies:
     source-map "^0.5.3"
 
+source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
+  version "0.5.6"
+  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
+
 source-map@^0.1.41:
   version "0.1.43"
   resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
@@ -5083,10 +5098,6 @@ source-map@^0.4.4:
   dependencies:
     amdefine ">=0.0.4"
 
-source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
-  version "0.5.6"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
-
 source-map@~0.2.0:
   version "0.2.0"
   resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
-- 
GitLab


From 7963c2c25114e871eb42c0859b6d24fc37437a8a Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Tue, 18 Apr 2017 14:55:09 +0100
Subject: [PATCH 08/42] Added Vue filters & directives for translating

---
 .../components/limit_warning_component.js     |  2 +-
 .../components/stage_code_component.js        |  4 ++--
 .../components/stage_issue_component.js       |  4 ++--
 .../components/stage_plan_component.js        |  4 ++--
 .../components/stage_production_component.js  |  4 ++--
 .../components/stage_review_component.js      |  4 ++--
 .../components/stage_staging_component.js     |  2 +-
 .../components/total_time_component.js        |  6 ++---
 .../cycle_analytics/cycle_analytics_bundle.js |  3 +++
 .../cycle_analytics/cycle_analytics_store.js  | 16 ++++++++------
 .../javascripts/vue_shared/translate.js       | 14 ++++++++++++
 .../cycle_analytics/_empty_stage.html.haml    |  2 +-
 .../cycle_analytics/_no_access.html.haml      |  4 ++--
 .../projects/cycle_analytics/show.html.haml   | 22 +++++++++----------
 config/webpack.config.js                      |  8 +++++++
 15 files changed, 63 insertions(+), 36 deletions(-)
 create mode 100644 app/assets/javascripts/vue_shared/translate.js

diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
index abe48572347..a7b187a0a36 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
@@ -11,7 +11,7 @@ export default {
           aria-hidden="true"
           title="Limited to showing 50 events at most"
           data-placement="top"></i>
-      Showing 50 events
+      {{ 'Showing 50 events' | translate }}
     </span>
   `,
 };
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
index 80bd2df6f42..f72882872cd 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageCodeComponent = Vue.extend({
             <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
             &middot;
             <span>
-              Opened
+              {{ 'Opened' | translate }}
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              by
+              {{ 'by' | translate }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
           </div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
index 20a43798fbe..bb265c8316f 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageIssueComponent = Vue.extend({
             <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
             &middot;
             <span>
-              Opened
+              {{ 'Opened' | translate }}
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-              by
+              {{ 'by' | translate }}
               <a :href="issue.author.webUrl" class="issue-author-link">
                 {{ issue.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
index f33cac3da82..32b685faece 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
@@ -31,10 +31,10 @@ global.cycleAnalytics.StagePlanComponent = Vue.extend({
               </a>
             </h5>
             <span>
-              First
+              {{ 'First' | translate }}
               <span class="commit-icon">${iconCommit}</span>
               <a :href="commit.commitUrl" class="commit-hash-link monospace">{{ commit.shortSha }}</a>
-              pushed by
+              {{ 'pushed by' | translate }}
               <a :href="commit.author.webUrl" class="commit-author-link">
                 {{ commit.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
index 657f5385374..5c9186a2e49 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageProductionComponent = Vue.extend({
             <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
             &middot;
             <span>
-              Opened
+              {{ 'Opened' | translate }}
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-            by
+            {{ 'by' | translate }}
             <a :href="issue.author.webUrl" class="issue-author-link">
               {{ issue.author.name }}
             </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
index 8a801300647..a047573548d 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageReviewComponent = Vue.extend({
             <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
             &middot;
             <span>
-              Opened
+              {{ 'Opened' | translate }}
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              by
+              {{ 'by' | translate }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
             <template v-if="mergeRequest.state === 'closed'">
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
index 4a286379588..e8dfaf4294e 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageStagingComponent = Vue.extend({
             </h5>
             <span>
               <a :href="build.url" class="build-date">{{ build.date }}</a>
-              by
+              {{ 'by' | translate }}
               <a :href="build.author.webUrl" class="issue-author-link">
                 {{ build.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
index 77edcb76273..e07963b1b45 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -12,9 +12,9 @@ global.cycleAnalytics.TotalTimeComponent = Vue.extend({
   template: `
     <span class="total-time">
       <template v-if="Object.keys(time).length">
-        <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template>
-        <template v-if="time.hours">{{ time.hours }} <span>hr</span></template>
-        <template v-if="time.mins && !time.days">{{ time.mins }} <span>mins</span></template>
+        <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' | translate }}</span></template>
+        <template v-if="time.hours">{{ time.hours }} <span v-translate>hr</span></template>
+        <template v-if="time.mins && !time.days">{{ time.mins }} <span v-translate>mins</span></template>
         <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template>
       </template>
       <template v-else>
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
index b099b39e58f..95257e58e6b 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
@@ -2,6 +2,7 @@
 
 import Vue from 'vue';
 import Cookies from 'js-cookie';
+import Translate from '../vue_shared/translate';
 import LimitWarningComponent from './components/limit_warning_component';
 
 require('./components/stage_code_component');
@@ -16,6 +17,8 @@ require('./cycle_analytics_service');
 require('./cycle_analytics_store');
 require('./default_event_objects');
 
+Vue.use(Translate);
+
 $(() => {
   const OVERVIEW_DIALOG_COOKIE = 'cycle_analytics_help_dismissed';
   const cycleAnalyticsEl = document.querySelector('#cycle-analytics');
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
index 6536a8fd7fa..25d5092a1fd 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
@@ -1,5 +1,7 @@
 /* eslint-disable no-param-reassign */
 
+import locale from '~/locale';
+
 require('../lib/utils/text_utility');
 const DEFAULT_EVENT_OBJECTS = require('./default_event_objects');
 
@@ -7,13 +9,13 @@ const global = window.gl || (window.gl = {});
 global.cycleAnalytics = global.cycleAnalytics || {};
 
 const EMPTY_STAGE_TEXTS = {
-  issue: 'The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.',
-  plan: 'The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.',
-  code: 'The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.',
-  test: 'The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.',
-  review: 'The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.',
-  staging: 'The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.',
-  production: 'The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.',
+  issue: locale.gettext('The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.'),
+  plan: locale.gettext('The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.'),
+  code: locale.gettext('The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.'),
+  test: locale.gettext('The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.'),
+  review: locale.gettext('The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.'),
+  staging: locale.gettext('The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.'),
+  production: locale.gettext('The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.'),
 };
 
 global.cycleAnalytics.CycleAnalyticsStore = {
diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js
new file mode 100644
index 00000000000..88b7c0bb954
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/translate.js
@@ -0,0 +1,14 @@
+import locale from '../locale';
+
+export default (Vue) => {
+  Vue.filter('translate', text => locale.gettext(text));
+
+  Vue.directive('translate', {
+    bind(el) {
+      const $el = el;
+      const text = $el.textContent.trim();
+
+      $el.textContent = locale.gettext(text);
+    },
+  });
+};
diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml
index c3f95860e92..27190785fff 100644
--- a/app/views/projects/cycle_analytics/_empty_stage.html.haml
+++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml
@@ -2,6 +2,6 @@
   .empty-stage
     .icon-no-data
       = custom_icon ('icon_no_data')
-    %h4 We don't have enough data to show this stage.
+    %h4 {{ 'We don\'t have enough data to show this stage.' | translate }}
     %p
       {{currentStage.emptyStageText}}
diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml
index 0ffc79b3181..474d0f410a7 100644
--- a/app/views/projects/cycle_analytics/_no_access.html.haml
+++ b/app/views/projects/cycle_analytics/_no_access.html.haml
@@ -2,6 +2,6 @@
   .no-access-stage
     .icon-lock
       = custom_icon ('icon_lock')
-    %h4 You need permission.
+    %h4 {{ 'You need permission.' | translate }}
     %p
-      Want to see the data? Please ask administrator for access.
+      {{ 'Want to see the data? Please ask administrator for access.' | translate }}
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index dd3fa814716..47fde758ffc 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -15,9 +15,9 @@
           = custom_icon('icon_cycle_analytics_splash')
         .col-sm-8.col-xs-12.inner-content
           %h4
-            Introducing Cycle Analytics
+            {{ 'Introducing Cycle Analytics' | translate }}
           %p
-            Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.
+            {{ 'Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.' | translate }}
 
           = link_to "Read more",  help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn'
   = icon("spinner spin", "v-show" => "isLoading")
@@ -34,15 +34,15 @@
             .col-sm-3.col-xs-12.column
               .dropdown.inline.js-ca-dropdown
                 %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
-                  %span.dropdown-label Last 30 days
+                  %span.dropdown-label {{ 'Last 30 days' | translate }}
                   %i.fa.fa-chevron-down
                 %ul.dropdown-menu.dropdown-menu-align-right
                   %li
                     %a{ "href" => "#", "data-value" => "30" }
-                      Last 30 days
+                      {{ 'Last 30 days' | translate }}
                   %li
                     %a{ "href" => "#", "data-value" => "90" }
-                      Last 90 days
+                      {{ 'Last 30 days' | translate }}
     .stage-panel-container
       .panel.panel-default.stage-panel
         .panel-heading
@@ -50,19 +50,19 @@
             %ul
               %li.stage-header
                 %span.stage-name
-                  Stage
+                  {{ 'Stage' | translate }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" }
               %li.median-header
                 %span.stage-name
-                  Median
+                  {{ 'Median' | translate }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" }
               %li.event-header
                 %span.stage-name
-                  {{ currentStage ? currentStage.legend : 'Related Issues' }}
+                  {{ currentStage ? currentStage.legend : 'Related Issues' | translate }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" }
               %li.total-time-header
                 %span.stage-name
-                  Total Time
+                  {{ 'Total Time' | translate }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" }
         .stage-panel-body
           %nav.stage-nav
@@ -75,10 +75,10 @@
                     %span{ "v-if" => "stage.value" }
                       {{ stage.value }}
                     %span.stage-empty{ "v-else" => true }
-                      Not enough data
+                      {{ 'Not enough data' | translate }}
                   %template{ "v-else" => true }
                     %span.not-available
-                      Not available
+                      {{ 'Not available' | translate }}
           .section.stage-events
             %template{ "v-if" => "isLoadingStage" }
               = icon("spinner spin")
diff --git a/config/webpack.config.js b/config/webpack.config.js
index df7b43cf053..92ecba45d6e 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -150,6 +150,14 @@ var config = {
     new webpack.optimize.CommonsChunkPlugin({
       names: ['main', 'common', 'runtime'],
     }),
+
+    // locale common library
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'locale',
+      chunks: [
+        'cycle_analytics',
+      ],
+    }),
   ],
 
   resolve: {
-- 
GitLab


From b0df1ed4884a16c5c45800031667e0dd3251c978 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Tue, 18 Apr 2017 15:11:32 +0100
Subject: [PATCH 09/42] Make the locale file page specific

---
 app/views/layouts/_head.html.haml                 | 1 -
 app/views/projects/cycle_analytics/show.html.haml | 4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 7e198679489..19473b6ab27 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -31,7 +31,6 @@
   = webpack_bundle_tag "runtime"
   = webpack_bundle_tag "common"
   = webpack_bundle_tag "main"
-  = webpack_bundle_tag "locale"
 
   - if content_for?(:page_specific_javascripts)
     = yield :page_specific_javascripts
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 47fde758ffc..a0a629eaa41 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -2,6 +2,7 @@
 - page_title "Cycle Analytics"
 - content_for :page_specific_javascripts do
   = page_specific_javascript_bundle_tag('common_vue')
+  = page_specific_javascript_bundle_tag('locale')
   = page_specific_javascript_bundle_tag('cycle_analytics')
 
 = render "projects/head"
@@ -19,7 +20,8 @@
           %p
             {{ 'Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.' | translate }}
 
-          = link_to "Read more",  help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn'
+          = link_to help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' do
+            {{ 'Read more' | translate }}
   = icon("spinner spin", "v-show" => "isLoading")
   .wrapper{ "v-show" => "!isLoading && !hasError" }
     .panel.panel-default
-- 
GitLab


From 372841975feace348ffdcc14819b9c9a9da8b181 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Tue, 18 Apr 2017 16:29:22 +0100
Subject: [PATCH 10/42] Default the language to en - more useful for specs

---
 app/assets/javascripts/locale/index.js                         | 2 +-
 .../cycle_analytics/limit_warning_component_spec.js            | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index 0feb9eb5d43..56791968e53 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -9,7 +9,7 @@ const locales = {
   en,
 };
 
-const lang = document.querySelector('html').getAttribute('lang');
+const lang = document.querySelector('html').getAttribute('lang') || 'en';
 
 export { lang };
 export default new Jed(locales[lang]);
diff --git a/spec/javascripts/cycle_analytics/limit_warning_component_spec.js b/spec/javascripts/cycle_analytics/limit_warning_component_spec.js
index 50000c5a5f5..2fb9eb0ca85 100644
--- a/spec/javascripts/cycle_analytics/limit_warning_component_spec.js
+++ b/spec/javascripts/cycle_analytics/limit_warning_component_spec.js
@@ -1,6 +1,9 @@
 import Vue from 'vue';
+import Translate from '~/vue_shared/translate';
 import limitWarningComp from '~/cycle_analytics/components/limit_warning_component';
 
+Vue.use(Translate);
+
 describe('Limit warning component', () => {
   let component;
   let LimitWarningComponent;
-- 
GitLab


From a3506a228723d7e31fb37580dcd3b30245436f22 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Tue, 18 Apr 2017 17:00:44 +0100
Subject: [PATCH 11/42] Fixed missing text Fixed duplicated time in dropdown

---
 app/views/projects/cycle_analytics/show.html.haml | 4 ++--
 config/webpack.config.js                          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index a0a629eaa41..a7783b69588 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -26,7 +26,7 @@
   .wrapper{ "v-show" => "!isLoading && !hasError" }
     .panel.panel-default
       .panel-heading
-        Pipeline Health
+        {{ 'Pipeline Health' | translate }}
       .content-block
         .container-fluid
           .row
@@ -44,7 +44,7 @@
                       {{ 'Last 30 days' | translate }}
                   %li
                     %a{ "href" => "#", "data-value" => "90" }
-                      {{ 'Last 30 days' | translate }}
+                      {{ 'Last 90 days' | translate }}
     .stage-panel-container
       .panel.panel-default.stage-panel
         .panel-heading
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 92ecba45d6e..f93f4d6cd5e 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -34,6 +34,7 @@ var config = {
     graphs:               './graphs/graphs_bundle.js',
     groups_list:          './groups_list.js',
     issuable:             './issuable/issuable_bundle.js',
+    locale:               './locale/index.js',
     merge_conflicts:      './merge_conflicts/merge_conflicts_bundle.js',
     merge_request_widget: './merge_request_widget/ci_bundle.js',
     monitoring:           './monitoring/monitoring_bundle.js',
@@ -52,7 +53,6 @@ var config = {
     vue_pipelines:        './vue_pipelines_index/index.js',
     issue_show:           './issue_show/index.js',
     group:                './group.js',
-    locale:               './locale/index.js',
   },
 
   output: {
-- 
GitLab


From 7d16537cac7eb808d8d18cd0b89475db4e4eeaaa Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 19 Apr 2017 16:53:06 +0100
Subject: [PATCH 12/42] Created a plural filter Added tests for the filter

[ci skip]
---
 .../components/limit_warning_component.js     |  2 +-
 .../components/total_time_component.js        |  4 +-
 .../javascripts/vue_shared/translate.js       |  3 +
 spec/javascripts/vue_shared/translate_spec.js | 90 +++++++++++++++++++
 4 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 spec/javascripts/vue_shared/translate_spec.js

diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
index a7b187a0a36..63e20478e94 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
@@ -11,7 +11,7 @@ export default {
           aria-hidden="true"
           title="Limited to showing 50 events at most"
           data-placement="top"></i>
-      {{ 'Showing 50 events' | translate }}
+      {{ 'Showing %d event' | translate-plural('Showing %d events', 50) }}
     </span>
   `,
 };
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
index e07963b1b45..a0d735f159c 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -12,9 +12,9 @@ global.cycleAnalytics.TotalTimeComponent = Vue.extend({
   template: `
     <span class="total-time">
       <template v-if="Object.keys(time).length">
-        <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' | translate }}</span></template>
+        <template v-if="time.days">{{ time.days }} <span>{{ 'day' | translate-plural('days', time.days) }}</span></template>
         <template v-if="time.hours">{{ time.hours }} <span v-translate>hr</span></template>
-        <template v-if="time.mins && !time.days">{{ time.mins }} <span v-translate>mins</span></template>
+        <template v-if="time.mins && !time.days">{{ time.mins }} <span>{{ 'min' | translate-plural('mins', time.mins) }}</span></template>
         <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template>
       </template>
       <template v-else>
diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js
index 88b7c0bb954..072828b310e 100644
--- a/app/assets/javascripts/vue_shared/translate.js
+++ b/app/assets/javascripts/vue_shared/translate.js
@@ -3,6 +3,9 @@ import locale from '../locale';
 export default (Vue) => {
   Vue.filter('translate', text => locale.gettext(text));
 
+  Vue.filter('translate-plural', (text, pluralText, count) =>
+    locale.ngettext(text, pluralText, count).replace(/%d/g, count));
+
   Vue.directive('translate', {
     bind(el) {
       const $el = el;
diff --git a/spec/javascripts/vue_shared/translate_spec.js b/spec/javascripts/vue_shared/translate_spec.js
new file mode 100644
index 00000000000..74bd4ff86b1
--- /dev/null
+++ b/spec/javascripts/vue_shared/translate_spec.js
@@ -0,0 +1,90 @@
+import Vue from 'vue';
+import Translate from '~/vue_shared/translate';
+
+Vue.use(Translate);
+
+describe('Vue translate filter', () => {
+  let el;
+
+  beforeEach(() => {
+    el = document.createElement('div');
+
+    document.body.appendChild(el);
+  });
+
+  it('translate single text', (done) => {
+    const comp = new Vue({
+      el,
+      template: `
+        <span>
+          {{ 'testing' | translate }}
+        </span>
+      `,
+    }).$mount();
+
+    Vue.nextTick(() => {
+      expect(
+        comp.$el.textContent.trim(),
+      ).toBe('testing');
+
+      done();
+    });
+  });
+
+  it('translate plural text with single count', (done) => {
+    const comp = new Vue({
+      el,
+      template: `
+        <span>
+          {{ '%d day' | translate-plural('%d days', 1) }}
+        </span>
+      `,
+    }).$mount();
+
+    Vue.nextTick(() => {
+      expect(
+        comp.$el.textContent.trim(),
+      ).toBe('1 day');
+
+      done();
+    });
+  });
+
+  it('translate plural text with multiple count', (done) => {
+    const comp = new Vue({
+      el,
+      template: `
+        <span>
+          {{ '%d day' | translate-plural('%d days', 2) }}
+        </span>
+      `,
+    }).$mount();
+
+    Vue.nextTick(() => {
+      expect(
+        comp.$el.textContent.trim(),
+      ).toBe('2 days');
+
+      done();
+    });
+  });
+
+  it('translate plural without replacing any text', (done) => {
+    const comp = new Vue({
+      el,
+      template: `
+        <span>
+          {{ 'day' | translate-plural('days', 2) }}
+        </span>
+      `,
+    }).$mount();
+
+    Vue.nextTick(() => {
+      expect(
+        comp.$el.textContent.trim(),
+      ).toBe('days');
+
+      done();
+    });
+  });
+});
-- 
GitLab


From 1de135bc0408a871e3bfa8b0ba5aa81a7936bd01 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 19 Apr 2017 23:19:24 -0500
Subject: [PATCH 13/42] Fix Rubocop complains plus some small refactor

---
 app/controllers/application_controller.rb              |  1 +
 app/views/profiles/show.html.haml                      |  2 +-
 config/initializers/fast_gettext.rb                    |  2 +-
 .../20170413035209_add_preferred_language_to_users.rb  |  6 +++++-
 lib/gitlab/i18n.rb                                     | 10 +++++-----
 5 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 5a3bd4040cc..0af05992cce 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -269,6 +269,7 @@ class ApplicationController < ActionController::Base
   def set_locale
     requested_locale = current_user&.preferred_language || request.env['HTTP_ACCEPT_LANGUAGE'] || I18n.default_locale
     locale = FastGettext.set_locale(requested_locale)
+
     I18n.locale = locale
   end
 end
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index d8ef64ceb72..9846f01603f 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -74,7 +74,7 @@
         %span.help-block This email will be displayed on your public profile.
       .form-group
         = f.label :preferred_language, class: "label-light"
-        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |lang| [_(lang[0]), lang[1]] },
+        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |value, label| [_(label), value] },
           {}, class: "select2"
       .form-group
         = f.label :skype, class: "label-light"
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
index cfc3427b5ae..54b0049033b 100644
--- a/config/initializers/fast_gettext.rb
+++ b/config/initializers/fast_gettext.rb
@@ -1,3 +1,3 @@
 FastGettext.add_text_domain 'gitlab', path: 'locale', type: :po
-FastGettext.default_available_locales = ['en', 'es','de']
+FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys
 FastGettext.default_text_domain = 'gitlab'
diff --git a/db/migrate/20170413035209_add_preferred_language_to_users.rb b/db/migrate/20170413035209_add_preferred_language_to_users.rb
index 5dc128dbaea..6fe91656eeb 100644
--- a/db/migrate/20170413035209_add_preferred_language_to_users.rb
+++ b/db/migrate/20170413035209_add_preferred_language_to_users.rb
@@ -8,7 +8,11 @@ class AddPreferredLanguageToUsers < ActiveRecord::Migration
 
   disable_ddl_transaction!
 
-  def change
+  def up
     add_column_with_default :users, :preferred_language, :string, default: 'en'
   end
+
+  def down
+    remove_column :users, :preferred_language
+  end
 end
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
index 85e527afd71..0459def6517 100644
--- a/lib/gitlab/i18n.rb
+++ b/lib/gitlab/i18n.rb
@@ -1,9 +1,9 @@
 module Gitlab
   module I18n
-    AVAILABLE_LANGUAGES = [
-      ['English', 'en'],
-      ['Spanish', 'es'],
-      ['Deutsch', 'de']
-    ]
+    AVAILABLE_LANGUAGES = {
+      'en' => 'English',
+      'es' => 'Spanish',
+      'de' => 'Deutsch'
+    }.freeze
   end
 end
-- 
GitLab


From 4471d7b84fc783a08909473ef0243e6e07d2342a Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 20 Apr 2017 18:09:13 -0500
Subject: [PATCH 14/42] Some small fixes for the current I18n implementation

---
 app/controllers/projects/cycle_analytics_controller.rb | 1 +
 config/initializers/fast_gettext.rb                    | 2 +-
 lib/gitlab/i18n.rb                                     | 6 +++---
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 88ac3ad046b..7ef8872a90b 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -4,6 +4,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
   include CycleAnalyticsParams
 
   before_action :authorize_read_cycle_analytics!
+  before_action :set_locale, only: :show
 
   def show
     @cycle_analytics = ::CycleAnalytics.new(@project, options(cycle_analytics_params))
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
index 54b0049033b..10a3ee02b85 100644
--- a/config/initializers/fast_gettext.rb
+++ b/config/initializers/fast_gettext.rb
@@ -1,3 +1,3 @@
 FastGettext.add_text_domain 'gitlab', path: 'locale', type: :po
-FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys
 FastGettext.default_text_domain = 'gitlab'
+FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
index 0459def6517..64a86b55c7f 100644
--- a/lib/gitlab/i18n.rb
+++ b/lib/gitlab/i18n.rb
@@ -1,9 +1,9 @@
 module Gitlab
   module I18n
     AVAILABLE_LANGUAGES = {
-      'en' => 'English',
-      'es' => 'Spanish',
-      'de' => 'Deutsch'
+      'en' => N_('English'),
+      'es' => N_('Spanish'),
+      'de' => N_('Deutsch')
     }.freeze
   end
 end
-- 
GitLab


From 6fbc6befa1768cc68471d17091ef08b2e73fec82 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 20 Apr 2017 22:47:31 -0500
Subject: [PATCH 15/42] Monkey patch gettext_i18n_rails so it can parse content
 in Mustache format

---
 config/initializers/gettext_rails_i18n_patch.rb | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/initializers/gettext_rails_i18n_patch.rb

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
new file mode 100644
index 00000000000..0413330c608
--- /dev/null
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -0,0 +1,17 @@
+module GettextI18nRails
+  class HamlParser
+    singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code)
+
+    # We need to convert text in Mustache format
+    # to a format that can be parsed by Gettext scripts.
+    # If we found a content like "{{ 'Stage' | translate }}"
+    # in a HAML file we convert it to "= _('Stage')", that way
+    # it can be processed by the "rake gettext:find" script.
+    def self.convert_to_code(text)
+      text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)")
+
+      old_convert_to_code(text)
+    end
+  end
+end
+
-- 
GitLab


From 4f31d5963f44b1803fa54d0732cae86b0ec45e06 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Fri, 21 Apr 2017 09:16:50 +0100
Subject: [PATCH 16/42] Revert line being commented out

---
 .../initializers/gettext_rails_i18n_patch.rb  | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index 744e983a094..c6b3795d0c4 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -1,16 +1,16 @@
 module GettextI18nRails
   class HamlParser
-    # singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code)
-    #
-    # # We need to convert text in Mustache format
-    # # to a format that can be parsed by Gettext scripts.
-    # # If we found a content like "{{ 'Stage' | translate }}"
-    # # in a HAML file we convert it to "= _('Stage')", that way
-    # # it can be processed by the "rake gettext:find" script.
-    # def self.convert_to_code(text)
-    #   text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)")
-    #
-    #   old_convert_to_code(text)
-    # end
+    singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code)
+
+    # We need to convert text in Mustache format
+    # to a format that can be parsed by Gettext scripts.
+    # If we found a content like "{{ 'Stage' | translate }}"
+    # in a HAML file we convert it to "= _('Stage')", that way
+    # it can be processed by the "rake gettext:find" script.
+    def self.convert_to_code(text)
+      text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)")
+
+      old_convert_to_code(text)
+    end
   end
 end
-- 
GitLab


From 77d9e3f9b49821af3ec9b4fbac574c75b02d0351 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Mon, 24 Apr 2017 22:36:14 -0500
Subject: [PATCH 17/42] Monkey patch gettext_i18n_rails so it can parse content
 in Mustache format

---
 .../initializers/gettext_rails_i18n_patch.rb  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 config/initializers/gettext_rails_i18n_patch.rb

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
new file mode 100644
index 00000000000..c6b841aacd6
--- /dev/null
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -0,0 +1,19 @@
+require 'gettext_i18n_rails/haml_parser'
+
+module GettextI18nRails
+  class HamlParser
+    singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code)
+
+    # We need to convert text in Mustache format
+    # to a format that can be parsed by Gettext scripts.
+    # If we found a content like "{{ 'Stage' | translate }}"
+    # in a HAML file we convert it to "= _('Stage')", that way
+    # it can be processed by the "rake gettext:find" script.
+    def self.convert_to_code(text)
+      text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)")
+
+      old_convert_to_code(text)
+    end
+  end
+end
+
-- 
GitLab


From 80d7f4166fec5476c07ca7afe78e3e8a50071f2b Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Mon, 24 Apr 2017 23:03:38 -0500
Subject: [PATCH 18/42] Parse the translate-plural filter in HAML views

---
 config/initializers/gettext_rails_i18n_patch.rb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index a50be2ea279..3b50501c3da 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -10,8 +10,12 @@ module GettextI18nRails
     # in a HAML file we convert it to "= _('Stage')", that way
     # it can be processed by the "rake gettext:find" script.
     def self.convert_to_code(text)
+      # {{ 'Stage' | translate }} => = _('Stage')
       text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)")
 
+      # {{ 'user' | translate-plural('users', users.size) }} => = n_('user', 'users', users.size)
+      text.gsub!(/{{ (.*)( \| translate-plural\((.*), (.*)\)) }}/, "= n_(\\1, \\3, \\4)")
+
       old_convert_to_code(text)
     end
   end
-- 
GitLab


From 422c48baa7eeaca025a423c4eb48256c786514ed Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Tue, 25 Apr 2017 00:01:59 -0500
Subject: [PATCH 19/42] Parse translate filters from JS files.

---
 .../initializers/gettext_rails_i18n_patch.rb  | 31 +++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index 3b50501c3da..5570b7e31e9 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -1,4 +1,8 @@
 require 'gettext_i18n_rails/haml_parser'
+require 'gettext_i18n_rails_js/parser/javascript'
+
+VUE_TRANSLATE_REGEX = /{{ ([^{]*)( \| translate) }}/
+VUE_TRANSLATE_PLURAL_REGEX = /{{ ([^{]*)( \| translate-plural\((.*), (.*)\)) }}/
 
 module GettextI18nRails
   class HamlParser
@@ -9,14 +13,37 @@ module GettextI18nRails
     # If we found a content like "{{ 'Stage' | translate }}"
     # in a HAML file we convert it to "= _('Stage')", that way
     # it can be processed by the "rake gettext:find" script.
+    # Overwrites: https://github.com/grosser/gettext_i18n_rails/blob/8396387a431e0f8ead72fc1cd425cad2fa4992f2/lib/gettext_i18n_rails/haml_parser.rb#L9
     def self.convert_to_code(text)
       # {{ 'Stage' | translate }} => = _('Stage')
-      text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)")
+      text.gsub!(VUE_TRANSLATE_REGEX, "= _(\\1)")
 
       # {{ 'user' | translate-plural('users', users.size) }} => = n_('user', 'users', users.size)
-      text.gsub!(/{{ (.*)( \| translate-plural\((.*), (.*)\)) }}/, "= n_(\\1, \\3, \\4)")
+      text.gsub!(VUE_TRANSLATE_PLURAL_REGEX, "= n_(\\1, \\3, \\4)")
 
       old_convert_to_code(text)
     end
   end
 end
+
+module GettextI18nRailsJs
+  module Parser
+    module Javascript
+      protected
+
+      # Overwrites: https://github.com/webhippie/gettext_i18n_rails_js/blob/46c58db6d2053a4f5f36a0eb024ea706ff5707cb/lib/gettext_i18n_rails_js/parser/javascript.rb#L46
+      def collect_for(value)
+        ::File.open(value) do |f|
+          f.each_line.each_with_index.collect do |line, idx|
+            line.gsub!(VUE_TRANSLATE_REGEX, "__(\\1)")
+            line.gsub!(VUE_TRANSLATE_PLURAL_REGEX, "n__(\\1, \\3, \\4)")
+
+            line.scan(invoke_regex).collect do |function, arguments|
+              yield(function, arguments, idx + 1)
+            end
+          end.inject([], :+).compact
+        end
+      end
+    end
+  end
+end
-- 
GitLab


From d8f767445933f41a7629a7637ba962bdbc461c9a Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Tue, 25 Apr 2017 21:47:49 -0500
Subject: [PATCH 20/42] Add ability to parse *.vue files through the `ruby
 gettext:find` script

---
 .../initializers/gettext_rails_i18n_patch.rb  | 15 +++++++++
 lib/tasks/gettext.rake                        | 33 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 lib/tasks/gettext.rake

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index 5570b7e31e9..d74c1f597fe 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -13,6 +13,7 @@ module GettextI18nRails
     # If we found a content like "{{ 'Stage' | translate }}"
     # in a HAML file we convert it to "= _('Stage')", that way
     # it can be processed by the "rake gettext:find" script.
+    #
     # Overwrites: https://github.com/grosser/gettext_i18n_rails/blob/8396387a431e0f8ead72fc1cd425cad2fa4992f2/lib/gettext_i18n_rails/haml_parser.rb#L9
     def self.convert_to_code(text)
       # {{ 'Stage' | translate }} => = _('Stage')
@@ -29,6 +30,20 @@ end
 module GettextI18nRailsJs
   module Parser
     module Javascript
+
+      # This is required to tell the `rake gettext:find` script to use the Javascript
+      # parser for *.vue files.
+      #
+      # Overwrites: https://github.com/webhippie/gettext_i18n_rails_js/blob/46c58db6d2053a4f5f36a0eb024ea706ff5707cb/lib/gettext_i18n_rails_js/parser/javascript.rb#L36
+      def target?(file)
+        [
+          ".js",
+          ".jsx",
+          ".coffee",
+          ".vue"
+        ].include? ::File.extname(file)
+      end
+
       protected
 
       # Overwrites: https://github.com/webhippie/gettext_i18n_rails_js/blob/46c58db6d2053a4f5f36a0eb024ea706ff5707cb/lib/gettext_i18n_rails_js/parser/javascript.rb#L46
diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake
new file mode 100644
index 00000000000..cc18616d2a7
--- /dev/null
+++ b/lib/tasks/gettext.rake
@@ -0,0 +1,33 @@
+require "gettext_i18n_rails/tasks"
+
+namespace :gettext do
+  # Customize list of translatable files
+  # See: https://github.com/grosser/gettext_i18n_rails#customizing-list-of-translatable-files
+  def files_to_translate
+    folders = [
+      "app",
+      "lib",
+      "config",
+      locale_path
+    ].join(",")
+
+    exts = [
+      "rb",
+      "erb",
+      "haml",
+      "slim",
+      "rhtml",
+      "js",
+      "jsx",
+      "vue",
+      "coffee",
+      "handlebars",
+      "hbs",
+      "mustache"
+    ].join(",")
+
+    Dir.glob(
+      "{#{folders}}/**/*.{#{exts}}"
+    )
+  end
+end
-- 
GitLab


From 0242c4dfc92da0c59583b0ac9f1d3f2e6dcd11b8 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 26 Apr 2017 17:03:06 +0100
Subject: [PATCH 21/42] Changed JS translation functions Added context function

---
 .../components/limit_warning_component.js     |  2 +-
 .../components/stage_code_component.js        |  4 +-
 .../components/stage_issue_component.js       |  4 +-
 .../components/stage_plan_component.js        |  4 +-
 .../components/stage_production_component.js  |  4 +-
 .../components/stage_review_component.js      |  4 +-
 .../components/stage_staging_component.js     |  2 +-
 .../components/total_time_component.js        |  6 +--
 .../cycle_analytics/cycle_analytics_store.js  | 17 +++---
 app/assets/javascripts/locale/index.js        |  9 +++-
 .../javascripts/vue_shared/translate.js       | 19 +++++--
 .../cycle_analytics/_empty_stage.html.haml    |  2 +-
 .../cycle_analytics/_no_access.html.haml      |  4 +-
 .../projects/cycle_analytics/show.html.haml   | 29 ++++++-----
 locale/de/gitlab.po                           | 48 +++++++++++------
 locale/en/gitlab.po                           | 48 +++++++++++------
 locale/es/gitlab.po                           | 50 ++++++++++++------
 locale/gitlab.pot                             | 52 +++++++++++++------
 spec/javascripts/vue_shared/translate_spec.js |  8 +--
 19 files changed, 202 insertions(+), 114 deletions(-)

diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
index 63e20478e94..72ada943fea 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
@@ -11,7 +11,7 @@ export default {
           aria-hidden="true"
           title="Limited to showing 50 events at most"
           data-placement="top"></i>
-      {{ 'Showing %d event' | translate-plural('Showing %d events', 50) }}
+      {{ n__('Showing %d event', 'Showing %d events', 50) }}
     </span>
   `,
 };
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
index f72882872cd..0bd15ee773d 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageCodeComponent = Vue.extend({
             <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
             &middot;
             <span>
-              {{ 'Opened' | translate }}
+              {{ __('Opened') }}
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              {{ 'by' | translate }}
+              {{ __('by') }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
           </div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
index bb265c8316f..b6bf9a2572e 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageIssueComponent = Vue.extend({
             <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
             &middot;
             <span>
-              {{ 'Opened' | translate }}
+              {{ __('Opened') }}
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-              {{ 'by' | translate }}
+              {{ __('by') }}
               <a :href="issue.author.webUrl" class="issue-author-link">
                 {{ issue.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
index 32b685faece..116c118b824 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
@@ -31,10 +31,10 @@ global.cycleAnalytics.StagePlanComponent = Vue.extend({
               </a>
             </h5>
             <span>
-              {{ 'First' | translate }}
+              {{ __('First') }}
               <span class="commit-icon">${iconCommit}</span>
               <a :href="commit.commitUrl" class="commit-hash-link monospace">{{ commit.shortSha }}</a>
-              {{ 'pushed by' | translate }}
+              {{ __('pushed by') }}
               <a :href="commit.author.webUrl" class="commit-author-link">
                 {{ commit.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
index 5c9186a2e49..18fb09d6d2f 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageProductionComponent = Vue.extend({
             <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
             &middot;
             <span>
-              {{ 'Opened' | translate }}
+              {{ __('Opened') }}
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-            {{ 'by' | translate }}
+            {{ __('by') }}
             <a :href="issue.author.webUrl" class="issue-author-link">
               {{ issue.author.name }}
             </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
index a047573548d..af5f1b42ea2 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageReviewComponent = Vue.extend({
             <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
             &middot;
             <span>
-              {{ 'Opened' | translate }}
+              {{ __('Opened') }}
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              {{ 'by' | translate }}
+              {{ __('by') }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
             <template v-if="mergeRequest.state === 'closed'">
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
index e8dfaf4294e..a0bd1bab96e 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageStagingComponent = Vue.extend({
             </h5>
             <span>
               <a :href="build.url" class="build-date">{{ build.date }}</a>
-              {{ 'by' | translate }}
+              {{ __('by') }}
               <a :href="build.author.webUrl" class="issue-author-link">
                 {{ build.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
index 47d82bdda90..48cc0a5c58d 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -12,9 +12,9 @@ global.cycleAnalytics.TotalTimeComponent = Vue.extend({
   template: `
     <span class="total-time">
       <template v-if="Object.keys(time).length">
-        <template v-if="time.days">{{ time.days }} <span>{{ 'day' | translate-plural('days', time.days) }}</span></template>
-        <template v-if="time.hours">{{ time.hours }} <span>{{ 'hr' | translate }}</span></template>
-        <template v-if="time.mins && !time.days">{{ time.mins }} <span>{{ 'min' | translate-plural('mins', time.mins) }}</span></template>
+        <template v-if="time.days">{{ time.days }} <span>{{ n__('day', 'days', time.days) }}</span></template>
+        <template v-if="time.hours">{{ time.hours }} <span>{{ __('hr') }}</span></template>
+        <template v-if="time.mins && !time.days">{{ time.mins }} <span>{{ n__('min', 'mins', time.mins) }}</span></template>
         <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template>
       </template>
       <template v-else>
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
index 25d5092a1fd..1c574951211 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
@@ -1,6 +1,5 @@
 /* eslint-disable no-param-reassign */
-
-import locale from '~/locale';
+import { __ } from '../locale';
 
 require('../lib/utils/text_utility');
 const DEFAULT_EVENT_OBJECTS = require('./default_event_objects');
@@ -9,13 +8,13 @@ const global = window.gl || (window.gl = {});
 global.cycleAnalytics = global.cycleAnalytics || {};
 
 const EMPTY_STAGE_TEXTS = {
-  issue: locale.gettext('The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.'),
-  plan: locale.gettext('The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.'),
-  code: locale.gettext('The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.'),
-  test: locale.gettext('The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.'),
-  review: locale.gettext('The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.'),
-  staging: locale.gettext('The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.'),
-  production: locale.gettext('The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.'),
+  issue: __('The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.'),
+  plan: __('The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.'),
+  code: __('The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.'),
+  test: __('The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.'),
+  review: __('The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.'),
+  staging: __('The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.'),
+  production: __('The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.'),
 };
 
 global.cycleAnalytics.CycleAnalyticsStore = {
diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index 9f81024ff68..3907b0e2aba 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -10,6 +10,13 @@ const locales = {
 };
 
 const lang = document.querySelector('html').getAttribute('lang') || 'en';
+const locale = new Jed(locales[lang]);
+const gettext = locale.gettext.bind(locale);
+const ngettext = locale.ngettext.bind(locale);
+const pgettext = locale.pgettext.bind(locale);
 
 export { lang };
-export default new Jed(locales[lang]);
+export { gettext as __ };
+export { ngettext as n__ };
+export { pgettext as s__ };
+export default locale;
diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js
index 7fc6f1ce38a..c2c20ea0853 100644
--- a/app/assets/javascripts/vue_shared/translate.js
+++ b/app/assets/javascripts/vue_shared/translate.js
@@ -1,8 +1,17 @@
-import locale from '../locale';
+import {
+  __,
+  n__,
+  s__,
+} from '../locale';
 
 export default (Vue) => {
-  Vue.filter('translate', text => locale.gettext(text));
-
-  Vue.filter('translate-plural', (text, pluralText, count) =>
-    locale.ngettext(text, pluralText, count).replace(/%d/g, count));
+  Vue.mixin({
+    methods: {
+      __(text) { return __(text); },
+      n__(text, pluralText, count) {
+        return n__(text, pluralText, count).replace(/%d/g, count);
+      },
+      s__(context, key) { return s__(context, key); },
+    },
+  });
 };
diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml
index 27190785fff..57e95c4c14f 100644
--- a/app/views/projects/cycle_analytics/_empty_stage.html.haml
+++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml
@@ -2,6 +2,6 @@
   .empty-stage
     .icon-no-data
       = custom_icon ('icon_no_data')
-    %h4 {{ 'We don\'t have enough data to show this stage.' | translate }}
+    %h4 {{ 'We don\'t have enough data to show this stage.' | t }}
     %p
       {{currentStage.emptyStageText}}
diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml
index 474d0f410a7..25109bd61cd 100644
--- a/app/views/projects/cycle_analytics/_no_access.html.haml
+++ b/app/views/projects/cycle_analytics/_no_access.html.haml
@@ -2,6 +2,6 @@
   .no-access-stage
     .icon-lock
       = custom_icon ('icon_lock')
-    %h4 {{ 'You need permission.' | translate }}
+    %h4 {{ 'You need permission.' | t }}
     %p
-      {{ 'Want to see the data? Please ask administrator for access.' | translate }}
+      {{ 'Want to see the data? Please ask administrator for access.' | t }}
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index a7783b69588..2e0e4753e68 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -8,7 +8,8 @@
 = render "projects/head"
 
 #cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } }
-  - if @cycle_analytics_no_data
+  - if @cycle_analytics_no_data || true
+    {{ s__('context', 'key') }}
     .bordered-box.landing.content-block{ "v-if" => "!isOverviewDialogDismissed" }
       = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()")
       .row
@@ -16,17 +17,17 @@
           = custom_icon('icon_cycle_analytics_splash')
         .col-sm-8.col-xs-12.inner-content
           %h4
-            {{ 'Introducing Cycle Analytics' | translate }}
+            {{ __('Introducing Cycle Analytics') }}
           %p
-            {{ 'Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.' | translate }}
+            {{ __('Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.') }}
 
           = link_to help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' do
-            {{ 'Read more' | translate }}
+            {{ __('Read more') }}
   = icon("spinner spin", "v-show" => "isLoading")
   .wrapper{ "v-show" => "!isLoading && !hasError" }
     .panel.panel-default
       .panel-heading
-        {{ 'Pipeline Health' | translate }}
+        {{ __('Pipeline Health') }}
       .content-block
         .container-fluid
           .row
@@ -36,15 +37,15 @@
             .col-sm-3.col-xs-12.column
               .dropdown.inline.js-ca-dropdown
                 %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
-                  %span.dropdown-label {{ 'Last 30 days' | translate }}
+                  %span.dropdown-label {{ __('Last 30 days') }}
                   %i.fa.fa-chevron-down
                 %ul.dropdown-menu.dropdown-menu-align-right
                   %li
                     %a{ "href" => "#", "data-value" => "30" }
-                      {{ 'Last 30 days' | translate }}
+                      {{ __('Last 30 days') }}
                   %li
                     %a{ "href" => "#", "data-value" => "90" }
-                      {{ 'Last 90 days' | translate }}
+                      {{ __('Last 90 days') }}
     .stage-panel-container
       .panel.panel-default.stage-panel
         .panel-heading
@@ -52,19 +53,19 @@
             %ul
               %li.stage-header
                 %span.stage-name
-                  {{ 'Stage' | translate }}
+                  {{ __('Stage') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" }
               %li.median-header
                 %span.stage-name
-                  {{ 'Median' | translate }}
+                  {{ __('Median') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" }
               %li.event-header
                 %span.stage-name
-                  {{ currentStage ? currentStage.legend : 'Related Issues' | translate }}
+                  {{ __(currentStage ? currentStage.legend : 'Related Issues') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" }
               %li.total-time-header
                 %span.stage-name
-                  {{ 'Total Time' | translate }}
+                  {{ __('Total Time') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" }
         .stage-panel-body
           %nav.stage-nav
@@ -77,10 +78,10 @@
                     %span{ "v-if" => "stage.value" }
                       {{ stage.value }}
                     %span.stage-empty{ "v-else" => true }
-                      {{ 'Not enough data' | translate }}
+                      {{ __('Not enough data') }}
                   %template{ "v-else" => true }
                     %span.not-available
-                      {{ 'Not available' | translate }}
+                      {{ __('Not available') }}
           .section.stage-events
             %template{ "v-if" => "isLoadingStage" }
               = icon("spinner spin")
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index f3b6cb6e905..c291b6adab6 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -17,47 +17,65 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
-msgstr ""
-
 msgid "Deutsch"
 msgstr ""
 
 msgid "English"
 msgstr ""
 
-msgid "Introducing Cycle Analytics"
+msgid "First"
 msgstr ""
 
-msgid "Last 30 days"
+msgid "Opened"
 msgstr ""
 
-msgid "Last 90 days"
-msgstr ""
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
 
-msgid "Median"
+msgid "Spanish"
 msgstr ""
 
-msgid "Not available"
+msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
-msgid "Not enough data"
+msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
-msgid "Pipeline Health"
+msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
-msgid "Read more"
+msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
 msgstr ""
 
-msgid "Spanish"
+msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
 msgstr ""
 
-msgid "Stage"
+msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
 msgstr ""
 
-msgid "Total Time"
+msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
+
+msgid "by"
+msgstr ""
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 93029868486..7e13ddb1c18 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -17,47 +17,65 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
-msgstr ""
-
 msgid "Deutsch"
 msgstr ""
 
 msgid "English"
 msgstr ""
 
-msgid "Introducing Cycle Analytics"
+msgid "First"
 msgstr ""
 
-msgid "Last 30 days"
+msgid "Opened"
 msgstr ""
 
-msgid "Last 90 days"
-msgstr ""
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
 
-msgid "Median"
+msgid "Spanish"
 msgstr ""
 
-msgid "Not available"
+msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
-msgid "Not enough data"
+msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
-msgid "Pipeline Health"
+msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
-msgid "Read more"
+msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
 msgstr ""
 
-msgid "Spanish"
+msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
 msgstr ""
 
-msgid "Stage"
+msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
 msgstr ""
 
-msgid "Total Time"
+msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
+
+msgid "by"
+msgstr ""
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 23863cbdb92..f5bf45e2cd3 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -17,47 +17,65 @@ msgstr ""
 "Last-Translator: \n"
 "X-Generator: Poedit 2.0.1\n"
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
-msgstr ""
-
 msgid "Deutsch"
 msgstr "Alemán"
 
 msgid "English"
 msgstr "Inglés"
 
-msgid "Introducing Cycle Analytics"
+msgid "First"
 msgstr ""
 
-msgid "Last 30 days"
+msgid "Opened"
 msgstr ""
 
-msgid "Last 90 days"
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Spanish"
+msgstr "Español"
+
+msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
-msgid "Median"
+msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
-msgid "Not available"
+msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
-msgid "Not enough data"
+msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
 msgstr ""
 
-msgid "Pipeline Health"
+msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
 msgstr ""
 
-msgid "Read more"
+msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
 msgstr ""
 
-msgid "Spanish"
-msgstr "Español"
+msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
+msgstr ""
 
-msgid "Stage"
+msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
 
-msgid "Total Time"
+msgid "by"
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
 msgstr ""
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index ada103157d9..372ab3cd3cc 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: 2017-04-21 09:01+0100\n"
-"PO-Revision-Date: 2017-04-21 09:01+0100\n"
+"POT-Creation-Date: 2017-04-26 16:26+0100\n"
+"PO-Revision-Date: 2017-04-26 16:26+0100\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -18,47 +18,65 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
-msgstr ""
-
 msgid "Deutsch"
 msgstr ""
 
 msgid "English"
 msgstr ""
 
-msgid "Introducing Cycle Analytics"
+msgid "First"
 msgstr ""
 
-msgid "Last 30 days"
+msgid "Opened"
 msgstr ""
 
-msgid "Last 90 days"
-msgstr ""
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
 
-msgid "Median"
+msgid "Spanish"
 msgstr ""
 
-msgid "Not available"
+msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
-msgid "Not enough data"
+msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
-msgid "Pipeline Health"
+msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
-msgid "Read more"
+msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
 msgstr ""
 
-msgid "Spanish"
+msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
 msgstr ""
 
-msgid "Stage"
+msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
 msgstr ""
 
-msgid "Total Time"
+msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
+
+msgid "by"
+msgstr ""
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr ""
diff --git a/spec/javascripts/vue_shared/translate_spec.js b/spec/javascripts/vue_shared/translate_spec.js
index 74bd4ff86b1..5dc0be50116 100644
--- a/spec/javascripts/vue_shared/translate_spec.js
+++ b/spec/javascripts/vue_shared/translate_spec.js
@@ -17,7 +17,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ 'testing' | translate }}
+          {{ 'testing' | t }}
         </span>
       `,
     }).$mount();
@@ -36,7 +36,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ '%d day' | translate-plural('%d days', 1) }}
+          {{ '%d day' | nt('%d days', 1) }}
         </span>
       `,
     }).$mount();
@@ -55,7 +55,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ '%d day' | translate-plural('%d days', 2) }}
+          {{ '%d day' | nt('%d days', 2) }}
         </span>
       `,
     }).$mount();
@@ -74,7 +74,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ 'day' | translate-plural('days', 2) }}
+          {{ 'day' | nt('days', 2) }}
         </span>
       `,
     }).$mount();
-- 
GitLab


From cb06f09e982248ff6dc8218ffa1f431141fd1ad8 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 26 Apr 2017 17:20:13 +0100
Subject: [PATCH 22/42] Removed t filter from other places

---
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 .../cycle_analytics/_empty_stage.html.haml    |  2 +-
 .../cycle_analytics/_no_access.html.haml      |  4 +-
 locale/de/gitlab.po                           | 51 +++++++++--------
 locale/en/gitlab.po                           | 51 +++++++++--------
 locale/es/gitlab.po                           | 51 +++++++++--------
 locale/gitlab.pot                             | 55 ++++++++++---------
 spec/javascripts/vue_shared/translate_spec.js |  8 +--
 10 files changed, 120 insertions(+), 108 deletions(-)

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index 036572c5568..76f01f1affe 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":[""],"Stage":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index dfab3c8f0de..9a2d27c9f24 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":[""],"Stage":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index a12129bef13..1518d885233 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-13 00:07-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":["Alemán"],"English":["Inglés"],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":["Español"],"Stage":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-13 00:07-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":["Alemán"],"English":["Inglés"],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":["Español"],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""]}}};
\ No newline at end of file
diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml
index 57e95c4c14f..cdad0bc7231 100644
--- a/app/views/projects/cycle_analytics/_empty_stage.html.haml
+++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml
@@ -2,6 +2,6 @@
   .empty-stage
     .icon-no-data
       = custom_icon ('icon_no_data')
-    %h4 {{ 'We don\'t have enough data to show this stage.' | t }}
+    %h4 {{ __('We don\'t have enough data to show this stage.') }}
     %p
       {{currentStage.emptyStageText}}
diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml
index 25109bd61cd..dcfd1b7afc0 100644
--- a/app/views/projects/cycle_analytics/_no_access.html.haml
+++ b/app/views/projects/cycle_analytics/_no_access.html.haml
@@ -2,6 +2,6 @@
   .no-access-stage
     .icon-lock
       = custom_icon ('icon_lock')
-    %h4 {{ 'You need permission.' | t }}
+    %h4 {{ __('You need permission.') }}
     %p
-      {{ 'Want to see the data? Please ask administrator for access.' | t }}
+      {{ __('Want to see the data? Please ask administrator for access.') }}
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index c291b6adab6..aeee577c144 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -17,26 +17,45 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgstr ""
+
 msgid "Deutsch"
 msgstr ""
 
 msgid "English"
 msgstr ""
 
-msgid "First"
+msgid "Introducing Cycle Analytics"
+msgstr ""
+
+msgid "Last 30 days"
+msgstr ""
+
+msgid "Last 90 days"
 msgstr ""
 
-msgid "Opened"
+msgid "Median"
 msgstr ""
 
-msgid "Showing %d event"
-msgid_plural "Showing %d events"
-msgstr[0] ""
-msgstr[1] ""
+msgid "Not available"
+msgstr ""
+
+msgid "Not enough data"
+msgstr ""
+
+msgid "Pipeline Health"
+msgstr ""
+
+msgid "Read more"
+msgstr ""
 
 msgid "Spanish"
 msgstr ""
 
+msgid "Stage"
+msgstr ""
+
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -58,24 +77,8 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
-msgstr ""
-
-msgid "by"
+msgid "Total Time"
 msgstr ""
 
-msgid "day"
-msgid_plural "days"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "pushed by"
+msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 7e13ddb1c18..9d32f6c9f8f 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -17,26 +17,45 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgstr ""
+
 msgid "Deutsch"
 msgstr ""
 
 msgid "English"
 msgstr ""
 
-msgid "First"
+msgid "Introducing Cycle Analytics"
+msgstr ""
+
+msgid "Last 30 days"
+msgstr ""
+
+msgid "Last 90 days"
 msgstr ""
 
-msgid "Opened"
+msgid "Median"
 msgstr ""
 
-msgid "Showing %d event"
-msgid_plural "Showing %d events"
-msgstr[0] ""
-msgstr[1] ""
+msgid "Not available"
+msgstr ""
+
+msgid "Not enough data"
+msgstr ""
+
+msgid "Pipeline Health"
+msgstr ""
+
+msgid "Read more"
+msgstr ""
 
 msgid "Spanish"
 msgstr ""
 
+msgid "Stage"
+msgstr ""
+
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -58,24 +77,8 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
-msgstr ""
-
-msgid "by"
+msgid "Total Time"
 msgstr ""
 
-msgid "day"
-msgid_plural "days"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "pushed by"
+msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index f5bf45e2cd3..af7e127bc3a 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -17,26 +17,45 @@ msgstr ""
 "Last-Translator: \n"
 "X-Generator: Poedit 2.0.1\n"
 
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgstr ""
+
 msgid "Deutsch"
 msgstr "Alemán"
 
 msgid "English"
 msgstr "Inglés"
 
-msgid "First"
+msgid "Introducing Cycle Analytics"
+msgstr ""
+
+msgid "Last 30 days"
+msgstr ""
+
+msgid "Last 90 days"
 msgstr ""
 
-msgid "Opened"
+msgid "Median"
 msgstr ""
 
-msgid "Showing %d event"
-msgid_plural "Showing %d events"
-msgstr[0] ""
-msgstr[1] ""
+msgid "Not available"
+msgstr ""
+
+msgid "Not enough data"
+msgstr ""
+
+msgid "Pipeline Health"
+msgstr ""
+
+msgid "Read more"
+msgstr ""
 
 msgid "Spanish"
 msgstr "Español"
 
+msgid "Stage"
+msgstr ""
+
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -58,24 +77,8 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
-msgstr ""
-
-msgid "by"
+msgid "Total Time"
 msgstr ""
 
-msgid "day"
-msgid_plural "days"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "pushed by"
+msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 372ab3cd3cc..b99506788c7 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: 2017-04-26 16:26+0100\n"
-"PO-Revision-Date: 2017-04-26 16:26+0100\n"
+"POT-Creation-Date: 2017-04-26 17:18+0100\n"
+"PO-Revision-Date: 2017-04-26 17:18+0100\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -18,26 +18,45 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgstr ""
+
 msgid "Deutsch"
 msgstr ""
 
 msgid "English"
 msgstr ""
 
-msgid "First"
+msgid "Introducing Cycle Analytics"
+msgstr ""
+
+msgid "Last 30 days"
+msgstr ""
+
+msgid "Last 90 days"
 msgstr ""
 
-msgid "Opened"
+msgid "Median"
 msgstr ""
 
-msgid "Showing %d event"
-msgid_plural "Showing %d events"
-msgstr[0] ""
-msgstr[1] ""
+msgid "Not available"
+msgstr ""
+
+msgid "Not enough data"
+msgstr ""
+
+msgid "Pipeline Health"
+msgstr ""
+
+msgid "Read more"
+msgstr ""
 
 msgid "Spanish"
 msgstr ""
 
+msgid "Stage"
+msgstr ""
+
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -59,24 +78,8 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
-msgstr ""
-
-msgid "by"
+msgid "Total Time"
 msgstr ""
 
-msgid "day"
-msgid_plural "days"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "pushed by"
+msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
diff --git a/spec/javascripts/vue_shared/translate_spec.js b/spec/javascripts/vue_shared/translate_spec.js
index 5dc0be50116..cbb3cbdff46 100644
--- a/spec/javascripts/vue_shared/translate_spec.js
+++ b/spec/javascripts/vue_shared/translate_spec.js
@@ -17,7 +17,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ 'testing' | t }}
+          {{ __('testing') }}
         </span>
       `,
     }).$mount();
@@ -36,7 +36,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ '%d day' | nt('%d days', 1) }}
+          {{ n__('%d day', '%d days', 1) }}
         </span>
       `,
     }).$mount();
@@ -55,7 +55,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ '%d day' | nt('%d days', 2) }}
+          {{ n__('%d day', '%d days', 2) }}
         </span>
       `,
     }).$mount();
@@ -74,7 +74,7 @@ describe('Vue translate filter', () => {
       el,
       template: `
         <span>
-          {{ 'day' | nt('days', 2) }}
+          {{ n__('day', 'days', 2) }}
         </span>
       `,
     }).$mount();
-- 
GitLab


From c159727894d399152bc04914ef7b936417d6e1bb Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 26 Apr 2017 17:26:07 +0100
Subject: [PATCH 23/42] Removed random test code

---
 app/views/projects/cycle_analytics/show.html.haml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 2e0e4753e68..65afe41fe9e 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -8,8 +8,7 @@
 = render "projects/head"
 
 #cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } }
-  - if @cycle_analytics_no_data || true
-    {{ s__('context', 'key') }}
+  - if @cycle_analytics_no_data
     .bordered-box.landing.content-block{ "v-if" => "!isOverviewDialogDismissed" }
       = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()")
       .row
-- 
GitLab


From 82e967bc3ebc6b884651ddcadff2142332c365a5 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 26 Apr 2017 13:02:07 -0500
Subject: [PATCH 24/42] Adjust the patch for the gettext_i18n_rails and
 gettext_i18n_rails_js gems.

This is more simple now given we're using the recommended code to
annotate content to be translated.
---
 .../initializers/gettext_rails_i18n_patch.rb  | 27 +++----------------
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index d74c1f597fe..6785f361eda 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -1,8 +1,7 @@
 require 'gettext_i18n_rails/haml_parser'
 require 'gettext_i18n_rails_js/parser/javascript'
 
-VUE_TRANSLATE_REGEX = /{{ ([^{]*)( \| translate) }}/
-VUE_TRANSLATE_PLURAL_REGEX = /{{ ([^{]*)( \| translate-plural\((.*), (.*)\)) }}/
+VUE_TRANSLATE_REGEX = /{{ (N|n|s)?__\((.*)\) }}/
 
 module GettextI18nRails
   class HamlParser
@@ -10,17 +9,13 @@ module GettextI18nRails
 
     # We need to convert text in Mustache format
     # to a format that can be parsed by Gettext scripts.
-    # If we found a content like "{{ 'Stage' | translate }}"
+    # If we found a content like "{{ __('Stage') }}"
     # in a HAML file we convert it to "= _('Stage')", that way
     # it can be processed by the "rake gettext:find" script.
     #
     # Overwrites: https://github.com/grosser/gettext_i18n_rails/blob/8396387a431e0f8ead72fc1cd425cad2fa4992f2/lib/gettext_i18n_rails/haml_parser.rb#L9
     def self.convert_to_code(text)
-      # {{ 'Stage' | translate }} => = _('Stage')
-      text.gsub!(VUE_TRANSLATE_REGEX, "= _(\\1)")
-
-      # {{ 'user' | translate-plural('users', users.size) }} => = n_('user', 'users', users.size)
-      text.gsub!(VUE_TRANSLATE_PLURAL_REGEX, "= n_(\\1, \\3, \\4)")
+      text.gsub!(VUE_TRANSLATE_REGEX, "= \\1_(\\2)")
 
       old_convert_to_code(text)
     end
@@ -43,22 +38,6 @@ module GettextI18nRailsJs
           ".vue"
         ].include? ::File.extname(file)
       end
-
-      protected
-
-      # Overwrites: https://github.com/webhippie/gettext_i18n_rails_js/blob/46c58db6d2053a4f5f36a0eb024ea706ff5707cb/lib/gettext_i18n_rails_js/parser/javascript.rb#L46
-      def collect_for(value)
-        ::File.open(value) do |f|
-          f.each_line.each_with_index.collect do |line, idx|
-            line.gsub!(VUE_TRANSLATE_REGEX, "__(\\1)")
-            line.gsub!(VUE_TRANSLATE_PLURAL_REGEX, "n__(\\1, \\3, \\4)")
-
-            line.scan(invoke_regex).collect do |function, arguments|
-              yield(function, arguments, idx + 1)
-            end
-          end.inject([], :+).compact
-        end
-      end
     end
   end
 end
-- 
GitLab


From a4267d2d0f9b414aeeb1e42c6e0eca8a53af72e8 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 26 Apr 2017 16:19:06 -0500
Subject: [PATCH 25/42] Add some translations for Spanish.

---
 app/assets/javascripts/locale/de/app.js |  2 +-
 app/assets/javascripts/locale/en/app.js |  2 +-
 app/assets/javascripts/locale/es/app.js |  2 +-
 locale/de/gitlab.po                     | 30 +++++++++++
 locale/en/gitlab.po                     | 30 +++++++++++
 locale/es/gitlab.po                     | 69 ++++++++++++++++++-------
 locale/gitlab.pot                       | 34 +++++++++++-
 7 files changed, 145 insertions(+), 24 deletions(-)

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index 76f01f1affe..d74d36711d3 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index 9a2d27c9f24..05ddc42e333 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 1518d885233..bb5976c572a 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-13 00:07-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":["Alemán"],"English":["Inglés"],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Pipeline Health":[""],"Read more":[""],"Spanish":["Español"],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-26 16:07-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Median":["Mediana"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde la primera confirmación hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primera confirmación."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirá automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirá automáticamente una vez que se implementa en producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirá automáticamente luego de que el primer pipeline termine de ejecutarse."],"Total Time":["Tiempo total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index aeee577c144..747d446ebc4 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -26,6 +26,9 @@ msgstr ""
 msgid "English"
 msgstr ""
 
+msgid "First"
+msgstr ""
+
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
@@ -44,12 +47,20 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
+msgid "Opened"
+msgstr ""
+
 msgid "Pipeline Health"
 msgstr ""
 
 msgid "Read more"
 msgstr ""
 
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "Spanish"
 msgstr ""
 
@@ -82,3 +93,22 @@ msgstr ""
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
+
+msgid "by"
+msgstr ""
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 9d32f6c9f8f..d2ecc6cd73a 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -26,6 +26,9 @@ msgstr ""
 msgid "English"
 msgstr ""
 
+msgid "First"
+msgstr ""
+
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
@@ -44,12 +47,20 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
+msgid "Opened"
+msgstr ""
+
 msgid "Pipeline Health"
 msgstr ""
 
 msgid "Read more"
 msgstr ""
 
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "Spanish"
 msgstr ""
 
@@ -82,3 +93,22 @@ msgstr ""
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
+
+msgid "by"
+msgstr ""
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index af7e127bc3a..404ab89c7cd 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-13 00:07-0500\n"
+"PO-Revision-Date: 2017-04-26 16:07-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -18,7 +18,7 @@ msgstr ""
 "X-Generator: Poedit 2.0.1\n"
 
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
-msgstr ""
+msgstr "Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."
 
 msgid "Deutsch"
 msgstr "Alemán"
@@ -26,59 +26,90 @@ msgstr "Alemán"
 msgid "English"
 msgstr "Inglés"
 
+msgid "First"
+msgstr "Primer"
+
 msgid "Introducing Cycle Analytics"
-msgstr ""
+msgstr "Introducción a Cycle Analytics"
 
 msgid "Last 30 days"
-msgstr ""
+msgstr "Últimos 30 días"
 
 msgid "Last 90 days"
-msgstr ""
+msgstr "Últimos 90 días"
 
 msgid "Median"
-msgstr ""
+msgstr "Mediana"
 
 msgid "Not available"
-msgstr ""
+msgstr "No disponible"
 
 msgid "Not enough data"
-msgstr ""
+msgstr "No hay suficientes datos"
+
+msgid "Opened"
+msgstr "Abiertos"
 
 msgid "Pipeline Health"
-msgstr ""
+msgstr "Estado del Pipeline"
 
 msgid "Read more"
-msgstr ""
+msgstr "Leer más"
+
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] "Mostrando %d evento"
+msgstr[1] "Mostrando %d eventos"
 
 msgid "Spanish"
 msgstr "Español"
 
 msgid "Stage"
-msgstr ""
+msgstr "Etapa"
 
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
-msgstr ""
+msgstr "La etapa de codificación muestra el tiempo desde la primera confirmación hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."
 
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
-msgstr ""
+msgstr "La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
 
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
-msgstr ""
+msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primera confirmación."
 
 msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
-msgstr ""
+msgstr "La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirá automáticamente una vez haya finalizado por completo el ciclo de idea a producción."
 
 msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
-msgstr ""
+msgstr "La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."
 
 msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
-msgstr ""
+msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirá automáticamente una vez que se implementa en producción por primera vez."
 
+#, fuzzy
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
-msgstr ""
+msgstr "La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirá automáticamente luego de que el primer pipeline termine de ejecutarse."
 
 msgid "Total Time"
-msgstr ""
+msgstr "Tiempo total"
 
 msgid "Want to see the data? Please ask administrator for access."
+msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
+
+msgid "by"
+msgstr "por"
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] "día"
+msgstr[1] "días"
+
+msgid "hr"
 msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr "enviado por"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index b99506788c7..ab9ab88b24e 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: 2017-04-26 17:18+0100\n"
-"PO-Revision-Date: 2017-04-26 17:18+0100\n"
+"POT-Creation-Date: 2017-04-26 12:42-0500\n"
+"PO-Revision-Date: 2017-04-26 12:42-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -27,6 +27,9 @@ msgstr ""
 msgid "English"
 msgstr ""
 
+msgid "First"
+msgstr ""
+
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
@@ -45,12 +48,20 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
+msgid "Opened"
+msgstr ""
+
 msgid "Pipeline Health"
 msgstr ""
 
 msgid "Read more"
 msgstr ""
 
+msgid "Showing %d event"
+msgid_plural "Showing %d events"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "Spanish"
 msgstr ""
 
@@ -83,3 +94,22 @@ msgstr ""
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
+
+msgid "by"
+msgstr ""
+
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "hr"
+msgstr ""
+
+msgid "min"
+msgid_plural "mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "pushed by"
+msgstr ""
-- 
GitLab


From e4526e061cff78ce6dafc0bd5e3555c634161d3d Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 26 Apr 2017 20:04:33 -0500
Subject: [PATCH 26/42] Add more translation for Spanish.

---
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 .../projects/cycle_analytics/show.html.haml   |  4 +-
 lib/gitlab/cycle_analytics/code_stage.rb      |  2 +-
 lib/gitlab/cycle_analytics/issue_stage.rb     |  2 +-
 lib/gitlab/cycle_analytics/plan_stage.rb      |  2 +-
 .../cycle_analytics/production_stage.rb       |  2 +-
 lib/gitlab/cycle_analytics/review_stage.rb    |  2 +-
 lib/gitlab/cycle_analytics/staging_stage.rb   |  2 +-
 lib/gitlab/cycle_analytics/test_stage.rb      |  2 +-
 locale/de/gitlab.po                           | 27 ++++++++++++
 locale/en/gitlab.po                           | 27 ++++++++++++
 locale/es/gitlab.po                           | 44 +++++++++++++++----
 locale/gitlab.pot                             | 31 ++++++++++++-
 locale/unfound_translations.rb                |  3 ++
 16 files changed, 134 insertions(+), 22 deletions(-)
 create mode 100644 locale/unfound_translations.rb

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index d74d36711d3..ba6adc73345 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index 05ddc42e333..d5d5b005058 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index bb5976c572a..c47a743e210 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-26 16:07-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Median":["Mediana"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde la primera confirmación hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primera confirmación."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirá automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirá automáticamente una vez que se implementa en producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirá automáticamente luego de que el primer pipeline termine de ejecutarse."],"Total Time":["Tiempo total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-26 20:01-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 65afe41fe9e..9710c7a0905 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -32,7 +32,7 @@
           .row
             .col-sm-3.col-xs-12.column{ "v-for" => "item in state.summary" }
               %h3.header {{ item.value }}
-              %p.text {{ item.title }}
+              %p.text {{ __(item.title) }}
             .col-sm-3.col-xs-12.column
               .dropdown.inline.js-ca-dropdown
                 %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
@@ -60,7 +60,7 @@
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" }
               %li.event-header
                 %span.stage-name
-                  {{ __(currentStage ? currentStage.legend : 'Related Issues') }}
+                  {{ __(currentStage ? __(currentStage.legend) : __('Related Issues')) }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" }
               %li.total-time-header
                 %span.stage-name
diff --git a/lib/gitlab/cycle_analytics/code_stage.rb b/lib/gitlab/cycle_analytics/code_stage.rb
index 1e52b6614a1..afb81964847 100644
--- a/lib/gitlab/cycle_analytics/code_stage.rb
+++ b/lib/gitlab/cycle_analytics/code_stage.rb
@@ -14,7 +14,7 @@ module Gitlab
       end
 
       def legend
-        "Related Merge Requests"
+        N_("Related Merge Requests")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/issue_stage.rb b/lib/gitlab/cycle_analytics/issue_stage.rb
index 213994988a5..d36967d9497 100644
--- a/lib/gitlab/cycle_analytics/issue_stage.rb
+++ b/lib/gitlab/cycle_analytics/issue_stage.rb
@@ -15,7 +15,7 @@ module Gitlab
       end
 
       def legend
-        "Related Issues"
+        N_("Related Issues")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/plan_stage.rb b/lib/gitlab/cycle_analytics/plan_stage.rb
index 45d51d30ccc..7231c453788 100644
--- a/lib/gitlab/cycle_analytics/plan_stage.rb
+++ b/lib/gitlab/cycle_analytics/plan_stage.rb
@@ -15,7 +15,7 @@ module Gitlab
       end
 
       def legend
-        "Related Commits"
+        N_("Related Commits")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/production_stage.rb b/lib/gitlab/cycle_analytics/production_stage.rb
index 9f387a02945..451720c8121 100644
--- a/lib/gitlab/cycle_analytics/production_stage.rb
+++ b/lib/gitlab/cycle_analytics/production_stage.rb
@@ -16,7 +16,7 @@ module Gitlab
       end
 
       def legend
-        "Related Issues"
+        N_("Related Issues")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/review_stage.rb b/lib/gitlab/cycle_analytics/review_stage.rb
index 4744be834de..08e895acad6 100644
--- a/lib/gitlab/cycle_analytics/review_stage.rb
+++ b/lib/gitlab/cycle_analytics/review_stage.rb
@@ -14,7 +14,7 @@ module Gitlab
       end
 
       def legend
-        "Relative Merged Requests"
+        N_("Relative Merged Requests")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/staging_stage.rb b/lib/gitlab/cycle_analytics/staging_stage.rb
index 3cdbe04fbaf..706a5d14d3f 100644
--- a/lib/gitlab/cycle_analytics/staging_stage.rb
+++ b/lib/gitlab/cycle_analytics/staging_stage.rb
@@ -15,7 +15,7 @@ module Gitlab
       end
 
       def legend
-        "Relative Deployed Builds"
+        N_("Relative Deployed Builds")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/test_stage.rb b/lib/gitlab/cycle_analytics/test_stage.rb
index e96943833bc..887cf3e0941 100644
--- a/lib/gitlab/cycle_analytics/test_stage.rb
+++ b/lib/gitlab/cycle_analytics/test_stage.rb
@@ -14,7 +14,7 @@ module Gitlab
       end
 
       def legend
-        "Relative Builds Trigger by Commits"
+        N_("Relative Builds Trigger by Commits")
       end
 
       def description
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 747d446ebc4..0a5db8ab1e5 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -17,9 +17,15 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
+msgid "Commits"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
+msgid "Deploys"
+msgstr ""
+
 msgid "Deutsch"
 msgstr ""
 
@@ -41,6 +47,9 @@ msgstr ""
 msgid "Median"
 msgstr ""
 
+msgid "New Issues"
+msgstr ""
+
 msgid "Not available"
 msgstr ""
 
@@ -56,6 +65,24 @@ msgstr ""
 msgid "Read more"
 msgstr ""
 
+msgid "Related Commits"
+msgstr ""
+
+msgid "Related Issues"
+msgstr ""
+
+msgid "Related Merge Requests"
+msgstr ""
+
+msgid "Relative Builds Trigger by Commits"
+msgstr ""
+
+msgid "Relative Deployed Builds"
+msgstr ""
+
+msgid "Relative Merged Requests"
+msgstr ""
+
 msgid "Showing %d event"
 msgid_plural "Showing %d events"
 msgstr[0] ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index d2ecc6cd73a..fac5c3ddb02 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -17,9 +17,15 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
+msgid "Commits"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
+msgid "Deploys"
+msgstr ""
+
 msgid "Deutsch"
 msgstr ""
 
@@ -41,6 +47,9 @@ msgstr ""
 msgid "Median"
 msgstr ""
 
+msgid "New Issues"
+msgstr ""
+
 msgid "Not available"
 msgstr ""
 
@@ -56,6 +65,24 @@ msgstr ""
 msgid "Read more"
 msgstr ""
 
+msgid "Related Commits"
+msgstr ""
+
+msgid "Related Issues"
+msgstr ""
+
+msgid "Related Merge Requests"
+msgstr ""
+
+msgid "Relative Builds Trigger by Commits"
+msgstr ""
+
+msgid "Relative Deployed Builds"
+msgstr ""
+
+msgid "Relative Merged Requests"
+msgstr ""
+
 msgid "Showing %d event"
 msgid_plural "Showing %d events"
 msgstr[0] ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 404ab89c7cd..8bb4176dbf4 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-26 16:07-0500\n"
+"PO-Revision-Date: 2017-04-26 20:01-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -17,9 +17,15 @@ msgstr ""
 "Last-Translator: \n"
 "X-Generator: Poedit 2.0.1\n"
 
+msgid "Commits"
+msgstr "Cambios"
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr "Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."
 
+msgid "Deploys"
+msgstr "Despliegues"
+
 msgid "Deutsch"
 msgstr "Alemán"
 
@@ -41,6 +47,9 @@ msgstr "Últimos 90 días"
 msgid "Median"
 msgstr "Mediana"
 
+msgid "New Issues"
+msgstr "Nuevos temas"
+
 msgid "Not available"
 msgstr "No disponible"
 
@@ -56,6 +65,26 @@ msgstr "Estado del Pipeline"
 msgid "Read more"
 msgstr "Leer más"
 
+msgid "Related Commits"
+msgstr "Cambios Relacionados"
+
+msgid "Related Issues"
+msgstr "Temas Relacionados"
+
+msgid "Related Merge Requests"
+msgstr "Solicitudes de fusión Relacionadas"
+
+#, fuzzy
+msgid "Relative Builds Trigger by Commits"
+msgstr "Builds Relacionadas Originadas por Cambios"
+
+#, fuzzy
+msgid "Relative Deployed Builds"
+msgstr "Builds Desplegadas Relacionadas"
+
+msgid "Relative Merged Requests"
+msgstr "Solicitudes de fusión Relacionadas"
+
 msgid "Showing %d event"
 msgid_plural "Showing %d events"
 msgstr[0] "Mostrando %d evento"
@@ -68,29 +97,28 @@ msgid "Stage"
 msgstr "Etapa"
 
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
-msgstr "La etapa de codificación muestra el tiempo desde la primera confirmación hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."
+msgstr "La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."
 
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr "La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
 
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
-msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primera confirmación."
+msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."
 
 msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
-msgstr "La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirá automáticamente una vez haya finalizado por completo el ciclo de idea a producción."
+msgstr "La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."
 
 msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
 msgstr "La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."
 
 msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
-msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirá automáticamente una vez que se implementa en producción por primera vez."
+msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."
 
-#, fuzzy
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
-msgstr "La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirá automáticamente luego de que el primer pipeline termine de ejecutarse."
+msgstr "La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."
 
 msgid "Total Time"
-msgstr "Tiempo total"
+msgstr "Tiempo Total"
 
 msgid "Want to see the data? Please ask administrator for access."
 msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index ab9ab88b24e..9e2614cb8ba 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: 2017-04-26 12:42-0500\n"
-"PO-Revision-Date: 2017-04-26 12:42-0500\n"
+"POT-Creation-Date: 2017-04-26 19:52-0500\n"
+"PO-Revision-Date: 2017-04-26 19:52-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -18,9 +18,15 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
+msgid "Commits"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
+msgid "Deploys"
+msgstr ""
+
 msgid "Deutsch"
 msgstr ""
 
@@ -42,6 +48,9 @@ msgstr ""
 msgid "Median"
 msgstr ""
 
+msgid "New Issues"
+msgstr ""
+
 msgid "Not available"
 msgstr ""
 
@@ -57,6 +66,24 @@ msgstr ""
 msgid "Read more"
 msgstr ""
 
+msgid "Related Commits"
+msgstr ""
+
+msgid "Related Issues"
+msgstr ""
+
+msgid "Related Merge Requests"
+msgstr ""
+
+msgid "Relative Builds Trigger by Commits"
+msgstr ""
+
+msgid "Relative Deployed Builds"
+msgstr ""
+
+msgid "Relative Merged Requests"
+msgstr ""
+
 msgid "Showing %d event"
 msgid_plural "Showing %d events"
 msgstr[0] ""
diff --git a/locale/unfound_translations.rb b/locale/unfound_translations.rb
new file mode 100644
index 00000000000..a88300ba43f
--- /dev/null
+++ b/locale/unfound_translations.rb
@@ -0,0 +1,3 @@
+N_('New Issues')
+N_('Commits')
+N_('Deploys')
-- 
GitLab


From b3c80094e0db4d390522daef7a845ff2c5744bf3 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Thu, 27 Apr 2017 14:47:00 +0100
Subject: [PATCH 27/42] Added some missing text that needs translating

---
 .../components/limit_warning_component.js     |  4 ++--
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 .../projects/cycle_analytics/show.html.haml   | 10 +++++-----
 locale/de/gitlab.po                           | 15 +++++++++++++++
 locale/en/gitlab.po                           | 15 +++++++++++++++
 locale/es/gitlab.po                           | 16 ++++++++++++++++
 locale/gitlab.pot                             | 19 +++++++++++++++++--
 9 files changed, 73 insertions(+), 12 deletions(-)

diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
index 72ada943fea..6e07560040c 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
@@ -6,10 +6,10 @@ export default {
     },
   },
   template: `
-    <span v-if="count === 50" class="events-info pull-right">
+    <span v-if="count === 50 || true" class="events-info pull-right">
       <i class="fa fa-warning has-tooltip"
           aria-hidden="true"
-          title="Limited to showing 50 events at most"
+          :title="__('Limited to showing 50 events at most')"
           data-placement="top"></i>
       {{ n__('Showing %d event', 'Showing %d events', 50) }}
     </span>
diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index ba6adc73345..f59109f247f 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index d5d5b005058..ec64122d1a9 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index c47a743e210..64a4449c260 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-26 20:01-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-26 20:01-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":[""],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["por"],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 9710c7a0905..b088dfe3441 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -53,19 +53,19 @@
               %li.stage-header
                 %span.stage-name
                   {{ __('Stage') }}
-                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" }
+                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The phase of the development lifecycle."), "aria-hidden" => "true" }
               %li.median-header
                 %span.stage-name
                   {{ __('Median') }}
-                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" }
+                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."), "aria-hidden" => "true" }
               %li.event-header
                 %span.stage-name
-                  {{ __(currentStage ? __(currentStage.legend) : __('Related Issues')) }}
-                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" }
+                  {{ currentStage ? currentStage.legend : __('Related Issues') }}
+                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The collection of events added to the data gathered for that stage."), "aria-hidden" => "true" }
               %li.total-time-header
                 %span.stage-name
                   {{ __('Total Time') }}
-                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" }
+                %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The time taken by each data entry gathered by that stage."), "aria-hidden" => "true" }
         .stage-panel-body
           %nav.stage-nav
             %ul
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 0a5db8ab1e5..bbdd4e4a0be 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -44,6 +44,9 @@ msgstr ""
 msgid "Last 90 days"
 msgstr ""
 
+msgid "Limited to showing 50 events at most"
+msgstr ""
+
 msgid "Median"
 msgstr ""
 
@@ -97,9 +100,15 @@ msgstr ""
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
+msgid "The collection of events added to the data gathered for that stage."
+msgstr ""
+
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
+msgid "The phase of the development lifecycle."
+msgstr ""
+
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
@@ -115,6 +124,12 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
+msgid "The time taken by each data entry gathered by that stage."
+msgstr ""
+
+msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
+msgstr ""
+
 msgid "Total Time"
 msgstr ""
 
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index fac5c3ddb02..4942149dd1f 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -44,6 +44,9 @@ msgstr ""
 msgid "Last 90 days"
 msgstr ""
 
+msgid "Limited to showing 50 events at most"
+msgstr ""
+
 msgid "Median"
 msgstr ""
 
@@ -97,9 +100,15 @@ msgstr ""
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
+msgid "The collection of events added to the data gathered for that stage."
+msgstr ""
+
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
+msgid "The phase of the development lifecycle."
+msgstr ""
+
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
@@ -115,6 +124,12 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
+msgid "The time taken by each data entry gathered by that stage."
+msgstr ""
+
+msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
+msgstr ""
+
 msgid "Total Time"
 msgstr ""
 
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 8bb4176dbf4..bad2b6b72a2 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -44,6 +44,9 @@ msgstr "Últimos 30 días"
 msgid "Last 90 days"
 msgstr "Últimos 90 días"
 
+msgid "Limited to showing 50 events at most"
+msgstr ""
+
 msgid "Median"
 msgstr "Mediana"
 
@@ -99,9 +102,15 @@ msgstr "Etapa"
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr "La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."
 
+msgid "The collection of events added to the data gathered for that stage."
+msgstr ""
+
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr "La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
 
+msgid "The phase of the development lifecycle."
+msgstr ""
+
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."
 
@@ -117,6 +126,13 @@ msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión  y el de
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr "La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."
 
+#, fuzzy
+msgid "The time taken by each data entry gathered by that stage."
+msgstr "por"
+
+msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
+msgstr ""
+
 msgid "Total Time"
 msgstr "Tiempo Total"
 
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 9e2614cb8ba..faac5f13aed 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: 2017-04-26 19:52-0500\n"
-"PO-Revision-Date: 2017-04-26 19:52-0500\n"
+"POT-Creation-Date: 2017-04-27 14:41+0100\n"
+"PO-Revision-Date: 2017-04-27 14:41+0100\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -45,6 +45,9 @@ msgstr ""
 msgid "Last 90 days"
 msgstr ""
 
+msgid "Limited to showing 50 events at most"
+msgstr ""
+
 msgid "Median"
 msgstr ""
 
@@ -98,9 +101,15 @@ msgstr ""
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
+msgid "The collection of events added to the data gathered for that stage."
+msgstr ""
+
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr ""
 
+msgid "The phase of the development lifecycle."
+msgstr ""
+
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr ""
 
@@ -116,6 +125,12 @@ msgstr ""
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr ""
 
+msgid "The time taken by each data entry gathered by that stage."
+msgstr ""
+
+msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
+msgstr ""
+
 msgid "Total Time"
 msgstr ""
 
-- 
GitLab


From 22ecf73e823f01e155b2db2cb072120f80b9d234 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 27 Apr 2017 11:51:04 -0500
Subject: [PATCH 28/42] Adjust regex used in order to parse inline content.

e.g: %h4 {{ __('foo') }}

Problem was it was being parsed as: %h4 = _('foo')
And the correct content should be: %h4= _('foo')
---
 app/assets/javascripts/locale/de/app.js         | 2 +-
 app/assets/javascripts/locale/en/app.js         | 2 +-
 app/assets/javascripts/locale/es/app.js         | 2 +-
 config/initializers/gettext_rails_i18n_patch.rb | 4 ++--
 locale/de/gitlab.po                             | 6 ++++++
 locale/en/gitlab.po                             | 6 ++++++
 locale/es/gitlab.po                             | 8 +++++++-
 locale/gitlab.pot                               | 6 ++++++
 8 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index f59109f247f..9fd02783bdb 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index ec64122d1a9..8bc82f12171 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 64a4449c260..dfe33cb6eb9 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-26 20:01-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":[""],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["por"],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-27 11:45-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":[""],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["por"],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index 6785f361eda..616f6c45b0a 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -1,7 +1,7 @@
 require 'gettext_i18n_rails/haml_parser'
 require 'gettext_i18n_rails_js/parser/javascript'
 
-VUE_TRANSLATE_REGEX = /{{ (N|n|s)?__\((.*)\) }}/
+VUE_TRANSLATE_REGEX = /((%[\w.-]+)(?:\s))?{{ (N|n|s)?__\((.*)\) }}/
 
 module GettextI18nRails
   class HamlParser
@@ -15,7 +15,7 @@ module GettextI18nRails
     #
     # Overwrites: https://github.com/grosser/gettext_i18n_rails/blob/8396387a431e0f8ead72fc1cd425cad2fa4992f2/lib/gettext_i18n_rails/haml_parser.rb#L9
     def self.convert_to_code(text)
-      text.gsub!(VUE_TRANSLATE_REGEX, "= \\1_(\\2)")
+      text.gsub!(VUE_TRANSLATE_REGEX, "\\2= \\3_(\\4)")
 
       old_convert_to_code(text)
     end
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index bbdd4e4a0be..108273898d0 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -136,6 +136,12 @@ msgstr ""
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
 
+msgid "We don't have enough data to show this stage."
+msgstr ""
+
+msgid "You need permission."
+msgstr ""
+
 msgid "by"
 msgstr ""
 
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 4942149dd1f..b33e941a4f3 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -136,6 +136,12 @@ msgstr ""
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
 
+msgid "We don't have enough data to show this stage."
+msgstr ""
+
+msgid "You need permission."
+msgstr ""
+
 msgid "by"
 msgstr ""
 
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index bad2b6b72a2..f3d77cffecd 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-26 20:01-0500\n"
+"PO-Revision-Date: 2017-04-27 11:45-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -139,6 +139,12 @@ msgstr "Tiempo Total"
 msgid "Want to see the data? Please ask administrator for access."
 msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
 
+msgid "We don't have enough data to show this stage."
+msgstr "No hay suficientes datos para mostrar en esta etapa."
+
+msgid "You need permission."
+msgstr "Necesitas permisos."
+
 msgid "by"
 msgstr "por"
 
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index faac5f13aed..9d3be20e132 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -137,6 +137,12 @@ msgstr ""
 msgid "Want to see the data? Please ask administrator for access."
 msgstr ""
 
+msgid "We don't have enough data to show this stage."
+msgstr ""
+
+msgid "You need permission."
+msgstr ""
+
 msgid "by"
 msgstr ""
 
-- 
GitLab


From 657664f9801c90ded9ede327a7c8b11016809a29 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 27 Apr 2017 17:56:21 -0500
Subject: [PATCH 29/42] Add more spanish translations.

---
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 .../projects/cycle_analytics/show.html.haml   |  4 +-
 locale/de/gitlab.po                           | 18 +++++++++
 locale/en/gitlab.po                           | 18 +++++++++
 locale/es/gitlab.po                           | 37 +++++++++++++++----
 locale/gitlab.pot                             | 22 ++++++++++-
 locale/unfound_translations.rb                |  8 +++-
 9 files changed, 98 insertions(+), 15 deletions(-)

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index 9fd02783bdb..1b10c19c48e 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index 8bc82f12171..2754e177653 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index dfe33cb6eb9..5d1cfddf76a 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-27 11:45-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":[""],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["por"],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-27 19:15-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Cycle|Code":["Código"],"Cycle|Issue":["Tema"],"Cycle|Plan":["Planificación"],"Cycle|Review":["Revisión"],"Cycle|Staging":["Etapa"],"Cycle|Test":["Pruebas"],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":["Limitado a mostrar máximo 50 eventos"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index b088dfe3441..a1a227d2fe9 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -60,7 +60,7 @@
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."), "aria-hidden" => "true" }
               %li.event-header
                 %span.stage-name
-                  {{ currentStage ? currentStage.legend : __('Related Issues') }}
+                  {{ currentStage ? __(currentStage.legend) : __('Related Issues') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The collection of events added to the data gathered for that stage."), "aria-hidden" => "true" }
               %li.total-time-header
                 %span.stage-name
@@ -71,7 +71,7 @@
             %ul
               %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" }
                 .stage-nav-item-cell.stage-name
-                  {{ stage.title }}
+                  {{ s__('Cycle', stage.title) }}
                 .stage-nav-item-cell.stage-median
                   %template{ "v-if" => "stage.isUserAllowed" }
                     %span{ "v-if" => "stage.value" }
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 108273898d0..843648c25f1 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -23,6 +23,24 @@ msgstr ""
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
+msgid "Cycle|Code"
+msgstr ""
+
+msgid "Cycle|Issue"
+msgstr ""
+
+msgid "Cycle|Plan"
+msgstr ""
+
+msgid "Cycle|Review"
+msgstr ""
+
+msgid "Cycle|Staging"
+msgstr ""
+
+msgid "Cycle|Test"
+msgstr ""
+
 msgid "Deploys"
 msgstr ""
 
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index b33e941a4f3..e98931685d7 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -23,6 +23,24 @@ msgstr ""
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
+msgid "Cycle|Code"
+msgstr ""
+
+msgid "Cycle|Issue"
+msgstr ""
+
+msgid "Cycle|Plan"
+msgstr ""
+
+msgid "Cycle|Review"
+msgstr ""
+
+msgid "Cycle|Staging"
+msgstr ""
+
+msgid "Cycle|Test"
+msgstr ""
+
 msgid "Deploys"
 msgstr ""
 
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index f3d77cffecd..644007f5149 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-27 11:45-0500\n"
+"PO-Revision-Date: 2017-04-27 19:15-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -23,6 +23,30 @@ msgstr "Cambios"
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr "Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."
 
+#, fuzzy
+msgid "Cycle|Code"
+msgstr "Código"
+
+#, fuzzy
+msgid "Cycle|Issue"
+msgstr "Tema"
+
+#, fuzzy
+msgid "Cycle|Plan"
+msgstr "Planificación"
+
+#, fuzzy
+msgid "Cycle|Review"
+msgstr "Revisión"
+
+#, fuzzy
+msgid "Cycle|Staging"
+msgstr "Etapa"
+
+#, fuzzy
+msgid "Cycle|Test"
+msgstr "Pruebas"
+
 msgid "Deploys"
 msgstr "Despliegues"
 
@@ -45,7 +69,7 @@ msgid "Last 90 days"
 msgstr "Últimos 90 días"
 
 msgid "Limited to showing 50 events at most"
-msgstr ""
+msgstr "Limitado a mostrar máximo 50 eventos"
 
 msgid "Median"
 msgstr "Mediana"
@@ -103,13 +127,13 @@ msgid "The coding stage shows the time from the first commit to creating the mer
 msgstr "La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."
 
 msgid "The collection of events added to the data gathered for that stage."
-msgstr ""
+msgstr "La colección de eventos agregados a los datos recopilados para esa etapa."
 
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
 msgstr "La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
 
 msgid "The phase of the development lifecycle."
-msgstr ""
+msgstr "La etapa del ciclo de vida del desarrollo."
 
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
 msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."
@@ -126,12 +150,11 @@ msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión  y el de
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr "La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."
 
-#, fuzzy
 msgid "The time taken by each data entry gathered by that stage."
-msgstr "por"
+msgstr "El tiempo utilizado por cada entrada de datos obtenido por esa etapa."
 
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
-msgstr ""
+msgstr "El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."
 
 msgid "Total Time"
 msgstr "Tiempo Total"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 9d3be20e132..1b60f9dad7a 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: 2017-04-27 14:41+0100\n"
-"PO-Revision-Date: 2017-04-27 14:41+0100\n"
+"POT-Creation-Date: 2017-04-27 19:13-0500\n"
+"PO-Revision-Date: 2017-04-27 19:13-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -24,6 +24,24 @@ msgstr ""
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
+msgid "Cycle|Code"
+msgstr ""
+
+msgid "Cycle|Issue"
+msgstr ""
+
+msgid "Cycle|Plan"
+msgstr ""
+
+msgid "Cycle|Review"
+msgstr ""
+
+msgid "Cycle|Staging"
+msgstr ""
+
+msgid "Cycle|Test"
+msgstr ""
+
 msgid "Deploys"
 msgstr ""
 
diff --git a/locale/unfound_translations.rb b/locale/unfound_translations.rb
index a88300ba43f..e38b49b48a1 100644
--- a/locale/unfound_translations.rb
+++ b/locale/unfound_translations.rb
@@ -1,3 +1,9 @@
-N_('New Issues')
 N_('Commits')
+N_('Cycle|Code')
+N_('Cycle|Issue')
+N_('Cycle|Plan')
+N_('Cycle|Review')
+N_('Cycle|Staging')
+N_('Cycle|Test')
 N_('Deploys')
+N_('New Issues')
-- 
GitLab


From d14397ff956e6f56bedf7737f51f8da154a9da64 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Fri, 28 Apr 2017 10:49:28 +0100
Subject: [PATCH 30/42] Fixed context translation Fixes CSS widths when
 translating

---
 .../components/limit_warning_component.js            |  2 +-
 app/assets/javascripts/locale/index.js               |  5 ++++-
 app/assets/stylesheets/pages/cycle_analytics.scss    | 12 ++++--------
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
index 6e07560040c..c43a4506755 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
@@ -6,7 +6,7 @@ export default {
     },
   },
   template: `
-    <span v-if="count === 50 || true" class="events-info pull-right">
+    <span v-if="count === 50" class="events-info pull-right">
       <i class="fa fa-warning has-tooltip"
           aria-hidden="true"
           :title="__('Limited to showing 50 events at most')"
diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index 3907b0e2aba..ca3ed69fbb3 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -13,7 +13,10 @@ const lang = document.querySelector('html').getAttribute('lang') || 'en';
 const locale = new Jed(locales[lang]);
 const gettext = locale.gettext.bind(locale);
 const ngettext = locale.ngettext.bind(locale);
-const pgettext = locale.pgettext.bind(locale);
+const pgettext = (context, key) => {
+  const joinedKey = [context, key].join('|');
+  return gettext(joinedKey).split('|').pop();
+};
 
 export { lang };
 export { gettext as __ };
diff --git a/app/assets/stylesheets/pages/cycle_analytics.scss b/app/assets/stylesheets/pages/cycle_analytics.scss
index ad3dbc7ac48..182909627bb 100644
--- a/app/assets/stylesheets/pages/cycle_analytics.scss
+++ b/app/assets/stylesheets/pages/cycle_analytics.scss
@@ -213,7 +213,7 @@
     }
 
     .stage-nav-item {
-      display: block;
+      display: flex;
       line-height: 65px;
       border-top: 1px solid transparent;
       border-bottom: 1px solid transparent;
@@ -247,14 +247,10 @@
       }
 
       .stage-nav-item-cell {
-        float: left;
-
-        &.stage-name {
-          width: 65%;
-        }
-
         &.stage-median {
-          width: 35%;
+          margin-left: auto;
+          margin-right: $gl-padding;
+          min-width: calc(35% - #{$gl-padding});
         }
       }
 
-- 
GitLab


From 3b82444eb7791e58e3e0ba2f08b8ccde48e3d4c6 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Tue, 2 May 2017 13:13:28 -0500
Subject: [PATCH 31/42] Fix Rubocop complains.

---
 .../initializers/gettext_rails_i18n_patch.rb  |  1 -
 lib/tasks/gettext.rake                        | 23 ++-----------------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb
index 616f6c45b0a..69118f464ca 100644
--- a/config/initializers/gettext_rails_i18n_patch.rb
+++ b/config/initializers/gettext_rails_i18n_patch.rb
@@ -25,7 +25,6 @@ end
 module GettextI18nRailsJs
   module Parser
     module Javascript
-
       # This is required to tell the `rake gettext:find` script to use the Javascript
       # parser for *.vue files.
       #
diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake
index cc18616d2a7..0aa21a4bd13 100644
--- a/lib/tasks/gettext.rake
+++ b/lib/tasks/gettext.rake
@@ -4,27 +4,8 @@ namespace :gettext do
   # Customize list of translatable files
   # See: https://github.com/grosser/gettext_i18n_rails#customizing-list-of-translatable-files
   def files_to_translate
-    folders = [
-      "app",
-      "lib",
-      "config",
-      locale_path
-    ].join(",")
-
-    exts = [
-      "rb",
-      "erb",
-      "haml",
-      "slim",
-      "rhtml",
-      "js",
-      "jsx",
-      "vue",
-      "coffee",
-      "handlebars",
-      "hbs",
-      "mustache"
-    ].join(",")
+    folders = %W(app lib config #{locale_path}).join(',')
+    exts = %w(rb erb haml slim rhtml js jsx vue coffee handlebars hbs mustache).join(',')
 
     Dir.glob(
       "{#{folders}}/**/*.{#{exts}}"
-- 
GitLab


From 6d5364cfb0e39f49afac9b465f37bd19185c3755 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Tue, 2 May 2017 23:36:36 -0500
Subject: [PATCH 32/42] First round of updates from the code review.

---
 .../components/stage_code_component.js        |  2 +-
 .../components/stage_issue_component.js       |  2 +-
 .../components/stage_plan_component.js        |  2 +-
 .../components/stage_production_component.js  |  2 +-
 .../components/stage_review_component.js      |  2 +-
 .../components/stage_staging_component.js     |  2 +-
 .../components/total_time_component.js        |  6 +-
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 app/controllers/application_controller.rb     | 15 +++--
 app/controllers/profiles_controller.rb        |  1 -
 .../projects/cycle_analytics_controller.rb    |  1 -
 app/models/user.rb                            |  1 +
 app/views/profiles/show.html.haml             |  2 +-
 .../projects/cycle_analytics/show.html.haml   |  2 +-
 config/initializers/fast_gettext.rb           |  4 +-
 ...3035209_add_preferred_language_to_users.rb |  4 +-
 lib/gitlab/i18n.rb                            | 12 +++-
 locale/de/gitlab.po                           | 51 +++++++++--------
 locale/en/gitlab.po                           | 51 +++++++++--------
 locale/es/gitlab.po                           | 54 +++++++++---------
 locale/gitlab.pot                             | 55 +++++++++----------
 23 files changed, 143 insertions(+), 134 deletions(-)

diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
index 0bd15ee773d..f22299898a5 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageCodeComponent = Vue.extend({
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              {{ __('by') }}
+              {{ __('Author|by') }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
           </div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
index b6bf9a2572e..f400fd2fb14 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageIssueComponent = Vue.extend({
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-              {{ __('by') }}
+              {{ __('Author|by') }}
               <a :href="issue.author.webUrl" class="issue-author-link">
                 {{ issue.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
index 116c118b824..b85b8902fc7 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
@@ -31,7 +31,7 @@ global.cycleAnalytics.StagePlanComponent = Vue.extend({
               </a>
             </h5>
             <span>
-              {{ __('First') }}
+              {{ __('OfFirstTime|First') }}
               <span class="commit-icon">${iconCommit}</span>
               <a :href="commit.commitUrl" class="commit-hash-link monospace">{{ commit.shortSha }}</a>
               {{ __('pushed by') }}
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
index 18fb09d6d2f..18c30f490fd 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageProductionComponent = Vue.extend({
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-            {{ __('by') }}
+            {{ __('Author|by') }}
             <a :href="issue.author.webUrl" class="issue-author-link">
               {{ issue.author.name }}
             </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
index af5f1b42ea2..98806760128 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageReviewComponent = Vue.extend({
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              {{ __('by') }}
+              {{ __('Author|by') }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
             <template v-if="mergeRequest.state === 'closed'">
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
index a0bd1bab96e..f13294c7af7 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageStagingComponent = Vue.extend({
             </h5>
             <span>
               <a :href="build.url" class="build-date">{{ build.date }}</a>
-              {{ __('by') }}
+              {{ __('Author|by') }}
               <a :href="build.author.webUrl" class="issue-author-link">
                 {{ build.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
index 48cc0a5c58d..1eef7d9a873 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -13,9 +13,9 @@ global.cycleAnalytics.TotalTimeComponent = Vue.extend({
     <span class="total-time">
       <template v-if="Object.keys(time).length">
         <template v-if="time.days">{{ time.days }} <span>{{ n__('day', 'days', time.days) }}</span></template>
-        <template v-if="time.hours">{{ time.hours }} <span>{{ __('hr') }}</span></template>
-        <template v-if="time.mins && !time.days">{{ time.mins }} <span>{{ n__('min', 'mins', time.mins) }}</span></template>
-        <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template>
+        <template v-if="time.hours">{{ time.hours }} <span>{{ n__('Time|hr', 'Time|hrs', time.hours) }}</span></template>
+        <template v-if="time.mins && !time.days">{{ time.mins }} <span>{{ n__('Time|min', 'Time|mins', time.mins) }}</span></template>
+        <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>{{ __('Time|s') }}</span></template>
       </template>
       <template v-else>
         --
diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index 1b10c19c48e..51c5ad512fc 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index 2754e177653..68beb0afda0 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Deutsch":[""],"English":[""],"First":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"Opened":[""],"Pipeline Health":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"Spanish":[""],"Stage":[""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"by":[""],"day":["",""],"hr":[""],"min":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 5d1cfddf76a..511c70b30a6 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-27 19:15-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Cycle|Code":["Código"],"Cycle|Issue":["Tema"],"Cycle|Plan":["Planificación"],"Cycle|Review":["Revisión"],"Cycle|Staging":["Etapa"],"Cycle|Test":["Pruebas"],"Deploys":["Despliegues"],"Deutsch":["Alemán"],"English":["Inglés"],"First":["Primer"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":["Limitado a mostrar máximo 50 eventos"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"Spanish":["Español"],"Stage":["Etapa"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"by":["por"],"day":["día","días"],"hr":[""],"min":["",""],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-02 23:17-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":["por"],"Commits":["Cambios"],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Cycle|Code":["Código"],"Cycle|Issue":["Tema"],"Cycle|Plan":["Planificación"],"Cycle|Review":["Revisión"],"Cycle|Staging":["Etapa"],"Cycle|Test":["Pruebas"],"Deploys":["Despliegues"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":["Limitado a mostrar máximo 50 eventos"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OfFirstTime|First":["Primer"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f2997d0b0c4..24017e8ea40 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -21,6 +21,8 @@ class ApplicationController < ActionController::Base
   before_action :configure_permitted_parameters, if: :devise_controller?
   before_action :require_email, unless: :devise_controller?
 
+  around_action :set_locale
+
   protect_from_forgery with: :exception
 
   helper_method :can?, :current_application_settings
@@ -271,9 +273,14 @@ class ApplicationController < ActionController::Base
   end
 
   def set_locale
-    requested_locale = current_user&.preferred_language || request.env['HTTP_ACCEPT_LANGUAGE'] || I18n.default_locale
-    locale = FastGettext.set_locale(requested_locale)
-
-    I18n.locale = locale
+    begin
+      requested_locale = current_user&.preferred_language || I18n.default_locale
+      locale = FastGettext.set_locale(requested_locale)
+      I18n.locale = locale
+
+      yield
+    ensure
+      I18n.locale = I18n.default_locale
+    end
   end
 end
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 0f01bf7e706..57e23cea00e 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -3,7 +3,6 @@ class ProfilesController < Profiles::ApplicationController
 
   before_action :user
   before_action :authorize_change_username!, only: :update_username
-  before_action :set_locale, only: :show
   skip_before_action :require_email, only: [:show, :update]
 
   def show
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 7ef8872a90b..88ac3ad046b 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -4,7 +4,6 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
   include CycleAnalyticsParams
 
   before_action :authorize_read_cycle_analytics!
-  before_action :set_locale, only: :show
 
   def show
     @cycle_analytics = ::CycleAnalytics.new(@project, options(cycle_analytics_params))
diff --git a/app/models/user.rb b/app/models/user.rb
index 2b7ebe6c1a7..43c5fdc038d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -23,6 +23,7 @@ class User < ActiveRecord::Base
   default_value_for :hide_no_password, false
   default_value_for :project_view, :files
   default_value_for :notified_of_own_activity, false
+  default_value_for :preferred_language, I18n.default_locale
 
   attr_encrypted :otp_secret,
     key:       Gitlab::Application.secrets.otp_key_base,
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 9846f01603f..6e14be62e32 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -74,7 +74,7 @@
         %span.help-block This email will be displayed on your public profile.
       .form-group
         = f.label :preferred_language, class: "label-light"
-        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |value, label| [_(label), value] },
+        = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |value, label| [label, value] },
           {}, class: "select2"
       .form-group
         = f.label :skype, class: "label-light"
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index a1a227d2fe9..a8ce021e05f 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -52,7 +52,7 @@
             %ul
               %li.stage-header
                 %span.stage-name
-                  {{ __('Stage') }}
+                  {{ __('ProjectLifecycle|Stage') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The phase of the development lifecycle."), "aria-hidden" => "true" }
               %li.median-header
                 %span.stage-name
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
index 10a3ee02b85..bea85b43b95 100644
--- a/config/initializers/fast_gettext.rb
+++ b/config/initializers/fast_gettext.rb
@@ -1,3 +1,5 @@
 FastGettext.add_text_domain 'gitlab', path: 'locale', type: :po
 FastGettext.default_text_domain = 'gitlab'
-FastGettext.default_available_locales = Gitlab::I18n::AVAILABLE_LANGUAGES.keys
+FastGettext.default_available_locales = Gitlab::I18n.available_locales
+
+I18n.available_locales = Gitlab::I18n.available_locales
diff --git a/db/migrate/20170413035209_add_preferred_language_to_users.rb b/db/migrate/20170413035209_add_preferred_language_to_users.rb
index 6fe91656eeb..92f1d6f2436 100644
--- a/db/migrate/20170413035209_add_preferred_language_to_users.rb
+++ b/db/migrate/20170413035209_add_preferred_language_to_users.rb
@@ -6,10 +6,8 @@ class AddPreferredLanguageToUsers < ActiveRecord::Migration
 
   DOWNTIME = false
 
-  disable_ddl_transaction!
-
   def up
-    add_column_with_default :users, :preferred_language, :string, default: 'en'
+    add_column :users, :preferred_language, :string
   end
 
   def down
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
index 64a86b55c7f..a7addee0dcd 100644
--- a/lib/gitlab/i18n.rb
+++ b/lib/gitlab/i18n.rb
@@ -1,9 +1,15 @@
 module Gitlab
   module I18n
+    extend self
+
     AVAILABLE_LANGUAGES = {
-      'en' => N_('English'),
-      'es' => N_('Spanish'),
-      'de' => N_('Deutsch')
+      en: 'English',
+      es: 'Español',
+      de: 'Deutsch'
     }.freeze
+
+    def available_locales
+      AVAILABLE_LANGUAGES.keys
+    end
   end
 end
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 843648c25f1..beeca35b879 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -17,9 +17,15 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
+msgid "Author|by"
+msgstr ""
+
 msgid "Commits"
 msgstr ""
 
+msgid "Cycle"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
@@ -44,15 +50,6 @@ msgstr ""
 msgid "Deploys"
 msgstr ""
 
-msgid "Deutsch"
-msgstr ""
-
-msgid "English"
-msgstr ""
-
-msgid "First"
-msgstr ""
-
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
@@ -77,12 +74,18 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
+msgid "OfFirstTime|First"
+msgstr ""
+
 msgid "Opened"
 msgstr ""
 
 msgid "Pipeline Health"
 msgstr ""
 
+msgid "ProjectLifecycle|Stage"
+msgstr ""
+
 msgid "Read more"
 msgstr ""
 
@@ -109,12 +112,6 @@ msgid_plural "Showing %d events"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Spanish"
-msgstr ""
-
-msgid "Stage"
-msgstr ""
-
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -148,6 +145,19 @@ msgstr ""
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr ""
 
+msgid "Time|hr"
+msgid_plural "Time|hrs"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|min"
+msgid_plural "Time|mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|s"
+msgstr ""
+
 msgid "Total Time"
 msgstr ""
 
@@ -160,21 +170,10 @@ msgstr ""
 msgid "You need permission."
 msgstr ""
 
-msgid "by"
-msgstr ""
-
 msgid "day"
 msgid_plural "days"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
 msgid "pushed by"
 msgstr ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index e98931685d7..9596531fdbd 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -17,9 +17,15 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
+msgid "Author|by"
+msgstr ""
+
 msgid "Commits"
 msgstr ""
 
+msgid "Cycle"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
@@ -44,15 +50,6 @@ msgstr ""
 msgid "Deploys"
 msgstr ""
 
-msgid "Deutsch"
-msgstr ""
-
-msgid "English"
-msgstr ""
-
-msgid "First"
-msgstr ""
-
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
@@ -77,12 +74,18 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
+msgid "OfFirstTime|First"
+msgstr ""
+
 msgid "Opened"
 msgstr ""
 
 msgid "Pipeline Health"
 msgstr ""
 
+msgid "ProjectLifecycle|Stage"
+msgstr ""
+
 msgid "Read more"
 msgstr ""
 
@@ -109,12 +112,6 @@ msgid_plural "Showing %d events"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Spanish"
-msgstr ""
-
-msgid "Stage"
-msgstr ""
-
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -148,6 +145,19 @@ msgstr ""
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr ""
 
+msgid "Time|hr"
+msgid_plural "Time|hrs"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|min"
+msgid_plural "Time|mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|s"
+msgstr ""
+
 msgid "Total Time"
 msgstr ""
 
@@ -160,21 +170,10 @@ msgstr ""
 msgid "You need permission."
 msgstr ""
 
-msgid "by"
-msgstr ""
-
 msgid "day"
 msgid_plural "days"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
 msgid "pushed by"
 msgstr ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 644007f5149..56f889c7141 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-04-27 19:15-0500\n"
+"PO-Revision-Date: 2017-05-02 23:17-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -17,9 +17,15 @@ msgstr ""
 "Last-Translator: \n"
 "X-Generator: Poedit 2.0.1\n"
 
+msgid "Author|by"
+msgstr "por"
+
 msgid "Commits"
 msgstr "Cambios"
 
+msgid "Cycle"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr "Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."
 
@@ -50,15 +56,6 @@ msgstr "Pruebas"
 msgid "Deploys"
 msgstr "Despliegues"
 
-msgid "Deutsch"
-msgstr "Alemán"
-
-msgid "English"
-msgstr "Inglés"
-
-msgid "First"
-msgstr "Primer"
-
 msgid "Introducing Cycle Analytics"
 msgstr "Introducción a Cycle Analytics"
 
@@ -83,12 +80,19 @@ msgstr "No disponible"
 msgid "Not enough data"
 msgstr "No hay suficientes datos"
 
+#, fuzzy
+msgid "OfFirstTime|First"
+msgstr "Primer"
+
 msgid "Opened"
 msgstr "Abiertos"
 
 msgid "Pipeline Health"
 msgstr "Estado del Pipeline"
 
+msgid "ProjectLifecycle|Stage"
+msgstr "Etapa"
+
 msgid "Read more"
 msgstr "Leer más"
 
@@ -117,12 +121,6 @@ msgid_plural "Showing %d events"
 msgstr[0] "Mostrando %d evento"
 msgstr[1] "Mostrando %d eventos"
 
-msgid "Spanish"
-msgstr "Español"
-
-msgid "Stage"
-msgstr "Etapa"
-
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr "La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."
 
@@ -156,6 +154,19 @@ msgstr "El tiempo utilizado por cada entrada de datos obtenido por esa etapa."
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr "El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."
 
+msgid "Time|hr"
+msgid_plural "Time|hrs"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|min"
+msgid_plural "Time|mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|s"
+msgstr ""
+
 msgid "Total Time"
 msgstr "Tiempo Total"
 
@@ -168,21 +179,10 @@ msgstr "No hay suficientes datos para mostrar en esta etapa."
 msgid "You need permission."
 msgstr "Necesitas permisos."
 
-msgid "by"
-msgstr "por"
-
 msgid "day"
 msgid_plural "days"
 msgstr[0] "día"
 msgstr[1] "días"
 
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
 msgid "pushed by"
 msgstr "enviado por"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 1b60f9dad7a..956e05926e1 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: 2017-04-27 19:13-0500\n"
-"PO-Revision-Date: 2017-04-27 19:13-0500\n"
+"POT-Creation-Date: 2017-05-02 23:33-0500\n"
+"PO-Revision-Date: 2017-05-02 23:33-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -18,9 +18,15 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
+msgid "Author|by"
+msgstr ""
+
 msgid "Commits"
 msgstr ""
 
+msgid "Cycle"
+msgstr ""
+
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
@@ -45,15 +51,6 @@ msgstr ""
 msgid "Deploys"
 msgstr ""
 
-msgid "Deutsch"
-msgstr ""
-
-msgid "English"
-msgstr ""
-
-msgid "First"
-msgstr ""
-
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
@@ -78,12 +75,18 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
+msgid "OfFirstTime|First"
+msgstr ""
+
 msgid "Opened"
 msgstr ""
 
 msgid "Pipeline Health"
 msgstr ""
 
+msgid "ProjectLifecycle|Stage"
+msgstr ""
+
 msgid "Read more"
 msgstr ""
 
@@ -110,12 +113,6 @@ msgid_plural "Showing %d events"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Spanish"
-msgstr ""
-
-msgid "Stage"
-msgstr ""
-
 msgid "The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request."
 msgstr ""
 
@@ -149,6 +146,19 @@ msgstr ""
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr ""
 
+msgid "Time|hr"
+msgid_plural "Time|hrs"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|min"
+msgid_plural "Time|mins"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Time|s"
+msgstr ""
+
 msgid "Total Time"
 msgstr ""
 
@@ -161,21 +171,10 @@ msgstr ""
 msgid "You need permission."
 msgstr ""
 
-msgid "by"
-msgstr ""
-
 msgid "day"
 msgid_plural "days"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "hr"
-msgstr ""
-
-msgid "min"
-msgid_plural "mins"
-msgstr[0] ""
-msgstr[1] ""
-
 msgid "pushed by"
 msgstr ""
-- 
GitLab


From 93f27958d02389b3550d25470ccd29b304005e96 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 3 May 2017 12:02:26 +0100
Subject: [PATCH 33/42] Updated some JS translate methods to correctly take in
 context

---
 .../components/limit_warning_component.js     |  2 +-
 .../components/total_time_component.js        |  2 +-
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 app/assets/javascripts/locale/index.js        | 21 +++++++++++--------
 .../javascripts/vue_shared/translate.js       | 12 ++++++++---
 .../cycle_analytics/_no_access.html.haml      |  2 +-
 .../projects/cycle_analytics/show.html.haml   | 13 ++++++------
 locale/de/gitlab.po                           | 17 ++++++++-------
 locale/en/gitlab.po                           | 17 ++++++++-------
 locale/es/gitlab.po                           | 18 +++++++++-------
 locale/gitlab.pot                             | 21 ++++++++++---------
 13 files changed, 72 insertions(+), 59 deletions(-)

diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
index c43a4506755..8d3d34f836f 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.js
@@ -9,7 +9,7 @@ export default {
     <span v-if="count === 50" class="events-info pull-right">
       <i class="fa fa-warning has-tooltip"
           aria-hidden="true"
-          :title="__('Limited to showing 50 events at most')"
+          :title="n__('Limited to showing %d event at most', 'Limited to showing %d events at most', 50)"
           data-placement="top"></i>
       {{ n__('Showing %d event', 'Showing %d events', 50) }}
     </span>
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
index 1eef7d9a873..d5e6167b2a8 100644
--- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js
@@ -15,7 +15,7 @@ global.cycleAnalytics.TotalTimeComponent = Vue.extend({
         <template v-if="time.days">{{ time.days }} <span>{{ n__('day', 'days', time.days) }}</span></template>
         <template v-if="time.hours">{{ time.hours }} <span>{{ n__('Time|hr', 'Time|hrs', time.hours) }}</span></template>
         <template v-if="time.mins && !time.days">{{ time.mins }} <span>{{ n__('Time|min', 'Time|mins', time.mins) }}</span></template>
-        <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>{{ __('Time|s') }}</span></template>
+        <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>{{ s__('Time|s') }}</span></template>
       </template>
       <template v-else>
         --
diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index 51c5ad512fc..a7922e911bd 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index 68beb0afda0..3ed43559e74 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last 30 days":[""],"Last 90 days":[""],"Limited to showing 50 events at most":[""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 511c70b30a6..b91dcbd1ff3 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-02 23:17-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":["por"],"Commits":["Cambios"],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Cycle|Code":["Código"],"Cycle|Issue":["Tema"],"Cycle|Plan":["Planificación"],"Cycle|Review":["Revisión"],"Cycle|Staging":["Etapa"],"Cycle|Test":["Pruebas"],"Deploys":["Despliegues"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last 30 days":["Últimos 30 días"],"Last 90 days":["Últimos 90 días"],"Limited to showing 50 events at most":["Limitado a mostrar máximo 50 eventos"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OfFirstTime|First":["Primer"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-02 23:17-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":["por"],"Commits":["Cambios"],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Cycle|Code":["Código"],"Cycle|Issue":["Tema"],"Cycle|Plan":["Planificación"],"Cycle|Review":["Revisión"],"Cycle|Staging":["Etapa"],"Cycle|Test":["Pruebas"],"Deploys":["Despliegues"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OfFirstTime|First":["Primer"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index ca3ed69fbb3..3b23e3a69d4 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -1,15 +1,18 @@
 import Jed from 'jed';
-import { de } from './de/app';
-import { es } from './es/app';
-import { en } from './en/app';
 
-const locales = {
-  de,
-  es,
-  en,
-};
+function requireAll(requireContext) { return requireContext.keys().map(requireContext); }
+
+const allLocales = requireAll(require.context('./', true, /^(?!.*(?:index.js$)).*\.js$/));
+const locales = allLocales.reduce((d, obj) => {
+  const data = d;
+  const localeKey = Object.keys(obj)[0];
+
+  data[localeKey] = obj[localeKey];
+
+  return data;
+}, {});
 
-const lang = document.querySelector('html').getAttribute('lang') || 'en';
+const lang = document.querySelector('html').getAttribute('lang').replace(/-/g, '_') || 'en';
 const locale = new Jed(locales[lang]);
 const gettext = locale.gettext.bind(locale);
 const ngettext = locale.ngettext.bind(locale);
diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js
index c2c20ea0853..07ef00c10d0 100644
--- a/app/assets/javascripts/vue_shared/translate.js
+++ b/app/assets/javascripts/vue_shared/translate.js
@@ -1,7 +1,6 @@
 import {
   __,
   n__,
-  s__,
 } from '../locale';
 
 export default (Vue) => {
@@ -9,9 +8,16 @@ export default (Vue) => {
     methods: {
       __(text) { return __(text); },
       n__(text, pluralText, count) {
-        return n__(text, pluralText, count).replace(/%d/g, count);
+        const translated = n__(text, pluralText, count).replace(/%d/g, count).split('|');
+        return translated[translated.length - 1];
+      },
+      s__(keyOrContext, key) {
+        const normalizedKey = key ? `${keyOrContext}|${key}` : keyOrContext;
+        // eslint-disable-next-line no-underscore-dangle
+        const translated = this.__(normalizedKey).split('|');
+
+        return translated[translated.length - 1];
       },
-      s__(context, key) { return s__(context, key); },
     },
   });
 };
diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml
index dcfd1b7afc0..c3eda398234 100644
--- a/app/views/projects/cycle_analytics/_no_access.html.haml
+++ b/app/views/projects/cycle_analytics/_no_access.html.haml
@@ -4,4 +4,4 @@
       = custom_icon ('icon_lock')
     %h4 {{ __('You need permission.') }}
     %p
-      {{ __('Want to see the data? Please ask administrator for access.') }}
+      {{ __('Want to see the data? Please ask an administrator for access.') }}
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index a8ce021e05f..376b1369405 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -20,8 +20,7 @@
           %p
             {{ __('Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.') }}
 
-          = link_to help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' do
-            {{ __('Read more') }}
+          = link_to _('Read more'), help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn'
   = icon("spinner spin", "v-show" => "isLoading")
   .wrapper{ "v-show" => "!isLoading && !hasError" }
     .panel.panel-default
@@ -32,19 +31,19 @@
           .row
             .col-sm-3.col-xs-12.column{ "v-for" => "item in state.summary" }
               %h3.header {{ item.value }}
-              %p.text {{ __(item.title) }}
+              %p.text {{ s__('Cycle', item.title) }}
             .col-sm-3.col-xs-12.column
               .dropdown.inline.js-ca-dropdown
                 %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
-                  %span.dropdown-label {{ __('Last 30 days') }}
+                  %span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }}
                   %i.fa.fa-chevron-down
                 %ul.dropdown-menu.dropdown-menu-align-right
                   %li
                     %a{ "href" => "#", "data-value" => "30" }
-                      {{ __('Last 30 days') }}
+                      {{ n__('Last %d day', 'Last %d days', 30) }}
                   %li
                     %a{ "href" => "#", "data-value" => "90" }
-                      {{ __('Last 90 days') }}
+                      {{ n__('Last %d day', 'Last %d days', 90) }}
     .stage-panel-container
       .panel.panel-default.stage-panel
         .panel-heading
@@ -52,7 +51,7 @@
             %ul
               %li.stage-header
                 %span.stage-name
-                  {{ __('ProjectLifecycle|Stage') }}
+                  {{ s__('ProjectLifecycle|Stage') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The phase of the development lifecycle."), "aria-hidden" => "true" }
               %li.median-header
                 %span.stage-name
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index beeca35b879..d2ea50e5a78 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -53,14 +53,15 @@ msgstr ""
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
-msgid "Last 30 days"
-msgstr ""
-
-msgid "Last 90 days"
-msgstr ""
+msgid "Last %d day"
+msgid_plural "Last %d days"
+msgstr[0] ""
+msgstr[1] ""
 
-msgid "Limited to showing 50 events at most"
-msgstr ""
+msgid "Limited to showing %d event at most"
+msgid_plural "Limited to showing %d events at most"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Median"
 msgstr ""
@@ -161,7 +162,7 @@ msgstr ""
 msgid "Total Time"
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
+msgid "Want to see the data? Please ask an administrator for access."
 msgstr ""
 
 msgid "We don't have enough data to show this stage."
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 9596531fdbd..f473ce2e0dc 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -53,14 +53,15 @@ msgstr ""
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
-msgid "Last 30 days"
-msgstr ""
-
-msgid "Last 90 days"
-msgstr ""
+msgid "Last %d day"
+msgid_plural "Last %d days"
+msgstr[0] ""
+msgstr[1] ""
 
-msgid "Limited to showing 50 events at most"
-msgstr ""
+msgid "Limited to showing %d event at most"
+msgid_plural "Limited to showing %d events at most"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Median"
 msgstr ""
@@ -161,7 +162,7 @@ msgstr ""
 msgid "Total Time"
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
+msgid "Want to see the data? Please ask an administrator for access."
 msgstr ""
 
 msgid "We don't have enough data to show this stage."
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 56f889c7141..91135a983f6 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -59,14 +59,15 @@ msgstr "Despliegues"
 msgid "Introducing Cycle Analytics"
 msgstr "Introducción a Cycle Analytics"
 
-msgid "Last 30 days"
-msgstr "Últimos 30 días"
-
-msgid "Last 90 days"
-msgstr "Últimos 90 días"
+#, fuzzy
+msgid "Last %d day"
+msgid_plural "Last %d days"
+msgstr[0] "Últimos %d días"
 
-msgid "Limited to showing 50 events at most"
-msgstr "Limitado a mostrar máximo 50 eventos"
+#, fuzzy
+msgid "Limited to showing %d event at most"
+msgid_plural "Limited to showing %d events at most"
+msgstr[0] "Limitado a mostrar máximo %d eventos"
 
 msgid "Median"
 msgstr "Mediana"
@@ -170,7 +171,8 @@ msgstr ""
 msgid "Total Time"
 msgstr "Tiempo Total"
 
-msgid "Want to see the data? Please ask administrator for access."
+#, fuzzy
+msgid "Want to see the data? Please ask an administrator for access."
 msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
 
 msgid "We don't have enough data to show this stage."
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 956e05926e1..bc16b7a0968 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: 2017-05-02 23:33-0500\n"
-"PO-Revision-Date: 2017-05-02 23:33-0500\n"
+"POT-Creation-Date: 2017-05-03 12:00+0100\n"
+"PO-Revision-Date: 2017-05-03 12:00+0100\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -54,14 +54,15 @@ msgstr ""
 msgid "Introducing Cycle Analytics"
 msgstr ""
 
-msgid "Last 30 days"
-msgstr ""
-
-msgid "Last 90 days"
-msgstr ""
+msgid "Last %d day"
+msgid_plural "Last %d days"
+msgstr[0] ""
+msgstr[1] ""
 
-msgid "Limited to showing 50 events at most"
-msgstr ""
+msgid "Limited to showing %d event at most"
+msgid_plural "Limited to showing %d events at most"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Median"
 msgstr ""
@@ -162,7 +163,7 @@ msgstr ""
 msgid "Total Time"
 msgstr ""
 
-msgid "Want to see the data? Please ask administrator for access."
+msgid "Want to see the data? Please ask an administrator for access."
 msgstr ""
 
 msgid "We don't have enough data to show this stage."
-- 
GitLab


From 9c78b17a113c593d5d1d2370688ac814a4d0f3a2 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 3 May 2017 13:33:12 +0100
Subject: [PATCH 34/42] Fixed karma failure

---
 app/assets/javascripts/locale/index.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index 3b23e3a69d4..c9df5f3723a 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -12,7 +12,9 @@ const locales = allLocales.reduce((d, obj) => {
   return data;
 }, {});
 
-const lang = document.querySelector('html').getAttribute('lang').replace(/-/g, '_') || 'en';
+let lang = document.querySelector('html').getAttribute('lang') || 'en';
+lang = lang.replace(/-/g, '_');
+
 const locale = new Jed(locales[lang]);
 const gettext = locale.gettext.bind(locale);
 const ngettext = locale.ngettext.bind(locale);
-- 
GitLab


From ee65de48d8285ec86b83ad6bb0bf95f23d53c6ce Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 3 May 2017 12:40:21 -0500
Subject: [PATCH 35/42] More translations updates.

---
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 .../projects/cycle_analytics/show.html.haml   |  4 +-
 lib/gitlab/cycle_analytics/code_stage.rb      |  2 +-
 lib/gitlab/cycle_analytics/issue_stage.rb     |  2 +-
 lib/gitlab/cycle_analytics/plan_stage.rb      |  2 +-
 .../cycle_analytics/production_stage.rb       |  2 +-
 lib/gitlab/cycle_analytics/review_stage.rb    |  2 +-
 lib/gitlab/cycle_analytics/staging_stage.rb   |  2 +-
 lib/gitlab/cycle_analytics/test_stage.rb      |  2 +-
 locale/de/gitlab.po                           | 19 ++++---
 locale/en/gitlab.po                           | 19 ++++---
 locale/es/gitlab.po                           | 56 +++++++++----------
 locale/gitlab.pot                             | 23 ++++----
 locale/unfound_translations.rb                | 13 +++--
 16 files changed, 79 insertions(+), 75 deletions(-)

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index a7922e911bd..e1e4a2b7138 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index 3ed43559e74..c14e7b41ad1 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"Cycle|Code":[""],"Cycle|Issue":[""],"Cycle|Plan":[""],"Cycle|Review":[""],"Cycle|Staging":[""],"Cycle|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index b91dcbd1ff3..9e09a28c0e5 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-02 23:17-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":["por"],"Commits":["Cambios"],"Cycle":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"Cycle|Code":["Código"],"Cycle|Issue":["Tema"],"Cycle|Plan":["Planificación"],"Cycle|Review":["Revisión"],"Cycle|Staging":["Etapa"],"Cycle|Test":["Pruebas"],"Deploys":["Despliegues"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issues":["Nuevos temas"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OfFirstTime|First":["Primer"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Temas Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionadas Originadas por Cambios"],"Relative Deployed Builds":["Builds Desplegadas Relacionadas"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-03 12:28-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":["por"],"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage":[""],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploys":["Despliegues"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issues":["Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OfFirstTime|First":["Primer"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionados Originados por Cambios"],"Relative Deployed Builds":["Builds Desplegados Relacionados"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"],"pushed by":["enviado por"]}}};
\ No newline at end of file
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 376b1369405..5c1426e4995 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -31,7 +31,7 @@
           .row
             .col-sm-3.col-xs-12.column{ "v-for" => "item in state.summary" }
               %h3.header {{ item.value }}
-              %p.text {{ s__('Cycle', item.title) }}
+              %p.text {{ __(item.title) }}
             .col-sm-3.col-xs-12.column
               .dropdown.inline.js-ca-dropdown
                 %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
@@ -70,7 +70,7 @@
             %ul
               %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" }
                 .stage-nav-item-cell.stage-name
-                  {{ s__('Cycle', stage.title) }}
+                  {{ s__('CycleAnalyticsStage', stage.title) }}
                 .stage-nav-item-cell.stage-median
                   %template{ "v-if" => "stage.isUserAllowed" }
                     %span{ "v-if" => "stage.value" }
diff --git a/lib/gitlab/cycle_analytics/code_stage.rb b/lib/gitlab/cycle_analytics/code_stage.rb
index afb81964847..182d4c43fbd 100644
--- a/lib/gitlab/cycle_analytics/code_stage.rb
+++ b/lib/gitlab/cycle_analytics/code_stage.rb
@@ -14,7 +14,7 @@ module Gitlab
       end
 
       def legend
-        N_("Related Merge Requests")
+        _("Related Merge Requests")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/issue_stage.rb b/lib/gitlab/cycle_analytics/issue_stage.rb
index d36967d9497..08e249116a4 100644
--- a/lib/gitlab/cycle_analytics/issue_stage.rb
+++ b/lib/gitlab/cycle_analytics/issue_stage.rb
@@ -15,7 +15,7 @@ module Gitlab
       end
 
       def legend
-        N_("Related Issues")
+        _("Related Issues")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/plan_stage.rb b/lib/gitlab/cycle_analytics/plan_stage.rb
index 7231c453788..c5b2809209c 100644
--- a/lib/gitlab/cycle_analytics/plan_stage.rb
+++ b/lib/gitlab/cycle_analytics/plan_stage.rb
@@ -15,7 +15,7 @@ module Gitlab
       end
 
       def legend
-        N_("Related Commits")
+        _("Related Commits")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/production_stage.rb b/lib/gitlab/cycle_analytics/production_stage.rb
index 451720c8121..8f05c840db1 100644
--- a/lib/gitlab/cycle_analytics/production_stage.rb
+++ b/lib/gitlab/cycle_analytics/production_stage.rb
@@ -16,7 +16,7 @@ module Gitlab
       end
 
       def legend
-        N_("Related Issues")
+        _("Related Issues")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/review_stage.rb b/lib/gitlab/cycle_analytics/review_stage.rb
index 08e895acad6..4f4c94f4020 100644
--- a/lib/gitlab/cycle_analytics/review_stage.rb
+++ b/lib/gitlab/cycle_analytics/review_stage.rb
@@ -14,7 +14,7 @@ module Gitlab
       end
 
       def legend
-        N_("Relative Merged Requests")
+        _("Relative Merged Requests")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/staging_stage.rb b/lib/gitlab/cycle_analytics/staging_stage.rb
index 706a5d14d3f..da8eb8c55de 100644
--- a/lib/gitlab/cycle_analytics/staging_stage.rb
+++ b/lib/gitlab/cycle_analytics/staging_stage.rb
@@ -15,7 +15,7 @@ module Gitlab
       end
 
       def legend
-        N_("Relative Deployed Builds")
+        _("Relative Deployed Builds")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/test_stage.rb b/lib/gitlab/cycle_analytics/test_stage.rb
index 887cf3e0941..3ef7132bcc3 100644
--- a/lib/gitlab/cycle_analytics/test_stage.rb
+++ b/lib/gitlab/cycle_analytics/test_stage.rb
@@ -14,7 +14,7 @@ module Gitlab
       end
 
       def legend
-        N_("Relative Builds Trigger by Commits")
+        _("Relative Builds Trigger by Commits")
       end
 
       def description
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index d2ea50e5a78..ea19349bac1 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -23,28 +23,31 @@ msgstr ""
 msgid "Commits"
 msgstr ""
 
-msgid "Cycle"
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgid "CycleAnalyticsStage"
+msgstr ""
+
+msgid "CycleAnalyticsStage|Code"
 msgstr ""
 
-msgid "Cycle|Code"
+msgid "CycleAnalyticsStage|Issue"
 msgstr ""
 
-msgid "Cycle|Issue"
+msgid "CycleAnalyticsStage|Plan"
 msgstr ""
 
-msgid "Cycle|Plan"
+msgid "CycleAnalyticsStage|Production"
 msgstr ""
 
-msgid "Cycle|Review"
+msgid "CycleAnalyticsStage|Review"
 msgstr ""
 
-msgid "Cycle|Staging"
+msgid "CycleAnalyticsStage|Staging"
 msgstr ""
 
-msgid "Cycle|Test"
+msgid "CycleAnalyticsStage|Test"
 msgstr ""
 
 msgid "Deploys"
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index f473ce2e0dc..2fed2aa1f57 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -23,28 +23,31 @@ msgstr ""
 msgid "Commits"
 msgstr ""
 
-msgid "Cycle"
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgid "CycleAnalyticsStage"
+msgstr ""
+
+msgid "CycleAnalyticsStage|Code"
 msgstr ""
 
-msgid "Cycle|Code"
+msgid "CycleAnalyticsStage|Issue"
 msgstr ""
 
-msgid "Cycle|Issue"
+msgid "CycleAnalyticsStage|Plan"
 msgstr ""
 
-msgid "Cycle|Plan"
+msgid "CycleAnalyticsStage|Production"
 msgstr ""
 
-msgid "Cycle|Review"
+msgid "CycleAnalyticsStage|Review"
 msgstr ""
 
-msgid "Cycle|Staging"
+msgid "CycleAnalyticsStage|Staging"
 msgstr ""
 
-msgid "Cycle|Test"
+msgid "CycleAnalyticsStage|Test"
 msgstr ""
 
 msgid "Deploys"
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 91135a983f6..254b7ad1802 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-05-02 23:17-0500\n"
+"PO-Revision-Date: 2017-05-03 12:28-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -23,34 +23,32 @@ msgstr "por"
 msgid "Commits"
 msgstr "Cambios"
 
-msgid "Cycle"
-msgstr ""
-
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr "Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."
 
-#, fuzzy
-msgid "Cycle|Code"
+msgid "CycleAnalyticsStage"
+msgstr ""
+
+msgid "CycleAnalyticsStage|Code"
 msgstr "Código"
 
-#, fuzzy
-msgid "Cycle|Issue"
-msgstr "Tema"
+msgid "CycleAnalyticsStage|Issue"
+msgstr "Incidencia"
 
-#, fuzzy
-msgid "Cycle|Plan"
+msgid "CycleAnalyticsStage|Plan"
 msgstr "Planificación"
 
-#, fuzzy
-msgid "Cycle|Review"
+msgid "CycleAnalyticsStage|Production"
+msgstr "Producción"
+
+msgid "CycleAnalyticsStage|Review"
 msgstr "Revisión"
 
 #, fuzzy
-msgid "Cycle|Staging"
-msgstr "Etapa"
+msgid "CycleAnalyticsStage|Staging"
+msgstr "Puesta en escena"
 
-#, fuzzy
-msgid "Cycle|Test"
+msgid "CycleAnalyticsStage|Test"
 msgstr "Pruebas"
 
 msgid "Deploys"
@@ -59,21 +57,21 @@ msgstr "Despliegues"
 msgid "Introducing Cycle Analytics"
 msgstr "Introducción a Cycle Analytics"
 
-#, fuzzy
 msgid "Last %d day"
 msgid_plural "Last %d days"
-msgstr[0] "Últimos %d días"
+msgstr[0] "Último %d día"
+msgstr[1] "Últimos %d días"
 
-#, fuzzy
 msgid "Limited to showing %d event at most"
 msgid_plural "Limited to showing %d events at most"
-msgstr[0] "Limitado a mostrar máximo %d eventos"
+msgstr[0] "Limitado a mostrar máximo %d evento"
+msgstr[1] "Limitado a mostrar máximo %d eventos"
 
 msgid "Median"
 msgstr "Mediana"
 
 msgid "New Issues"
-msgstr "Nuevos temas"
+msgstr "Nuevas incidencias"
 
 msgid "Not available"
 msgstr "No disponible"
@@ -81,7 +79,6 @@ msgstr "No disponible"
 msgid "Not enough data"
 msgstr "No hay suficientes datos"
 
-#, fuzzy
 msgid "OfFirstTime|First"
 msgstr "Primer"
 
@@ -101,18 +98,16 @@ msgid "Related Commits"
 msgstr "Cambios Relacionados"
 
 msgid "Related Issues"
-msgstr "Temas Relacionados"
+msgstr "Incidencias Relacionadas"
 
 msgid "Related Merge Requests"
 msgstr "Solicitudes de fusión Relacionadas"
 
-#, fuzzy
 msgid "Relative Builds Trigger by Commits"
-msgstr "Builds Relacionadas Originadas por Cambios"
+msgstr "Builds Relacionados Originados por Cambios"
 
-#, fuzzy
 msgid "Relative Deployed Builds"
-msgstr "Builds Desplegadas Relacionadas"
+msgstr "Builds Desplegados Relacionados"
 
 msgid "Relative Merged Requests"
 msgstr "Solicitudes de fusión Relacionadas"
@@ -129,7 +124,7 @@ msgid "The collection of events added to the data gathered for that stage."
 msgstr "La colección de eventos agregados a los datos recopilados para esa etapa."
 
 msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
-msgstr "La etapa de temas muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
+msgstr "La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
 
 msgid "The phase of the development lifecycle."
 msgstr "La etapa del ciclo de vida del desarrollo."
@@ -138,7 +133,7 @@ msgid "The planning stage shows the time from the previous step to pushing your
 msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."
 
 msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
-msgstr "La etapa de producción muestra el tiempo total que tarda entre la creación de un tema y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."
+msgstr "La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."
 
 msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
 msgstr "La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."
@@ -171,7 +166,6 @@ msgstr ""
 msgid "Total Time"
 msgstr "Tiempo Total"
 
-#, fuzzy
 msgid "Want to see the data? Please ask an administrator for access."
 msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
 
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index bc16b7a0968..8f4dc30b8c8 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: 2017-05-03 12:00+0100\n"
-"PO-Revision-Date: 2017-05-03 12:00+0100\n"
+"POT-Creation-Date: 2017-05-03 12:32-0500\n"
+"PO-Revision-Date: 2017-05-03 12:32-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -24,28 +24,31 @@ msgstr ""
 msgid "Commits"
 msgstr ""
 
-msgid "Cycle"
+msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
-msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
+msgid "CycleAnalyticsStage"
+msgstr ""
+
+msgid "CycleAnalyticsStage|Code"
 msgstr ""
 
-msgid "Cycle|Code"
+msgid "CycleAnalyticsStage|Issue"
 msgstr ""
 
-msgid "Cycle|Issue"
+msgid "CycleAnalyticsStage|Plan"
 msgstr ""
 
-msgid "Cycle|Plan"
+msgid "CycleAnalyticsStage|Production"
 msgstr ""
 
-msgid "Cycle|Review"
+msgid "CycleAnalyticsStage|Review"
 msgstr ""
 
-msgid "Cycle|Staging"
+msgid "CycleAnalyticsStage|Staging"
 msgstr ""
 
-msgid "Cycle|Test"
+msgid "CycleAnalyticsStage|Test"
 msgstr ""
 
 msgid "Deploys"
diff --git a/locale/unfound_translations.rb b/locale/unfound_translations.rb
index e38b49b48a1..e66211c1619 100644
--- a/locale/unfound_translations.rb
+++ b/locale/unfound_translations.rb
@@ -1,9 +1,10 @@
 N_('Commits')
-N_('Cycle|Code')
-N_('Cycle|Issue')
-N_('Cycle|Plan')
-N_('Cycle|Review')
-N_('Cycle|Staging')
-N_('Cycle|Test')
+N_('CycleAnalyticsStage|Code')
+N_('CycleAnalyticsStage|Issue')
+N_('CycleAnalyticsStage|Plan')
+N_('CycleAnalyticsStage|Production')
+N_('CycleAnalyticsStage|Review')
+N_('CycleAnalyticsStage|Staging')
+N_('CycleAnalyticsStage|Test')
 N_('Deploys')
 N_('New Issues')
-- 
GitLab


From b7f01f2b18940eb8dc0fa30e8ebbf1784c864304 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 3 May 2017 20:52:18 +0100
Subject: [PATCH 36/42] Moved all the text translation manipulation into the
 locale index file Commented the translation methods

---
 app/assets/javascripts/locale/index.js        | 48 +++++++++++++++++--
 .../javascripts/vue_shared/translate.js       | 39 +++++++++++----
 2 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js
index c9df5f3723a..7ba676d6d20 100644
--- a/app/assets/javascripts/locale/index.js
+++ b/app/assets/javascripts/locale/index.js
@@ -1,5 +1,9 @@
 import Jed from 'jed';
 
+/**
+  This is required to require all the translation folders in the current directory
+  this saves us having to do this manually & keep up to date with new languages
+**/
 function requireAll(requireContext) { return requireContext.keys().map(requireContext); }
 
 const allLocales = requireAll(require.context('./', true, /^(?!.*(?:index.js$)).*\.js$/));
@@ -16,11 +20,47 @@ let lang = document.querySelector('html').getAttribute('lang') || 'en';
 lang = lang.replace(/-/g, '_');
 
 const locale = new Jed(locales[lang]);
+
+/**
+  Translates `text`
+
+  @param text The text to be translated
+  @returns {String} The translated text
+**/
 const gettext = locale.gettext.bind(locale);
-const ngettext = locale.ngettext.bind(locale);
-const pgettext = (context, key) => {
-  const joinedKey = [context, key].join('|');
-  return gettext(joinedKey).split('|').pop();
+
+/**
+  Translate the text with a number
+  if the number is more than 1 it will use the `pluralText` translation.
+  This method allows for contexts, see below re. contexts
+
+  @param text Singular text to translate (eg. '%d day')
+  @param pluralText Plural text to translate (eg. '%d days')
+  @param count Number to decide which translation to use (eg. 2)
+  @returns {String} Translated text with the number replaced (eg. '2 days')
+**/
+const ngettext = (text, pluralText, count) => {
+  const translated = locale.ngettext(text, pluralText, count).replace(/%d/g, count).split('|');
+
+  return translated[translated.length - 1];
+};
+
+/**
+  Translate context based text
+  Either pass in the context translation like `Context|Text to translate`
+  or allow for dynamic text by doing passing in the context first & then the text to translate
+
+  @param keyOrContext Can be either the key to translate including the context
+                      (eg. 'Context|Text') or just the context for the translation
+                      (eg. 'Context')
+  @param key Is the dynamic variable you want to be translated
+  @returns {String} Translated context based text
+**/
+const pgettext = (keyOrContext, key) => {
+  const normalizedKey = key ? `${keyOrContext}|${key}` : keyOrContext;
+  const translated = gettext(normalizedKey).split('|');
+
+  return translated[translated.length - 1];
 };
 
 export { lang };
diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js
index 07ef00c10d0..ba9656d4e71 100644
--- a/app/assets/javascripts/vue_shared/translate.js
+++ b/app/assets/javascripts/vue_shared/translate.js
@@ -1,23 +1,42 @@
 import {
   __,
   n__,
+  s__,
 } from '../locale';
 
 export default (Vue) => {
   Vue.mixin({
     methods: {
+      /**
+        Translates `text`
+
+        @param text The text to be translated
+        @returns {String} The translated text
+      **/
       __(text) { return __(text); },
-      n__(text, pluralText, count) {
-        const translated = n__(text, pluralText, count).replace(/%d/g, count).split('|');
-        return translated[translated.length - 1];
-      },
-      s__(keyOrContext, key) {
-        const normalizedKey = key ? `${keyOrContext}|${key}` : keyOrContext;
-        // eslint-disable-next-line no-underscore-dangle
-        const translated = this.__(normalizedKey).split('|');
+      /**
+        Translate the text with a number
+        if the number is more than 1 it will use the `pluralText` translation.
+        This method allows for contexts, see below re. contexts
+
+        @param text Singular text to translate (eg. '%d day')
+        @param pluralText Plural text to translate (eg. '%d days')
+        @param count Number to decide which translation to use (eg. 2)
+        @returns {String} Translated text with the number replaced (eg. '2 days')
+      **/
+      n__(text, pluralText, count) { return n__(text, pluralText, count); },
+      /**
+        Translate context based text
+        Either pass in the context translation like `Context|Text to translate`
+        or allow for dynamic text by doing passing in the context first & then the text to translate
 
-        return translated[translated.length - 1];
-      },
+        @param keyOrContext Can be either the key to translate including the context
+                            (eg. 'Context|Text') or just the context for the translation
+                            (eg. 'Context')
+        @param key Is the dynamic variable you want to be translated
+        @returns {String} Translated context based text
+      **/
+      s__(keyOrContext, key) { return s__(keyOrContext, key); },
     },
   });
 };
-- 
GitLab


From dbd1bdaeed596f14af89d662e73030bb02571cfd Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Wed, 3 May 2017 21:05:38 -0500
Subject: [PATCH 37/42] More updates for translations plus some refactoring.

---
 .../components/stage_code_component.js        |  4 +-
 .../components/stage_issue_component.js       |  2 +-
 .../components/stage_plan_component.js        |  4 +-
 .../components/stage_production_component.js  |  4 +-
 .../components/stage_review_component.js      |  4 +-
 .../components/stage_staging_component.js     |  2 +-
 .../cycle_analytics_service.js                |  2 +-
 .../cycle_analytics/cycle_analytics_store.js  |  2 +-
 app/assets/javascripts/locale/de/app.js       |  2 +-
 app/assets/javascripts/locale/en/app.js       |  2 +-
 app/assets/javascripts/locale/es/app.js       |  2 +-
 app/controllers/application_controller.rb     | 14 ++---
 app/serializers/analytics_stage_entity.rb     |  1 +
 app/serializers/analytics_summary_entity.rb   |  5 +-
 .../projects/cycle_analytics/show.html.haml   |  4 +-
 db/fixtures/development/17_cycle_analytics.rb |  2 +-
 lib/api/api.rb                                |  3 +
 lib/gitlab/cycle_analytics/base_stage.rb      |  2 +-
 lib/gitlab/cycle_analytics/code_stage.rb      |  6 +-
 lib/gitlab/cycle_analytics/issue_stage.rb     |  6 +-
 lib/gitlab/cycle_analytics/plan_stage.rb      |  6 +-
 .../cycle_analytics/production_stage.rb       |  6 +-
 lib/gitlab/cycle_analytics/review_stage.rb    |  6 +-
 lib/gitlab/cycle_analytics/staging_stage.rb   |  6 +-
 lib/gitlab/cycle_analytics/summary/base.rb    |  2 +-
 lib/gitlab/cycle_analytics/summary/commit.rb  |  4 ++
 lib/gitlab/cycle_analytics/summary/deploy.rb  |  4 ++
 lib/gitlab/cycle_analytics/summary/issue.rb   |  2 +-
 lib/gitlab/cycle_analytics/test_stage.rb      |  6 +-
 lib/gitlab/i18n.rb                            | 10 +++
 locale/de/gitlab.po                           | 55 ++++++++++++-----
 locale/en/gitlab.po                           | 55 ++++++++++++-----
 locale/es/gitlab.po                           | 61 +++++++++++++------
 locale/gitlab.pot                             | 59 +++++++++++++-----
 locale/unfound_translations.rb                | 10 ---
 35 files changed, 253 insertions(+), 112 deletions(-)
 delete mode 100644 locale/unfound_translations.rb

diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
index f22299898a5..0d9ad197abf 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageCodeComponent = Vue.extend({
             <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
             &middot;
             <span>
-              {{ __('Opened') }}
+              {{ __('OpenedNDaysAgo|Opened') }}
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              {{ __('Author|by') }}
+              {{ __('ByAuthor|by') }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
           </div>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
index f400fd2fb14..c4018c8fc36 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageIssueComponent = Vue.extend({
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-              {{ __('Author|by') }}
+              {{ __('ByAuthor|by') }}
               <a :href="issue.author.webUrl" class="issue-author-link">
                 {{ issue.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
index b85b8902fc7..222084deee9 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js
@@ -31,10 +31,10 @@ global.cycleAnalytics.StagePlanComponent = Vue.extend({
               </a>
             </h5>
             <span>
-              {{ __('OfFirstTime|First') }}
+              {{ __('FirstPushedBy|First') }}
               <span class="commit-icon">${iconCommit}</span>
               <a :href="commit.commitUrl" class="commit-hash-link monospace">{{ commit.shortSha }}</a>
-              {{ __('pushed by') }}
+              {{ __('FirstPushedBy|pushed by') }}
               <a :href="commit.author.webUrl" class="commit-author-link">
                 {{ commit.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
index 18c30f490fd..a14ebc3ece9 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageProductionComponent = Vue.extend({
             <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
             &middot;
             <span>
-              {{ __('Opened') }}
+              {{ __('OpenedNDaysAgo|Opened') }}
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
-            {{ __('Author|by') }}
+            {{ __('ByAuthor|by') }}
             <a :href="issue.author.webUrl" class="issue-author-link">
               {{ issue.author.name }}
             </a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
index 98806760128..1a5bf9bc0b5 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js
@@ -28,11 +28,11 @@ global.cycleAnalytics.StageReviewComponent = Vue.extend({
             <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
             &middot;
             <span>
-              {{ __('Opened') }}
+              {{ __('OpenedNDaysAgo|Opened') }}
               <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a>
             </span>
             <span>
-              {{ __('Author|by') }}
+              {{ __('ByAuthor|by') }}
               <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ mergeRequest.author.name }}</a>
             </span>
             <template v-if="mergeRequest.state === 'closed'">
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
index f13294c7af7..b1e9362434f 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js
@@ -32,7 +32,7 @@ global.cycleAnalytics.StageStagingComponent = Vue.extend({
             </h5>
             <span>
               <a :href="build.url" class="build-date">{{ build.date }}</a>
-              {{ __('Author|by') }}
+              {{ __('ByAuthor|by') }}
               <a :href="build.author.webUrl" class="issue-author-link">
                 {{ build.author.name }}
               </a>
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
index 681d6eef565..c176376e8cf 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
@@ -30,7 +30,7 @@ class CycleAnalyticsService {
       startDate,
     } = options;
 
-    return $.get(`${this.requestPath}/events/${stage.title.toLowerCase()}.json`, {
+    return $.get(`${this.requestPath}/events/${stage.name.toLowerCase()}.json`, {
       cycle_analytics: {
         start_date: startDate,
       },
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
index 1c574951211..50bd394e90e 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
@@ -39,7 +39,7 @@ global.cycleAnalytics.CycleAnalyticsStore = {
     });
 
     newData.stages.forEach((item) => {
-      const stageSlug = gl.text.dasherize(item.title.toLowerCase());
+      const stageSlug = gl.text.dasherize(item.name.toLowerCase());
       item.active = false;
       item.isUserAllowed = data.permissions[stageSlug];
       item.emptyStageText = EMPTY_STAGE_TEXTS[stageSlug];
diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index e1e4a2b7138..aee25c34392 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"Opened":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index c14e7b41ad1..ed32f7e49c0 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":[""],"Commits":[""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploys":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issues":[""],"Not available":[""],"Not enough data":[""],"OfFirstTime|First":[""],"Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""],"pushed by":[""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"Opened":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 9e09a28c0e5..0d8152bb863 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-03 12:28-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"Author|by":["por"],"Commits":["Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage":[""],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploys":["Despliegues"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issues":["Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OfFirstTime|First":["Primer"],"Opened":["Abiertos"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionados Originados por Cambios"],"Relative Deployed Builds":["Builds Desplegados Relacionados"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"],"pushed by":["enviado por"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-03 21:03-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":["por"],"Commit":["Cambio","Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploy":["Despliegue","Despliegues"],"FirstPushedBy|First":["Primer"],"FirstPushedBy|pushed by":["enviado por"],"From issue creation until deploy to production":["Desde la creación de la incidencia hasta el despliegue a producción"],"From merge request merge until deploy to production":["Desde la integración de la solicitud de fusión hasta el despliegue a producción"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issue":["Nueva incidencia","Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"OpenedNDaysAgo|Opened":["Abierto"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionados Originados por Cambios"],"Relative Deployed Builds":["Builds Desplegados Relacionados"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time before an issue gets scheduled":["Tiempo antes de que una incidencia sea programada"],"Time before an issue starts implementation":["Tiempo antes de que empieze la implementación de una incidencia"],"Time between merge request creation and merge/close":["Tiempo entre la creación de la solicitud de fusión y la integración o cierre de esta"],"Time until first merge request":["Tiempo hasta la primera solicitud de fusión"],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Total test time for all commits/merges":["Tiempo total de pruebas para todos los cambios o integraciones"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"]}}};
\ No newline at end of file
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 24017e8ea40..d2c13da6917 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -273,14 +273,10 @@ class ApplicationController < ActionController::Base
   end
 
   def set_locale
-    begin
-      requested_locale = current_user&.preferred_language || I18n.default_locale
-      locale = FastGettext.set_locale(requested_locale)
-      I18n.locale = locale
-
-      yield
-    ensure
-      I18n.locale = I18n.default_locale
-    end
+    Gitlab::I18n.set_locale(current_user)
+
+    yield
+  ensure
+    Gitlab::I18n.reset_locale
   end
 end
diff --git a/app/serializers/analytics_stage_entity.rb b/app/serializers/analytics_stage_entity.rb
index 69bf693de8d..564612202b5 100644
--- a/app/serializers/analytics_stage_entity.rb
+++ b/app/serializers/analytics_stage_entity.rb
@@ -2,6 +2,7 @@ class AnalyticsStageEntity < Grape::Entity
   include EntityDateHelper
 
   expose :title
+  expose :name
   expose :legend
   expose :description
 
diff --git a/app/serializers/analytics_summary_entity.rb b/app/serializers/analytics_summary_entity.rb
index 91803ec07f5..9c37afd53e1 100644
--- a/app/serializers/analytics_summary_entity.rb
+++ b/app/serializers/analytics_summary_entity.rb
@@ -1,7 +1,4 @@
 class AnalyticsSummaryEntity < Grape::Entity
   expose :value, safe: true
-
-  expose :title do |object|
-    object.title.pluralize(object.value)
-  end
+  expose :title
 end
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index 5c1426e4995..eadaff70e04 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -51,7 +51,7 @@
             %ul
               %li.stage-header
                 %span.stage-name
-                  {{ s__('ProjectLifecycle|Stage') }}
+                  {{ __('ProjectLifecycle|Stage') }}
                 %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The phase of the development lifecycle."), "aria-hidden" => "true" }
               %li.median-header
                 %span.stage-name
@@ -70,7 +70,7 @@
             %ul
               %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" }
                 .stage-nav-item-cell.stage-name
-                  {{ s__('CycleAnalyticsStage', stage.title) }}
+                  {{ stage.title }}
                 .stage-nav-item-cell.stage-median
                   %template{ "v-if" => "stage.isUserAllowed" }
                     %span{ "v-if" => "stage.value" }
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index 0d7eb1a7c93..040505ad52c 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -227,7 +227,7 @@ Gitlab::Seeder.quiet do
 
   if ENV[flag]
     Project.all.each do |project|
-      seeder = Gitlab::Seeder::CycleAnalytics.new(project)
+      seeder = Gitlab::Seeder::CycleAnalytics.new(pro)
       seeder.seed!
     end
   elsif ENV['CYCLE_ANALYTICS_PERF_TEST']
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 1bf20f76ad6..302ccd3e532 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -44,6 +44,9 @@ module API
     end
 
     before { allow_access_with_scope :api }
+    before { Gitlab::I18n.set_locale(current_user) }
+
+    after { Gitlab::I18n.reset_locale }
 
     rescue_from Gitlab::Access::AccessDeniedError do
       rack_response({ 'message' => '403 Forbidden' }.to_json, 403)
diff --git a/lib/gitlab/cycle_analytics/base_stage.rb b/lib/gitlab/cycle_analytics/base_stage.rb
index 559e3939da6..cac31ea8cff 100644
--- a/lib/gitlab/cycle_analytics/base_stage.rb
+++ b/lib/gitlab/cycle_analytics/base_stage.rb
@@ -17,7 +17,7 @@ module Gitlab
       end
 
       def title
-        name.to_s.capitalize
+        raise NotImplementedError.new("Expected #{self.name} to implement title")
       end
 
       def median
diff --git a/lib/gitlab/cycle_analytics/code_stage.rb b/lib/gitlab/cycle_analytics/code_stage.rb
index 182d4c43fbd..5f9dc9a4303 100644
--- a/lib/gitlab/cycle_analytics/code_stage.rb
+++ b/lib/gitlab/cycle_analytics/code_stage.rb
@@ -13,12 +13,16 @@ module Gitlab
         :code
       end
 
+      def title
+        s_('CycleAnalyticsStage|Code')
+      end
+
       def legend
         _("Related Merge Requests")
       end
 
       def description
-        "Time until first merge request"
+        _("Time until first merge request")
       end
     end
   end
diff --git a/lib/gitlab/cycle_analytics/issue_stage.rb b/lib/gitlab/cycle_analytics/issue_stage.rb
index 08e249116a4..7b03811efb2 100644
--- a/lib/gitlab/cycle_analytics/issue_stage.rb
+++ b/lib/gitlab/cycle_analytics/issue_stage.rb
@@ -14,12 +14,16 @@ module Gitlab
         :issue
       end
 
+      def title
+        s_('CycleAnalyticsStage|Issue')
+      end
+
       def legend
         _("Related Issues")
       end
 
       def description
-        "Time before an issue gets scheduled"
+        _("Time before an issue gets scheduled")
       end
     end
   end
diff --git a/lib/gitlab/cycle_analytics/plan_stage.rb b/lib/gitlab/cycle_analytics/plan_stage.rb
index c5b2809209c..1a0afb56b4f 100644
--- a/lib/gitlab/cycle_analytics/plan_stage.rb
+++ b/lib/gitlab/cycle_analytics/plan_stage.rb
@@ -14,12 +14,16 @@ module Gitlab
         :plan
       end
 
+      def title
+        s_('CycleAnalyticsStage|Plan')
+      end
+
       def legend
         _("Related Commits")
       end
 
       def description
-        "Time before an issue starts implementation"
+        _("Time before an issue starts implementation")
       end
     end
   end
diff --git a/lib/gitlab/cycle_analytics/production_stage.rb b/lib/gitlab/cycle_analytics/production_stage.rb
index 8f05c840db1..0fa8a65cb99 100644
--- a/lib/gitlab/cycle_analytics/production_stage.rb
+++ b/lib/gitlab/cycle_analytics/production_stage.rb
@@ -15,12 +15,16 @@ module Gitlab
         :production
       end
 
+      def title
+        s_('CycleAnalyticsStage|Production')
+      end
+
       def legend
         _("Related Issues")
       end
 
       def description
-        "From issue creation until deploy to production"
+        _("From issue creation until deploy to production")
       end
 
       def query
diff --git a/lib/gitlab/cycle_analytics/review_stage.rb b/lib/gitlab/cycle_analytics/review_stage.rb
index 4f4c94f4020..2cab363ba9d 100644
--- a/lib/gitlab/cycle_analytics/review_stage.rb
+++ b/lib/gitlab/cycle_analytics/review_stage.rb
@@ -13,12 +13,16 @@ module Gitlab
         :review
       end
 
+      def title
+        s_('CycleAnalyticsStage|Review')
+      end
+
       def legend
         _("Relative Merged Requests")
       end
 
       def description
-        "Time between merge request creation and merge/close"
+        _("Time between merge request creation and merge/close")
       end
     end
   end
diff --git a/lib/gitlab/cycle_analytics/staging_stage.rb b/lib/gitlab/cycle_analytics/staging_stage.rb
index da8eb8c55de..c1753340842 100644
--- a/lib/gitlab/cycle_analytics/staging_stage.rb
+++ b/lib/gitlab/cycle_analytics/staging_stage.rb
@@ -14,12 +14,16 @@ module Gitlab
         :staging
       end
 
+      def title
+        s_('CycleAnalyticsStage|Staging')
+      end
+
       def legend
         _("Relative Deployed Builds")
       end
 
       def description
-        "From merge request merge until deploy to production"
+        _("From merge request merge until deploy to production")
       end
     end
   end
diff --git a/lib/gitlab/cycle_analytics/summary/base.rb b/lib/gitlab/cycle_analytics/summary/base.rb
index 43fa3795e5c..a917ddccac7 100644
--- a/lib/gitlab/cycle_analytics/summary/base.rb
+++ b/lib/gitlab/cycle_analytics/summary/base.rb
@@ -8,7 +8,7 @@ module Gitlab
         end
 
         def title
-          self.class.name.demodulize
+          raise NotImplementedError.new("Expected #{self.name} to implement title")
         end
 
         def value
diff --git a/lib/gitlab/cycle_analytics/summary/commit.rb b/lib/gitlab/cycle_analytics/summary/commit.rb
index 7b8faa4d854..bea78862757 100644
--- a/lib/gitlab/cycle_analytics/summary/commit.rb
+++ b/lib/gitlab/cycle_analytics/summary/commit.rb
@@ -2,6 +2,10 @@ module Gitlab
   module CycleAnalytics
     module Summary
       class Commit < Base
+        def title
+          n_('Commit', 'Commits', value)
+        end
+
         def value
           @value ||= count_commits
         end
diff --git a/lib/gitlab/cycle_analytics/summary/deploy.rb b/lib/gitlab/cycle_analytics/summary/deploy.rb
index 06032e9200e..099d798aac6 100644
--- a/lib/gitlab/cycle_analytics/summary/deploy.rb
+++ b/lib/gitlab/cycle_analytics/summary/deploy.rb
@@ -2,6 +2,10 @@ module Gitlab
   module CycleAnalytics
     module Summary
       class Deploy < Base
+        def title
+          n_('Deploy', 'Deploys', value)
+        end
+
         def value
           @value ||= @project.deployments.where("created_at > ?", @from).count
         end
diff --git a/lib/gitlab/cycle_analytics/summary/issue.rb b/lib/gitlab/cycle_analytics/summary/issue.rb
index 008468f24b9..9bbf7a2685f 100644
--- a/lib/gitlab/cycle_analytics/summary/issue.rb
+++ b/lib/gitlab/cycle_analytics/summary/issue.rb
@@ -9,7 +9,7 @@ module Gitlab
         end
 
         def title
-          'New Issue'
+          n_('New Issue', 'New Issues', value)
         end
 
         def value
diff --git a/lib/gitlab/cycle_analytics/test_stage.rb b/lib/gitlab/cycle_analytics/test_stage.rb
index 3ef7132bcc3..10402a1d7cd 100644
--- a/lib/gitlab/cycle_analytics/test_stage.rb
+++ b/lib/gitlab/cycle_analytics/test_stage.rb
@@ -13,12 +13,16 @@ module Gitlab
         :test
       end
 
+      def title
+        s_('CycleAnalyticsStage|Test')
+      end
+
       def legend
         _("Relative Builds Trigger by Commits")
       end
 
       def description
-        "Total test time for all commits/merges"
+        _("Total test time for all commits/merges")
       end
 
       def stage_query
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
index a7addee0dcd..9081ced0238 100644
--- a/lib/gitlab/i18n.rb
+++ b/lib/gitlab/i18n.rb
@@ -11,5 +11,15 @@ module Gitlab
     def available_locales
       AVAILABLE_LANGUAGES.keys
     end
+
+    def set_locale(current_user)
+      requested_locale = current_user&.preferred_language || ::I18n.default_locale
+      locale = FastGettext.set_locale(requested_locale)
+      ::I18n.locale = locale
+    end
+
+    def reset_locale
+      ::I18n.locale = ::I18n.default_locale
+    end
   end
 end
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index ea19349bac1..3e7bcf2c90f 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -17,18 +17,17 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
-msgid "Author|by"
+msgid "ByAuthor|by"
 msgstr ""
 
-msgid "Commits"
-msgstr ""
+msgid "Commit"
+msgid_plural "Commits"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
-msgid "CycleAnalyticsStage"
-msgstr ""
-
 msgid "CycleAnalyticsStage|Code"
 msgstr ""
 
@@ -50,7 +49,21 @@ msgstr ""
 msgid "CycleAnalyticsStage|Test"
 msgstr ""
 
-msgid "Deploys"
+msgid "Deploy"
+msgid_plural "Deploys"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "FirstPushedBy|First"
+msgstr ""
+
+msgid "FirstPushedBy|pushed by"
+msgstr ""
+
+msgid "From issue creation until deploy to production"
+msgstr ""
+
+msgid "From merge request merge until deploy to production"
 msgstr ""
 
 msgid "Introducing Cycle Analytics"
@@ -69,8 +82,10 @@ msgstr[1] ""
 msgid "Median"
 msgstr ""
 
-msgid "New Issues"
-msgstr ""
+msgid "New Issue"
+msgid_plural "New Issues"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Not available"
 msgstr ""
@@ -78,10 +93,10 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
-msgid "OfFirstTime|First"
+msgid "Opened"
 msgstr ""
 
-msgid "Opened"
+msgid "OpenedNDaysAgo|Opened"
 msgstr ""
 
 msgid "Pipeline Health"
@@ -149,6 +164,18 @@ msgstr ""
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr ""
 
+msgid "Time before an issue gets scheduled"
+msgstr ""
+
+msgid "Time before an issue starts implementation"
+msgstr ""
+
+msgid "Time between merge request creation and merge/close"
+msgstr ""
+
+msgid "Time until first merge request"
+msgstr ""
+
 msgid "Time|hr"
 msgid_plural "Time|hrs"
 msgstr[0] ""
@@ -165,6 +192,9 @@ msgstr ""
 msgid "Total Time"
 msgstr ""
 
+msgid "Total test time for all commits/merges"
+msgstr ""
+
 msgid "Want to see the data? Please ask an administrator for access."
 msgstr ""
 
@@ -178,6 +208,3 @@ msgid "day"
 msgid_plural "days"
 msgstr[0] ""
 msgstr[1] ""
-
-msgid "pushed by"
-msgstr ""
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 2fed2aa1f57..9f75b5641a4 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -17,18 +17,17 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "\n"
 
-msgid "Author|by"
+msgid "ByAuthor|by"
 msgstr ""
 
-msgid "Commits"
-msgstr ""
+msgid "Commit"
+msgid_plural "Commits"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
-msgid "CycleAnalyticsStage"
-msgstr ""
-
 msgid "CycleAnalyticsStage|Code"
 msgstr ""
 
@@ -50,7 +49,21 @@ msgstr ""
 msgid "CycleAnalyticsStage|Test"
 msgstr ""
 
-msgid "Deploys"
+msgid "Deploy"
+msgid_plural "Deploys"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "FirstPushedBy|First"
+msgstr ""
+
+msgid "FirstPushedBy|pushed by"
+msgstr ""
+
+msgid "From issue creation until deploy to production"
+msgstr ""
+
+msgid "From merge request merge until deploy to production"
 msgstr ""
 
 msgid "Introducing Cycle Analytics"
@@ -69,8 +82,10 @@ msgstr[1] ""
 msgid "Median"
 msgstr ""
 
-msgid "New Issues"
-msgstr ""
+msgid "New Issue"
+msgid_plural "New Issues"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Not available"
 msgstr ""
@@ -78,10 +93,10 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
-msgid "OfFirstTime|First"
+msgid "Opened"
 msgstr ""
 
-msgid "Opened"
+msgid "OpenedNDaysAgo|Opened"
 msgstr ""
 
 msgid "Pipeline Health"
@@ -149,6 +164,18 @@ msgstr ""
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr ""
 
+msgid "Time before an issue gets scheduled"
+msgstr ""
+
+msgid "Time before an issue starts implementation"
+msgstr ""
+
+msgid "Time between merge request creation and merge/close"
+msgstr ""
+
+msgid "Time until first merge request"
+msgstr ""
+
 msgid "Time|hr"
 msgid_plural "Time|hrs"
 msgstr[0] ""
@@ -165,6 +192,9 @@ msgstr ""
 msgid "Total Time"
 msgstr ""
 
+msgid "Total test time for all commits/merges"
+msgstr ""
+
 msgid "Want to see the data? Please ask an administrator for access."
 msgstr ""
 
@@ -178,6 +208,3 @@ msgid "day"
 msgid_plural "days"
 msgstr[0] ""
 msgstr[1] ""
-
-msgid "pushed by"
-msgstr ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 254b7ad1802..6806bf21677 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-05-03 12:28-0500\n"
+"PO-Revision-Date: 2017-05-03 21:03-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -17,18 +17,17 @@ msgstr ""
 "Last-Translator: \n"
 "X-Generator: Poedit 2.0.1\n"
 
-msgid "Author|by"
+msgid "ByAuthor|by"
 msgstr "por"
 
-msgid "Commits"
-msgstr "Cambios"
+msgid "Commit"
+msgid_plural "Commits"
+msgstr[0] "Cambio"
+msgstr[1] "Cambios"
 
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr "Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."
 
-msgid "CycleAnalyticsStage"
-msgstr ""
-
 msgid "CycleAnalyticsStage|Code"
 msgstr "Código"
 
@@ -51,8 +50,22 @@ msgstr "Puesta en escena"
 msgid "CycleAnalyticsStage|Test"
 msgstr "Pruebas"
 
-msgid "Deploys"
-msgstr "Despliegues"
+msgid "Deploy"
+msgid_plural "Deploys"
+msgstr[0] "Despliegue"
+msgstr[1] "Despliegues"
+
+msgid "FirstPushedBy|First"
+msgstr "Primer"
+
+msgid "FirstPushedBy|pushed by"
+msgstr "enviado por"
+
+msgid "From issue creation until deploy to production"
+msgstr "Desde la creación de la incidencia hasta el despliegue a producción"
+
+msgid "From merge request merge until deploy to production"
+msgstr "Desde la integración de la solicitud de fusión hasta el despliegue a producción"
 
 msgid "Introducing Cycle Analytics"
 msgstr "Introducción a Cycle Analytics"
@@ -70,8 +83,10 @@ msgstr[1] "Limitado a mostrar máximo %d eventos"
 msgid "Median"
 msgstr "Mediana"
 
-msgid "New Issues"
-msgstr "Nuevas incidencias"
+msgid "New Issue"
+msgid_plural "New Issues"
+msgstr[0] "Nueva incidencia"
+msgstr[1] "Nuevas incidencias"
 
 msgid "Not available"
 msgstr "No disponible"
@@ -79,12 +94,12 @@ msgstr "No disponible"
 msgid "Not enough data"
 msgstr "No hay suficientes datos"
 
-msgid "OfFirstTime|First"
-msgstr "Primer"
-
 msgid "Opened"
 msgstr "Abiertos"
 
+msgid "OpenedNDaysAgo|Opened"
+msgstr "Abierto"
+
 msgid "Pipeline Health"
 msgstr "Estado del Pipeline"
 
@@ -150,6 +165,18 @@ msgstr "El tiempo utilizado por cada entrada de datos obtenido por esa etapa."
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr "El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."
 
+msgid "Time before an issue gets scheduled"
+msgstr "Tiempo antes de que una incidencia sea programada"
+
+msgid "Time before an issue starts implementation"
+msgstr "Tiempo antes de que empieze la implementación de una incidencia"
+
+msgid "Time between merge request creation and merge/close"
+msgstr "Tiempo entre la creación de la solicitud de fusión y la integración o cierre de esta"
+
+msgid "Time until first merge request"
+msgstr "Tiempo hasta la primera solicitud de fusión"
+
 msgid "Time|hr"
 msgid_plural "Time|hrs"
 msgstr[0] ""
@@ -166,6 +193,9 @@ msgstr ""
 msgid "Total Time"
 msgstr "Tiempo Total"
 
+msgid "Total test time for all commits/merges"
+msgstr "Tiempo total de pruebas para todos los cambios o integraciones"
+
 msgid "Want to see the data? Please ask an administrator for access."
 msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
 
@@ -179,6 +209,3 @@ msgid "day"
 msgid_plural "days"
 msgstr[0] "día"
 msgstr[1] "días"
-
-msgid "pushed by"
-msgstr "enviado por"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 8f4dc30b8c8..e1796d51935 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: 2017-05-03 12:32-0500\n"
-"PO-Revision-Date: 2017-05-03 12:32-0500\n"
+"POT-Creation-Date: 2017-05-03 20:53-0500\n"
+"PO-Revision-Date: 2017-05-03 20:53-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -18,18 +18,17 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
-msgid "Author|by"
+msgid "ByAuthor|by"
 msgstr ""
 
-msgid "Commits"
-msgstr ""
+msgid "Commit"
+msgid_plural "Commits"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project."
 msgstr ""
 
-msgid "CycleAnalyticsStage"
-msgstr ""
-
 msgid "CycleAnalyticsStage|Code"
 msgstr ""
 
@@ -51,7 +50,21 @@ msgstr ""
 msgid "CycleAnalyticsStage|Test"
 msgstr ""
 
-msgid "Deploys"
+msgid "Deploy"
+msgid_plural "Deploys"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "FirstPushedBy|First"
+msgstr ""
+
+msgid "FirstPushedBy|pushed by"
+msgstr ""
+
+msgid "From issue creation until deploy to production"
+msgstr ""
+
+msgid "From merge request merge until deploy to production"
 msgstr ""
 
 msgid "Introducing Cycle Analytics"
@@ -70,8 +83,10 @@ msgstr[1] ""
 msgid "Median"
 msgstr ""
 
-msgid "New Issues"
-msgstr ""
+msgid "New Issue"
+msgid_plural "New Issues"
+msgstr[0] ""
+msgstr[1] ""
 
 msgid "Not available"
 msgstr ""
@@ -79,10 +94,10 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
-msgid "OfFirstTime|First"
+msgid "Opened"
 msgstr ""
 
-msgid "Opened"
+msgid "OpenedNDaysAgo|Opened"
 msgstr ""
 
 msgid "Pipeline Health"
@@ -150,6 +165,18 @@ msgstr ""
 msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
 msgstr ""
 
+msgid "Time before an issue gets scheduled"
+msgstr ""
+
+msgid "Time before an issue starts implementation"
+msgstr ""
+
+msgid "Time between merge request creation and merge/close"
+msgstr ""
+
+msgid "Time until first merge request"
+msgstr ""
+
 msgid "Time|hr"
 msgid_plural "Time|hrs"
 msgstr[0] ""
@@ -166,6 +193,9 @@ msgstr ""
 msgid "Total Time"
 msgstr ""
 
+msgid "Total test time for all commits/merges"
+msgstr ""
+
 msgid "Want to see the data? Please ask an administrator for access."
 msgstr ""
 
@@ -179,6 +209,3 @@ msgid "day"
 msgid_plural "days"
 msgstr[0] ""
 msgstr[1] ""
-
-msgid "pushed by"
-msgstr ""
diff --git a/locale/unfound_translations.rb b/locale/unfound_translations.rb
deleted file mode 100644
index e66211c1619..00000000000
--- a/locale/unfound_translations.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-N_('Commits')
-N_('CycleAnalyticsStage|Code')
-N_('CycleAnalyticsStage|Issue')
-N_('CycleAnalyticsStage|Plan')
-N_('CycleAnalyticsStage|Production')
-N_('CycleAnalyticsStage|Review')
-N_('CycleAnalyticsStage|Staging')
-N_('CycleAnalyticsStage|Test')
-N_('Deploys')
-N_('New Issues')
-- 
GitLab


From 628d641b067fd0c0ba16fc7f6d68bcd241a7a105 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 4 May 2017 01:58:57 -0500
Subject: [PATCH 38/42] Disable FastGettext from translating AR attrs.

It isn't working fine when using POROs in forms like WikiPage,
the following error is being raised: undefined method `abstract_class?' for Object:Class
---
 config/application.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/application.rb b/config/application.rb
index f2ecc4ce77c..32ad2393648 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -40,6 +40,9 @@ module Gitlab
     # config.i18n.default_locale = :de
     config.i18n.enforce_available_locales = false
 
+    # Translation for AR attrs is not working well for POROs like WikiPage
+    config.gettext_i18n_rails.use_for_active_record_attributes = false
+
     # Configure the default encoding used in templates for Ruby 1.9.
     config.encoding = "utf-8"
 
-- 
GitLab


From e1d22a054e5ebac2846da1c2f5fbdf2bc22a7117 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Thu, 4 May 2017 16:16:00 +0100
Subject: [PATCH 39/42] Updated JS object for Vue methods

---
 app/assets/javascripts/vue_shared/translate.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js
index ba9656d4e71..f83c4b00761 100644
--- a/app/assets/javascripts/vue_shared/translate.js
+++ b/app/assets/javascripts/vue_shared/translate.js
@@ -13,7 +13,7 @@ export default (Vue) => {
         @param text The text to be translated
         @returns {String} The translated text
       **/
-      __(text) { return __(text); },
+      __,
       /**
         Translate the text with a number
         if the number is more than 1 it will use the `pluralText` translation.
@@ -24,7 +24,7 @@ export default (Vue) => {
         @param count Number to decide which translation to use (eg. 2)
         @returns {String} Translated text with the number replaced (eg. '2 days')
       **/
-      n__(text, pluralText, count) { return n__(text, pluralText, count); },
+      n__,
       /**
         Translate context based text
         Either pass in the context translation like `Context|Text to translate`
@@ -36,7 +36,7 @@ export default (Vue) => {
         @param key Is the dynamic variable you want to be translated
         @returns {String} Translated context based text
       **/
-      s__(keyOrContext, key) { return s__(keyOrContext, key); },
+      s__,
     },
   });
 };
-- 
GitLab


From f7b7a520920204d1a2864af6d911ef9dc8c2df6b Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 4 May 2017 17:05:14 -0500
Subject: [PATCH 40/42] More updates for translations plus small tweaks.

---
 .../components/stage_issue_component.js       |   2 +-
 .../cycle_analytics_service.js                |   2 +-
 app/assets/javascripts/locale/de/app.js       |   2 +-
 app/assets/javascripts/locale/en/app.js       |   2 +-
 app/assets/javascripts/locale/es/app.js       |   2 +-
 app/views/profiles/show.html.haml             |   1 +
 .../projects/cycle_analytics/show.html.haml   |   2 +-
 config/locales/es.yml                         | 217 ++++++++++++++++++
 db/fixtures/development/17_cycle_analytics.rb |   2 +-
 locale/de/gitlab.po                           |   3 -
 locale/en/gitlab.po                           |   3 -
 locale/es/gitlab.po                           |  31 ++-
 locale/gitlab.pot                             |   7 +-
 13 files changed, 241 insertions(+), 35 deletions(-)
 create mode 100644 config/locales/es.yml

diff --git a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
index c4018c8fc36..ad285874643 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
+++ b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js
@@ -28,7 +28,7 @@ global.cycleAnalytics.StageIssueComponent = Vue.extend({
             <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
             &middot;
             <span>
-              {{ __('Opened') }}
+              {{ __('OpenedNDaysAgo|Opened') }}
               <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a>
             </span>
             <span>
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
index c176376e8cf..6504d7db2f2 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
@@ -30,7 +30,7 @@ class CycleAnalyticsService {
       startDate,
     } = options;
 
-    return $.get(`${this.requestPath}/events/${stage.name.toLowerCase()}.json`, {
+    return $.get(`${this.requestPath}/events/${stage.name}.json`, {
       cycle_analytics: {
         start_date: startDate,
       },
diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index aee25c34392..7dfa38dab8c 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"Opened":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index ed32f7e49c0..d6dcf739aad 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"Opened":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 0d8152bb863..2bb5145e67b 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-03 21:03-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":["por"],"Commit":["Cambio","Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploy":["Despliegue","Despliegues"],"FirstPushedBy|First":["Primer"],"FirstPushedBy|pushed by":["enviado por"],"From issue creation until deploy to production":["Desde la creación de la incidencia hasta el despliegue a producción"],"From merge request merge until deploy to production":["Desde la integración de la solicitud de fusión hasta el despliegue a producción"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issue":["Nueva incidencia","Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"Opened":["Abiertos"],"OpenedNDaysAgo|Opened":["Abierto"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relacionados Originados por Cambios"],"Relative Deployed Builds":["Builds Desplegados Relacionados"],"Relative Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida del desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time before an issue gets scheduled":["Tiempo antes de que una incidencia sea programada"],"Time before an issue starts implementation":["Tiempo antes de que empieze la implementación de una incidencia"],"Time between merge request creation and merge/close":["Tiempo entre la creación de la solicitud de fusión y la integración o cierre de esta"],"Time until first merge request":["Tiempo hasta la primera solicitud de fusión"],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":["Tiempo Total"],"Total test time for all commits/merges":["Tiempo total de pruebas para todos los cambios o integraciones"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pedir acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-04 14:52-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":["por"],"Commit":["Cambio","Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploy":["Despliegue","Despliegues"],"FirstPushedBy|First":["Primer"],"FirstPushedBy|pushed by":["enviado por"],"From issue creation until deploy to production":["Desde la creación de la incidencia hasta el despliegue a producción"],"From merge request merge until deploy to production":["Desde la integración de la solicitud de fusión hasta el despliegue a producción"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issue":["Nueva incidencia","Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OpenedNDaysAgo|Opened":["Abierto"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relativos Originados por Cambios"],"Relative Deployed Builds":["Builds Desplegados Relativos"],"Relative Merged Requests":["Solicitudes de fusión Relativas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida de desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe el primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time before an issue gets scheduled":["Tiempo antes de que una incidencia sea programada"],"Time before an issue starts implementation":["Tiempo antes de que empieze la implementación de una incidencia"],"Time between merge request creation and merge/close":["Tiempo entre la creación de la solicitud de fusión y la integración o cierre de ésta"],"Time until first merge request":["Tiempo hasta la primera solicitud de fusión"],"Time|hr":["hr","hrs"],"Time|min":["min","mins"],"Time|s":["s"],"Total Time":["Tiempo Total"],"Total test time for all commits/merges":["Tiempo total de pruebas para todos los cambios o integraciones"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pide acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"]}}};
\ No newline at end of file
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 6e14be62e32..4a1438aa68e 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -76,6 +76,7 @@
         = f.label :preferred_language, class: "label-light"
         = f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |value, label| [label, value] },
           {}, class: "select2"
+        %span.help-block This feature is experimental and translations are not complete yet.
       .form-group
         = f.label :skype, class: "label-light"
         = f.text_field :skype, class: "form-control"
diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml
index eadaff70e04..819f29d3ca5 100644
--- a/app/views/projects/cycle_analytics/show.html.haml
+++ b/app/views/projects/cycle_analytics/show.html.haml
@@ -31,7 +31,7 @@
           .row
             .col-sm-3.col-xs-12.column{ "v-for" => "item in state.summary" }
               %h3.header {{ item.value }}
-              %p.text {{ __(item.title) }}
+              %p.text {{ item.title }}
             .col-sm-3.col-xs-12.column
               .dropdown.inline.js-ca-dropdown
                 %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
diff --git a/config/locales/es.yml b/config/locales/es.yml
new file mode 100644
index 00000000000..87e79beee74
--- /dev/null
+++ b/config/locales/es.yml
@@ -0,0 +1,217 @@
+---
+es:
+  activerecord:
+    errors:
+      messages:
+        record_invalid: "La validación falló: %{errors}"
+        restrict_dependent_destroy:
+          has_one: No se puede eliminar el registro porque existe un %{record} dependiente
+          has_many: No se puede eliminar el registro porque existen %{record} dependientes
+  date:
+    abbr_day_names:
+    - dom
+    - lun
+    - mar
+    - mié
+    - jue
+    - vie
+    - sáb
+    abbr_month_names:
+    -
+    - ene
+    - feb
+    - mar
+    - abr
+    - may
+    - jun
+    - jul
+    - ago
+    - sep
+    - oct
+    - nov
+    - dic
+    day_names:
+    - domingo
+    - lunes
+    - martes
+    - miércoles
+    - jueves
+    - viernes
+    - sábado
+    formats:
+      default: "%d/%m/%Y"
+      long: "%d de %B de %Y"
+      short: "%d de %b"
+    month_names:
+    -
+    - enero
+    - febrero
+    - marzo
+    - abril
+    - mayo
+    - junio
+    - julio
+    - agosto
+    - septiembre
+    - octubre
+    - noviembre
+    - diciembre
+    order:
+    - :day
+    - :month
+    - :year
+  datetime:
+    distance_in_words:
+      about_x_hours:
+        one: alrededor de 1 hora
+        other: alrededor de %{count} horas
+      about_x_months:
+        one: alrededor de 1 mes
+        other: alrededor de %{count} meses
+      about_x_years:
+        one: alrededor de 1 año
+        other: alrededor de %{count} años
+      almost_x_years:
+        one: casi 1 año
+        other: casi %{count} años
+      half_a_minute: medio minuto
+      less_than_x_minutes:
+        one: menos de 1 minuto
+        other: menos de %{count} minutos
+      less_than_x_seconds:
+        one: menos de 1 segundo
+        other: menos de %{count} segundos
+      over_x_years:
+        one: más de 1 año
+        other: más de %{count} años
+      x_days:
+        one: 1 día
+        other: "%{count} días"
+      x_minutes:
+        one: 1 minuto
+        other: "%{count} minutos"
+      x_months:
+        one: 1 mes
+        other: "%{count} meses"
+      x_years:
+        one: 1 año
+        other: "%{count} años"
+      x_seconds:
+        one: 1 segundo
+        other: "%{count} segundos"
+    prompts:
+      day: Día
+      hour: Hora
+      minute: Minutos
+      month: Mes
+      second: Segundos
+      year: Año
+  errors:
+    format: "%{attribute} %{message}"
+    messages:
+      accepted: debe ser aceptado
+      blank: no puede estar en blanco
+      present: debe estar en blanco
+      confirmation: no coincide
+      empty: no puede estar vacío
+      equal_to: debe ser igual a %{count}
+      even: debe ser par
+      exclusion: está reservado
+      greater_than: debe ser mayor que %{count}
+      greater_than_or_equal_to: debe ser mayor que o igual a %{count}
+      inclusion: no está incluido en la lista
+      invalid: no es válido
+      less_than: debe ser menor que %{count}
+      less_than_or_equal_to: debe ser menor que o igual a %{count}
+      model_invalid: "La validación falló: %{errors}"
+      not_a_number: no es un número
+      not_an_integer: debe ser un entero
+      odd: debe ser impar
+      required: debe existir
+      taken: ya está en uso
+      too_long:
+        one: "es demasiado largo (1 carácter máximo)"
+        other: "es demasiado largo (%{count} caracteres máximo)"
+      too_short:
+        one: "es demasiado corto (1 carácter mínimo)"
+        other: "es demasiado corto (%{count} caracteres mínimo)"
+      wrong_length:
+        one: "no tiene la longitud correcta (1 carácter exactos)"
+        other: "no tiene la longitud correcta (%{count} caracteres exactos)"
+      other_than: debe ser distinto de %{count}
+    template:
+      body: 'Se encontraron problemas con los siguientes campos:'
+      header:
+        one: No se pudo guardar este/a %{model} porque se encontró 1 error
+        other: No se pudo guardar este/a %{model} porque se encontraron %{count} errores
+  helpers:
+    select:
+      prompt: Por favor seleccione
+    submit:
+      create: Crear %{model}
+      submit: Guardar %{model}
+      update: Actualizar %{model}
+  number:
+    currency:
+      format:
+        delimiter: "."
+        format: "%n %u"
+        precision: 2
+        separator: ","
+        significant: false
+        strip_insignificant_zeros: false
+        unit: "€"
+    format:
+      delimiter: "."
+      precision: 3
+      separator: ","
+      significant: false
+      strip_insignificant_zeros: false
+    human:
+      decimal_units:
+        format: "%n %u"
+        units:
+          billion: mil millones
+          million:
+            one: millón
+            other: millones
+          quadrillion: mil billones
+          thousand: mil
+          trillion:
+            one: billón
+            other: billones
+          unit: ''
+      format:
+        delimiter: ''
+        precision: 1
+        significant: true
+        strip_insignificant_zeros: true
+      storage_units:
+        format: "%n %u"
+        units:
+          byte:
+            one: Byte
+            other: Bytes
+          gb: GB
+          kb: KB
+          mb: MB
+          tb: TB
+    percentage:
+      format:
+        delimiter: ''
+        format: "%n %"
+    precision:
+      format:
+        delimiter: ''
+  support:
+    array:
+      last_word_connector: " y "
+      two_words_connector: " y "
+      words_connector: ", "
+  time:
+    am: am
+    formats:
+      default: "%A, %d de %B de %Y %H:%M:%S %z"
+      long: "%d de %B de %Y %H:%M"
+      short: "%d de %b %H:%M"
+    pm: pm
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index 040505ad52c..0d7eb1a7c93 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -227,7 +227,7 @@ Gitlab::Seeder.quiet do
 
   if ENV[flag]
     Project.all.each do |project|
-      seeder = Gitlab::Seeder::CycleAnalytics.new(pro)
+      seeder = Gitlab::Seeder::CycleAnalytics.new(project)
       seeder.seed!
     end
   elsif ENV['CYCLE_ANALYTICS_PERF_TEST']
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 3e7bcf2c90f..5a13000434e 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -93,9 +93,6 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
-msgid "Opened"
-msgstr ""
-
 msgid "OpenedNDaysAgo|Opened"
 msgstr ""
 
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 9f75b5641a4..93ecefec762 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -93,9 +93,6 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
-msgid "Opened"
-msgstr ""
-
 msgid "OpenedNDaysAgo|Opened"
 msgstr ""
 
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 6806bf21677..2074912c147 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-05-03 21:03-0500\n"
+"PO-Revision-Date: 2017-05-04 14:52-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -94,9 +94,6 @@ msgstr "No disponible"
 msgid "Not enough data"
 msgstr "No hay suficientes datos"
 
-msgid "Opened"
-msgstr "Abiertos"
-
 msgid "OpenedNDaysAgo|Opened"
 msgstr "Abierto"
 
@@ -119,13 +116,13 @@ msgid "Related Merge Requests"
 msgstr "Solicitudes de fusión Relacionadas"
 
 msgid "Relative Builds Trigger by Commits"
-msgstr "Builds Relacionados Originados por Cambios"
+msgstr "Builds Relativos Originados por Cambios"
 
 msgid "Relative Deployed Builds"
-msgstr "Builds Desplegados Relacionados"
+msgstr "Builds Desplegados Relativos"
 
 msgid "Relative Merged Requests"
-msgstr "Solicitudes de fusión Relacionadas"
+msgstr "Solicitudes de fusión Relativas"
 
 msgid "Showing %d event"
 msgid_plural "Showing %d events"
@@ -142,10 +139,10 @@ msgid "The issue stage shows the time it takes from creating an issue to assigni
 msgstr "La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."
 
 msgid "The phase of the development lifecycle."
-msgstr "La etapa del ciclo de vida del desarrollo."
+msgstr "La etapa del ciclo de vida de desarrollo."
 
 msgid "The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit."
-msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe su primer cambio."
+msgstr "La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe el primer cambio."
 
 msgid "The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle."
 msgstr "La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."
@@ -154,7 +151,7 @@ msgid "The review stage shows the time from creating the merge request to mergin
 msgstr "La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."
 
 msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
-msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión  y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."
+msgstr "La etapa de puesta en escena muestra el tiempo entre la fusión y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."
 
 msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
 msgstr "La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."
@@ -172,23 +169,23 @@ msgid "Time before an issue starts implementation"
 msgstr "Tiempo antes de que empieze la implementación de una incidencia"
 
 msgid "Time between merge request creation and merge/close"
-msgstr "Tiempo entre la creación de la solicitud de fusión y la integración o cierre de esta"
+msgstr "Tiempo entre la creación de la solicitud de fusión y la integración o cierre de ésta"
 
 msgid "Time until first merge request"
 msgstr "Tiempo hasta la primera solicitud de fusión"
 
 msgid "Time|hr"
 msgid_plural "Time|hrs"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "hr"
+msgstr[1] "hrs"
 
 msgid "Time|min"
 msgid_plural "Time|mins"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "min"
+msgstr[1] "mins"
 
 msgid "Time|s"
-msgstr ""
+msgstr "s"
 
 msgid "Total Time"
 msgstr "Tiempo Total"
@@ -197,7 +194,7 @@ msgid "Total test time for all commits/merges"
 msgstr "Tiempo total de pruebas para todos los cambios o integraciones"
 
 msgid "Want to see the data? Please ask an administrator for access."
-msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
+msgstr "¿Quieres ver los datos? Por favor pide acceso al administrador."
 
 msgid "We don't have enough data to show this stage."
 msgstr "No hay suficientes datos para mostrar en esta etapa."
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index e1796d51935..4473f5715a2 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: 2017-05-03 20:53-0500\n"
-"PO-Revision-Date: 2017-05-03 20:53-0500\n"
+"POT-Creation-Date: 2017-05-04 14:55-0500\n"
+"PO-Revision-Date: 2017-05-04 14:55-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -94,9 +94,6 @@ msgstr ""
 msgid "Not enough data"
 msgstr ""
 
-msgid "Opened"
-msgstr ""
-
 msgid "OpenedNDaysAgo|Opened"
 msgstr ""
 
-- 
GitLab


From b396668ec55fb866ef578e5f0e60df8b13519613 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 4 May 2017 18:44:19 -0500
Subject: [PATCH 41/42] Add CHANGELOG entry, some specs and locale file for
 German.

---
 .../unreleased/implement-i18n-support.yml     |   4 +
 config/locales/de.yml                         | 219 ++++++++++++++++++
 lib/gitlab/i18n.rb                            |   7 +-
 spec/features/cycle_analytics_spec.rb         |  19 ++
 spec/lib/gitlab/i18n_spec.rb                  |  27 +++
 spec/models/user_spec.rb                      |   8 +
 6 files changed, 281 insertions(+), 3 deletions(-)
 create mode 100644 changelogs/unreleased/implement-i18n-support.yml
 create mode 100644 config/locales/de.yml
 create mode 100644 spec/lib/gitlab/i18n_spec.rb

diff --git a/changelogs/unreleased/implement-i18n-support.yml b/changelogs/unreleased/implement-i18n-support.yml
new file mode 100644
index 00000000000..d304fbecf90
--- /dev/null
+++ b/changelogs/unreleased/implement-i18n-support.yml
@@ -0,0 +1,4 @@
+---
+title: Add support for i18n on Cycle Analytics page
+merge_request: 10669
+author:
diff --git a/config/locales/de.yml b/config/locales/de.yml
new file mode 100644
index 00000000000..533663a2704
--- /dev/null
+++ b/config/locales/de.yml
@@ -0,0 +1,219 @@
+---
+de:
+  activerecord:
+    errors:
+      messages:
+        record_invalid: 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
+        restrict_dependent_destroy:
+          has_one: Datensatz kann nicht gelöscht werden, da ein abhängiger %{record}-Datensatz
+            existiert.
+          has_many: Datensatz kann nicht gelöscht werden, da abhängige %{record} existieren.
+  date:
+    abbr_day_names:
+    - So
+    - Mo
+    - Di
+    - Mi
+    - Do
+    - Fr
+    - Sa
+    abbr_month_names:
+    -
+    - Jan
+    - Feb
+    - Mär
+    - Apr
+    - Mai
+    - Jun
+    - Jul
+    - Aug
+    - Sep
+    - Okt
+    - Nov
+    - Dez
+    day_names:
+    - Sonntag
+    - Montag
+    - Dienstag
+    - Mittwoch
+    - Donnerstag
+    - Freitag
+    - Samstag
+    formats:
+      default: "%d.%m.%Y"
+      long: "%e. %B %Y"
+      short: "%e. %b"
+    month_names:
+    -
+    - Januar
+    - Februar
+    - März
+    - April
+    - Mai
+    - Juni
+    - Juli
+    - August
+    - September
+    - Oktober
+    - November
+    - Dezember
+    order:
+    - :day
+    - :month
+    - :year
+  datetime:
+    distance_in_words:
+      about_x_hours:
+        one: etwa eine Stunde
+        other: etwa %{count} Stunden
+      about_x_months:
+        one: etwa ein Monat
+        other: etwa %{count} Monate
+      about_x_years:
+        one: etwa ein Jahr
+        other: etwa %{count} Jahre
+      almost_x_years:
+        one: fast ein Jahr
+        other: fast %{count} Jahre
+      half_a_minute: eine halbe Minute
+      less_than_x_minutes:
+        one: weniger als eine Minute
+        other: weniger als %{count} Minuten
+      less_than_x_seconds:
+        one: weniger als eine Sekunde
+        other: weniger als %{count} Sekunden
+      over_x_years:
+        one: mehr als ein Jahr
+        other: mehr als %{count} Jahre
+      x_days:
+        one: ein Tag
+        other: "%{count} Tage"
+      x_minutes:
+        one: eine Minute
+        other: "%{count} Minuten"
+      x_months:
+        one: ein Monat
+        other: "%{count} Monate"
+      x_seconds:
+        one: eine Sekunde
+        other: "%{count} Sekunden"
+    prompts:
+      day: Tag
+      hour: Stunden
+      minute: Minute
+      month: Monat
+      second: Sekunde
+      year: Jahr
+  errors:
+    format: "%{attribute} %{message}"
+    messages:
+      accepted: muss akzeptiert werden
+      blank: muss ausgefüllt werden
+      present: darf nicht ausgefüllt werden
+      confirmation: stimmt nicht mit %{attribute} überein
+      empty: muss ausgefüllt werden
+      equal_to: muss genau %{count} sein
+      even: muss gerade sein
+      exclusion: ist nicht verfügbar
+      greater_than: muss größer als %{count} sein
+      greater_than_or_equal_to: muss größer oder gleich %{count} sein
+      inclusion: ist kein gültiger Wert
+      invalid: ist nicht gültig
+      less_than: muss kleiner als %{count} sein
+      less_than_or_equal_to: muss kleiner oder gleich %{count} sein
+      model_invalid: 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
+      not_a_number: ist keine Zahl
+      not_an_integer: muss ganzzahlig sein
+      odd: muss ungerade sein
+      required: muss ausgefüllt werden
+      taken: ist bereits vergeben
+      too_long:
+        one: ist zu lang (mehr als 1 Zeichen)
+        other: ist zu lang (mehr als %{count} Zeichen)
+      too_short:
+        one: ist zu kurz (weniger als 1 Zeichen)
+        other: ist zu kurz (weniger als %{count} Zeichen)
+      wrong_length:
+        one: hat die falsche Länge (muss genau 1 Zeichen haben)
+        other: hat die falsche Länge (muss genau %{count} Zeichen haben)
+      other_than: darf nicht gleich %{count} sein
+    template:
+      body: 'Bitte überprüfen Sie die folgenden Felder:'
+      header:
+        one: 'Konnte %{model} nicht speichern: ein Fehler.'
+        other: 'Konnte %{model} nicht speichern: %{count} Fehler.'
+  helpers:
+    select:
+      prompt: Bitte wählen
+    submit:
+      create: "%{model} erstellen"
+      submit: "%{model} speichern"
+      update: "%{model} aktualisieren"
+  number:
+    currency:
+      format:
+        delimiter: "."
+        format: "%n %u"
+        precision: 2
+        separator: ","
+        significant: false
+        strip_insignificant_zeros: false
+        unit: "€"
+    format:
+      delimiter: "."
+      precision: 2
+      separator: ","
+      significant: false
+      strip_insignificant_zeros: false
+    human:
+      decimal_units:
+        format: "%n %u"
+        units:
+          billion:
+            one: Milliarde
+            other: Milliarden
+          million:
+            one: Million
+            other: Millionen
+          quadrillion:
+            one: Billiarde
+            other: Billiarden
+          thousand: Tausend
+          trillion:
+            one: Billion
+            other: Billionen
+          unit: ''
+      format:
+        delimiter: ''
+        precision: 3
+        significant: true
+        strip_insignificant_zeros: true
+      storage_units:
+        format: "%n %u"
+        units:
+          byte:
+            one: Byte
+            other: Bytes
+          gb: GB
+          kb: KB
+          mb: MB
+          tb: TB
+    percentage:
+      format:
+        delimiter: ''
+        format: "%n %"
+    precision:
+      format:
+        delimiter: ''
+  support:
+    array:
+      last_word_connector: " und "
+      two_words_connector: " und "
+      words_connector: ", "
+  time:
+    am: vormittags
+    formats:
+      default: "%A, %d. %B %Y, %H:%M Uhr"
+      long: "%A, %d. %B %Y, %H:%M Uhr"
+      short: "%d. %B, %H:%M Uhr"
+    pm: nachmittags
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb
index 9081ced0238..3411516319f 100644
--- a/lib/gitlab/i18n.rb
+++ b/lib/gitlab/i18n.rb
@@ -3,9 +3,9 @@ module Gitlab
     extend self
 
     AVAILABLE_LANGUAGES = {
-      en: 'English',
-      es: 'Español',
-      de: 'Deutsch'
+      'en' => 'English',
+      'es' => 'Español',
+      'de' => 'Deutsch'
     }.freeze
 
     def available_locales
@@ -19,6 +19,7 @@ module Gitlab
     end
 
     def reset_locale
+      FastGettext.set_locale(::I18n.default_locale)
       ::I18n.locale = ::I18n.default_locale
     end
   end
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb
index b93275c330b..7c9d522273b 100644
--- a/spec/features/cycle_analytics_spec.rb
+++ b/spec/features/cycle_analytics_spec.rb
@@ -62,6 +62,25 @@ feature 'Cycle Analytics', feature: true, js: true do
         expect_issue_to_be_present
       end
     end
+
+    context "when my preferred language is Spanish" do
+      before do
+        user.update_attribute(:preferred_language, 'es')
+
+        project.team << [user, :master]
+        login_as(user)
+        visit namespace_project_cycle_analytics_path(project.namespace, project)
+        wait_for_ajax
+      end
+
+      it 'shows the content in Spanish' do
+        expect(page).to have_content('Estado del Pipeline')
+      end
+
+      it 'resets the language to English' do
+        expect(I18n.locale).to eq(:en)
+      end
+    end
   end
 
   context "as a guest" do
diff --git a/spec/lib/gitlab/i18n_spec.rb b/spec/lib/gitlab/i18n_spec.rb
new file mode 100644
index 00000000000..52f2614d5ca
--- /dev/null
+++ b/spec/lib/gitlab/i18n_spec.rb
@@ -0,0 +1,27 @@
+require 'spec_helper'
+
+module Gitlab
+  describe I18n, lib: true do
+    let(:user) { create(:user, preferred_language: 'es') }
+
+    describe '.set_locale' do
+      it 'sets the locale based on current user preferred language' do
+        Gitlab::I18n.set_locale(user)
+
+        expect(FastGettext.locale).to eq('es')
+        expect(::I18n.locale).to eq(:es)
+      end
+    end
+
+    describe '.reset_locale' do
+      it 'resets the locale to the default language' do
+        Gitlab::I18n.set_locale(user)
+
+        Gitlab::I18n.reset_locale
+
+        expect(FastGettext.locale).to eq('en')
+        expect(::I18n.locale).to eq(:en)
+      end
+    end
+  end
+end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 1c2df4c9d97..13179174956 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1663,4 +1663,12 @@ describe User, models: true do
       expect(User.active.count).to eq(1)
     end
   end
+
+  describe 'preferred language' do
+    it 'is English by default' do
+      user = create(:user)
+
+      expect(user.preferred_language).to eq('en')
+    end
+  end
 end
-- 
GitLab


From 7f24b87b3beb142cadc7644db3ab4c49fdd04839 Mon Sep 17 00:00:00 2001
From: Ruben Davila <rdavila84@gmail.com>
Date: Thu, 4 May 2017 19:27:17 -0500
Subject: [PATCH 42/42] Some small updates for Spanish translations.

---
 app/assets/javascripts/locale/de/app.js     |  2 +-
 app/assets/javascripts/locale/en/app.js     |  2 +-
 app/assets/javascripts/locale/es/app.js     |  2 +-
 lib/gitlab/cycle_analytics/review_stage.rb  |  2 +-
 lib/gitlab/cycle_analytics/staging_stage.rb |  2 +-
 lib/gitlab/cycle_analytics/test_stage.rb    |  2 +-
 locale/de/gitlab.po                         | 10 +++++-----
 locale/en/gitlab.po                         | 10 +++++-----
 locale/es/gitlab.po                         | 18 +++++++++---------
 locale/gitlab.pot                           | 14 +++++++-------
 10 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/app/assets/javascripts/locale/de/app.js b/app/assets/javascripts/locale/de/app.js
index 7dfa38dab8c..e96090da80e 100644
--- a/app/assets/javascripts/locale/de/app.js
+++ b/app/assets/javascripts/locale/de/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['de'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:37-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"German","Language":"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"de","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Deployed Jobs":[""],"Related Issues":[""],"Related Jobs":[""],"Related Merge Requests":[""],"Related Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/en/app.js b/app/assets/javascripts/locale/en/app.js
index d6dcf739aad..ade9b667b3c 100644
--- a/app/assets/javascripts/locale/en/app.js
+++ b/app/assets/javascripts/locale/en/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Issues":[""],"Related Merge Requests":[""],"Relative Builds Trigger by Commits":[""],"Relative Deployed Builds":[""],"Relative Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
+var locales = locales || {}; locales['en'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-04-12 22:36-0500","Last-Translator":"FULL NAME <EMAIL@ADDRESS>","Language-Team":"English","Language":"en","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","lang":"en","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":[""],"Commit":["",""],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":[""],"CycleAnalyticsStage|Code":[""],"CycleAnalyticsStage|Issue":[""],"CycleAnalyticsStage|Plan":[""],"CycleAnalyticsStage|Production":[""],"CycleAnalyticsStage|Review":[""],"CycleAnalyticsStage|Staging":[""],"CycleAnalyticsStage|Test":[""],"Deploy":["",""],"FirstPushedBy|First":[""],"FirstPushedBy|pushed by":[""],"From issue creation until deploy to production":[""],"From merge request merge until deploy to production":[""],"Introducing Cycle Analytics":[""],"Last %d day":["",""],"Limited to showing %d event at most":["",""],"Median":[""],"New Issue":["",""],"Not available":[""],"Not enough data":[""],"OpenedNDaysAgo|Opened":[""],"Pipeline Health":[""],"ProjectLifecycle|Stage":[""],"Read more":[""],"Related Commits":[""],"Related Deployed Jobs":[""],"Related Issues":[""],"Related Jobs":[""],"Related Merge Requests":[""],"Related Merged Requests":[""],"Showing %d event":["",""],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":[""],"The collection of events added to the data gathered for that stage.":[""],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":[""],"The phase of the development lifecycle.":[""],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":[""],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":[""],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":[""],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":[""],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":[""],"The time taken by each data entry gathered by that stage.":[""],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":[""],"Time before an issue gets scheduled":[""],"Time before an issue starts implementation":[""],"Time between merge request creation and merge/close":[""],"Time until first merge request":[""],"Time|hr":["",""],"Time|min":["",""],"Time|s":[""],"Total Time":[""],"Total test time for all commits/merges":[""],"Want to see the data? Please ask an administrator for access.":[""],"We don't have enough data to show this stage.":[""],"You need permission.":[""],"day":["",""]}}};
\ No newline at end of file
diff --git a/app/assets/javascripts/locale/es/app.js b/app/assets/javascripts/locale/es/app.js
index 2bb5145e67b..3dafa21f235 100644
--- a/app/assets/javascripts/locale/es/app.js
+++ b/app/assets/javascripts/locale/es/app.js
@@ -1 +1 @@
-var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-04 14:52-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":["por"],"Commit":["Cambio","Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploy":["Despliegue","Despliegues"],"FirstPushedBy|First":["Primer"],"FirstPushedBy|pushed by":["enviado por"],"From issue creation until deploy to production":["Desde la creación de la incidencia hasta el despliegue a producción"],"From merge request merge until deploy to production":["Desde la integración de la solicitud de fusión hasta el despliegue a producción"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issue":["Nueva incidencia","Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OpenedNDaysAgo|Opened":["Abierto"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Relative Builds Trigger by Commits":["Builds Relativos Originados por Cambios"],"Relative Deployed Builds":["Builds Desplegados Relativos"],"Relative Merged Requests":["Solicitudes de fusión Relativas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida de desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe el primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time before an issue gets scheduled":["Tiempo antes de que una incidencia sea programada"],"Time before an issue starts implementation":["Tiempo antes de que empieze la implementación de una incidencia"],"Time between merge request creation and merge/close":["Tiempo entre la creación de la solicitud de fusión y la integración o cierre de ésta"],"Time until first merge request":["Tiempo hasta la primera solicitud de fusión"],"Time|hr":["hr","hrs"],"Time|min":["min","mins"],"Time|s":["s"],"Total Time":["Tiempo Total"],"Total test time for all commits/merges":["Tiempo total de pruebas para todos los cambios o integraciones"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pide acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"]}}};
\ No newline at end of file
+var locales = locales || {}; locales['es'] = {"domain":"app","locale_data":{"app":{"":{"Project-Id-Version":"gitlab 1.0.0","Report-Msgid-Bugs-To":"","PO-Revision-Date":"2017-05-04 19:24-0500","Language-Team":"Spanish","Language":"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=n != 1;","Last-Translator":"","X-Generator":"Poedit 2.0.1","lang":"es","domain":"app","plural_forms":"nplurals=2; plural=n != 1;"},"ByAuthor|by":["por"],"Commit":["Cambio","Cambios"],"Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.":["Cycle Analytics ofrece una visión general de cuánto tiempo tarda en pasar de idea a producción en su proyecto."],"CycleAnalyticsStage|Code":["Código"],"CycleAnalyticsStage|Issue":["Incidencia"],"CycleAnalyticsStage|Plan":["Planificación"],"CycleAnalyticsStage|Production":["Producción"],"CycleAnalyticsStage|Review":["Revisión"],"CycleAnalyticsStage|Staging":["Puesta en escena"],"CycleAnalyticsStage|Test":["Pruebas"],"Deploy":["Despliegue","Despliegues"],"FirstPushedBy|First":["Primer"],"FirstPushedBy|pushed by":["enviado por"],"From issue creation until deploy to production":["Desde la creación de la incidencia hasta el despliegue a producción"],"From merge request merge until deploy to production":["Desde la integración de la solicitud de fusión hasta el despliegue a producción"],"Introducing Cycle Analytics":["Introducción a Cycle Analytics"],"Last %d day":["Último %d día","Últimos %d días"],"Limited to showing %d event at most":["Limitado a mostrar máximo %d evento","Limitado a mostrar máximo %d eventos"],"Median":["Mediana"],"New Issue":["Nueva incidencia","Nuevas incidencias"],"Not available":["No disponible"],"Not enough data":["No hay suficientes datos"],"OpenedNDaysAgo|Opened":["Abierto"],"Pipeline Health":["Estado del Pipeline"],"ProjectLifecycle|Stage":["Etapa"],"Read more":["Leer más"],"Related Commits":["Cambios Relacionados"],"Related Deployed Jobs":["Trabajos Desplegados Relacionados"],"Related Issues":["Incidencias Relacionadas"],"Related Jobs":["Trabajos Relacionados"],"Related Merge Requests":["Solicitudes de fusión Relacionadas"],"Related Merged Requests":["Solicitudes de fusión Relacionadas"],"Showing %d event":["Mostrando %d evento","Mostrando %d eventos"],"The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.":["La etapa de codificación muestra el tiempo desde el primer cambio hasta la creación de la solicitud de fusión. Los datos serán automáticamente incorporados aquí una vez creada tu primera solicitud de fusión."],"The collection of events added to the data gathered for that stage.":["La colección de eventos agregados a los datos recopilados para esa etapa."],"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.":["La etapa de incidencia muestra el tiempo que toma desde la creación de un tema hasta asignar el tema a un hito, o añadir el tema a una lista en el panel de temas. Empieza a crear temas para ver los datos de esta etapa."],"The phase of the development lifecycle.":["La etapa del ciclo de vida de desarrollo."],"The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.":["La etapa de planificación muestra el tiempo desde el paso anterior hasta el envío de tu primera confirmación. Este tiempo se añadirá automáticamente una vez que usted envíe el primer cambio."],"The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.":["La etapa de producción muestra el tiempo total que tarda entre la creación de una incidencia y el despliegue del código a producción. Los datos se añadirán automáticamente una vez haya finalizado por completo el ciclo de idea a producción."],"The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.":["La etapa de revisión muestra el tiempo desde la creación de la solicitud de fusión hasta que los cambios se fusionaron. Los datos se añadirán automáticamente después de fusionar su primera solicitud de fusión."],"The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.":["La etapa de puesta en escena muestra el tiempo entre la fusión y el despliegue de código en el entorno de producción. Los datos se añadirán automáticamente una vez que se despliega a producción por primera vez."],"The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.":["La etapa de pruebas muestra el tiempo que GitLab CI toma para ejecutar cada pipeline para la solicitud de fusión relacionada. Los datos se añadirán automáticamente luego de que el primer pipeline termine de ejecutarse."],"The time taken by each data entry gathered by that stage.":["El tiempo utilizado por cada entrada de datos obtenido por esa etapa."],"The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.":["El valor en el punto medio de una serie de valores observados. Por ejemplo, entre 3, 5, 9, la mediana es 5. Entre 3, 5, 7, 8, la mediana es (5 + 7) / 2 = 6."],"Time before an issue gets scheduled":["Tiempo antes de que una incidencia sea programada"],"Time before an issue starts implementation":["Tiempo antes de que empieze la implementación de una incidencia"],"Time between merge request creation and merge/close":["Tiempo entre la creación de la solicitud de fusión y la integración o cierre de ésta"],"Time until first merge request":["Tiempo hasta la primera solicitud de fusión"],"Time|hr":["hr","hrs"],"Time|min":["min","mins"],"Time|s":["s"],"Total Time":["Tiempo Total"],"Total test time for all commits/merges":["Tiempo total de pruebas para todos los cambios o integraciones"],"Want to see the data? Please ask an administrator for access.":["¿Quieres ver los datos? Por favor pide acceso al administrador."],"We don't have enough data to show this stage.":["No hay suficientes datos para mostrar en esta etapa."],"You need permission.":["Necesitas permisos."],"day":["día","días"]}}};
\ No newline at end of file
diff --git a/lib/gitlab/cycle_analytics/review_stage.rb b/lib/gitlab/cycle_analytics/review_stage.rb
index 0642e1ce32f..cfbbdc43fd9 100644
--- a/lib/gitlab/cycle_analytics/review_stage.rb
+++ b/lib/gitlab/cycle_analytics/review_stage.rb
@@ -18,7 +18,7 @@ module Gitlab
       end
 
       def legend
-        "Related Merged Requests"
+        _("Related Merged Requests")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/staging_stage.rb b/lib/gitlab/cycle_analytics/staging_stage.rb
index d5c7d3f915a..d5684bb9201 100644
--- a/lib/gitlab/cycle_analytics/staging_stage.rb
+++ b/lib/gitlab/cycle_analytics/staging_stage.rb
@@ -19,7 +19,7 @@ module Gitlab
       end
 
       def legend
-        "Related Deployed Jobs"
+        _("Related Deployed Jobs")
       end
 
       def description
diff --git a/lib/gitlab/cycle_analytics/test_stage.rb b/lib/gitlab/cycle_analytics/test_stage.rb
index 956ee9b8b74..2b5f72bef89 100644
--- a/lib/gitlab/cycle_analytics/test_stage.rb
+++ b/lib/gitlab/cycle_analytics/test_stage.rb
@@ -18,7 +18,7 @@ module Gitlab
       end
 
       def legend
-        "Related Jobs"
+        _("Related Jobs")
       end
 
       def description
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 5a13000434e..b804dc0436f 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -108,19 +108,19 @@ msgstr ""
 msgid "Related Commits"
 msgstr ""
 
-msgid "Related Issues"
+msgid "Related Deployed Jobs"
 msgstr ""
 
-msgid "Related Merge Requests"
+msgid "Related Issues"
 msgstr ""
 
-msgid "Relative Builds Trigger by Commits"
+msgid "Related Jobs"
 msgstr ""
 
-msgid "Relative Deployed Builds"
+msgid "Related Merge Requests"
 msgstr ""
 
-msgid "Relative Merged Requests"
+msgid "Related Merged Requests"
 msgstr ""
 
 msgid "Showing %d event"
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 93ecefec762..a43bafbbe28 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -108,19 +108,19 @@ msgstr ""
 msgid "Related Commits"
 msgstr ""
 
-msgid "Related Issues"
+msgid "Related Deployed Jobs"
 msgstr ""
 
-msgid "Related Merge Requests"
+msgid "Related Issues"
 msgstr ""
 
-msgid "Relative Builds Trigger by Commits"
+msgid "Related Jobs"
 msgstr ""
 
-msgid "Relative Deployed Builds"
+msgid "Related Merge Requests"
 msgstr ""
 
-msgid "Relative Merged Requests"
+msgid "Related Merged Requests"
 msgstr ""
 
 msgid "Showing %d event"
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 2074912c147..c14ddd3b94c 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gitlab 1.0.0\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2017-05-04 14:52-0500\n"
+"PO-Revision-Date: 2017-05-04 19:24-0500\n"
 "Language-Team: Spanish\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
@@ -109,20 +109,20 @@ msgstr "Leer más"
 msgid "Related Commits"
 msgstr "Cambios Relacionados"
 
+msgid "Related Deployed Jobs"
+msgstr "Trabajos Desplegados Relacionados"
+
 msgid "Related Issues"
 msgstr "Incidencias Relacionadas"
 
+msgid "Related Jobs"
+msgstr "Trabajos Relacionados"
+
 msgid "Related Merge Requests"
 msgstr "Solicitudes de fusión Relacionadas"
 
-msgid "Relative Builds Trigger by Commits"
-msgstr "Builds Relativos Originados por Cambios"
-
-msgid "Relative Deployed Builds"
-msgstr "Builds Desplegados Relativos"
-
-msgid "Relative Merged Requests"
-msgstr "Solicitudes de fusión Relativas"
+msgid "Related Merged Requests"
+msgstr "Solicitudes de fusión Relacionadas"
 
 msgid "Showing %d event"
 msgid_plural "Showing %d events"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 4473f5715a2..3967d40ea9e 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: 2017-05-04 14:55-0500\n"
-"PO-Revision-Date: 2017-05-04 14:55-0500\n"
+"POT-Creation-Date: 2017-05-04 19:24-0500\n"
+"PO-Revision-Date: 2017-05-04 19:24-0500\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -109,19 +109,19 @@ msgstr ""
 msgid "Related Commits"
 msgstr ""
 
-msgid "Related Issues"
+msgid "Related Deployed Jobs"
 msgstr ""
 
-msgid "Related Merge Requests"
+msgid "Related Issues"
 msgstr ""
 
-msgid "Relative Builds Trigger by Commits"
+msgid "Related Jobs"
 msgstr ""
 
-msgid "Relative Deployed Builds"
+msgid "Related Merge Requests"
 msgstr ""
 
-msgid "Relative Merged Requests"
+msgid "Related Merged Requests"
 msgstr ""
 
 msgid "Showing %d event"
-- 
GitLab