Commit c3cd29f7c9f74cf3eefe8a3f92ebad9c8cb3eb5e
1 parent
8e54760d
Exists in
colab
and in
4 other branches
Miscellaneous translations, reviewing for #204
Signed off by: Diego Araújo <diegoamc90@gmail.com>
Showing
7 changed files
with
21 additions
and
7 deletions
Show diff stats
app/helpers/application_helper.rb
| 1 | module ApplicationHelper | 1 | module ApplicationHelper |
| 2 | - def t_hint(attribute_key, class_key=nil) | 2 | + def t_hint(attribute_key, class_key=nil, options={}) |
| 3 | class_key ||= controller_name.singularize | 3 | class_key ||= controller_name.singularize |
| 4 | - t("activemodel.hints.#{class_key}.#{attribute_key}") | 4 | + t("activemodel.hints.#{class_key}.#{attribute_key}", options) |
| 5 | end | 5 | end |
| 6 | end | 6 | end |
app/views/devise/_links.erb
| 1 | +<%# This file was autogenerated by devise-i18n-views and is not used %> | ||
| 1 | <% ActiveSupport::Deprecation.warn "Rendering partials devise/_links.erb is deprecated" \ | 2 | <% ActiveSupport::Deprecation.warn "Rendering partials devise/_links.erb is deprecated" \ |
| 2 | "please use devise/shared/_links.erb instead."%> | 3 | "please use devise/shared/_links.erb instead."%> |
| 3 | -<%= render "shared/links" %> | ||
| 4 | \ No newline at end of file | 4 | \ No newline at end of file |
| 5 | +<%= render "shared/links" %> |
app/views/kalibro_ranges/_form.html.erb
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | </div> | 13 | </div> |
| 14 | <div class="help-container"> | 14 | <div class="help-container"> |
| 15 | <p> | 15 | <p> |
| 16 | - <%= t('activemodel.hints.kalibro_range.reading', | 16 | + <%= t_hint('reading', 'kalibro_range', |
| 17 | reading_href: link_to(t('reading'), tutorials_path('keywords', anchor: 'reading')), | 17 | reading_href: link_to(t('reading'), tutorials_path('keywords', anchor: 'reading')), |
| 18 | range_href: link_to(KalibroRange.model_name.human, tutorials_path('keywords', anchor: 'range')) | 18 | range_href: link_to(KalibroRange.model_name.human, tutorials_path('keywords', anchor: 'range')) |
| 19 | ).html_safe | 19 | ).html_safe |
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 36 | 36 | ||
| 37 | <div class="help-container"> | 37 | <div class="help-container"> |
| 38 | <p> | 38 | <p> |
| 39 | - <%= t('activemodel.hints.kalibro_range.beginning') %> | 39 | + <%= t_hint('beginning', 'kalibro_range') %> |
| 40 | </p> | 40 | </p> |
| 41 | </div> | 41 | </div> |
| 42 | </div> | 42 | </div> |
| @@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
| 53 | </div> | 53 | </div> |
| 54 | <div class="help-container"> | 54 | <div class="help-container"> |
| 55 | <p> | 55 | <p> |
| 56 | - <%= t('activemodel.hints.kalibro_range.end') %> | 56 | + <%= t_hint('end', 'kalibro_range') %> |
| 57 | </p> | 57 | </p> |
| 58 | </div> | 58 | </div> |
| 59 | </div> | 59 | </div> |
| @@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
| 65 | </div> | 65 | </div> |
| 66 | <div class="help-container"> | 66 | <div class="help-container"> |
| 67 | <p> | 67 | <p> |
| 68 | - <%= t('activemodel.hints.kalibro_range.comments', metric_href: link_to(t('metric'), tutorials_path('keywords', anchor: 'metric'))).html_safe %> | 68 | + <%= t_hint('comments', 'kalibro_range', metric_href: link_to(t('metric'), tutorials_path('keywords', anchor: 'metric'))).html_safe %> |
| 69 | </p> | 69 | </p> |
| 70 | </div> | 70 | </div> |
| 71 | </div> | 71 | </div> |
config/locales/default/en.yml
config/locales/default/pt.yml
config/locales/views/devise/en.yml
| @@ -8,6 +8,7 @@ en: | @@ -8,6 +8,7 @@ en: | ||
| 8 | activerecord: | 8 | activerecord: |
| 9 | attributes: | 9 | attributes: |
| 10 | user: | 10 | user: |
| 11 | + name: Name | ||
| 11 | current_password: Current password | 12 | current_password: Current password |
| 12 | email: Email | 13 | email: Email |
| 13 | password: Password | 14 | password: Password |
| @@ -72,6 +73,9 @@ en: | @@ -72,6 +73,9 @@ en: | ||
| 72 | same_email: *same_email | 73 | same_email: *same_email |
| 73 | forgot_password_link_html: If you forgot your password, follow this %{link} to reset it. | 74 | forgot_password_link_html: If you forgot your password, follow this %{link} to reset it. |
| 74 | stay_logged_in: Stay logged in. | 75 | stay_logged_in: Stay logged in. |
| 76 | + user: | ||
| 77 | + signed_in: Signed in successfully. | ||
| 78 | + signed_out: Signed out successfully. | ||
| 75 | shared: | 79 | shared: |
| 76 | links: | 80 | links: |
| 77 | back: Back | 81 | back: Back |
config/locales/views/devise/pt.yml
| @@ -8,6 +8,7 @@ pt: | @@ -8,6 +8,7 @@ pt: | ||
| 8 | activerecord: | 8 | activerecord: |
| 9 | attributes: | 9 | attributes: |
| 10 | user: | 10 | user: |
| 11 | + name: Nome | ||
| 11 | current_password: Senha atual | 12 | current_password: Senha atual |
| 12 | email: Email | 13 | email: Email |
| 13 | password: Senha | 14 | password: Senha |
| @@ -16,6 +17,9 @@ pt: | @@ -16,6 +17,9 @@ pt: | ||
| 16 | models: | 17 | models: |
| 17 | user: Usuário | 18 | user: Usuário |
| 18 | devise: | 19 | devise: |
| 20 | + failure: | ||
| 21 | + user: | ||
| 22 | + invalid: Email ou senha inválidos. | ||
| 19 | confirmations: | 23 | confirmations: |
| 20 | new: | 24 | new: |
| 21 | resend_confirmation_instructions: Reenviar instruções de confirmação | 25 | resend_confirmation_instructions: Reenviar instruções de confirmação |
| @@ -72,6 +76,9 @@ pt: | @@ -72,6 +76,9 @@ pt: | ||
| 72 | same_email: *same_email | 76 | same_email: *same_email |
| 73 | forgot_password_link_html: Se você esqueceu sua senha, clique neste %{link} para redefini-la. | 77 | forgot_password_link_html: Se você esqueceu sua senha, clique neste %{link} para redefini-la. |
| 74 | stay_logged_in: Continuar logado. | 78 | stay_logged_in: Continuar logado. |
| 79 | + user: | ||
| 80 | + signed_in: Entrou com sucesso. | ||
| 81 | + signed_out: Saiu com sucesso. | ||
| 75 | shared: | 82 | shared: |
| 76 | links: | 83 | links: |
| 77 | back: Voltar | 84 | back: Voltar |