Merge branch 'commits-internationalise' into 'master'

Added internationalization to commits list

Closes #32793

See merge request !12062
This commit is contained in:
Douwe Maan 2017-06-22 15:21:04 +00:00
commit 9b2e890c37
6 changed files with 75 additions and 19 deletions

File diff suppressed because one or more lines are too long

View file

@ -85,20 +85,20 @@ module CommitsHelper
if @path.blank?
return link_to(
"Browse Files",
_("Browse Files"),
namespace_project_tree_path(project.namespace, project, commit),
class: "btn btn-default"
)
elsif @repo.blob_at(commit.id, @path)
return link_to(
"Browse File",
_("Browse File"),
namespace_project_blob_path(project.namespace, project,
tree_join(commit.id, @path)),
class: "btn btn-default"
)
elsif @path.present?
return link_to(
"Browse Directory",
_("Browse Directory"),
namespace_project_tree_path(project.namespace, project,
tree_join(commit.id, @path)),
class: "btn btn-default"

View file

@ -3,8 +3,8 @@
- commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, commits|
%li.commit-header.js-commit-header{ data: { day: day } }
%span.day= day.strftime('%d %b, %Y')
%span.commits-count= pluralize(commits.count, 'commit')
%span.day= l(day, format: '%d %b, %Y')
%span.commits-count= n_("%d commit", "%d commits", commits.count) % commits.count
%li.commits-row{ data: { day: day } }
%ul.content-list.commit-list
@ -12,4 +12,4 @@
- if hidden > 0
%li.alert.alert-warning
#{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues.
= n_('%d additional commit has been omitted to prevent performance issues.', '%d additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden)

View file

@ -1,6 +1,6 @@
- @no_container = true
- page_title "Commits", @ref
- page_title _("Commits"), @ref
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits")
@ -18,16 +18,16 @@
.block-controls.hidden-xs.hidden-sm
- if @merge_request.present?
.control
= link_to "View open merge request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn'
= link_to _("View open merge request"), namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn'
- elsif create_mr_button?(@repository.root_ref, @ref)
.control
= link_to "Create merge request", create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success'
= link_to _("Create merge request"), create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success'
.control
= form_tag(namespace_project_commits_path(@project.namespace, @project, @id), method: :get, class: 'commits-search-form') do
= search_field_tag :search, params[:search], { placeholder: 'Filter by commit message', id: 'commits-search', class: 'form-control search-text-input input-short', spellcheck: false }
= search_field_tag :search, params[:search], { placeholder: _('Filter by commit message'), id: 'commits-search', class: 'form-control search-text-input input-short', spellcheck: false }
.control
= link_to namespace_project_commits_path(@project.namespace, @project, @ref, rss_url_options), title: "Commits feed", class: 'btn' do
= link_to namespace_project_commits_path(@project.namespace, @project, @ref, rss_url_options), title: _("Commits feed"), class: 'btn' do
= icon("rss")
%div{ id: dom_id(@project) }

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2017-06-19 15:22-0500\n"
"PO-Revision-Date: 2017-06-21 12:09-0500\n"
"Language-Team: Spanish\n"
"Language: es\n"
"MIME-Version: 1.0\n"
@ -17,6 +17,16 @@ msgstr ""
"Last-Translator: Bob Van Landuyt <bob@gitlab.com>\n"
"X-Generator: Poedit 2.0.2\n"
msgid "%d additional commit has been omitted to prevent performance issues."
msgid_plural "%d additional commits have been omitted to prevent performance issues."
msgstr[0] "%d cambio adicional ha sido omitido para evitar problemas de rendimiento."
msgstr[1] "%d cambios adicionales han sido omitidos para evitar problemas de rendimiento."
msgid "%d commit"
msgid_plural "%d commits"
msgstr[0] "%d cambio"
msgstr[1] "%d cambios"
msgid "%{commit_author_link} committed %{commit_timeago}"
msgstr "%{commit_author_link} cambió %{commit_timeago}"
@ -70,8 +80,17 @@ msgstr "Cambiar rama"
msgid "Branches"
msgstr "Ramas"
msgid "Browse Directory"
msgstr "Examinar directorio"
msgid "Browse File"
msgstr "Examinar archivo"
msgid "Browse Files"
msgstr "Examinar archivos"
msgid "Browse files"
msgstr "Examinar los archivos"
msgstr "Examinar archivos"
msgid "ByAuthor|by"
msgstr "por"
@ -177,6 +196,9 @@ msgstr "Agregar %{file_name}"
msgid "Commits"
msgstr "Cambios"
msgid "Commits feed"
msgstr "Feed de cambios"
msgid "Commits|History"
msgstr "Historial"
@ -329,6 +351,9 @@ msgstr "Error al eliminar la programación del pipeline"
msgid "Files"
msgstr "Archivos"
msgid "Filter by commit message"
msgstr "Filtrar por mensaje del cambio"
msgid "Find by path"
msgstr "Buscar por ruta"
@ -957,6 +982,9 @@ msgstr "Hacer clic para subir"
msgid "Use your global notification setting"
msgstr "Utiliza tu configuración de notificación global"
msgid "View open merge request"
msgstr "Ver solicitud de fusión abierta"
msgid "VisibilityLevel|Internal"
msgstr "Interno"
@ -993,12 +1021,12 @@ msgstr "Vas a transferir %{project_name_with_namespace} a otro propietario. ¿Es
msgid "You can only add files when you are on a branch"
msgstr "Solo puedes agregar archivos cuando estás en una rama"
msgid "You have reached your project limit"
msgstr "Has alcanzado el límite de tu proyecto"
msgid "You must sign in to star a project"
msgstr "Debes iniciar sesión para destacar un proyecto"
msgid "You have reached your project limit"
msgstr ""
msgid "You need permission."
msgstr "Necesitas permisos."

View file

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-19 15:13-0500\n"
"PO-Revision-Date: 2017-06-19 15:13-0500\n"
"POT-Creation-Date: 2017-06-19 15:50-0500\n"
"PO-Revision-Date: 2017-06-19 15:50-0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@ -18,6 +18,16 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
msgid "%d additional commit have been omitted to prevent performance issues."
msgid_plural "%d additional commits have been omitted to prevent performance issues."
msgstr[0] ""
msgstr[1] ""
msgid "%d commit"
msgid_plural "%d commits"
msgstr[0] ""
msgstr[1] ""
msgid "%{commit_author_link} committed %{commit_timeago}"
msgstr ""
@ -71,6 +81,15 @@ msgstr ""
msgid "Branches"
msgstr ""
msgid "Browse Directory"
msgstr ""
msgid "Browse File"
msgstr ""
msgid "Browse Files"
msgstr ""
msgid "Browse files"
msgstr ""
@ -178,6 +197,9 @@ msgstr ""
msgid "Commits"
msgstr ""
msgid "Commits feed"
msgstr ""
msgid "Commits|History"
msgstr ""
@ -330,6 +352,9 @@ msgstr ""
msgid "Files"
msgstr ""
msgid "Filter by commit message"
msgstr ""
msgid "Find by path"
msgstr ""
@ -958,6 +983,9 @@ msgstr ""
msgid "Use your global notification setting"
msgstr ""
msgid "View open merge request"
msgstr ""
msgid "VisibilityLevel|Internal"
msgstr ""