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