PluginProbe ʕ •ᴥ•ʔ
CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice) / 3.5.0
CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice) v3.5.0
3.5.1 3.5.0 3.4.2 trunk 1.0.1 1.0.3 1.2 1.2.1 1.2.2 1.3 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.10 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.2.0 3.2.1 3.2.10 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.3.9.1 3.4.0 3.4.1
cookie-law-info / scripts / make-pot.sh
cookie-law-info / scripts Last commit date
make-pot.sh 2 weeks ago
make-pot.sh
37 lines
1 #!/usr/bin/env bash
2 # Generate languages/cookie-law-info.pot from the plugin root.
3 #
4 # WP-CLI only scans .js/.jsx for gettext — not .ts/.tsx (see wp-cli/i18n-command
5 # JsCodeExtractor extensions). So we merge a second POT from react-gettext-parser
6 # on lite/admin/dist/js/index.js (run `npm run dev:build` in lite/admin first if dist is missing).
7 #
8 # Minified JS and node_modules are excluded from the PHP run to avoid OOM in Peast.
9 set -euo pipefail
10
11 ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12 cd "$ROOT"
13
14 export WP_CLI_PHP_ARGS='-d memory_limit=2G'
15
16 EXCLUDE='node_modules,lite/admin/node_modules,lite/admin/dist,dist,vendor,.git,lite/frontend/js/script.min.js,lite/frontend/js/wca.min.js,lite/frontend/js/gcm.min.js,lite/admin/modules/dashboard-widget/assets/js/chart.min.js'
17
18 REACT_POT="$ROOT/languages/.tmp-admin-react.pot"
19 ADMIN_BUNDLE="$ROOT/lite/admin/dist/js/index.js"
20
21 if [[ -f "$ROOT/lite/admin/package.json" ]]; then
22 if [[ ! -f "$ADMIN_BUNDLE" ]]; then
23 echo "Error: $ADMIN_BUNDLE not found. Build the admin app first:" >&2
24 echo " cd lite/admin && npm run dev:build" >&2
25 exit 1
26 fi
27 (cd "$ROOT/lite/admin" && npm run -s i18n:extract-react)
28 fi
29
30 if [[ -f "$REACT_POT" ]]; then
31 wp i18n make-pot "$ROOT" "$ROOT/languages/cookie-law-info.pot" --exclude="$EXCLUDE" --merge="$REACT_POT" "$@"
32 rm -f "$REACT_POT"
33 else
34 echo "Warning: react POT not found at $REACT_POT (run: cd lite/admin && npm install). Running wp make-pot only." >&2
35 wp i18n make-pot "$ROOT" "$ROOT/languages/cookie-law-info.pot" --exclude="$EXCLUDE" "$@"
36 fi
37