diff options
author | Rémy Coutable <remy@rymai.me> | 2017-07-21 13:43:04 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-07-21 13:44:16 +0300 |
commit | 53c5b6717ccfb4c9bc1f4faf008d084dd4f0cd96 (patch) | |
tree | 5703dbdb3c152f2597ad8caebbfdac21ad1fb5f7 /app/assets/javascripts/star.js | |
parent | 1733090a9efd3ee6c3c7e0eb0001602db89a04d7 (diff) |
Fix translations for Star/Unstar in JS file
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/assets/javascripts/star.js')
-rw-r--r-- | app/assets/javascripts/star.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/star.js b/app/assets/javascripts/star.js index 6d38124f1c1..3a06b477d7c 100644 --- a/app/assets/javascripts/star.js +++ b/app/assets/javascripts/star.js @@ -1,6 +1,8 @@ /* eslint-disable func-names, space-before-function-paren, wrap-iife, no-unused-vars, one-var, no-var, one-var-declaration-per-line, prefer-arrow-callback, no-new, max-len */ /* global Flash */ +import { __, s__ } from './locale'; + export default class Star { constructor() { $('.project-home-panel .toggle-star').on('ajax:success', function(e, data, status, xhr) { @@ -11,10 +13,10 @@ export default class Star { toggleStar = function(isStarred) { $this.parent().find('.star-count').text(data.star_count); if (isStarred) { - $starSpan.removeClass('starred').text('Star'); + $starSpan.removeClass('starred').text(s__('StarProject|Star')); $starIcon.removeClass('fa-star').addClass('fa-star-o'); } else { - $starSpan.addClass('starred').text('Unstar'); + $starSpan.addClass('starred').text(__('Unstar')); $starIcon.removeClass('fa-star-o').addClass('fa-star'); } }; |