diff --git a/platform/diff-impl/tests/com/intellij/diff/util/DiffUtilTest.kt b/platform/diff-impl/tests/com/intellij/diff/util/DiffUtilTest.kt index cea97c254952..719f7cb092f5 100644 --- a/platform/diff-impl/tests/com/intellij/diff/util/DiffUtilTest.kt +++ b/platform/diff-impl/tests/com/intellij/diff/util/DiffUtilTest.kt @@ -31,6 +31,7 @@ package com.intellij.diff.util import com.intellij.diff.DiffTestCase +import com.intellij.openapi.diff.DiffBundle import com.intellij.util.containers.ContainerUtil class DiffUtilTest : DiffTestCase() { @@ -58,4 +59,23 @@ class DiffUtilTest : DiffTestCase() { doTest(1, 3, 5, 7, 8, 6, 4, 2) { v1, v2 -> v2 - v1 } } + + fun `test merge conflict partially resolved confirmation message`() { + fun doTest(changes: Int, conflicts: Int, expected: String) { + val actual = DiffBundle.message("merge.dialog.apply.partially.resolved.changes.confirmation.message", changes, conflicts) + assertTrue(actual.startsWith(expected), actual) + } + + doTest(1, 0, "There is one change left") + doTest(0, 1, "There is one conflict left") + doTest(1, 1, "There is one change and one conflict left") + + doTest(2, 0, "There are 2 changes left") + doTest(0, 2, "There are 2 conflicts left") + doTest(2, 2, "There are 2 changes and 2 conflicts left") + + doTest(1, 2, "There is one change and 2 conflicts left") + doTest(2, 1, "There are 2 changes and one conflict left") + doTest(2, 3, "There are 2 changes and 3 conflicts left") + } } diff --git a/platform/platform-resources-en/src/messages/DiffBundle.properties b/platform/platform-resources-en/src/messages/DiffBundle.properties index 94015a6faae0..f3114678cbe9 100644 --- a/platform/platform-resources-en/src/messages/DiffBundle.properties +++ b/platform/platform-resources-en/src/messages/DiffBundle.properties @@ -75,7 +75,7 @@ apply.somehow.status.message.all.applied=All hunks resolved apply.somehow.status.message.already.applied={0, number} {0, choice, 1#hunk is|2#hunks are} already applied apply.somehow.status.message.cant.apply=Can''t apply {0, number} {0, choice, 1#hunk|2#hunks} apply.somehow.status.message.cant.apply.some=Can''t apply {0, number} of {1, number} hunks -merge.dialog.apply.partially.resolved.changes.confirmation.message=There {0, choice, 0#'{1, choice, 1#is|2#are}'|1#'{1, choice, 0#is|1#are}'|2#are} {0, choice, 0#|1#one change|2#{0, number} changes}{0, choice, 0#|1#'{1, choice, 0#|1# and }'}{1, choice, 0#|1#one conflict|2#{1, number} conflicts} left unprocessed.\nAre you sure you want to save changes and finish merging? +merge.dialog.apply.partially.resolved.changes.confirmation.message=There {0, choice, 0#'{1, choice, 1#is|2#are}'|1#is|2#are} {0, choice, 0#|1#one change|2#{0, number} changes}{0, choice, 0#|1#'{1, choice, 0#|1# and }'}{1, choice, 0#|1#one conflict|2#{1, number} conflicts} left unprocessed.\nAre you sure you want to save changes and finish merging? apply.patch.partially.resolved.changes.confirmation.message=There {0, choice, 1#is one hunk|2#are {0, number} hunks} left unprocessed.\nAre you sure you want to save changes and finish resolve? apply.partially.resolved.merge.dialog.title=Apply Changes merge.dialog.resolve.side.with.discard.title=Accept Changes