npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ckeditor/ckeditor5-dev-translations

v43.0.1

Published

CKEditor 5 translations plugin for webpack.

Downloads

250,575

Readme

CKEditor 5 translation tools

npm version CircleCI

Integrate CKEditor 5's build process with your webpack setup.

Requires webpack ^4.0.0 or ^5.0.0.

More information about development tools packages can be found at the following URL: https://github.com/ckeditor/ckeditor5-dev.

Usage

The current functionality of this plugin is limited to localizing the editor builds. Add this plugin to your webpack configuration to change the language of the editor's interface or build the editor with support for multiple languages (by extracting multiple language files):

const { CKEditorTranslationsPlugin } = require( '@ckeditor/ckeditor5-dev-translations' );

// Define webpack plugins ...
	plugins: [
		new CKEditorTranslationsPlugin( options ),

		// Other webpack plugins...
	]
// ...

Options:

language

The main language that will be built into the main bundle, e.g. en.

additionalLanguages

Additional languages that will be emitted to the outputDirectory. This option can be set to an array of language codes or 'all' to build all found languages. The bundle is optimized for one language when this option is omitted.

outputDirectory

An optional directory for emitted translations. Relative to the webpack's output. Defaults to 'translations'.

strict

When set to true, it stops the webpack compilation when an error occurs. Defaults to false.

verbose

When set to true, it logs all warnings found during the compilation. Defaults to false.

addMainLanguageTranslationsToAllAssets

When set to true, all generated assets (bundles) will include translations for the main language.

buildAllTranslationsToSeparateFiles

When set to true, all translations will be output to the translations directory (or the directory specified by the outputDirectory option).

packageNamesPattern

A pattern which is used for determining if a package may contain translations (PO files) in the <package_name>/lang/translations directory. Defaults to /[/\\]ckeditor5-[^/\\]+[/\\]/.

sourceFilesPattern

A pattern which is used for determining if a file may contain messages to translate. Defaults to /[/\\]ckeditor5-[^/\\]+[/\\]src[/\\].+\.js$/.

translationsOutputFile

An option that allows specifying the target file to which all translations will be outputted. This option supports a string, regular expression and a function. If no asset exists with the name, it will be created automatically and filled with translations.

includeCorePackageTranslations

When set to true, all translations from the ckeditor5-core package will be added into the bundle files. Defaults to false.

skipPluralFormFunction

When set to true, the getPluralForm() function (if exists for the specified language) will not be added into the bundle file. Defaults to false.

assetNamesFilter

A function to filter assets importing CKEditor 5 modules. Potential performance boost for applications with many webpack entry points. It allows disabling the CKEditorTranslationsPlugin plugin for an entry point not containing imports CKEditor 5 modules. Defaults to name => name.endsWith( '.js' ).

corePackagePattern

(internal) A pattern which is used to get a path to the core translation package from corePackageSampleResourcePath, which contains the main translations. Defaults to /[/\]ckeditor5-core/.

corePackageSampleResourcePath

(internal) A sample path to the ckeditor5-core package. A test import to this file shows if the ckeditor5-core package is available and allows to load the core package translations first.

corePackageContextsResourcePath

(internal) A path the context.json file in the ckeditor5-core package. It is used if the includeCorePackageTranslations option is set to true.

You can read more about localizing the editor in the Setting the UI language guide.

Changelog

See the CHANGELOG.md file.

License

Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md file.