Skip to content

Commit

Permalink
Reduced globe icon count (#9826)
Browse files Browse the repository at this point in the history
* Reduced globe icon count

* Added equal sign

Co-authored-by: imajit <[email protected]>
  • Loading branch information
imajit and imajit authored Jun 22, 2021
1 parent cf6f681 commit b3dab52
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/translation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(document).ready(function () {
$('.translationIcon').filter(function(i) {
return (i + 1) % 3 === 0
}).show();
});
4 changes: 2 additions & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def translation(key, options = {}, html = true)
translated_string2 = t(key, options)

if html && current_user&.has_tag('translation-helper') && translated_string2.include?("translation missing") && !translated_string.include?("<")
raw(%(<span>#{translated_string} <a href="https://www.transifex.com/publiclab/publiclaborg/translate/#de/$?q=text%3A#{translated_string}">
<i data-toggle='tooltip' data-placement='top' title='Needs translation? Click to help translate the text \" #{translated_string} \"' style='position:relative; right:2px; color:#bbb; font-size: 15px;' class='fa fa-globe'></i></a>
raw(%(<span>#{translated_string} <a class="translationIcon" style='display: none;' href="https://www.transifex.com/publiclab/publiclaborg/translate/#de/$?q=text%3A#{translated_string}">
<i data-toggle='tooltip' data-placement='top' title='Needs translation? Click to help translate this text.' style='position:relative; right:2px; color:#bbb; font-size: 15px;' class='fa fa-globe'></i></a>
</span>))
else
raw(translated_string)
Expand Down
1 change: 1 addition & 0 deletions app/views/dashboard/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@
</div>
<%= stylesheet_link_tag "dashboard" %>
<%= javascript_include_tag "dashboard" %>
<%= javascript_include_tag "translation" %>
1 change: 1 addition & 0 deletions app/views/home/subscriptions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
});
</script>
<%= javascript_include_tag "translation" %>

<div class="col-lg-3">

Expand Down
1 change: 1 addition & 0 deletions app/views/users/profile.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@
</div>

</div>
<%= javascript_include_tag "translation" %>

<script src = "https://cdn.jsdelivr.net/npm/[email protected]/dist/frappe-charts.min.iife.js"></script>

Expand Down
1 change: 1 addition & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'question.js',
'sidebar.js',
'textBoxExpand.js',
'translation.js',

'blog.css',
'comments.css',
Expand Down

0 comments on commit b3dab52

Please sign in to comment.