Skip to content
Snippets Groups Projects
Unverified Commit fa4c33b7 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Merge pull request #1110 from noesya/fix_languages

fix languages
parents 30896054 ee40d6dc
No related branches found
No related tags found
No related merge requests found
<% if about.available_languages.many? %>
<% # TODO i18n %>
<br>en <%= t(about.language.iso_code, scope: :languages) %>
<br> <%= t('admin.i18n.in', lang: language_name(about.language.iso_code).downcase) %>
<%
route_args = about.is_direct_object? ? [:admin, about.becomes(about.class.base_class)]
......@@ -9,9 +8,9 @@
<%
links = about.available_languages.map { |language|
next if language.id == about.language_id
link_to t(language.iso_code, scope: :languages).downcase,
link_to language_name(language.iso_code).downcase,
[*route_args, lang: language.iso_code]
}.compact
%>
<br>(basculer en <%= links.to_sentence.html_safe %>)
<br>(<%= t('admin.i18n.switch_to', choices: links.to_sentence).html_safe %>)
<% end %>
\ No newline at end of file
......@@ -22,7 +22,7 @@ end if @page.featured_image.attached?
language = @page.language
json.language do
json.extract! language, :id, :name, :iso_code, :summernote_locale
json.label t(language.iso_code, scope: :languages)
json.label language_name(language.iso_code)
end
original = @page.original
......
......@@ -107,6 +107,9 @@ en:
zero: No element
one: 1 element
other: "%{count} elements"
i18n:
in: in %{lang}
switch_to: switch to %{choices}
infos: Informations
inheritance:
sentence_without_link: Value inherited
......
......@@ -107,6 +107,9 @@ fr:
zero: Aucun élément
one: 1 élément
other: "%{count} éléments"
i18n:
in: en %{lang}
switch_to: basculer en %{choices}
infos: Informations
inheritance:
sentence_without_link: Valeur héritée
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment