@@ -24,11 +24,11 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
2424
2525 const handleConfirm = async ( ) => {
2626 if ( ! newName || newName . includes ( " " ) ) {
27- toast . error ( "Tag name cannot be empty or contain spaces" ) ;
27+ toast . error ( t ( "tag.rename-error- empty" ) ) ;
2828 return ;
2929 }
3030 if ( newName === tag ) {
31- toast . error ( "New name cannot be the same as the old name" ) ;
31+ toast . error ( t ( "tag.rename-error-repeat" ) ) ;
3232 return ;
3333 }
3434
@@ -38,7 +38,7 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
3838 oldTag : tag ,
3939 newTag : newName ,
4040 } ) ;
41- toast . success ( "Rename tag successfully" ) ;
41+ toast . success ( t ( " tag.rename-success" ) ) ;
4242 } catch ( error : any ) {
4343 console . error ( error ) ;
4444 toast . error ( error . details ) ;
@@ -57,16 +57,16 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
5757 < div className = "flex flex-col justify-start items-start max-w-xs" >
5858 < div className = "w-full flex flex-col justify-start items-start mb-3" >
5959 < 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 >
6161 < Input className = "w-full" readOnly disabled type = "text" placeholder = "A new tag name" value = { tag } />
6262 </ div >
6363 < 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 >
6565 < Input className = "w-full" type = "text" placeholder = "A new tag name" value = { newName } onChange = { handleTagNameInputChange } />
6666 </ div >
6767 < List size = "sm" marker = "disc" >
6868 < 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 >
7070 </ ListItem >
7171 </ List >
7272 </ div >
0 commit comments