Commit dc03842e authored by Brandon Labuschagne's avatar Brandon Labuschagne

Refactor split link after i18n

parent b01aaa3e
...@@ -35,7 +35,7 @@ import { ...@@ -35,7 +35,7 @@ import {
} from './lib/utils/common_utils'; } from './lib/utils/common_utils';
import imageDiffHelper from './image_diff/helpers/index'; import imageDiffHelper from './image_diff/helpers/index';
import { localTimeAgo } from './lib/utils/datetime_utility'; import { localTimeAgo } from './lib/utils/datetime_utility';
import { s__, __ } from './locale'; import { sprintf, s__, __ } from './locale';
window.autosize = Autosize; window.autosize = Autosize;
...@@ -1261,12 +1261,19 @@ export default class Notes { ...@@ -1261,12 +1261,19 @@ export default class Notes {
putConflictEditWarningInPlace(noteEntity, $note) { putConflictEditWarningInPlace(noteEntity, $note) {
if ($note.find('.js-conflict-edit-warning').length === 0) { if ($note.find('.js-conflict-edit-warning').length === 0) {
const open_link = `<a href="#note_${
noteEntity.id
}" target="_blank" rel="noopener noreferrer">`;
const $alert = $(`<div class="js-conflict-edit-warning alert alert-danger"> const $alert = $(`<div class="js-conflict-edit-warning alert alert-danger">
${__('This comment has changed since you started editing, please review the')} ${sprintf(
<a href="#note_${noteEntity.id}" target="_blank" rel="noopener noreferrer"> s__(
${__('updated comment')} 'Notes|This comment has changed since you started editing, please review the %{open_link}updated comment%{close_link} to ensure information is not lost',
</a> ),
${__('to ensure information is not lost')} {
open_link,
close_link: '</a>',
},
)}
</div>`); </div>`);
$alert.insertAfter($note.find('.note-text')); $alert.insertAfter($note.find('.note-text'));
} }
......
...@@ -8495,6 +8495,9 @@ msgstr "" ...@@ -8495,6 +8495,9 @@ msgstr ""
msgid "Notes|Show history only" msgid "Notes|Show history only"
msgstr "" msgstr ""
msgid "Notes|This comment has changed since you started editing, please review the %{open_link}updated comment%{close_link} to ensure information is not lost"
msgstr ""
msgid "Nothing to preview." msgid "Nothing to preview."
msgstr "" msgstr ""
...@@ -12646,9 +12649,6 @@ msgstr "" ...@@ -12646,9 +12649,6 @@ msgstr ""
msgid "This chart could not be displayed" msgid "This chart could not be displayed"
msgstr "" msgstr ""
msgid "This comment has changed since you started editing, please review the"
msgstr ""
msgid "This commit is part of merge request %{link_to_merge_request}. Comments created here will be created in the context of that merge request." msgid "This commit is part of merge request %{link_to_merge_request}. Comments created here will be created in the context of that merge request."
msgstr "" msgstr ""
...@@ -15574,9 +15574,6 @@ msgstr "" ...@@ -15574,9 +15574,6 @@ msgstr ""
msgid "this document" msgid "this document"
msgstr "" msgstr ""
msgid "to ensure information is not lost"
msgstr ""
msgid "to help your contributors communicate effectively!" msgid "to help your contributors communicate effectively!"
msgstr "" msgstr ""
...@@ -15586,9 +15583,6 @@ msgstr "" ...@@ -15586,9 +15583,6 @@ msgstr ""
msgid "updated" msgid "updated"
msgstr "" msgstr ""
msgid "updated comment"
msgstr ""
msgid "username" msgid "username"
msgstr "" msgstr ""
......
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