stable

Clone or download

Read-only

request #13845 Replace easygettext by our own gettext extractor

How to test: - make generate-po should not result in any changes in .po files. Notes: - A translation string was never extracted from document app, I took the liberty of translating it to french. - It extracts from [v-translate], <translate> and title="$gettext()" - Some translations contain HTML tags. vue-gettext allows it inside [v-translate] directives, but the extraction of such strings requires us to parse HTML _in addition_ to parsing Vue.js' AST. Given that there is a workable solution around that problem (using $gettext and $gettextInterpolate + v-dompurify-html), supporting this use-case is not worth the effort. The upside is we can just drop HTML-parsing dependencies such as cheerio and pug. Change-Id: I1dca7e25fbb366dec94e148ba804ac22e4286fe3

Modified Files

Name
M package-lock.json +18 −532 Go to diff View file
M package.json +2 −6 Go to diff View file
M plugins/document/scripts/document/components/Folder/DragNDrop/DocumentLockedForEditionErrorModal.vue +11 −12 Go to diff View file
M plugins/document/scripts/document/components/Folder/DragNDrop/DocumentNeedsApprovalErrorModal.vue +12 −13 Go to diff View file
M plugins/document/scripts/document/po/fr.po +11 −2 Go to diff View file
M plugins/tracker/www/scripts/package-lock.json +13 −0 Go to diff View file
M plugins/tracker/www/scripts/package.json +1 −0 Go to diff View file
M plugins/tracker/www/scripts/workflow-transitions/po/fr.po +3 −3 Go to diff View file
M plugins/tracker/www/scripts/workflow-transitions/src/components/FirstConfiguration/FirstConfigurationImpossibleWarning.vue +7 −4 Go to diff View file
M plugins/tracker/www/scripts/workflow-transitions/src/index.js +2 −0 Go to diff View file
M tools/utils/scripts/gettext/constants.js +5 −28 Go to diff View file
D tools/utils/scripts/gettext/extract.js +0 −547 Go to diff View file
A tools/utils/scripts/gettext/file-extractor.js +181 −0 Go to diff View file
A tools/utils/scripts/gettext/log.js +22 −0 Go to diff View file
M tools/utils/scripts/vue-typescript-gettext-extractor-cli.js +10 −105 Go to diff View file