ReplaceDialog: use ternary conditionals