@ckeditor/ckeditor5-language 39.0.1 → 40.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +3 -3
  3. package/build/language.js.map +1 -0
  4. package/lang/translations/ar.po +1 -0
  5. package/lang/translations/bg.po +1 -0
  6. package/lang/translations/bn.po +1 -0
  7. package/lang/translations/ca.po +1 -0
  8. package/lang/translations/cs.po +1 -0
  9. package/lang/translations/da.po +1 -0
  10. package/lang/translations/de-ch.po +1 -0
  11. package/lang/translations/de.po +1 -0
  12. package/lang/translations/el.po +1 -0
  13. package/lang/translations/en-au.po +1 -0
  14. package/lang/translations/en.po +1 -0
  15. package/lang/translations/es.po +1 -0
  16. package/lang/translations/et.po +1 -0
  17. package/lang/translations/fi.po +1 -0
  18. package/lang/translations/fr.po +1 -0
  19. package/lang/translations/gl.po +1 -0
  20. package/lang/translations/he.po +1 -0
  21. package/lang/translations/hi.po +1 -0
  22. package/lang/translations/hr.po +1 -0
  23. package/lang/translations/hu.po +1 -0
  24. package/lang/translations/id.po +1 -0
  25. package/lang/translations/it.po +1 -0
  26. package/lang/translations/ja.po +1 -0
  27. package/lang/translations/jv.po +1 -0
  28. package/lang/translations/ko.po +1 -0
  29. package/lang/translations/lt.po +1 -0
  30. package/lang/translations/lv.po +1 -0
  31. package/lang/translations/ms.po +1 -0
  32. package/lang/translations/nl.po +1 -0
  33. package/lang/translations/no.po +1 -0
  34. package/lang/translations/pl.po +1 -0
  35. package/lang/translations/pt-br.po +1 -0
  36. package/lang/translations/pt.po +1 -0
  37. package/lang/translations/ro.po +1 -0
  38. package/lang/translations/ru.po +1 -0
  39. package/lang/translations/sk.po +1 -0
  40. package/lang/translations/sr-latn.po +1 -0
  41. package/lang/translations/sr.po +1 -0
  42. package/lang/translations/sv.po +1 -0
  43. package/lang/translations/th.po +1 -0
  44. package/lang/translations/tk.po +1 -0
  45. package/lang/translations/tr.po +1 -0
  46. package/lang/translations/tt.po +1 -0
  47. package/lang/translations/ug.po +1 -0
  48. package/lang/translations/uk.po +1 -0
  49. package/lang/translations/ur.po +1 -0
  50. package/lang/translations/vi.po +1 -0
  51. package/lang/translations/zh-cn.po +1 -0
  52. package/lang/translations/zh.po +1 -0
  53. package/package.json +2 -6
  54. package/src/augmentation.d.ts +47 -47
  55. package/src/augmentation.js +5 -5
  56. package/src/index.d.ts +13 -13
  57. package/src/index.js +11 -11
  58. package/src/textpartlanguage.d.ts +35 -35
  59. package/src/textpartlanguage.js +39 -39
  60. package/src/textpartlanguagecommand.d.ts +70 -70
  61. package/src/textpartlanguagecommand.js +89 -89
  62. package/src/textpartlanguageconfig.d.ts +25 -25
  63. package/src/textpartlanguageconfig.js +5 -5
  64. package/src/textpartlanguageediting.d.ts +28 -28
  65. package/src/textpartlanguageediting.js +84 -84
  66. package/src/textpartlanguageui.d.ts +23 -23
  67. package/src/textpartlanguageui.js +101 -101
  68. package/src/utils.d.ts +40 -40
  69. package/src/utils.js +43 -43
package/src/utils.js CHANGED
@@ -1,43 +1,43 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module language/utils
7
- */
8
- import { getLanguageDirection } from 'ckeditor5/src/utils';
9
- /**
10
- * Returns the language attribute value in a human-readable text format:
11
- *
12
- * ```
13
- * <languageCode>:<textDirection>
14
- * ```
15
- *
16
- * * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
17
- * * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.
18
- *
19
- * See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}
20
- * for more information about language properties.
21
- *
22
- * If the `textDirection` argument is omitted, it will be automatically detected based on `languageCode`.
23
- *
24
- * @param languageCode The language code in the ISO 639-1 format.
25
- * @param textDirection The language text direction. Automatically detected if omitted.
26
- */
27
- export function stringifyLanguageAttribute(languageCode, textDirection) {
28
- textDirection = textDirection || getLanguageDirection(languageCode);
29
- return `${languageCode}:${textDirection}`;
30
- }
31
- /**
32
- * Retrieves language properties converted to attribute value by the
33
- * {@link module:language/utils~stringifyLanguageAttribute stringifyLanguageAttribute} function.
34
- *
35
- * @param str The attribute value.
36
- * @returns The object with properties:
37
- * * languageCode - The language code in the ISO 639 format.
38
- * * textDirection - The language text direction.
39
- */
40
- export function parseLanguageAttribute(str) {
41
- const [languageCode, textDirection] = str.split(':');
42
- return { languageCode, textDirection };
43
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module language/utils
7
+ */
8
+ import { getLanguageDirection } from 'ckeditor5/src/utils';
9
+ /**
10
+ * Returns the language attribute value in a human-readable text format:
11
+ *
12
+ * ```
13
+ * <languageCode>:<textDirection>
14
+ * ```
15
+ *
16
+ * * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
17
+ * * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.
18
+ *
19
+ * See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}
20
+ * for more information about language properties.
21
+ *
22
+ * If the `textDirection` argument is omitted, it will be automatically detected based on `languageCode`.
23
+ *
24
+ * @param languageCode The language code in the ISO 639-1 format.
25
+ * @param textDirection The language text direction. Automatically detected if omitted.
26
+ */
27
+ export function stringifyLanguageAttribute(languageCode, textDirection) {
28
+ textDirection = textDirection || getLanguageDirection(languageCode);
29
+ return `${languageCode}:${textDirection}`;
30
+ }
31
+ /**
32
+ * Retrieves language properties converted to attribute value by the
33
+ * {@link module:language/utils~stringifyLanguageAttribute stringifyLanguageAttribute} function.
34
+ *
35
+ * @param str The attribute value.
36
+ * @returns The object with properties:
37
+ * * languageCode - The language code in the ISO 639 format.
38
+ * * textDirection - The language text direction.
39
+ */
40
+ export function parseLanguageAttribute(str) {
41
+ const [languageCode, textDirection] = str.split(':');
42
+ return { languageCode, textDirection };
43
+ }