Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/admin/custom_admin_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def build(namespace, menu) # rubocop:disable Metrics/AbcSize
li do
text_node content_tag "a", t("active_admin.menu.language.language")
ul do
li { link_to t("active_admin.menu.language.english"), admin_dashboard_change_language_path(locale: :en), method: :post }
li { link_to t("active_admin.menu.language.french"), admin_dashboard_change_language_path(locale: :fr), method: :post }
li { link_to t("active_admin.menu.language.spanish"), admin_dashboard_change_language_path(locale: :es), method: :post }
li { link_to t("locales.en"), admin_dashboard_change_language_path(locale: :en), method: :post }
li { link_to t("locales.fr"), admin_dashboard_change_language_path(locale: :fr), method: :post }
li { link_to t("locales.es"), admin_dashboard_change_language_path(locale: :es), method: :post }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/admin/newsletter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def scoped_collection
action_item :force_translations, only: :show do
dropdown_menu I18n.t("active_admin.shared.force_translations") do
I18n.available_locales.sort.each do |locale|
item locale, force_translations_admin_newsletter_path(newsletter, translate_from: locale)
item I18n.t("locales.#{locale}"), force_translations_admin_newsletter_path(newsletter, translate_from: locale)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmm.. usually it's better not to translate the names of the languages and keep them in English.
Cause if you make a mistake you're gonna have a hard time finding out how the word "English" is spelled in Mandarin 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, ok. I will change that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but actually in this case we only have backoffice in 3 languages so there will be no issue like that, so I will keep it :P

end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/admin/observation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def scoped_collection
action_item :force_translations, only: :show do
dropdown_menu I18n.t("active_admin.shared.force_translations") do
I18n.available_locales.sort.each do |locale|
item locale, force_translations_admin_observation_path(observation, translate_from: locale)
item I18n.t("locales.#{locale}"), force_translations_admin_observation_path(observation, translate_from: locale)
end
end
end
Expand Down
14 changes: 10 additions & 4 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
en:
locale_name: "English"
attributes:
name: Name
description: Description
Expand Down Expand Up @@ -256,9 +255,6 @@ en:
notification_groups: 'Notification groups'
language:
language: 'Language'
english: 'English'
french: 'French'
spanish: 'Spanish'
logout: 'Logout'
dashboard_page:
columns:
Expand Down Expand Up @@ -1721,3 +1717,13 @@ en:
types: 'observation-type'
info: 'observation-info'
attachments: 'observation-attachments'

locales:
en: 'English'
fr: 'French'
pt: 'Portuguese'
es: 'Spanish'
zh-CN: 'Chinese (Simplified)'
ja: 'Japanese'
ko: 'Korean'
vi: 'Vietnamese'
14 changes: 10 additions & 4 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
es:
locale_name: "Español"
attributes:
name: Nombre
description: Descripción
Expand Down Expand Up @@ -270,9 +269,6 @@ es:
notification_groups: 'Grupos de notificación'
language:
language: 'Idioma'
english: 'Inglés'
french: 'Francés'
spanish: 'Español'
logout: 'Cerrar sesión'
dashboard_page:
columns:
Expand Down Expand Up @@ -1722,3 +1718,13 @@ es:
types: 'tipo-de-observación'
info: 'información-de-observación'
attachments: 'archivos-adjuntos-de-observación'

locales:
en: 'Inglés'
fr: 'Francés'
pt: 'Portugués'
es: 'Español'
zh-CN: 'Chino (simplificado)'
ja: 'Japonés'
ko: 'Coreano'
vi: 'Vietnamita'
14 changes: 10 additions & 4 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
fr:
locale_name: "Français"
attributes:
name: Nom
description: Description
Expand Down Expand Up @@ -263,9 +262,6 @@ fr:
notification_groups: 'Groupes de notifications'
language:
language: 'Langue'
english: 'Anglais'
french: 'Français'
spanish: 'Espagnol'
logout: 'Se déconnecter'
dashboard_page:
columns:
Expand Down Expand Up @@ -1624,3 +1620,13 @@ fr:
types: 'observation-type'
info: 'observation-info'
attachments: 'observation-attachments'

locales:
en: 'Anglais'
fr: 'Français'
pt: 'Portugais'
es: 'Espagnol'
zh-CN: 'Chinois (simplifié)'
ja: 'Japonais'
ko: 'Coréen'
vi: 'Vietnamien'