[updater] preparing conflict resolution options for localization (IDEA-336163)

GitOrigin-RevId: ea3aa7f3df24ab6ad0bcb0c5a5cebeb699913170
This commit is contained in:
Roman Shevchenko
2023-11-28 15:10:11 +00:00
committed by intellij-monorepo-bot
parent 8044f96707
commit e5776f72b4
2 changed files with 21 additions and 1 deletions
@@ -289,7 +289,7 @@ public class SwingUpdaterUI implements UpdaterUI {
case 2:
return item.validationResult.message;
case OPTIONS_COLUMN_INDEX:
return item.option;
return getOptionName(item.option);
}
return null;
}
@@ -307,6 +307,21 @@ public class SwingUpdaterUI implements UpdaterUI {
}
}
private static @Nls String getOptionName(ValidationResult.Option option) {
switch (option) {
case NONE: return "-";
case IGNORE: return UpdaterUI.message("option.ignore");
case KEEP: return UpdaterUI.message("option.keep");
case REPLACE: return UpdaterUI.message("option.replace");
case DELETE: return UpdaterUI.message("option.delete");
case KILL_PROCESS: return UpdaterUI.message("option.kill.process");
default: {
@SuppressWarnings("HardCodedStringLiteral") var name = option.toString();
return name;
}
}
}
public ValidationResult.Kind getKind(int rowIndex) {
return myItems.get(rowIndex).validationResult.kind;
}
@@ -26,6 +26,11 @@ action.create=Create
action.update=Update
action.delete=Delete
action.validate=Validate
option.ignore=Ignore
option.keep=Keep
option.replace=Replace
option.delete=Delete
option.kill.process=Kill Process
button.proceed=Proceed
updating.x.to.y=Updating {0} to {1}