Commit dbd1bdae authored by Ruben Davila's avatar Ruben Davila

More updates for translations plus some refactoring.

parent b7f01f2b
......@@ -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>
......
......@@ -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>
&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>
......
......@@ -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'">
......
......@@ -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];
......
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
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
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
......@@ -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
......@@ -2,6 +2,7 @@ class AnalyticsStageEntity < Grape::Entity
include EntityDateHelper
expose :title
expose :name
expose :legend
expose :description
......
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 ""
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')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment