Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2ciek committed May 15, 2020
2 parents 09071e4 + 5e17bb9 commit e73554a
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 43 deletions.
2 changes: 1 addition & 1 deletion docs/builds/guides/support/reporting-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Most of the issues are reproducible on the demo. If you have a different case th

## Reporting issues

All issues should be reported in the [CKEditor 5 repository](https://github.com/ckeditor/ckeditor5/issues) on GitHub, except ones that are related to one of the following projects (which have their own issue pages):
All issues should be reported in the [CKEditor 5 repository](https://github.com/ckeditor/ckeditor5/issues) on GitHub, except ones that are related to one of the following projects (that have their own issue pages):

* [Angular integration](https://github.com/ckeditor/ckeditor5-angular),
* [React integration](https://github.com/ckeditor/ckeditor5-react),
Expand Down
12 changes: 7 additions & 5 deletions docs/features/ui-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ menu-title: UI language

# Setting the UI language

The UI of the editor can be localized. CKEditor 5 currently supports around 50 languages and the number is growing.
The UI of the editor can be localized. CKEditor 5 currently supports around 90 languages and the number is growing.

<info-box>
If you want to help translate CKEditor 5 into your native language, join the [CKEditor 5 project on Transifex](https://www.transifex.com/ckeditor/ckeditor5/). Your help will be much appreciated!
Expand All @@ -17,6 +17,10 @@ See the demo of the editor in Spanish:

{@snippet features/ui-language}

<info-box>
If you are interested in creating features that can be localized, check out the {@link framework/guides/deep-dive/localization localization guide}.
</info-box>

## Right–to–left (RTL) languages support

CKEditor 5 supports right–to–left languages out–of–the–box. When one of <abbr title="right–to–left">RTL</abbr> languages is used, the WYSIWYG editor adapts its UI for the best editing experience, for instance, mirroring various elements like toolbars, dropdowns, buttons, etc.
Expand Down Expand Up @@ -102,7 +106,7 @@ If you build CKEditor 5 from scratch or integrate it directly into your applicat

1. Install the [`@ckeditor/ckeditor5-dev-webpack-plugin`](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-webpack-plugin) package:

```bash
```
npm install --save @ckeditor/ckeditor5-dev-webpack-plugin
```

Expand Down Expand Up @@ -142,7 +146,7 @@ If you build CKEditor 5 from scratch or integrate it directly into your applicat
// ...
```

3. Run webpack. If the `additionalLanguages` option is not set, the CKEditor 5 plugin for webpack will replace the {@link module:utils/locale~Locale#t `t()`} function call parameters used in the source code with localized language strings. Otherwise the CKEditor 5 plugin for webpack will replace the {@link module:utils/locale~Locale#t `t()`} function call parameters with short IDs and emit the translation files that should land in the `'translations'` directory (or different, if the `outputDirectory` option is specified).
3. Run webpack. The CKEditor 5 plugin for webpack will emit additional files for each language specified in the `additionalLanguages` option. They will contain translations for messages from the {@link module:utils/locale~Locale#t `t()` function} calls. The files will be created in the `translations` directory (or another one if the `outputDirectory` option is specified). Translations from the language specified in the `language` option will be automatically included in the build.

4. If you want to change the language after the build ends, you will need to edit the `index.html` file, add the translation file, and set the UI language to the target one.

Expand All @@ -165,8 +169,6 @@ If you build CKEditor 5 from scratch or integrate it directly into your applicat

<info-box>
We are aware that the current localization method is not sufficient for some needs. It does not support different bundlers (e.g. Rollup or Browserify). We will be extending the localization possibilities in the future.

You can read more about the used techniques in the [Implement translation services](https://github.com/ckeditor/ckeditor5/issues/387) and [Implement translation services v2](https://github.com/ckeditor/ckeditor5/issues/624) issues.
</info-box>

## Setting the language of the content
Expand Down
4 changes: 4 additions & 0 deletions docs/framework/guides/architecture/ui-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The standard UI library of CKEditor 5 is [`@ckeditor/ckeditor5-ui`](https://www.

Views use [templates](#templates) to build the UI. They also provide observable interfaces that other features (e.g. {@link framework/guides/architecture/core-editor-architecture#plugins plugins}, {@link framework/guides/architecture/core-editor-architecture#commands commands}, etc.) can use to change the DOM without any actual interaction with the native API.

<info-box>
All views can be localized using the `locale` instance with which they were created. Check the {@link framework/guides/deep-dive/localization localization guide} to see how to use the `t()` function available in the `locale` instance.
</info-box>

### Definition

A simple input view class can be defined as follows:
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/guides/contributing/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ Read more about our {@link framework/guides/contributing/testing-environment tes
</info-box>

<info-box>
[Angular](https://github.com/ckeditor/ckeditor5-angular), [React](https://github.com/ckeditor/ckeditor5-react) and [Vue](https://github.com/ckeditor/ckeditor5-vue) integrations as well as [CKEditor 5 inspector](https://github.com/ckeditor/ckeditor5-inspector) and [dev packages](https://github.com/ckeditor/ckeditor5-dev) are kept in separate repositories. The below steps assume that you want to propose a change in the [main CKEditor 5 repository](https://github.com/ckeditor/ckeditor5).
The [Angular](https://github.com/ckeditor/ckeditor5-angular), [React](https://github.com/ckeditor/ckeditor5-react) and [Vue](https://github.com/ckeditor/ckeditor5-vue) integrations as well as [CKEditor 5 inspector](https://github.com/ckeditor/ckeditor5-inspector) and [development tools packages](https://github.com/ckeditor/ckeditor5-dev) are kept in separate repositories. The steps below assume that you want to propose a change in the [main CKEditor 5 repository](https://github.com/ckeditor/ckeditor5).
</info-box>

Assuming that you would like to propose some changes, these are the steps you should take to create a pull request:

1. Make sure to open a ticket in https://github.com/ckeditor/ckeditor5 describing the issue/feature/problem that you want to solve in your pull request. This can be skipped in case of obvious and trivial changes (typos, documentation, etc.).
1. Make sure to open a ticket in https://github.com/ckeditor/ckeditor5 describing the issue, feature or problem that you want to solve in your pull request. This can be skipped in case of obvious and trivial changes (typos, documentation, etc.).
1. Make sure your {@link framework/guides/contributing/development-environment development environment} is ready.
1. Go to GitHub and [fork the repository](https://help.github.com/articles/fork-a-repo). The forked repository will appear in your GitHub account as `https://github.com/YOUR-USERNAME/ckeditor5`.
1. Open your terminal, then go to the package ("repository") folder in your development environment:
Expand Down
43 changes: 22 additions & 21 deletions docs/framework/guides/contributing/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ The CKEditor 5 codebase is divided into multiple [npm](http://npmjs.com/) packag

The main package's GitHub repository also [hosts all other CKEditor5 sub-packages](https://github.com/ckeditor/ckeditor5/tree/master/packages).

You can find all the official packages listed in [CKEditor 5 development repository's README](https://github.com/ckeditor/ckeditor5#packages).
You can find all the official packages listed in the [CKEditor 5 repository's README](https://github.com/ckeditor/ckeditor5#packages).

<info-box info>
Prior to version **19.0.0** CKEditor 5 was developed in a multi repository architecture. If you'd like to work with the older multi-repository release, please refer to [older Developer Environment guide](/docs/ckeditor5/19.0.0/framework/guides/contributing/development-environment.html) for multi-repository oriented instructions.
Prior to version **19.0.0** CKEditor 5 was developed in a multi-repository architecture. If you would like to work with an older multi-repository release, please refer to the [older Development environment guide](/docs/ckeditor5/19.0.0/framework/guides/contributing/development-environment.html) for multi-repository oriented instructions.
</info-box>

## Requirements
Expand All @@ -34,36 +34,36 @@ First, you need to install [Yarn](https://yarnpkg.com/) that will be used for d

It is best to install it globally in your system for an easier use later on:

```bash
```
npm install -g yarn
```

**Note:** [Read how to avoid using `sudo` to install packages globally](https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md) or use [nvm](https://github.com/creationix/nvm).

Then clone the [CKEditor 5 repository](https://github.com/ckeditor/ckeditor5):

```bash
```
git clone https://github.com/ckeditor/ckeditor5.git
cd ckeditor5
```

And install all CKEditor 5 packages from the [npm registry](http://npmjs.com/).

```bash
```
yarn install
```

## Running tests

In order to run tests you need to use the `test` and `manual` tasks.
In order to run tests, you need to use the `test` and `manual` tasks.

```bash
```
yarn run test --watch --coverage --source-map --files=engine
```

or, shorter:

```bash
```
yarn run test -- -wcs --files=engine
```

Expand All @@ -73,33 +73,33 @@ This command will run the [`ckeditor5-engine`](https://github.com/ckeditor/ckedi

To create a server for manual tests use the `manual` task:

```bash
```
yarn run manual
```

To help test localized editors, the task accepts two optional configurations: `--language="en"` and `--additionalLanguages="ar,pl,..."`. The former sets the main language used by test editors. By default it is `"en"` and it in most scenarios you do not need to change it. The later brings more languages to manual tests, e.g. which is helpful when working with {@link features/ui-language#righttoleft-rtl-languages-support right–to–left languages in the user interface}.
To help test localized editors, the task accepts two optional configurations: `--language="en"` and `--additionalLanguages="ar,pl,..."`. The former sets the main language used by test editors. By default it is `"en"` and in most scenarios you do not need to change it. The latter brings more languages to manual tests, which is helpful e.g. when working with {@link features/ui-language#righttoleft-rtl-languages-support right–to–left languages in the user interface}.

You can read more about the {@link framework/guides/contributing/testing-environment Testing environment}.

## Generating documentation

To build the documentation you need to run the `docs` task:
To build the documentation, you need to run the `docs` task:

```bash
```
yarn run docs
```

The documentation will be available in `build/docs/`.

This task accepts the following arguments:

* `--skip-api` &mdash; Skips building the API documentation (which takes the majority of the total time).
* `--skip-snippets` &mdash; Skips building live snippets.
* `--snippets=snippet-name` &mdash; Whitelist snippets to build (accepts glob patterns).
* `--skip-validation` &mdash; Skips the final link validation.
* `--watch` &mdash; Runs the documentation generator in a watch mode. It covers guides (it does not cover API docs).
* `--production` &mdash; Minifies the assets and performs other actions which are unnecessary during CKEditor 5 development.
* `--verbose` &mdash; Prints out more information.
* `--skip-api` &ndash; Skips building the API documentation (which takes the majority of the total time).
* `--skip-snippets` &ndash; Skips building live snippets.
* `--snippets=snippet-name` &ndash; Whitelists snippets to build (accepts glob patterns).
* `--skip-validation` &ndash; Skips the final link validation.
* `--watch` &ndash; Runs the documentation generator in a watch mode. It covers guides but it does not cover API docs.
* `--production` &ndash; Minifies the assets and performs other actions which are unnecessary during CKEditor 5 development.
* `--verbose` &ndash; Prints out more information.

Note: These arguments must be passed after additional `--`:

Expand All @@ -117,9 +117,10 @@ yarn run docs:serve

It is possible to generate a stylesheet containing content styles brought by all CKEditor 5 features. In order to do that, execute:

```bash
```
yarn docs:content-styles
```

The stylesheet will be saved in the `build/content-styles` folder.

To learn more, refer to the {@link builds/guides/integration/content-styles Content styles} guide.
Expand All @@ -132,7 +133,7 @@ By default, CKEditor 5 supports SVG icons found in the `ckeditor5-*/theme/icons`

To remove the excess data and prevent [certain issues](https://github.com/ckeditor/ckeditor5-ui/issues/245), **all new icons should be optimized before joining the code base**. To do that, you can use the `clean-up-svg-icons` script in the [root of the project](#setting-up-the-ckeditor-development-environment), a wrapper for the [SVGO](https://github.com/svg/svgo) tool:

```bash
```
cd path/to/ckeditor5
# Optimize all SVG files in the folder.
Expand Down
20 changes: 10 additions & 10 deletions docs/framework/guides/contributing/git-commit-message-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ order: 40

# Git commit message convention

Every commit made *directly* to the `master` branch must follow the below convention. Based on commits in the `master` branch CKEditor 5 release tools will generate changelog entries for the current release.
Every commit made *directly* to the `master` branch must follow the convention below. Based on commits in the `master` branch CKEditor 5 release tools will generate changelog entries for the current release.

<info-box>
Commits in the ticket branches are not analyzed for the changelog and do not have to follow any specific convention (other than finishing sentences with periods). In case of ticket branches, **only merge commits are analyzed**.
Expand All @@ -20,7 +20,7 @@ Commit message template:
```
Type (package-name): A short sentence about the commit. Closes #XXX.
Type (other-package-name): If the change affects more than one package, it's possible to put multiple entries at once. Closes #YYY.
Type (another-package-name): If the change affects more than one package, it's possible to put multiple entries at once. Closes #YYY.
Optional description.
Expand All @@ -41,7 +41,7 @@ BREAKING CHANGE: Another breaking change if needed. Closes #ZZZ.
| Revert | `patch` | Revert of some commit. | Hidden |
| Release | `patch` | A special type of commit used by the release tools. | Hidden |

Each commit can contain additional notes which will be inserted into the changelog:
Each commit can contain additional notes that will be inserted into the changelog:

* `MAJOR BREAKING CHANGE` (alias: `BREAKING CHANGE`),
* `MINOR BREAKING CHANGE`.
Expand All @@ -54,9 +54,9 @@ For reference on how to identify minor or major breaking change see the {@link f

Most commits are related to one or more packages. Each affected package should be listed in parenthesis following the commit type. A package that was the most impacted by the change should be listed first.

It is, however, possible to skip this part if many packages are affected. This is a typically indication that this is a generic change and having all the packages listed would reduce changelog readability.
It is, however, possible to skip this part if many packages are affected. This usually indicates a generic change. In this case having all the packages listed would reduce the changelog readability.

The package name is based on npm package name, however it has the `@ckeditor/ckeditor(5)-` prefix stripped.
The package name is based on the npm package name, however, it has the `@ckeditor/ckeditor(5)-` prefix stripped.

If your change is related to the main package only, use `ckeditor5` as the package name.

Expand All @@ -76,13 +76,13 @@ A generic bug fix for an existing feature that affects many packages (closes two
Fix: The editor will be great again. Closes #3. Closes #4.
```

Commit with updated documentation:
A commit with updated documentation:

```
Docs (link): Updated the README.
```

Commit that provides or changes the tests:
A commit that provides or changes the tests:

```
Tests (widget): Introduced missing tests. Closes #5.
Expand Down Expand Up @@ -128,9 +128,9 @@ Changelog

## Handling pull requests

When making a pull request its author may (it is recommended in the pull request template) propose a merge commit message.
When creating a pull request, its author may (it is recommended in the pull request template) propose a merge commit message.

The reviewer's duty is to validate the proposed message and apply necessary changes (the PR description can be edited).
The reviewer's duty is to validate the proposed message and apply necessary changes. The PR description can be edited.

Things like:

Expand All @@ -144,7 +144,7 @@ should be checked and added if missing.

As a reviewer, remember that the message will end up in the changelog and must be understandable in a broad context of the entire editor. It is not for you &mdash; it is for other developers.

When closing a PR remember to copy the source of the message to the textarea with the merge commit message:
When closing a PR, remember to copy the source of the message to the textarea with the merge commit message:

{@img assets/img/closing-a-pr.gif Screencast how to copy a source version of the suggested commit message when closing a PR.}

Expand Down
6 changes: 3 additions & 3 deletions docs/framework/guides/contributing/testing-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ It accepts the following arguments that must be passed after the `--` option:

Run all tests with the code coverage check of the [`ckeditor5-core`](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-core/tests) package:

```bash
```
yarn run test -c --files=core
```

Run and watch the [engine's `view` namespace tests](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-engine/tests/view) and all the tests in [`ckeditor5-typing`](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-typing/tests):

```bash
```
yarn run test -cw --files=engine/view,typing
```

Run the `bold*.js` tests in the [`ckeditor5-basic-styles`](https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-basic-styles/tests) package:

```bash
```
yarn run test -cw --files=basic-styles/bold*.js
```

Expand Down
6 changes: 5 additions & 1 deletion docs/framework/guides/creating-simple-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ The plugin that you will write will use a part of the {@link features/image imag
We recommend using the official {@link framework/guides/development-tools#ckeditor-5-inspector CKEditor 5 inspector} for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.
</info-box>

<info-box hint>
For simplicity reasons this guide does not describe how to localize the created plugin. To see how to localize plugins, refer to the {@link framework/guides/deep-dive/localization localization guide}.
</info-box>

## Step 1. Installing dependencies

Start from installing the necessary dependencies:
Expand All @@ -27,7 +31,7 @@ Start from installing the necessary dependencies:
* The [`@ckeditor/ckeditor5-core`](https://www.npmjs.com/package/@ckeditor/ckeditor5-core) package which contains the {@link module:core/plugin~Plugin} and {@link module:core/command~Command} classes.
* The [`@ckeditor/ckeditor5-ui`](https://www.npmjs.com/package/@ckeditor/ckeditor5-ui) package which contains the UI library and framework.

```bash
```
npm install --save @ckeditor/ckeditor5-image \
@ckeditor/ckeditor5-core \
@ckeditor/ckeditor5-ui
Expand Down
Loading

0 comments on commit e73554a

Please sign in to comment.