Jelajahi Sumber

Refactor reset option button tooltip.

panr 5 tahun lalu
induk
melakukan
1229fd971a

+ 2 - 1
packages/ckeditor5-image/lang/contexts.json

@@ -12,5 +12,6 @@
 	"Upload failed": "Title of the notification displayed when upload fails.",
 	"Image toolbar": "The label used by assistive technologies describing an image toolbar attached to an image widget.",
 	"Resize image to": "The label used for the standalone resize option buttons in the image toolbar",
-	"Resize image": "The label used for the dropdown in the image toolbar, containing defined resize options"
+	"Resize image": "The label used for the dropdown in the image toolbar, containing defined resize options",
+	"Resize image to the original size": "The label used for the standalone resize reset option button in the image toolbar, when user set the value to `null`"
 }

+ 1 - 1
packages/ckeditor5-image/src/imageresize/imageresizeui.js

@@ -81,7 +81,7 @@ export default class ImageResizeUI extends Plugin {
 			button.set( {
 				label: t( label ),
 				withText: true,
-				tooltip: t( 'Resize image to' ) + ' ' + ( parsedValue || 'the original size' ),
+				tooltip: parsedValue ? t( 'Resize image to' ) + ' ' + parsedValue : t( 'Resize image to the original size' ),
 				isToggleable: true,
 				commandValue: parsedValue
 			} );