Przeglądaj źródła

Internal: Made the 'Saving changes' text translatable. Simplified it and removed period to align it to the text in the upload package. Closes ckeditor/ckeditor5-core#143.

Piotrek Koszuliński 7 lat temu
rodzic
commit
e4c8eb79dd

+ 3 - 0
packages/ckeditor5-autosave/lang/contexts.json

@@ -0,0 +1,3 @@
+{
+	"Saving changes": "A message that the data is being saved."
+}

+ 3 - 1
packages/ckeditor5-autosave/src/autosave.js

@@ -231,10 +231,12 @@ export default class Autosave extends Plugin {
 	 * @private
 	 */
 	_incrementCounter() {
+		const t = this.editor.t;
+
 		this._saveActionCounter++;
 
 		if ( !this._action ) {
-			this._action = this._pendingActions.add( 'Saving in progress.' );
+			this._action = this._pendingActions.add( t( 'Saving changes' ) );
 		}
 	}
 

+ 1 - 1
packages/ckeditor5-autosave/tests/autosave.js

@@ -250,7 +250,7 @@ describe( 'Autosave', () => {
 
 			sinon.assert.notCalled( serverActionSpy );
 			expect( pendingActions.isPending ).to.be.true;
-			expect( pendingActions.first.message ).to.equal( 'Saving in progress.' );
+			expect( pendingActions.first.message ).to.equal( 'Saving changes' );
 
 			sandbox.clock.tick( 1000 );
 			return Promise.resolve().then( () => Promise.resolve() ).then( () => {