mirror of
https://github.com/home-assistant/frontend.git
synced 2025-10-11 20:59:45 +00:00
Speed up and simplify translations build (#19988)
* Speed up and simplify translations build - Remove use of gulp-flatmap for merges (wasted input) and just loop over translation files. - Parse and buffer master only once for all merges. - Remove lokalise key reference transform from non-English files. This is already done by Lokalise when they are downloaded. - Remove tabs from merged output to minimize buffer sizes. - Pipe merges to a hashing stream, removing extra tasks and intermediate file I/O. - Pipe hashed files to a single custom asynchronous transform stream to fragmentize the files. It expands the stream to push a new file for each fragment. - Incorporate flattening into fragmentization. - Delete entire ui.panel key for base translation (instead of leaving an empty object). - Optimize flatten method to stop copying output over and over. - Convert empty and test filters to JSON.parse() revivers for simplicity and better performance. - Incorporate supervisor builds into main tasks using a simple toggle (i.e. remove duplicate code). - Funcify local tasks and simplify exported tasks. - Incorporate test metadata task into a simplified metadata task. * Fix Lokalise key reference link Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> --------- Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
This commit is contained in:
@@ -99,7 +99,7 @@ gulp.task("webpack-watch-app", () => {
|
||||
).watch({ poll: isWsl }, doneHandler());
|
||||
gulp.watch(
|
||||
path.join(paths.translations_src, "en.json"),
|
||||
gulp.series("create-translations", "copy-translations-app")
|
||||
gulp.series("build-translations", "copy-translations-app")
|
||||
);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user