diff --git a/app/controllers/kalibro_configurations_controller.rb b/app/controllers/kalibro_configurations_controller.rb index 6f0b4e5..f514e4e 100644 --- a/app/controllers/kalibro_configurations_controller.rb +++ b/app/controllers/kalibro_configurations_controller.rb @@ -80,7 +80,7 @@ class KalibroConfigurationsController < ApplicationController if @kalibro_configuration.save current_user.kalibro_configuration_ownerships.create kalibro_configuration_id: @kalibro_configuration.id - format.html { redirect_to kalibro_configuration_path(@kalibro_configuration.id), notice: t('successfully_created', :record => t(@kalibro_configuration.class.name)) } + format.html { redirect_to kalibro_configuration_path(@kalibro_configuration.id), notice: t('successfully_created', :record => t(@kalibro_configuration.model_name.human)) } format.json { render action: 'show', status: :created, location: @kalibro_configuration } else format.html { render action: 'new' } diff --git a/app/views/kalibro_configurations/_form.html.erb b/app/views/kalibro_configurations/_form.html.erb index 9c54b01..1101a0a 100644 --- a/app/views/kalibro_configurations/_form.html.erb +++ b/app/views/kalibro_configurations/_form.html.erb @@ -22,8 +22,8 @@
- <%= f.submit 'Save', class: 'btn btn-primary' %> - <%= link_to 'Back', kalibro_configurations_path, class: 'btn btn-default' %> + <%= f.submit t('save'), class: 'btn btn-primary' %> + <%= link_to t('back'), kalibro_configurations_path, class: 'btn btn-default' %>
<% end %> diff --git a/app/views/kalibro_configurations/_kalibro_configuration.html.erb b/app/views/kalibro_configurations/_kalibro_configuration.html.erb index 0daaa0e..b51d52b 100644 --- a/app/views/kalibro_configurations/_kalibro_configuration.html.erb +++ b/app/views/kalibro_configurations/_kalibro_configuration.html.erb @@ -1,10 +1,10 @@ <%= kalibro_configuration.name %> <%= kalibro_configuration.description %> - <%= link_to 'Show', kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> + <%= link_to t('show'), kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> <% if kalibro_configuration_owner?(kalibro_configuration.id) %> - <%= link_to 'Edit', edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> + <%= link_to t('edit'), edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> <% end %> \ No newline at end of file diff --git a/app/views/kalibro_configurations/_list.html.erb b/app/views/kalibro_configurations/_list.html.erb index e5b0a37..a600535 100644 --- a/app/views/kalibro_configurations/_list.html.erb +++ b/app/views/kalibro_configurations/_list.html.erb @@ -1,8 +1,8 @@ - - + + diff --git a/app/views/kalibro_configurations/_metric_configurations.html.erb b/app/views/kalibro_configurations/_metric_configurations.html.erb index 30e1539..7a81514 100644 --- a/app/views/kalibro_configurations/_metric_configurations.html.erb +++ b/app/views/kalibro_configurations/_metric_configurations.html.erb @@ -10,7 +10,7 @@ <%= link_to_edit_form(metric_configuration, @kalibro_configuration.id) %> diff --git a/app/views/kalibro_configurations/_no_metric_configurations.html.erb b/app/views/kalibro_configurations/_no_metric_configurations.html.erb index b836523..d9e6667 100644 --- a/app/views/kalibro_configurations/_no_metric_configurations.html.erb +++ b/app/views/kalibro_configurations/_no_metric_configurations.html.erb @@ -1,4 +1,4 @@ <% col_number = kalibro_configuration_owner?(@kalibro_configuration.id) ? 5 : 3 %> - + \ No newline at end of file diff --git a/app/views/kalibro_configurations/edit.html.erb b/app/views/kalibro_configurations/edit.html.erb index 352fbab..718887d 100644 --- a/app/views/kalibro_configurations/edit.html.erb +++ b/app/views/kalibro_configurations/edit.html.erb @@ -1,3 +1,3 @@ -

Edit Configuration

+

<%= "#{t('edit')} #{KalibroConfiguration.model_name.human}" %>

<%= render 'form' %> diff --git a/app/views/kalibro_configurations/index.html.erb b/app/views/kalibro_configurations/index.html.erb index f9d55fc..ea196c1 100644 --- a/app/views/kalibro_configurations/index.html.erb +++ b/app/views/kalibro_configurations/index.html.erb @@ -1,15 +1,15 @@ <% if user_signed_in? %>

- <%= link_to 'New Configuration', new_kalibro_configuration_path, class: 'btn btn-primary' %> + <%= link_to "#{t('new.female')} #{KalibroConfiguration.model_name.human}", new_kalibro_configuration_path, class: 'btn btn-primary' %>

<%else%>

- You must be logged in to create new Configurations. + <%= t('unauthenticated', action: "#{t('create').downcase} #{KalibroConfiguration.model_name.human(count: 2).downcase}") %>.

<% end %> diff --git a/app/views/kalibro_configurations/new.html.erb b/app/views/kalibro_configurations/new.html.erb index 7af2737..26cade4 100644 --- a/app/views/kalibro_configurations/new.html.erb +++ b/app/views/kalibro_configurations/new.html.erb @@ -1,3 +1,3 @@ -

New Configuration

+

<%= "#{t('new.female')} #{KalibroConfiguration.model_name.human}" %>

<%= render 'form' %> diff --git a/app/views/kalibro_configurations/show.html.erb b/app/views/kalibro_configurations/show.html.erb index 3239920..3e21020 100644 --- a/app/views/kalibro_configurations/show.html.erb +++ b/app/views/kalibro_configurations/show.html.erb @@ -3,23 +3,23 @@

- Description: + <%= t('description') %>: <%= @kalibro_configuration.description %>


-

Metrics

+

<%= t('metric').pluralize %>

<% if kalibro_configuration_owner? @kalibro_configuration.id %> - <%= link_to 'Add Metric', kalibro_configuration_choose_metric_path(@kalibro_configuration.id), class: 'btn btn-info' %> + <%= link_to "#{t('add')} #{t('metric')}", kalibro_configuration_choose_metric_path(@kalibro_configuration.id), class: 'btn btn-info' %> <% end %>
NameDescription<%= t('name') %><%= t('description') %>
- <%= link_to 'Destroy', kalibro_configuration_metric_configuration_path(@kalibro_configuration.id, metric_configuration.id), + <%= link_to t('destroy'), kalibro_configuration_metric_configuration_path(@kalibro_configuration.id, metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' }, class: 'btn btn-danger' %>
There are no Metric Configurations yet!<%= t('no_metric_configurations') %>
- - - + + + @@ -35,8 +35,8 @@

- <%= link_to 'Back', kalibro_configurations_path, class: 'btn btn-default' %> + <%= link_to t('back'), kalibro_configurations_path, class: 'btn btn-default' %> <% if kalibro_configuration_owner? @kalibro_configuration.id %> - <%= link_to 'Destroy Configuration', kalibro_configuration_path(@kalibro_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Configuration?' }, class: 'btn btn-danger' %> + <%= link_to "#{t('destroy')} #{KalibroConfiguration.model_name.human}", kalibro_configuration_path(@kalibro_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Configuration?' }, class: 'btn btn-danger' %> <% end %>

diff --git a/config/application.rb b/config/application.rb index a97b652..7d9b0b4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,7 +17,7 @@ module Mezuro # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - config.i18n.load_path += Dir[Rails.root.join('config', 'locales/*', '*.{rb,yml}').to_s] + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de config.i18n.enforce_available_locales = true diff --git a/config/locales/default/en.yml b/config/locales/default/en.yml index 6995e74..8426807 100644 --- a/config/locales/default/en.yml +++ b/config/locales/default/en.yml @@ -30,5 +30,8 @@ en: Repository: "Repository" Project: "Project" Reading: "Reading" + metric: 'Metric' compound: "Compound" + + unauthenticated: "You must be logged in to %{action}" diff --git a/config/locales/default/pt.yml b/config/locales/default/pt.yml index c036391..02912ae 100644 --- a/config/locales/default/pt.yml +++ b/config/locales/default/pt.yml @@ -9,5 +9,8 @@ pt: Repository: "Repositório" Project: "Projeto" Reading: "Leitura" + metric: 'Métrica' compound: "Composta" + + unauthenticated: "Você precisa fazer login para %{action}" diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index fde7ee1..8b9029d 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -20,7 +20,7 @@ # available at http://guides.rubyonrails.org/i18n.html. en: - #commons + #commons home: "Home" hello: "Hello" sign_out: "Sign Out" @@ -55,7 +55,6 @@ en: no_description: "There is no description available." welcome: "Welcome" metrics: "Metrics" - metric: "Metric" value: "Value" threshold: "Threshold" granularity: "Granularity" @@ -100,8 +99,12 @@ en: month: "Month" year: "Year" search: "Search" - - #this pattern is type_folder_file + new: + male: 'New' + female: 'New' + create: 'Create' + add: 'Add' + #this pattern is type_folder_file about_mezuro: "About Mezuro" about_mezuro_body: " The Mezuro project attempts to provide a platform to compare projects and metric techniques, teaching how to use metrics through configurations and code analysis, avoid technical debts and disseminate code metrics usage and understanding." @@ -133,12 +136,12 @@ en: metric_configurations_base_tool_name: "Base Tool Name:" metric_configurations_aggregation: "Aggregation Form" metric_configurations_reading_group: "Reading Group Name" - created_metrics: "Created Metrics" + created_metrics: "Created Metrics" resend_instruction: "Resend confirmation instructions" confirm_account_email: "You can confirm your account email through the link below:" request_change_password: "Someone has requested a link to change your password. You can do this through the link below:" ignore_email: "If you did not request this, please ignore this email." - password_not_change: "Your password will not change until you access the link above and create a new one." + password_not_change: "Your password will not change until you access the link above and create a new one." account_locked: "Your account has been locked due to an excessive number of unsuccessful sign in attempts." link_unlock_account: "Click the link below to unlock your account:" change_password: "Change your password" @@ -235,7 +238,7 @@ en: fill_name_unique: "Fill in the form with a name that must be unique" description_required: "Fill in the form with a description which is not required" click_save_project: "Click on 'Save' and you should be at the project page now, congratulations!" - repository_creation: "Repository creation" + repository_creation: "Repository creation" project_page_click_new_repository: "From the project page, click on New Repository" fill_form: "Fill in the form" name_must_unique: "Name' must be unique" @@ -249,7 +252,7 @@ en: repository_divided_diferent_sections: "The repository page is divided into four different sections:" provided_creation_steps: "Information that you provided during the creation steps" visualize_processings_repository: "Select box so it is possible to visualize previous processings of your repository" - processing_information: "Processing information" + processing_information: "Processing information" time_finish_processing: "Information about the time it has taken to finish each step of the processing" reserving_folder_repository: "PREPARING: the system is reserving a folder for your repository and retrieving the configuration" retrieving_source_code: "DOWNLOADING: retrieving the source code" diff --git a/config/locales/views/kalibro_configuration/en.yml b/config/locales/views/kalibro_configuration/en.yml new file mode 100644 index 0000000..40135d4 --- /dev/null +++ b/config/locales/views/kalibro_configuration/en.yml @@ -0,0 +1,10 @@ +en: + activemodel: + models: + kalibro_configuration: + one: Configuration + other: Configurations + attributes: + kalibro_configuration: + name: 'Name' + description: 'Description' \ No newline at end of file diff --git a/config/locales/views/kalibro_configuration/pt.yml b/config/locales/views/kalibro_configuration/pt.yml new file mode 100644 index 0000000..373bdb0 --- /dev/null +++ b/config/locales/views/kalibro_configuration/pt.yml @@ -0,0 +1,10 @@ +pt: + activemodel: + models: + kalibro_configuration: + one: Configuração + other: Configurações + attributes: + kalibro_configuration: + name: 'Nome' + description: 'Descrição' \ No newline at end of file diff --git a/config/locales/views/pt.yml b/config/locales/views/pt.yml index 6c0b880..c95df40 100644 --- a/config/locales/views/pt.yml +++ b/config/locales/views/pt.yml @@ -20,7 +20,7 @@ # available at http://guides.rubyonrails.org/i18n.html. pt: - #commons + #commons home: "Início" hello: "Olá" sign_out: "Sair" @@ -55,7 +55,6 @@ pt: no_description: "Não há descrição disponível." welcome: "Bem-Vindo" metrics: "Métricas" - metric: "Metrica" value: "Valor" threshold: "limite" granularity: "Granularidade" @@ -97,8 +96,13 @@ pt: month: "Mês" year: "Ano" search: "Procurar" + new: + male: 'Novo' + female: 'Nova' + create: 'Criar' + add: 'Adicionar' - #this pattern is type_folder_file + #this pattern is type_folder_file about_mezuro: "Sobre Mezuro" about_mezuro_body: " O projeto Mezuro tenta prover uma plataforma para comparar técnicas de projetos e métricas, ensinando como usar métricas através de configurações e análise de código, evitando débitos técnicos e disseminando o uso e entendimento de métricas de código." @@ -106,7 +110,7 @@ pt: about_mezuro2: "A ideia é ser um serviço em que vocẽ pode avaliar a qualidade do seu código e, se você quiser, definir um conjunto de métricas a serem usadas." title_home_index: "Entendendo Métricas de Código" latest_projects_home_index: "Últimos projetos" - body_home_index: "

Este é o Mezuro! Uma plataforma web livre para avaliação colaborativa de código fonte.

Aqui você pode avaliar seu código fonte com os SCMs mais populares (como Git e SVN), apenas fornecendo sua URL. Por enquanto, você pode avaliar códigos em C, C++ e Java, mas nós pretendemos dar suporte a mais linguagems no futuro.

" + body_home_index: "

Este é o Mezuro! Uma plataforma web livre para avaliação colaborativa de código fonte.

Aqui você pode avaliar seu código fonte com os SCMs mais populares (como Git e SVN), apenas fornecendo sua URL. Por enquanto, você pode avaliar códigos em C, C++ e Java, mas nós pretendemos dar suporte a mais linguagems no futuro.

" body_feedback_home_index: "Mezuro está sob constante desenvolvimento. Experimente e nos dê o seu" body1_compound_form: "Uma variável que contém o valor de um cálculo de métrica. Ele pode ser utilizado no script de outra métrica composta." body1_compound_form_example: "Exemplo: Código foo := 10" @@ -134,7 +138,7 @@ pt: confirm_account_email: "Você pode confirmar a sua conta de e-mail através do link abaixo:" request_change_password: "Alguém pediu um link para alterar sua senha. Você pode fazer isso através do link abaixo:" ignore_email: "Se você não solicitou este e-mail, por favor ignore-o." - password_not_change: "Sua senha não será alterada até que você acesse o link acima e crie uma nova senha." + password_not_change: "Sua senha não será alterada até que você acesse o link acima e crie uma nova senha." account_locked: "Sua conta foi bloqueada devido a um número excessivo de tentativas de login sem sucesso." link_unlock_account: "Clique no link abaixo para desbloquear sua conta:" change_password: "Mudando sua senha" @@ -230,7 +234,7 @@ pt: fill_name_unique: "Preencha o formulário com um nome que deve ser único" description_required: "Preencha o formulário com a descrição" click_save_project: "Clique em Salvar. Agora você deve estar na página do projeto, parabéns!" - repository_creation: "Criando um repositório" + repository_creation: "Criando um repositório" project_page_click_new_repository: "A partir da página do projeto, clique em Novo Repositório" fill_form: "Preencha o formulário" name_must_unique: "O nome deve ser exclusivo" @@ -244,7 +248,7 @@ pt: repository_divided_diferent_sections: "A página de repositório é dividida em quatro seções diferentes:" provided_creation_steps: "A informação que você forneceu durante as etapas de criação" visualize_processings_repository: "Selecione a caixa de modo que seja possível visualizar processamentos anteriores do seu repositório" - processing_information: "Informação de processamento" + processing_information: "Informação de processamento" time_finish_processing: "Informações sobre o tempo que cada etapa do processamento levou para concluir" reserving_folder_repository: "PREPARAÇÃO: o sistema está reservando uma pasta para seu repositório e recuperando a configuração" retrieving_source_code: "DOWNLOAD: recuperando o código-fonte" diff --git a/features/kalibro_configuration/listing.feature b/features/kalibro_configuration/listing.feature index 60a2c09..acbf9eb 100644 --- a/features/kalibro_configuration/listing.feature +++ b/features/kalibro_configuration/listing.feature @@ -9,7 +9,7 @@ Feature: Configuration listing Then I should see "Configurations" And I should see "Name" And I should see "Description" - And I should see "You must be logged in to create new Configurations." + And I should see "You must be logged in to create configurations." @kalibro_configuration_restart Scenario: Should list the existing configurations @@ -18,7 +18,7 @@ Feature: Configuration listing And I have a sample configuration And I am at the All Configurations page Then the sample configuration should be there - And I should not see "You must be logged in to create new Configurations." + And I should not see "You must be logged in to create configurations." @kalibro_configuration_restart Scenario: Should show the existing configuration -- libgit2 0.21.2
Metric NameCodeWeight<%= "#{t('metric')} #{t('name')}" %><%= t('code') %><%= t('weight') %>