More updates for translations plus some refactoring.
This commit is contained in:
parent
b7f01f2b18
commit
dbd1bdaeed
35 changed files with 252 additions and 111 deletions
|
@ -28,11 +28,11 @@ global.cycleAnalytics.StageCodeComponent = Vue.extend({
|
|||
<a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
|
||||
·
|
||||
<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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -28,11 +28,11 @@ global.cycleAnalytics.StageProductionComponent = Vue.extend({
|
|||
<a :href="issue.url" class="issue-link">#{{ issue.iid }}</a>
|
||||
·
|
||||
<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>
|
||||
|
|
|
@ -28,11 +28,11 @@ global.cycleAnalytics.StageReviewComponent = Vue.extend({
|
|||
<a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a>
|
||||
·
|
||||
<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'">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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":[""]}}};
|
||||
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":["",""]}}};
|
|
@ -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":[""]}}};
|
||||
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":["",""]}}};
|
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
Gitlab::I18n.set_locale(current_user)
|
||||
|
||||
yield
|
||||
ensure
|
||||
I18n.locale = I18n.default_locale
|
||||
end
|
||||
yield
|
||||
ensure
|
||||
Gitlab::I18n.reset_locale
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,6 +2,7 @@ class AnalyticsStageEntity < Grape::Entity
|
|||
include EntityDateHelper
|
||||
|
||||
expose :title
|
||||
expose :name
|
||||
expose :legend
|
||||
expose :description
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,7 +9,7 @@ module Gitlab
|
|||
end
|
||||
|
||||
def title
|
||||
'New Issue'
|
||||
n_('New Issue', 'New Issues', value)
|
||||
end
|
||||
|
||||
def value
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ""
|
||||
|
|
|
@ -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 ""
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 ""
|
||||
|
|
|
@ -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')
|
Loading…
Reference in a new issue