Commit 93f27958 authored by Phil Hughes's avatar Phil Hughes

Updated some JS translate methods to correctly take in context

parent 6d5364cf
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
<span v-if="count === 50" class="events-info pull-right"> <span v-if="count === 50" class="events-info pull-right">
<i class="fa fa-warning has-tooltip" <i class="fa fa-warning has-tooltip"
aria-hidden="true" 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> data-placement="top"></i>
{{ n__('Showing %d event', 'Showing %d events', 50) }} {{ n__('Showing %d event', 'Showing %d events', 50) }}
</span> </span>
......
...@@ -15,7 +15,7 @@ global.cycleAnalytics.TotalTimeComponent = Vue.extend({ ...@@ -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.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.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.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>
<template v-else> <template v-else>
-- --
......
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":[""]}}}; 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 \ 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":[""]}}}; 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 \ 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"]}}}; 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 \ No newline at end of file
import Jed from 'jed'; import Jed from 'jed';
import { de } from './de/app';
import { es } from './es/app';
import { en } from './en/app';
const locales = { function requireAll(requireContext) { return requireContext.keys().map(requireContext); }
de,
es, const allLocales = requireAll(require.context('./', true, /^(?!.*(?:index.js$)).*\.js$/));
en, 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 locale = new Jed(locales[lang]);
const gettext = locale.gettext.bind(locale); const gettext = locale.gettext.bind(locale);
const ngettext = locale.ngettext.bind(locale); const ngettext = locale.ngettext.bind(locale);
......
import { import {
__, __,
n__, n__,
s__,
} from '../locale'; } from '../locale';
export default (Vue) => { export default (Vue) => {
...@@ -9,9 +8,16 @@ export default (Vue) => { ...@@ -9,9 +8,16 @@ export default (Vue) => {
methods: { methods: {
__(text) { return __(text); }, __(text) { return __(text); },
n__(text, pluralText, count) { 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); },
}, },
}); });
}; };
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
= custom_icon ('icon_lock') = custom_icon ('icon_lock')
%h4 {{ __('You need permission.') }} %h4 {{ __('You need permission.') }}
%p %p
{{ __('Want to see the data? Please ask administrator for access.') }} {{ __('Want to see the data? Please ask an administrator for access.') }}
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
%p %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.') }}
= link_to help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' do = link_to _('Read more'), help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn'
{{ __('Read more') }}
= icon("spinner spin", "v-show" => "isLoading") = icon("spinner spin", "v-show" => "isLoading")
.wrapper{ "v-show" => "!isLoading && !hasError" } .wrapper{ "v-show" => "!isLoading && !hasError" }
.panel.panel-default .panel.panel-default
...@@ -32,19 +31,19 @@ ...@@ -32,19 +31,19 @@
.row .row
.col-sm-3.col-xs-12.column{ "v-for" => "item in state.summary" } .col-sm-3.col-xs-12.column{ "v-for" => "item in state.summary" }
%h3.header {{ item.value }} %h3.header {{ item.value }}
%p.text {{ __(item.title) }} %p.text {{ s__('Cycle', item.title) }}
.col-sm-3.col-xs-12.column .col-sm-3.col-xs-12.column
.dropdown.inline.js-ca-dropdown .dropdown.inline.js-ca-dropdown
%button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" } %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 %i.fa.fa-chevron-down
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-align-right
%li %li
%a{ "href" => "#", "data-value" => "30" } %a{ "href" => "#", "data-value" => "30" }
{{ __('Last 30 days') }} {{ n__('Last %d day', 'Last %d days', 30) }}
%li %li
%a{ "href" => "#", "data-value" => "90" } %a{ "href" => "#", "data-value" => "90" }
{{ __('Last 90 days') }} {{ n__('Last %d day', 'Last %d days', 90) }}
.stage-panel-container .stage-panel-container
.panel.panel-default.stage-panel .panel.panel-default.stage-panel
.panel-heading .panel-heading
...@@ -52,7 +51,7 @@ ...@@ -52,7 +51,7 @@
%ul %ul
%li.stage-header %li.stage-header
%span.stage-name %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" } %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: _("The phase of the development lifecycle."), "aria-hidden" => "true" }
%li.median-header %li.median-header
%span.stage-name %span.stage-name
......
...@@ -53,14 +53,15 @@ msgstr "" ...@@ -53,14 +53,15 @@ msgstr ""
msgid "Introducing Cycle Analytics" msgid "Introducing Cycle Analytics"
msgstr "" msgstr ""
msgid "Last 30 days" msgid "Last %d day"
msgstr "" msgid_plural "Last %d days"
msgstr[0] ""
msgid "Last 90 days" msgstr[1] ""
msgstr ""
msgid "Limited to showing 50 events at most" msgid "Limited to showing %d event at most"
msgstr "" msgid_plural "Limited to showing %d events at most"
msgstr[0] ""
msgstr[1] ""
msgid "Median" msgid "Median"
msgstr "" msgstr ""
...@@ -161,7 +162,7 @@ msgstr "" ...@@ -161,7 +162,7 @@ msgstr ""
msgid "Total Time" msgid "Total Time"
msgstr "" 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 "" msgstr ""
msgid "We don't have enough data to show this stage." msgid "We don't have enough data to show this stage."
......
...@@ -53,14 +53,15 @@ msgstr "" ...@@ -53,14 +53,15 @@ msgstr ""
msgid "Introducing Cycle Analytics" msgid "Introducing Cycle Analytics"
msgstr "" msgstr ""
msgid "Last 30 days" msgid "Last %d day"
msgstr "" msgid_plural "Last %d days"
msgstr[0] ""
msgid "Last 90 days" msgstr[1] ""
msgstr ""
msgid "Limited to showing 50 events at most" msgid "Limited to showing %d event at most"
msgstr "" msgid_plural "Limited to showing %d events at most"
msgstr[0] ""
msgstr[1] ""
msgid "Median" msgid "Median"
msgstr "" msgstr ""
...@@ -161,7 +162,7 @@ msgstr "" ...@@ -161,7 +162,7 @@ msgstr ""
msgid "Total Time" msgid "Total Time"
msgstr "" 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 "" msgstr ""
msgid "We don't have enough data to show this stage." msgid "We don't have enough data to show this stage."
......
...@@ -59,14 +59,15 @@ msgstr "Despliegues" ...@@ -59,14 +59,15 @@ msgstr "Despliegues"
msgid "Introducing Cycle Analytics" msgid "Introducing Cycle Analytics"
msgstr "Introducción a Cycle Analytics" msgstr "Introducción a Cycle Analytics"
msgid "Last 30 days" #, fuzzy
msgstr "Últimos 30 días" msgid "Last %d day"
msgid_plural "Last %d days"
msgid "Last 90 days" msgstr[0] "Últimos %d días"
msgstr "Últimos 90 días"
msgid "Limited to showing 50 events at most" #, fuzzy
msgstr "Limitado a mostrar máximo 50 eventos" 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" msgid "Median"
msgstr "Mediana" msgstr "Mediana"
...@@ -170,7 +171,8 @@ msgstr "" ...@@ -170,7 +171,8 @@ msgstr ""
msgid "Total Time" msgid "Total Time"
msgstr "Tiempo Total" 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." msgstr "¿Quieres ver los datos? Por favor pedir acceso al administrador."
msgid "We don't have enough data to show this stage." msgid "We don't have enough data to show this stage."
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-02 23:33-0500\n" "POT-Creation-Date: 2017-05-03 12:00+0100\n"
"PO-Revision-Date: 2017-05-02 23:33-0500\n" "PO-Revision-Date: 2017-05-03 12:00+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -54,14 +54,15 @@ msgstr "" ...@@ -54,14 +54,15 @@ msgstr ""
msgid "Introducing Cycle Analytics" msgid "Introducing Cycle Analytics"
msgstr "" msgstr ""
msgid "Last 30 days" msgid "Last %d day"
msgstr "" msgid_plural "Last %d days"
msgstr[0] ""
msgid "Last 90 days" msgstr[1] ""
msgstr ""
msgid "Limited to showing 50 events at most" msgid "Limited to showing %d event at most"
msgstr "" msgid_plural "Limited to showing %d events at most"
msgstr[0] ""
msgstr[1] ""
msgid "Median" msgid "Median"
msgstr "" msgstr ""
...@@ -162,7 +163,7 @@ msgstr "" ...@@ -162,7 +163,7 @@ msgstr ""
msgid "Total Time" msgid "Total Time"
msgstr "" 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 "" msgstr ""
msgid "We don't have enough data to show this stage." msgid "We don't have enough data to show this stage."
......
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