other merge fixes

This commit is contained in:
Will Li 2025-07-17 08:35:05 -07:00
parent 0e9954dfe7
commit 2ab8d4982a
2 changed files with 12 additions and 12 deletions

View file

@ -29,10 +29,10 @@ export const CheckpointRestoreDialog: React.FC<CheckpointRestoreDialogProps> = (
const { t } = useAppTranslation()
const isEdit = type === "edit"
const title = isEdit ? t("common:confirmation.edit_message") : t("common:confirmation.delete_message")
const title = isEdit ? t("common:confirmation.editMessage") : t("common:confirmation.deleteMessage")
const description = isEdit
? t("common:confirmation.edit_question_with_checkpoint")
: t("common:confirmation.delete_question_with_checkpoint")
? t("common:confirmation.editQuestionWithCheckpoint")
: t("common:confirmation.deleteQuestionWithCheckpoint")
const handleConfirmWithRestore = () => {
onConfirm(true)
@ -58,13 +58,13 @@ export const CheckpointRestoreDialog: React.FC<CheckpointRestoreDialogProps> = (
<AlertDialogAction
onClick={handleConfirmWithoutRestore}
className="bg-vscode-button-background hover:bg-vscode-button-hoverBackground text-vscode-button-foreground border-vscode-button-border">
{isEdit ? t("common:confirmation.edit_only") : t("common:confirmation.delete_only")}
{isEdit ? t("common:confirmation.editOnly") : t("common:confirmation.deleteOnly")}
</AlertDialogAction>
{hasCheckpoint && (
<AlertDialogAction
onClick={handleConfirmWithRestore}
className="bg-vscode-button-background hover:bg-vscode-button-hoverBackground text-vscode-button-foreground border-vscode-button-border">
{t("common:confirmation.restore_to_checkpoint")}
{t("common:confirmation.restoreToCeckpoint")}
</AlertDialogAction>
)}
</AlertDialogFooter>

View file

@ -11,15 +11,15 @@ vi.mock("@src/i18n/TranslationContext", () => ({
useAppTranslation: () => ({
t: (key: string) => {
const translations: Record<string, string> = {
"common:confirmation.delete_message": "Delete Message",
"common:confirmation.edit_message": "Edit Message",
"common:confirmation.delete_question_with_checkpoint":
"common:confirmation.deleteMessage": "Delete Message",
"common:confirmation.editMessage": "Edit Message",
"common:confirmation.deleteQuestionWithCheckpoint":
"Deleting this message will delete all subsequent messages in the conversation. Do you want to proceed?",
"common:confirmation.edit_question_with_checkpoint":
"common:confirmation.editQuestionWithCheckpoint":
"Editing this message will delete all subsequent messages in the conversation. Do you want to proceed?",
"common:confirmation.edit_only": "Edit Only",
"common:confirmation.delete_only": "Delete Only",
"common:confirmation.restore_to_checkpoint": "Restore to Checkpoint",
"common:confirmation.editOnly": "Edit Only",
"common:confirmation.deleteOnly": "Delete Only",
"common:confirmation.restoreToCeckpoint": "Restore to Checkpoint",
"common:answers.cancel": "Cancel",
}
return translations[key] || key