stable

Clone or download

Read-only

Remove angular-gettext-plugin

Part of request #13702 Introduce Typescript in Vue apps How to test: No functional change in those apps. When you change a translated string either in: - "| translate" filter - "translate" attribute - gettextCatalog.getString and you run "make generate-po", then the .po file will now be updated ----- When we introduced Typescript as a dependency, we started getting spammed with warnings like the following: WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-eslint-parser. This was due to angular-gettext-tools being outdated. It used to have a dependency on typescript-eslint-parser (presumably to parse TS in AngularJS apps). However we could not simply update it, because angular-gettext-plugin had a strict dependency on that specific version. Using that plugin runs counter to dev team expectations because it means that gettext _wasn't_ extracted when running "make generate-po". It would only be extracted when running "npm run watch" in the correct folder. As a side-effect, this meant that our tooling to detect missing translations on the CI would never catch missing translations in those apps (and as it turns out, there was one missing string). Finally, it looks like the webpack plugin is no longer updated. For all these reasons, this contribution simply removes all plugin usage. It is replaced by a now standard "gettext-*" style build-manifest entry. The actual extraction remains the same but is now used through a CLI and is now called from "generate-po" like everyone else. Note: as a side-effect, the file locations are now properly (and consistently with other po files) removed. Note to reviewer: the remaining angularjs apps did not use this plugin, they still use a variant of gulpfile. A next contribution may align gettext extraction and get rid of the scattered gulpfiles. Change-Id: I93be8c03b199757e9fd9e25c8efe9ba92c8458f4

Modified Files

Name
M package-lock.json +153 −123 Go to diff View file
M package.json +1 −1 Go to diff View file
D plugins/frs/.gitignore +0 −6 Go to diff View file
M plugins/frs/build-manifest.json +7 −1 Go to diff View file
M plugins/frs/www/js/angular/po/fr.po +0 −33 Go to diff View file
M plugins/frs/www/js/angular/webpack.config.js +19 −4 Go to diff View file
M plugins/pullrequest/build-manifest.json +6 −0 Go to diff View file
M plugins/pullrequest/www/scripts/po/fr.po +3 −57 Go to diff View file
M plugins/pullrequest/www/scripts/webpack.config.js +19 −4 Go to diff View file
M tools/utils/generate-po.php +22 −0 Go to diff View file
M tools/utils/scripts/webpack-configurator.js +0 −12 Go to diff View file