Commit 0e146a003cb1b08c96c5a17d3c98954b8fb1d34d
Committed by
Rafael Manzo
1 parent
b0a3f445
Exists in
colab
and in
4 other branches
Finished internationalizing layouts and menus
Signed-off-by: Pedro Scocco <pedroscocco@gmail.com>
Showing
8 changed files
with
41 additions
and
41 deletions
Show diff stats
app/views/layouts/application.html.erb
| ... | ... | @@ -58,18 +58,18 @@ |
| 58 | 58 | </div> |
| 59 | 59 | <div class="collapse navbar-collapse" id="nav-collapse"> |
| 60 | 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 | 65 | </ul> |
| 66 | 66 | <ul class="nav navbar-nav" style="float: right;"> |
| 67 | 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 | 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 | 73 | <% end %> |
| 74 | 74 | </ul> |
| 75 | 75 | </div><!--/.nav-collapse --> |
| ... | ... | @@ -83,13 +83,13 @@ |
| 83 | 83 | <div class="well sidebar-nav"> |
| 84 | 84 | <ul class="list-group"> |
| 85 | 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 | 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 | 93 | <% if content_for?(:sidebar) %> |
| 94 | 94 | <%= yield :sidebar %> |
| 95 | 95 | <% else %> |
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 | </div><!--/.well --> |
| 100 | 100 | </div><!--/col-sm-3 col-md-3--> |
| 101 | 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>   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>   <%= t('instant_loading_page') %></div> | |
| 103 | 103 | |
| 104 | 104 | <%= bootstrap_flash %> |
| 105 | 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 | 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 | 6 | </li> | ... | ... |
config/locales/views/en.yml
| ... | ... | @@ -21,11 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | en: |
| 23 | 23 | #commons |
| 24 | - home: "Home" | |
| 25 | - hello: "Hello" | |
| 26 | - sign_out: "Sign Out" | |
| 27 | - sign_in: "Sign In" | |
| 28 | - sign_up: "Sign Up" | |
| 29 | 24 | show: "Show" |
| 30 | 25 | edit: "Edit %{model}" |
| 31 | 26 | edit_user: "Edit User" |
| ... | ... | @@ -41,7 +36,6 @@ en: |
| 41 | 36 | reading_groups: "Reading Groups" |
| 42 | 37 | configuration: "Configuration" |
| 43 | 38 | configurations: "Configurations" |
| 44 | - edit_account: "Edit Account" | |
| 45 | 39 | module: "Module" |
| 46 | 40 | weight: "Weight" |
| 47 | 41 | description: "Description" |
| ... | ... | @@ -104,10 +98,6 @@ en: |
| 104 | 98 | sure_destroy: 'Are you sure that you want to destroy this %{model}?' |
| 105 | 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 | 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 | 102 | body1_compound_form_example: "Example: Code foo := 10" |
| 113 | 103 | body2_compound_form: " It is used to calculate the weighted average of a" |
| ... | ... | @@ -317,7 +307,6 @@ en: |
| 317 | 307 | process_period: "Process Period" |
| 318 | 308 | currently_waiting_confirmation: "Currently waiting confirmation for:" |
| 319 | 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 | 310 | pick_color: "Pick color" |
| 322 | 311 | password_confirmation: "Password confirmation" |
| 323 | 312 | current_password: "Current password" | ... | ... |
config/locales/views/pt.yml
| ... | ... | @@ -21,11 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | pt: |
| 23 | 23 | #commons |
| 24 | - home: "Início" | |
| 25 | - hello: "Olá" | |
| 26 | - sign_out: "Sair" | |
| 27 | - sign_in: "Entrar" | |
| 28 | - sign_up: "Inscrever-se" | |
| 29 | 24 | show: "Mostrar" |
| 30 | 25 | edit: "Editar %{model}" |
| 31 | 26 | edit_user: "Editar Usuário" |
| ... | ... | @@ -43,7 +38,6 @@ pt: |
| 43 | 38 | projects: "Projetos" |
| 44 | 39 | configuration: "Configuração" |
| 45 | 40 | configurations: "Configurações" |
| 46 | - edit_account: "Editar Conta" | |
| 47 | 41 | module: "Módulo" |
| 48 | 42 | weight: "Peso" |
| 49 | 43 | description: "Descrição" |
| ... | ... | @@ -104,11 +98,6 @@ pt: |
| 104 | 98 | sure_destroy: 'Você tem certeza que deseja apagar este(a) %{model}?' |
| 105 | 99 | |
| 106 | 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 | 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 | 102 | body1_compound_form_example: "Exemplo: Código foo := 10" |
| 114 | 103 | body1_compound_metric_options: "Um nome personalizado para a sua métrica composta." |
| ... | ... | @@ -322,7 +311,6 @@ pt: |
| 322 | 311 | process_period: "Período de processamento" |
| 323 | 312 | currently_waiting_confirmation: "Atualmente esperando confirmação de:" |
| 324 | 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 | 314 | pick_color: "Escolha a Cor" |
| 327 | 315 | password_confirmation: "Confirme sua senha" |
| 328 | 316 | current_password: "Senha Atual" | ... | ... |
| ... | ... | @@ -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." | ... | ... |
| ... | ... | @@ -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." | ... | ... |