@@ -24,11 +24,11 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
24
24
25
25
const handleConfirm = async ( ) => {
26
26
if ( ! newName || newName . includes ( " " ) ) {
27
- toast . error ( "Tag name cannot be empty or contain spaces" ) ;
27
+ toast . error ( t ( "tag.rename-error- empty" ) ) ;
28
28
return ;
29
29
}
30
30
if ( newName === tag ) {
31
- toast . error ( "New name cannot be the same as the old name" ) ;
31
+ toast . error ( t ( "tag.rename-error-repeat" ) ) ;
32
32
return ;
33
33
}
34
34
@@ -38,7 +38,7 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
38
38
oldTag : tag ,
39
39
newTag : newName ,
40
40
} ) ;
41
- toast . success ( "Rename tag successfully" ) ;
41
+ toast . success ( t ( " tag.rename-success" ) ) ;
42
42
} catch ( error : any ) {
43
43
console . error ( error ) ;
44
44
toast . error ( error . details ) ;
@@ -57,16 +57,16 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
57
57
< div className = "flex flex-col justify-start items-start max-w-xs" >
58
58
< div className = "w-full flex flex-col justify-start items-start mb-3" >
59
59
< div className = "relative w-full mb-2 flex flex-row justify-start items-center space-x-2" >
60
- < span className = "w-20 text-sm whitespace-nowrap shrink-0 text-right" > Old Name </ span >
60
+ < span className = "w-20 text-sm whitespace-nowrap shrink-0 text-right" > { t ( "tag.old-name" ) } </ span >
61
61
< Input className = "w-full" readOnly disabled type = "text" placeholder = "A new tag name" value = { tag } />
62
62
</ div >
63
63
< div className = "relative w-full mb-2 flex flex-row justify-start items-center space-x-2" >
64
- < span className = "w-20 text-sm whitespace-nowrap shrink-0 text-right" > New Name </ span >
64
+ < span className = "w-20 text-sm whitespace-nowrap shrink-0 text-right" > { t ( "tag.new-name" ) } </ span >
65
65
< Input className = "w-full" type = "text" placeholder = "A new tag name" value = { newName } onChange = { handleTagNameInputChange } />
66
66
</ div >
67
67
< List size = "sm" marker = "disc" >
68
68
< ListItem >
69
- < p className = "leading-5" > All your memos with this tag will be updated. </ p >
69
+ < p className = "leading-5" > { t ( " tag.rename-tip" ) } </ p >
70
70
</ ListItem >
71
71
</ List >
72
72
</ div >
0 commit comments