1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Centralize auth messages (#269)

* Add i18n-tasks

* Add auth-related i18n

* Centralize auth messages

* Remove safe navigation

* Revert "Remove safe navigation"

This reverts commit 56b5e01e5e.

* Remove newline in Gemfile
This commit is contained in:
Jose Farias 2024-02-03 14:17:49 -06:00 committed by GitHub
parent 69698d0463
commit c5192ee424
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 138 additions and 55 deletions

25
config/i18n-tasks.yml Normal file
View file

@ -0,0 +1,25 @@
base_locale: en
data:
read:
- config/locales/%{locale}.yml
write:
- config/locales/%{locale}.yml
router: conservative_router
search:
paths:
- app/
relative_roots:
- app/controllers
- app/helpers
- app/mailers
- app/presenters
- app/views
strict: true
## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
## *.jpg *.jpeg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less
## *.yml *.json *.zip *.tar.gz *.swf *.flv *.mp3 *.wav *.flac *.webm *.mp4 *.ogg *.opus *.webp *.map *.xlsx
exclude:
- app/assets/images
- app/assets/fonts
- app/assets/videos
- app/assets/builds

View file

@ -1,31 +1,22 @@
# Files in the config/locales directory are used for internationalization and
# are automatically loaded by Rails. If you want to use locales other than
# English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t "hello"
#
# In views, this is aliased to just `t`:
#
# <%= t("hello") %>
#
# To use a different locale, set it with `I18n.locale`:
#
# I18n.locale = :es
#
# This would use the information in config/locales/es.yml.
#
# To learn more about the API, please read the Rails Internationalization guide
# at https://guides.rubyonrails.org/i18n.html.
#
# Be aware that YAML interprets the following case-insensitive strings as
# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings
# must be quoted to be interpreted as strings. For example:
#
# en:
# "yes": yup
# enabled: "ON"
---
en:
hello: "Hello world"
password_resets:
create:
requested: If an account with that email exists, we have sent a link to reset
your password.
update:
invalid_token: Invalid token.
success: Your password has been reset.
passwords:
update:
success: Your password has been updated successfully.
registrations:
create:
failure: Invalid input, please try again.
invalid_invite_code: Invalid invite code, please try again.
success: You have signed up successfully.
sessions:
create:
invalid_credentials: Invalid email or password.
destroy:
logout_successful: You have signed out successfully.