Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow picking the bundle to which all translations will be outputted #7688

Closed
ma2ciek opened this issue Jul 23, 2020 · 0 comments · Fixed by ckeditor/ckeditor5-dev#662
Closed
Assignees
Labels
package:dev type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@ma2ciek
Copy link
Contributor

ma2ciek commented Jul 23, 2020

📝 Provide a description of the new feature

Problem

Ref: ckeditor/ckeditor5-vue#134 - during the translation process, a couple of errors occur in the Vue framework. Fixing them requires customization to our default translation process and some of them don't work.

1st problem: When there is no JS asset an error happens.

2nd problem: For multiple JS assets translations are exported to separate files. This works well in the production but it doesn't work at all during the development where the webpack creates files on the fly without saving them locally, and, what's worse, the server only serves known static files - other files become unavailable.

Idea

For the 1st problem: Nothing should happen as such a customized build is intentional.

As the second "replace" strategy of providing localization doesn't work well for plural forms and was removed in the past, this idea should not be rather taken into consideration. 

IMO the most valuable and safe solution would depend on allowing specifying the bundle to which all translations will be added. We could also support a RegExp pattern for targetting files that were built with some hashes - e.g. /chunk-vendors/ will match dist/js/chunk-vendors.5ef56efa.js. Such an option can be named translationsOutputFile and should take a string/regexp/fn for easier usage. In case of no file matching a fn/RegExp an error should be thrown, while in case of no matching file using the string option a file with all translations should be created. The later will also enhance the usage options of CKEditorWebpackPlugin.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@ma2ciek ma2ciek added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:dev labels Jul 23, 2020
@ma2ciek ma2ciek self-assigned this Jul 23, 2020
@ma2ciek ma2ciek changed the title Allow picking the bundle to which all translations will be output Allow picking the bundle to which all translations will be outputted Jul 23, 2020
@ma2ciek ma2ciek added this to the next milestone Jul 27, 2020
pomek added a commit to ckeditor/ckeditor5-dev that referenced this issue Aug 3, 2020
Feature (webpack-plugin): Add support for the `translationsOutputFile` option for `CKEditorWebpackPlugin` allowing specifying the target bundle for translations. Closes ckeditor/ckeditor5#7688.
pomek added a commit that referenced this issue Aug 3, 2020
Docs: Improved `Vue.js` localization docs. Part of #7688.
@mlewand mlewand modified the milestones: next, iteration 35 Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:dev type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
2 participants