Przeglądaj źródła

Internal: It should be "to-do list".

Piotrek Koszuliński 6 lat temu
rodzic
commit
ee802f21dc

+ 1 - 1
packages/ckeditor5-list/lang/contexts.json

@@ -1,5 +1,5 @@
 {
 	"Numbered List": "Toolbar button tooltip for the Numbered List feature.",
 	"Bulleted List": "Toolbar button tooltip for the Bulleted List feature.",
-	"Todo List": "Toolbar button tooltip for the Todo List feature."
+	"To-do List": "Toolbar button tooltip for the To-do List feature."
 }

+ 2 - 2
packages/ckeditor5-list/src/todolist.js

@@ -13,9 +13,9 @@ import TodoListUI from './todolistui';
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * The todo list feature.
+ * The to-do list feature.
  *
- * This is a "glue" plugin which loads the {@link module:list/todolistediting~TodoListEditing todo list editing feature}
+ * This is a "glue" plugin which loads the {@link module:list/todolistediting~TodoListEditing to-do list editing feature}
  * and {@link module:list/todolistui~TodoListUI list UI feature}.
  *
  * @extends module:core/plugin~Plugin

+ 4 - 4
packages/ckeditor5-list/src/todolistcheckcommand.js

@@ -23,7 +23,7 @@ export default class TodoListCheckCommand extends Command {
 
 		/**
 		 * Flag indicating whether the command is active. The command is active when at least one of
-		 * {@link module:engine/model/selection~Selection selected} elements is a todo list item.
+		 * {@link module:engine/model/selection~Selection selected} elements is a to-do list item.
 		 *
 		 * @observable
 		 * @readonly
@@ -31,7 +31,7 @@ export default class TodoListCheckCommand extends Command {
 		 */
 
 		/**
-		 * A List of todo list item selected by the {@link module:engine/model/selection~Selection}.
+		 * A List of to-do list item selected by the {@link module:engine/model/selection~Selection}.
 		 *
 		 * @observable
 		 * @readonly
@@ -39,7 +39,7 @@ export default class TodoListCheckCommand extends Command {
 		 */
 
 		/**
-		 * List of todo list items selected by the {@link module:engine/model/selection~Selection}.
+		 * List of to-do list items selected by the {@link module:engine/model/selection~Selection}.
 		 *
 		 * @protected
 		 * @type {Array.<module:engine/model/element~Element>}
@@ -63,7 +63,7 @@ export default class TodoListCheckCommand extends Command {
 	}
 
 	/**
-	 * Gets all todo list items selected by the {@link module:engine/model/selection~Selection}.
+	 * Gets all to-do list items selected by the {@link module:engine/model/selection~Selection}.
 	 *
 	 * @private
 	 * @returns {Array.<module:engine/model/element~Element>}

+ 3 - 3
packages/ckeditor5-list/src/todolistconverters.js

@@ -60,7 +60,7 @@ export function modelViewInsertion( model, onCheckboxChecked ) {
 }
 
 /**
- * A model-to-view converter for model `$text` element inside a todo list item.
+ * A model-to-view converter for model `$text` element inside a to-do list item.
  *
  * It takes care of creating text after the {@link module:engine/view/uielement~UIElement checkbox UI element}.
  *
@@ -148,7 +148,7 @@ export function dataModelViewInsertion( model ) {
 }
 
 /**
- * A model-to-view converter for model `$text` element inside a todo list item.
+ * A model-to-view converter for model `$text` element inside a to-do list item.
  *
  * It is used by {@link module:engine/controller/datacontroller~DataController}.
  *
@@ -264,7 +264,7 @@ export function modelViewChangeType( onCheckedChange ) {
  */
 export function modelViewChangeChecked( onCheckedChange ) {
 	return ( evt, data, conversionApi ) => {
-		// Do not convert `todoListChecked` attribute when todo list item has changed to other list item.
+		// Do not convert `todoListChecked` attribute when to-do list item has changed to other list item.
 		// This attribute will be removed by the model post fixer.
 		if ( data.item.getAttribute( 'listType' ) != 'todo' ) {
 			return;

+ 6 - 6
packages/ckeditor5-list/src/todolistediting.js

@@ -26,7 +26,7 @@ import {
 import { findInRange } from './utils';
 
 /**
- * The engine of the todo list feature. It handles creating, editing and removing todo lists and its items.
+ * The engine of the to-do list feature. It handles creating, editing and removing to-do lists and its items.
  *
  * It registers all functionalities of {@link module:list/listediting~ListEditing list editing plugin} and extends
  * it by `'todoList'` command.
@@ -54,7 +54,7 @@ export default class TodoListEditing extends Plugin {
 			allowAttributes: [ 'todoListChecked' ]
 		} );
 
-		// Disallow todoListChecked attribute on other nodes than listItem with todo listType.
+		// Disallow todoListChecked attribute on other nodes than listItem with to-do listType.
 		model.schema.addAttributeCheck( ( context, attributeName ) => {
 			const item = context.last;
 
@@ -122,10 +122,10 @@ export default class TodoListEditing extends Plugin {
 		// <ul><li><checkbox/>Bar</li></ul>
 		editor.keystrokes.set( 'arrowleft', ( evt, stop ) => jumpOverCheckmarkOnLeftArrowKeyPress( stop, model ) );
 
-		// Toggle check state of selected todo list items on keystroke.
+		// Toggle check state of selected to-do list items on keystroke.
 		editor.keystrokes.set( 'Ctrl+space', () => editor.execute( 'todoListCheck' ) );
 
-		// Remove `todoListChecked` attribute when a host element is no longer a todo list item.
+		// Remove `todoListChecked` attribute when a host element is no longer a to-do list item.
 		const listItemsToFix = new Set();
 
 		this.listenTo( model, 'applyOperation', ( evt, args ) => {
@@ -184,7 +184,7 @@ export default class TodoListEditing extends Plugin {
 	}
 }
 
-// Moves all uiElements in the todo list item after the checkmark element.
+// Moves all uiElements in the to-do list item after the checkmark element.
 //
 // @private
 // @param {module:engine/view/downcastwriter~DowncastWriter} writer
@@ -215,7 +215,7 @@ function moveUIElementsAfterCheckmark( writer, uiElements ) {
 	return hasChanged;
 }
 
-// Moves selection in the todo list item after the checkmark element.
+// Moves selection in the to-do list item after the checkmark element.
 //
 // @private
 // @param {module:engine/view/downcastwriter~DowncastWriter} writer

+ 2 - 2
packages/ckeditor5-list/src/todolistui.js

@@ -15,7 +15,7 @@ import '../theme/list.css';
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * The todo list UI feature. It introduces the `'todoList'` button that
+ * The to-do list UI feature. It introduces the `'todoList'` button that
  * allow to convert elements to and from list items and indent or outdent them.
  *
  * @extends module:core/plugin~Plugin
@@ -27,6 +27,6 @@ export default class TodoListUI extends Plugin {
 	init() {
 		const t = this.editor.t;
 
-		createUIComponent( this.editor, 'todoList', t( 'Todo List' ), todoListIcon );
+		createUIComponent( this.editor, 'todoList', t( 'To-do List' ), todoListIcon );
 	}
 }

+ 9 - 9
packages/ckeditor5-list/tests/manual/todo-list.html

@@ -2,14 +2,14 @@
 	<p>This is a test for list feature.</p>
 	<p>Some more text for testing.</p>
 	<ul>
-		<li><input type="checkbox">Todo list item 1</li>
-		<li><input type="checkbox" checked="checked">Todo list item 2</li>
-		<li><input type="checkbox">Todo list item 3</li>
-		<li><input type="checkbox" checked="checked">Todo list item 4</li>
-		<li><input type="checkbox">Todo list item 5</li>
-		<li><input type="checkbox">Todo list item 6</li>
-		<li><input type="checkbox" checked="checked">Todo list item 7</li>
-		<li><input type="checkbox">Todo list item 8</li>
+		<li><input type="checkbox">To-do list item 1</li>
+		<li><input type="checkbox" checked="checked">To-do list item 2</li>
+		<li><input type="checkbox">To-do list item 3</li>
+		<li><input type="checkbox" checked="checked">To-do list item 4</li>
+		<li><input type="checkbox">To-do list item 5</li>
+		<li><input type="checkbox">To-do list item 6</li>
+		<li><input type="checkbox" checked="checked">To-do list item 7</li>
+		<li><input type="checkbox">To-do list item 8</li>
 	</ul>
 	<p>Paragraph.</p>
 	<p>Another testing paragraph.</p>
@@ -17,7 +17,7 @@
 		<li>Numbered list item</li>
 	</ol>
 	<ul>
-		<li><input type="checkbox">Todo list item</li>
+		<li><input type="checkbox">To-do list item</li>
 	</ul>
 	<ul>
 		<li>Bullet list</li>

+ 21 - 21
packages/ckeditor5-list/tests/manual/todo-list.md

@@ -2,19 +2,19 @@
 
 1. The data should be loaded with:
   * two paragraphs,
-  * todo list with eight items, where 2,4 and 7 are checked,
+  * to-do list with eight items, where 2,4 and 7 are checked,
   * two paragraphs,
   * numbered list with one item,
-  * todo list with one unchecked item,
+  * to-do list with one unchecked item,
   * bullet list with one item.
-2. Toolbar should have three buttons: for bullet, numbered and todo list.
+2. Toolbar should have three buttons: for bullet, numbered and to-do list.
 
 ## Testing
 
 ### Creating:
 
-1. Convert first paragraph to todo list item
-2. Create empty paragraph and convert to todo list item
+1. Convert first paragraph to to-do list item
+2. Create empty paragraph and convert to to-do list item
 3. Press `Enter` in the middle of item
 4. Press `Enter` at the start of item
 5. Press `Enter` at the end of item
@@ -33,32 +33,32 @@
 
 ### Merging:
 
-1. Convert paragraph before todo list to same type of list
-2. Convert paragraph after todo list to same type of list
-3. Convert paragraph before todo list to different type of list
-4. Convert paragraph after todo list to different type of list
-5. Convert first paragraph to todo list, then convert second paragraph to todo list
+1. Convert paragraph before to-do list to same type of list
+2. Convert paragraph after to-do list to same type of list
+3. Convert paragraph before to-do list to different type of list
+4. Convert paragraph after to-do list to different type of list
+5. Convert first paragraph to to-do list, then convert second paragraph to to-do list
 6. Convert multiple items and paragraphs at once
 
 ### Toggling check state:
 
-1. Put selection in the middle of unchecked the todo list item
+1. Put selection in the middle of unchecked the to-do list item
 2. Check list item (selection should not move)
 
 ---
 
-1. Select multiple todo list items
-2. Check or uncheck todo list item (selection should not move)
+1. Select multiple to-do list items
+2. Check or uncheck to-do list item (selection should not move)
 
 ---
 
-1. Check todo list item
+1. Check to-do list item
 2. Convert checked list item to other list item
-3. Convert this list item once again to todo list item ()should be unchecked)
+3. Convert this list item once again to to-do list item ()should be unchecked)
 
 ---
 
-1. Put collapsed selection to todo list item
+1. Put collapsed selection to to-do list item
 2. Press `Ctrl+Space` (check state should toggle)
 
 ### Toggling check state for multiple items:
@@ -75,12 +75,12 @@
 ---
 
 1. Select the entire content
-2. Press `Ctrl+Space` (all todo list items should be checked)
-3. Press `Ctrl+Space` once again (all todo list items should be unchecked)
+2. Press `Ctrl+Space` (all to-do list items should be checked)
+3. Press `Ctrl+Space` once again (all to-do list items should be unchecked)
 
 ### Integration with attribute elements:
 
-1. Select multiple todo list items
+1. Select multiple to-do list items
 2. Highlight selected text
-3. Check or uncheck highlighted todo list item
-4. Type inside highlighted todo list item
+3. Check or uncheck highlighted to-do list item
+4. Type inside highlighted to-do list item

+ 7 - 7
packages/ckeditor5-list/tests/todolistcheckcommand.js

@@ -61,19 +61,19 @@ describe( 'TodoListCheckCommand', () => {
 	} );
 
 	describe( 'isEnabled', () => {
-		it( 'should be enabled when selection is inside todo list item', () => {
+		it( 'should be enabled when selection is inside to-do list item', () => {
 			setModelData( model, '<listItem listIndent="0" listType="todo">a[b]c</listItem>' );
 
 			expect( command.isEnabled ).to.equal( true );
 		} );
 
-		it( 'should be disabled when selection is not inside todo list item', () => {
+		it( 'should be disabled when selection is not inside to-do list item', () => {
 			setModelData( model, '<paragraph>a[b]c</paragraph>' );
 
 			expect( command.isEnabled ).to.equal( false );
 		} );
 
-		it( 'should be enabled when at least one todo list item is selected', () => {
+		it( 'should be enabled when at least one to-do list item is selected', () => {
 			setModelData( model,
 				'<paragraph>a[bc</paragraph>' +
 				'<listItem listIndent="0" listType="todo">abc</listItem>' +
@@ -83,7 +83,7 @@ describe( 'TodoListCheckCommand', () => {
 			expect( command.isEnabled ).to.equal( true );
 		} );
 
-		it( 'should be enabled when none todo list item is selected', () => {
+		it( 'should be enabled when none to-do list item is selected', () => {
 			setModelData( model,
 				'<paragraph>a[bc</paragraph>' +
 				'<paragraph>abc</paragraph>' +
@@ -95,7 +95,7 @@ describe( 'TodoListCheckCommand', () => {
 	} );
 
 	describe( 'execute()', () => {
-		it( 'should toggle checked state on todo list item when collapsed selection is inside this item', () => {
+		it( 'should toggle checked state on to-do list item when collapsed selection is inside this item', () => {
 			setModelData( model, '<listItem listIndent="0" listType="todo">b[]ar</listItem>' );
 
 			command.execute();
@@ -111,7 +111,7 @@ describe( 'TodoListCheckCommand', () => {
 			);
 		} );
 
-		it( 'should toggle checked state on todo list item when non-collapsed selection is inside this item', () => {
+		it( 'should toggle checked state on to-do list item when non-collapsed selection is inside this item', () => {
 			setModelData( model, '<listItem listIndent="0" listType="todo">b[a]r</listItem>' );
 
 			command.execute();
@@ -151,7 +151,7 @@ describe( 'TodoListCheckCommand', () => {
 			);
 		} );
 
-		it( 'should toggle state on multiple items mixed with none todo list items', () => {
+		it( 'should toggle state on multiple items mixed with none to-do list items', () => {
 			setModelData( model,
 				'<paragraph>a[bc</paragraph>' +
 				'<listItem listIndent="0" listType="todo">def</listItem>' +

+ 12 - 12
packages/ckeditor5-list/tests/todolistediting.js

@@ -76,7 +76,7 @@ describe( 'TodoListEditing', () => {
 			expect( command ).to.have.property( 'type', 'todo' );
 		} );
 
-		it( 'should create todo list item and change to paragraph in normal usage flow', () => {
+		it( 'should create to-do list item and change to paragraph in normal usage flow', () => {
 			expect( getViewData( view ) ).to.equal( '<p>[]</p>' );
 			expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph>' );
 
@@ -119,7 +119,7 @@ describe( 'TodoListEditing', () => {
 	} );
 
 	describe( 'editing pipeline', () => {
-		it( 'should convert todo list item', () => {
+		it( 'should convert to-do list item', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1</listItem>' +
 				'<listItem listType="todo" listIndent="0" todoListChecked="true">2</listItem>'
@@ -133,7 +133,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert nested todo list items', () => {
+		it( 'should convert nested to-do list items', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1.0</listItem>' +
 				'<listItem listType="todo" listIndent="1">2.1</listItem>' +
@@ -163,7 +163,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert todo list items mixed with bulleted list items', () => {
+		it( 'should convert to-do list items mixed with bulleted list items', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1.0</listItem>' +
 				'<listItem listType="bulleted" listIndent="0">2.0</listItem>' +
@@ -192,7 +192,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert todo list items mixed with numbered list items', () => {
+		it( 'should convert to-do list items mixed with numbered list items', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1.0</listItem>' +
 				'<listItem listType="numbered" listIndent="0">2.0</listItem>' +
@@ -377,7 +377,7 @@ describe( 'TodoListEditing', () => {
 	} );
 
 	describe( 'data pipeline m -> v', () => {
-		it( 'should convert todo list item', () => {
+		it( 'should convert to-do list item', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1</listItem>' +
 				'<listItem listType="todo" listIndent="0" todoListChecked="true">2</listItem>'
@@ -401,7 +401,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert nested todo list item', () => {
+		it( 'should convert nested to-do list item', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1.0</listItem>' +
 				'<listItem listType="todo" listIndent="1">2.1</listItem>'
@@ -427,7 +427,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert todo list item mixed with bulleted list items', () => {
+		it( 'should convert to-do list item mixed with bulleted list items', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1.0</listItem>' +
 				'<listItem listType="bulleted" listIndent="0">2.0</listItem>' +
@@ -469,7 +469,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert todo list item mixed with numbered list items', () => {
+		it( 'should convert to-do list item mixed with numbered list items', () => {
 			setModelData( model,
 				'<listItem listType="todo" listIndent="0">1.0</listItem>' +
 				'<listItem listType="numbered" listIndent="0">2.0</listItem>' +
@@ -545,13 +545,13 @@ describe( 'TodoListEditing', () => {
 	} );
 
 	describe( 'data pipeline v -> m', () => {
-		it( 'should convert li with checkbox before the first text node as todo list item', () => {
+		it( 'should convert li with checkbox before the first text node as to-do list item', () => {
 			editor.setData( '<ul><li><input type="checkbox">foo</li></ul>' );
 
 			expect( getModelData( model ) ).to.equal( '<listItem listIndent="0" listType="todo">[]foo</listItem>' );
 		} );
 
-		it( 'should convert li with checked checkbox as checked todo list item', () => {
+		it( 'should convert li with checked checkbox as checked to-do list item', () => {
 			editor.setData(
 				'<ul>' +
 					'<li><input type="checkbox" checked="checked">a</li>' +
@@ -641,7 +641,7 @@ describe( 'TodoListEditing', () => {
 			);
 		} );
 
-		it( 'should convert todo list returned by m -> v data pipeline conversion', () => {
+		it( 'should convert to-do list returned by m -> v data pipeline conversion', () => {
 			editor.setData(
 				'<ul class="todo-list">' +
 					'<li>' +