Open VILLAN3LL3 opened 3 years ago
bro, turn off namespace flag and use marker
"-sort --clean --format json --marker moo"
then... you'll have to write each key down with a marker, here's mine hope this helps save some time (didnt check for correctness yet), put the follwing into a file (so that "marker --input" does find it)
import { marker as m } from "@biesbjerg/ngx-translate-extract-marker";
// !! this file is imported nowhere !!
// https://primefaces.org/primeng/showcase/#/i18n
m("primeng.startsWith");
m("primeng.contains");
m("primeng.notContains");
m("primeng.endsWith");
m("primeng.equals");
m("primeng.notEquals");
m("primeng.noFilter");
m("primeng.lt");
m("primeng.lte");
m("primeng.gt");
m("primeng.gte");
m("primeng.is");
m("primeng.isNot");
m("primeng.before");
m("primeng.after");
m("primeng.clear");
m("primeng.apply");
m("primeng.matchAll");
m("primeng.matchAny");
m("primeng.addRule");
m("primeng.removeRule");
m("primeng.accept");
m("primeng.reject");
m("primeng.choose");
m("primeng.upload");
m("primeng.cancel");
m("primeng.dayNames");
m("primeng.dayNamesShort");
m("primeng.dayNamesMin");
m("primeng.monthNames");
m("primeng.monthNamesShort");
m("primeng.today");
m("primeng.weekHeader");
m("primeng.weak");
m("primeng.medium");
m("primeng.strong");
m("primeng.passwordPrompt");
m("primeng.emptyMessage");
m("primeng.emptyFilterMessage");
m("primeng.Names");
m("primeng.dayNamesMin");
m("primeng.dayNamesShort");
m("primeng.dayNamesShort.Sun");
m("primeng.dayNamesShort.Mon");
m("primeng.dayNamesShort.Tue");
m("primeng.dayNamesShort.Wed");
m("primeng.dayNamesShort.Thu");
m("primeng.dayNamesShort.Fri");
m("primeng.dayNamesShort.Sat");
m("primeng.dayNamesMin.Su");
m("primeng.dayNamesMin.Mo");
m("primeng.dayNamesMin.Tu");
m("primeng.dayNamesMin.We");
m("primeng.dayNamesMin.Th");
m("primeng.dayNamesMin.Fr");
m("primeng.dayNamesMin.Sa");
m("primeng.monthNames.January");
m("primeng.monthNames.February");
m("primeng.monthNames.March");
m("primeng.monthNames.April");
m("primeng.monthNames.May");
m("primeng.monthNames.June");
m("primeng.monthNames.July");
m("primeng.monthNames.August");
m("primeng.monthNames.September");
m("primeng.monthNames.October");
m("primeng.monthNames.November");
m("primeng.monthNames.December");
m("primeng.monthNamesShort.Jan");
m("primeng.monthNamesShort.Feb");
m("primeng.monthNamesShort.Mar");
m("primeng.monthNamesShort.Apr");
m("primeng.monthNamesShort.May");
m("primeng.monthNamesShort.Jun");
m("primeng.monthNamesShort.Jul");
m("primeng.monthNamesShort.Aug");
m("primeng.monthNamesShort.Sep");
m("primeng.monthNamesShort.Oct");
m("primeng.monthNamesShort.Nov");
m("primeng.monthNamesShort.Dec");
I'm using primeng and ngx-translate in my project. To Support i18n for primeng I added the primeng section to my i18n files (see here). But when running the i18n extract function it always deletes the primeng section. I use the following configuration in the package.json:
"i18n:extract": "ngx-translate-extract --input ./apps/my-projects/src ./libs --output ./apps/my-projects/src/assets/i18n/template.json ./apps/my-project/src/assets/i18n/en.json ./apps/my-project/src/assets/i18n/de.json ./apps/my-project/src/assets/i18n/es.json ./apps/my-project/src/assets/i18n/fr.json --sort --format namespaced-json --key-as-default-value"
How can I prevent ngx-translate-extract from deleting the primeng section in my i18n files?