Commit f096a555 authored by scootergrisen's avatar scootergrisen Committed by Paul Slaughter

Remove "files" from end of default commit message in Web IDE

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70582

Changelog: changed
parent 0261917a
import { sprintf, n__, __ } from '../../../../locale';
import { __ } from '../../../../locale';
import { COMMIT_TO_NEW_BRANCH } from './constants';
const BRANCH_SUFFIX_COUNT = 5;
const createTranslatedTextForFiles = (files, text) => {
if (!files.length) return null;
return sprintf(n__('%{text} %{files}', '%{text} %{files} files', files.length), {
files: files.reduce((acc, val) => acc.concat(val.path), []).join(', '),
text,
});
const filesPart = files.reduce((acc, val) => acc.concat(val.path), []).join(', ');
return `${text} ${filesPart}`;
};
export const discardDraftButtonDisabled = (state) =>
......
......@@ -968,11 +968,6 @@ msgstr ""
msgid "%{template_project_id} is unknown or invalid"
msgstr ""
msgid "%{text} %{files}"
msgid_plural "%{text} %{files} files"
msgstr[0] ""
msgstr[1] ""
msgid "%{text} is available"
msgstr ""
......
......@@ -126,7 +126,7 @@ describe('IDE commit module getters', () => {
);
expect(getters.preBuiltCommitMessage(state, null, rootState)).toBe(
'Update test-file, index.js files',
'Update test-file, index.js',
);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment