8
0
Pārlūkot izejas kodu

Applied suggestions from code review

Co-Authored-By: Marek Lewandowski <mlewand@users.noreply.github.com>
Maciej Bukowski 5 gadi atpakaļ
vecāks
revīzija
e0c20572b3

+ 4 - 4
packages/ckeditor5-utils/src/locale.js

@@ -77,7 +77,7 @@ export default class Locale {
 
 
 		/**
 		/**
 		 * Translates the given message to the {@link #uiLanguage}. This method is also available in
 		 * Translates the given message to the {@link #uiLanguage}. This method is also available in
-		 * {@link module:core/editor/editor~Editor#t} and {@link module:ui/view~View#t}.
+		 * {@link module:core/editor/editor~Editor#t Editor} and {@link module:ui/view~View#t View}.
 		 *
 		 *
 		 * This method's context is statically bound to the `Locale` instance and **always should be called as a function**:
 		 * This method's context is statically bound to the `Locale` instance and **always should be called as a function**:
 		 *
 		 *
@@ -86,16 +86,16 @@ export default class Locale {
 		 *
 		 *
 		 * The message can be either a string or an object implementing the {@link module:utils/translation-service~Message} interface.
 		 * The message can be either a string or an object implementing the {@link module:utils/translation-service~Message} interface.
 		 *
 		 *
-		 * The message may contain placeholders (`%<index>`) for value(s) that are passed as the second argument.
+		 * The message may contain placeholders (`%<index>`) for value(s) that are passed as a `values` parameter.
 		 * For an array of values the `%<index>` will be changed to an element of that array at the given index.
 		 * For an array of values the `%<index>` will be changed to an element of that array at the given index.
 		 * For a single value passed as the second argument, only the `%0` placeholders will be changed to the provided value.
 		 * For a single value passed as the second argument, only the `%0` placeholders will be changed to the provided value.
 		 *
 		 *
 		 *		t( 'Created file "%0" in %1ms.', [ fileName, timeTaken ] );
 		 *		t( 'Created file "%0" in %1ms.', [ fileName, timeTaken ] );
 		 * 		t( 'Created file "%0", fileName );
 		 * 		t( 'Created file "%0", fileName );
 		 *
 		 *
-		 * The message supports plural forms. To specify a plural form, use the `plural` property. Single or plural form
+         * The message supports plural forms. To specify the plural form, use the `plural` property. Singular or plural form
 		 * will be chosen depending on the first value from the passed `values`. The value of this property is used
 		 * will be chosen depending on the first value from the passed `values`. The value of this property is used
-		 * as a default plural translation when the translation for the target language is missing. Therefor, it should be a number.
+		 * as a default plural translation when the translation for the target language is missing. Therefore, it should be a number.
 		 *
 		 *
 		 *		t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space' for the English language.
 		 *		t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space' for the English language.
 		 *		t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Add 5 spaces' for the English language.
 		 *		t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Add 5 spaces' for the English language.

+ 1 - 1
packages/ckeditor5-utils/src/translation-service.js

@@ -31,7 +31,7 @@ if ( !window.CKEDITOR_TRANSLATIONS ) {
  *			'image_Insert image': 'obraz', // Note that the `Insert image` comes from the message context.
  *			'image_Insert image': 'obraz', // Note that the `Insert image` comes from the message context.
  *		} );
  *		} );
  *
  *
- * If the message is supposed to support various plural forms, make sure to provide an array with the single form and all plural forms:
+ * If the message is supposed to support various plural forms, make sure to provide an array with the singular form and all plural forms:
  *
  *
  *		add( 'pl', {
  *		add( 'pl', {
  *	 		'Add space': [ 'Dodaj spację', 'Dodaj %0 spacje', 'Dodaj %0 spacji' ]
  *	 		'Add space': [ 'Dodaj spację', 'Dodaj %0 spacje', 'Dodaj %0 spacji' ]