Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit f4233a5

Browse files
authored
Merge pull request #14 from ckeditor/t/11
Feature: Support for building the editor in another language than `en`. Closes #11.
2 parents 399fb50 + d17cda8 commit f4233a5

8 files changed

+25
-6
lines changed

build-config.js

+10
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
'use strict';
77

88
module.exports = {
9+
// The editor creator to use.
910
editor: '@ckeditor/ckeditor5-editor-classic/src/classiceditor',
11+
12+
// The name under which the editor will be exported.
1013
moduleName: 'ClassicEditor',
14+
15+
// Plugins to include in the build.
1116
plugins: [
1217
'@ckeditor/ckeditor5-presets/src/essentials',
1318

@@ -24,6 +29,11 @@ module.exports = {
2429
'@ckeditor/ckeditor5-list/src/list',
2530
'@ckeditor/ckeditor5-paragraph/src/paragraph',
2631
],
32+
33+
// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format.
34+
language: 'en',
35+
36+
// Editor config.
2737
config: {
2838
toolbar: [
2939
'headings',

build/ckeditor.compat.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ckeditor.compat.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ckeditor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ckeditor.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"devDependencies": {
2020
"@ckeditor/ckeditor5-dev-utils": "^3.0.0",
21+
"@ckeditor/ckeditor5-dev-webpack-plugin": "^2.0.11",
2122
"babel-core": "^6.24.0",
2223
"babel-loader": "^6.4.0",
2324
"babel-preset-env": "^1.2.2",

webpack.compat.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
const path = require( 'path' );
99
const webpack = require( 'webpack' );
1010
const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
11-
11+
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
1212
const BabiliPlugin = require( 'babili-webpack-plugin' );
13+
const buildConfig = require( './build-config' );
1314

1415
module.exports = {
1516
devtool: 'source-map',
@@ -26,6 +27,9 @@ module.exports = {
2627
},
2728

2829
plugins: [
30+
new CKEditorWebpackPlugin( {
31+
languages: [ buildConfig.language ]
32+
} ),
2933
new BabiliPlugin( null, {
3034
comments: false
3135
} ),

webpack.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
const path = require( 'path' );
99
const webpack = require( 'webpack' );
1010
const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
11-
11+
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
1212
const BabiliPlugin = require( 'babili-webpack-plugin' );
13+
const buildConfig = require( './build-config' );
1314

1415
module.exports = {
1516
devtool: 'source-map',
@@ -23,6 +24,9 @@ module.exports = {
2324
},
2425

2526
plugins: [
27+
new CKEditorWebpackPlugin( {
28+
languages: [ buildConfig.language ]
29+
} ),
2630
new BabiliPlugin( null, {
2731
comments: false
2832
} ),

0 commit comments

Comments
 (0)