diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2017-07-28 23:08:05 -0400 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2017-07-28 23:08:05 -0400 |
commit | 061e6032c8a333b1bf2223e1934af320dbde1891 (patch) | |
tree | a3f8beea8583051319ed960ea5a78ecb8d1038d3 | |
parent | c18fee9416a33840c363a9f0bb3269e0b447cded (diff) | |
download | gitlab-ce-061e6032c8a333b1bf2223e1934af320dbde1891.tar.gz |
Pluralize files
-rw-r--r-- | app/assets/javascripts/repo/repo_commit_section.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/repo/repo_commit_section.vue b/app/assets/javascripts/repo/repo_commit_section.vue index 85c7ff2b0a5..caab02c221c 100644 --- a/app/assets/javascripts/repo/repo_commit_section.vue +++ b/app/assets/javascripts/repo/repo_commit_section.vue @@ -16,7 +16,11 @@ const RepoCommitSection = { return this.changedFiles.map((f) => { return Helper.getFilePathFromFullPath(f.url, branch); }); - } + }, + + filePluralize() { + return this.changedFiles.length > 1 ? 'files' : 'file' + }, }, methods: { @@ -87,7 +91,7 @@ export default RepoCommitSection; <div class="col-md-offset-4 col-md-4"> <button type="submit" :disabled="!commitMessage || submitCommitsLoading" class="btn btn-success submit-commit" @click.prevent="makeCommit"> <i class="fa fa-spinner fa-spin" v-if="submitCommitsLoading"></i> - <span class="commit-summary">Commit {{changedFiles.length}} Files</span> + <span class="commit-summary">Commit {{changedFiles.length}} {{filePluralize}}</span> </button> </div> </fieldset> |