Skip to content

Commit

Permalink
Removed the text "translation is missing for " for pref_labels withou…
Browse files Browse the repository at this point in the history
…t a translation in the current locale.
  • Loading branch information
pschijven committed Nov 24, 2023
1 parent 0ba8a25 commit 85fd390
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions app/models/label/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ def to_literal
end

def to_s
if (language.presence || 'none') != I18n.locale.to_s
value.to_s + " [#{I18n.t('txt.common.translation_missing_for')} '#{I18n.locale}']"
else
value.to_s
end
end
end
4 changes: 2 additions & 2 deletions app/views/partials/concept/_edit_link_base.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% label = item.pref_label.to_s.presence || ":#{item.origin} [#{t("txt.common.translation_missing_for")} #{[I18n.locale.to_s, Iqvoc::Concept.pref_labeling_languages.first.to_s].uniq.join(", ")}]" %>
<% label = item.pref_label.to_s.presence || ":#{item.origin}" %>
<%= link_to truncate(label, :length => 45), (item.published? ? concept_path(:id => item.origin) : concept_path(:published => 0, :id => item.origin)) %>
<%- if (item.additional_info) -%>
<%- if item.additional_info -%>
(<%= item.additional_info %>)
<%- end -%>

0 comments on commit 85fd390

Please sign in to comment.