Posted 14 September 2017, 11:44 am EST
Hi Alex,
Thanks for the reply, but I’m not sure if you are understanding the issue correctly. I will restate my problem with an example. First start with the Angular2 Quick Start program (from angular.io). Then apply Webpack intro tutorial to it (from angular.io). Now apply i18n cookbook exercise (again from angular.io). The app comes up fine and I can do XLIFF extraction just fine with the command ‘./nodemodules/.bin/ng-xi18n’ as noted in the i18n cookbook. This command generates messages.xlf file as expected. Now I add Wijmo flavor to it as follows:
===== my app.module.ts file =====
import { NgModule } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { WjInputModule } from “wijmo/wijmo.angular2.input”;
import { AppComponent } from ‘./app.component’;
@NgModule({
// imports: [ BrowserModule, WjInputModule ], // <== ng-xi18n error once WjInputModule is added
imports: [ BrowserModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
===== my app.module.ts file (end) =====
As annotated above, once I add an Wijmo module reference to it, ‘ng-xi18n’ extraction tool errors out, and therefore, I cannot generate ‘messages.xlf’ file.
The error message is like this:
Error: Unexpected value ‘WjInputModule’ imported by the module ‘AppModule’
at /Users/bjjeong/dev/projects/i18n-qs/node_modules/@angular/compiler/bundles/compiler.umd.js:14078:37
…
Extraction failed
Note that the Wijmo control is rendered correctly and the application itself runs with no error, but I cannot simply use the extraction tool which prevents me from implementing i18n solution for our product. Flipping between two import statements above can easily demonstrate the issue, and I can provide the sample app I tried out if you like (Angular2 starter app + Webpack tutorial + i18n tutorial + Wijmo Number control). I think there is a simple solution as hinted in my earlier post with the metadata.json file inclusion in the Wijmo lib distribution.
I have a hunch that ‘ng-xi18n’ may fail even without webpack applied once Wijmo modules are referenced (In fact, the control does not even have to be used). Since you guys are about to release *.222 soon, I’m hoping it is released with ‘ng-xi18n’ extraction tool support.
By the way, attached zip file “FlexGridFilter_Cultures_Themes_WP.zip” errors out with an error to the effect ‘not able to read source file’. Thanks.