Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzekiel Kigbo <ekigbo@gitlab.com>2019-07-24 20:39:18 +0300
committerPaul Slaughter <pslaughter@gitlab.com>2019-07-24 20:39:18 +0300
commit78d57823cabc6ad7844439373a4bed253cfd1f6f (patch)
tree13cb0f71e2aadb74016b99fdb690f463eb392889 /app/assets/javascripts/commits.js
parent945eb2aeeebf1e4f6e235716ebd50b3f128f0ef9 (diff)
Removed pluralize function
Replaced instance of the `pluralize` js function with `n__` to follow our development guide.
Diffstat (limited to 'app/assets/javascripts/commits.js')
-rw-r--r--app/assets/javascripts/commits.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/commits.js b/app/assets/javascripts/commits.js
index 54e2589c707..7dd75d03ab9 100644
--- a/app/assets/javascripts/commits.js
+++ b/app/assets/javascripts/commits.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import { pluralize } from './lib/utils/text_utility';
+import { n__ } from '~/locale';
import { localTimeAgo } from './lib/utils/datetime_utility';
import Pager from './pager';
import axios from './lib/utils/axios_utils';
@@ -90,9 +90,10 @@ export default class CommitsList {
.first()
.find('li.commit').length,
);
+
$commitsHeadersLast
.find('span.commits-count')
- .text(`${commitsCount} ${pluralize('commit', commitsCount)}`);
+ .text(n__('%d commit', '%d commits', commitsCount));
}
localTimeAgo($processedData.find('.js-timeago'));