Commit 0e146a003cb1b08c96c5a17d3c98954b8fb1d34d

Authored by Heitor
Committed by Rafael Manzo
1 parent b0a3f445

Finished internationalizing layouts and menus

Signed-off-by: Pedro Scocco <pedroscocco@gmail.com>
app/views/layouts/application.html.erb
@@ -58,18 +58,18 @@ @@ -58,18 +58,18 @@
58 </div> 58 </div>
59 <div class="collapse navbar-collapse" id="nav-collapse"> 59 <div class="collapse navbar-collapse" id="nav-collapse">
60 <ul class="nav navbar-nav"> 60 <ul class="nav navbar-nav">
61 - <li><%= link_to 'Home', root_path %></li>  
62 - <li><%= link_to 'Project', projects_path %></li>  
63 - <li><%= link_to 'Configuration', kalibro_configurations_path %></li>  
64 - <li><%= link_to 'Reading Group', reading_groups_path %></li> 61 + <li><%= link_to t('home'), root_path %></li>
  62 + <li><%= link_to Project.model_name.human, projects_path %></li>
  63 + <li><%= link_to KalibroConfiguration.model_name.human, kalibro_configurations_path %></li>
  64 + <li><%= link_to ReadingGroup.model_name.human, reading_groups_path %></li>
65 </ul> 65 </ul>
66 <ul class="nav navbar-nav" style="float: right;"> 66 <ul class="nav navbar-nav" style="float: right;">
67 <% if user_signed_in? %> 67 <% if user_signed_in? %>
68 - <li><%= link_to 'Edit Account', edit_user_registration_path %></li>  
69 - <li><%= link_to 'Sign Out', destroy_user_session_path, :method => :delete %></li> 68 + <li><%= link_to t('edit_account'), edit_user_registration_path %></li>
  69 + <li><%= link_to t('sign_out'), destroy_user_session_path, :method => :delete %></li>
70 <% else %> 70 <% else %>
71 - <li><%= link_to 'Sign In', new_user_session_path %></li>  
72 - <li><%= link_to 'Sign Up', new_user_registration_path %></li> 71 + <li><%= link_to t('sign_in'), new_user_session_path %></li>
  72 + <li><%= link_to t('sign_up'), new_user_registration_path %></li>
73 <% end %> 73 <% end %>
74 </ul> 74 </ul>
75 </div><!--/.nav-collapse --> 75 </div><!--/.nav-collapse -->
@@ -83,13 +83,13 @@ @@ -83,13 +83,13 @@
83 <div class="well sidebar-nav"> 83 <div class="well sidebar-nav">
84 <ul class="list-group"> 84 <ul class="list-group">
85 <% if user_signed_in? %> 85 <% if user_signed_in? %>
86 - <li class="nav-header">Hello, <strong><%= current_user.name %></strong></li>  
87 - <li class="list-group-item"><%= link_to 'Your projects', user_projects_path(current_user.id) %></li> 86 + <li class="nav-header"><%= t('hello_html', user: current_user.name) %></li>
  87 + <li class="list-group-item"><%= link_to t('your_projects'), user_projects_path(current_user.id) %></li>
88 <% end %> 88 <% end %>
89 - <li class="nav-header">Tutorials</li>  
90 - <li class="list-group-item"><%= link_to 'Analysis', tutorials_path('analyzing') %></li>  
91 - <li class="list-group-item"><%= link_to 'Configuring', tutorials_path('configuring') %></li>  
92 - <li class="list-group-item" ><%= link_to 'Keywords', tutorials_path('keywords') %></li> 89 + <li class="nav-header"><%= t('tutorials') %></li>
  90 + <li class="list-group-item"><%= link_to t('analysis'), tutorials_path('analyzing') %></li>
  91 + <li class="list-group-item"><%= link_to t('configuring'), tutorials_path('configuring') %></li>
  92 + <li class="list-group-item" ><%= link_to t('keywords'), tutorials_path('keywords') %></li>
93 <% if content_for?(:sidebar) %> 93 <% if content_for?(:sidebar) %>
94 <%= yield :sidebar %> 94 <%= yield :sidebar %>
95 <% else %> 95 <% else %>
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 </div><!--/.well --> 99 </div><!--/.well -->
100 </div><!--/col-sm-3 col-md-3--> 100 </div><!--/col-sm-3 col-md-3-->
101 <div class="col-sm-9 col-md-9"> 101 <div class="col-sm-9 col-md-9">
102 - <div class="alert alert-info" id="loader"><i class="fa fa-spinner fa-spin fa-lg"></i>&nbsp&nbsp Wait an instant while we are loading the page that you have requested.</div> 102 + <div class="alert alert-info" id="loader"><i class="fa fa-spinner fa-spin fa-lg"></i>&nbsp&nbsp <%= t('instant_loading_page') %></div>
103 103
104 <%= bootstrap_flash %> 104 <%= bootstrap_flash %>
105 <%= yield %> 105 <%= yield %>
app/views/shared/_short_about.html.erb
1 -<li class="nav-header">About Mezuro</li> 1 +<li class="nav-header"><%= t('about_mezuro') %></li>
2 <li class="list-group-item"> 2 <li class="list-group-item">
3 - <small> 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.<br></small>  
4 - <small>Here you can try the front-end, which we call Prezento. It interacts with the <%= link_to 'Kalibro Web Service', 'https://github.com/mezuro/kalibro', target: '_blank' %> and <%= link_to 'Kalibro Processor', 'https://github.com/mezuro/kalibro_processor', target: '_blank' %>. It is intended to be a service where you can evaluate your code quality and, if you want, define which set of metrics to use.</small> 3 + <small>
  4 + <%= t('about_mezuro_body_html', href: link_to( 'Kalibro Web Service', 'https://github.com/mezuro/kalibro', target: '_blank'), href2: link_to('Kalibro Processor', 'https://github.com/mezuro/kalibro_processor', target: '_blank'))%>
  5 + </small>
5 </li> 6 </li>
config/locales/views/en.yml
@@ -21,11 +21,6 @@ @@ -21,11 +21,6 @@
21 21
22 en: 22 en:
23 #commons 23 #commons
24 - home: "Home"  
25 - hello: "Hello"  
26 - sign_out: "Sign Out"  
27 - sign_in: "Sign In"  
28 - sign_up: "Sign Up"  
29 show: "Show" 24 show: "Show"
30 edit: "Edit %{model}" 25 edit: "Edit %{model}"
31 edit_user: "Edit User" 26 edit_user: "Edit User"
@@ -41,7 +36,6 @@ en: @@ -41,7 +36,6 @@ en:
41 reading_groups: "Reading Groups" 36 reading_groups: "Reading Groups"
42 configuration: "Configuration" 37 configuration: "Configuration"
43 configurations: "Configurations" 38 configurations: "Configurations"
44 - edit_account: "Edit Account"  
45 module: "Module" 39 module: "Module"
46 weight: "Weight" 40 weight: "Weight"
47 description: "Description" 41 description: "Description"
@@ -104,10 +98,6 @@ en: @@ -104,10 +98,6 @@ en:
104 sure_destroy: 'Are you sure that you want to destroy this %{model}?' 98 sure_destroy: 'Are you sure that you want to destroy this %{model}?'
105 #this pattern is type_folder_file 99 #this pattern is type_folder_file
106 100
107 - about_mezuro: "About Mezuro"  
108 - about_mezuro_body: "<small> 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.</small>"  
109 - about_mezuro1: "Here you can try the front-end, which we call Prezento. It interacts with the"  
110 - about_mezuro2: "It is intended to be a service where you can evaluate your code quality and, if you want, define which set of metrics to use."  
111 body1_compound_form: "A variable that holds the value of a metric calculation. It can be used in the script of another compound metric." 101 body1_compound_form: "A variable that holds the value of a metric calculation. It can be used in the script of another compound metric."
112 body1_compound_form_example: "Example: Code foo := 10" 102 body1_compound_form_example: "Example: Code foo := 10"
113 body2_compound_form: " It is used to calculate the weighted average of a" 103 body2_compound_form: " It is used to calculate the weighted average of a"
@@ -317,7 +307,6 @@ en: @@ -317,7 +307,6 @@ en:
317 process_period: "Process Period" 307 process_period: "Process Period"
318 currently_waiting_confirmation: "Currently waiting confirmation for:" 308 currently_waiting_confirmation: "Currently waiting confirmation for:"
319 leave_blank_wont_change: "(leave it blank if you do not want to change it)" 309 leave_blank_wont_change: "(leave it blank if you do not want to change it)"
320 - instant_loading_page: "Wait an instant while we are loading the page that you have requested."  
321 pick_color: "Pick color" 310 pick_color: "Pick color"
322 password_confirmation: "Password confirmation" 311 password_confirmation: "Password confirmation"
323 current_password: "Current password" 312 current_password: "Current password"
config/locales/views/layouts/en.yml 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +en:
  2 + hello_html: "Hello, %{user}"
  3 + instant_loading_page: "Wait an instant while we are loading the page that you have requested."
  4 + home: "Home"
  5 + edit_account: "Edit Account"
  6 + sign_out: "Sign Out"
  7 + sign_in: "Sign In"
  8 + sign_up: "Sign Up"
config/locales/views/layouts/pt.yml 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +pt:
  2 + hello_html: "Olá, %{user}"
  3 + instant_loading_page: "Espere um instante enquanto estamos carregando a página que você solicitou."
  4 + home: "Início"
  5 + edit_account: "Editar Conta"
  6 + sign_out: "Sair"
  7 + sign_in: "Entrar"
  8 + sign_up: "Inscrever-se"
config/locales/views/pt.yml
@@ -21,11 +21,6 @@ @@ -21,11 +21,6 @@
21 21
22 pt: 22 pt:
23 #commons 23 #commons
24 - home: "Início"  
25 - hello: "Olá"  
26 - sign_out: "Sair"  
27 - sign_in: "Entrar"  
28 - sign_up: "Inscrever-se"  
29 show: "Mostrar" 24 show: "Mostrar"
30 edit: "Editar %{model}" 25 edit: "Editar %{model}"
31 edit_user: "Editar Usuário" 26 edit_user: "Editar Usuário"
@@ -43,7 +38,6 @@ pt: @@ -43,7 +38,6 @@ pt:
43 projects: "Projetos" 38 projects: "Projetos"
44 configuration: "Configuração" 39 configuration: "Configuração"
45 configurations: "Configurações" 40 configurations: "Configurações"
46 - edit_account: "Editar Conta"  
47 module: "Módulo" 41 module: "Módulo"
48 weight: "Peso" 42 weight: "Peso"
49 description: "Descrição" 43 description: "Descrição"
@@ -104,11 +98,6 @@ pt: @@ -104,11 +98,6 @@ pt:
104 sure_destroy: 'Você tem certeza que deseja apagar este(a) %{model}?' 98 sure_destroy: 'Você tem certeza que deseja apagar este(a) %{model}?'
105 99
106 #this pattern is type_folder_file 100 #this pattern is type_folder_file
107 -  
108 - about_mezuro: "Sobre Mezuro"  
109 - about_mezuro_body: "<small> 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.</small>"  
110 - about_mezuro1: "Aqui você pode experimentar a interface, que nós chamamos de Prezento. Ela interage com o"  
111 - 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."  
112 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." 101 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."
113 body1_compound_form_example: "Exemplo: Código foo := 10" 102 body1_compound_form_example: "Exemplo: Código foo := 10"
114 body1_compound_metric_options: "Um nome personalizado para a sua métrica composta." 103 body1_compound_metric_options: "Um nome personalizado para a sua métrica composta."
@@ -322,7 +311,6 @@ pt: @@ -322,7 +311,6 @@ pt:
322 process_period: "Período de processamento" 311 process_period: "Período de processamento"
323 currently_waiting_confirmation: "Atualmente esperando confirmação de:" 312 currently_waiting_confirmation: "Atualmente esperando confirmação de:"
324 leave_blank_wont_change: "(deixe-o em branco se não quiser mudá-lo.)" 313 leave_blank_wont_change: "(deixe-o em branco se não quiser mudá-lo.)"
325 - instant_loading_page: "Espere um instante enquanto estamos carregando a página que você solicitou."  
326 pick_color: "Escolha a Cor" 314 pick_color: "Escolha a Cor"
327 password_confirmation: "Confirme sua senha" 315 password_confirmation: "Confirme sua senha"
328 current_password: "Senha Atual" 316 current_password: "Senha Atual"
config/locales/views/shared/en.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +en:
  2 + about_mezuro: "About Mezuro"
  3 + about_mezuro_body_html: "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.<br>Here you can try the front-end, which we call Prezento. It interacts with the %{href} and %{href2}. It is intended to be a service where you can evaluate your code quality and, if you want, define which set of metrics to use."
config/locales/views/shared/pt.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +pt:
  2 + about_mezuro: "Sobre Mezuro"
  3 + about_mezuro_body_html: "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.<br>Aqui você pode experimentar a interface, que nós chamamos de Prezento. Ela interage com o %{href} e o %{href2}. 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."