Commit 398808ab authored by mercury233's avatar mercury233

test fix ng-xi18n

parent 1ed444bd
......@@ -18,6 +18,9 @@ import { CandyComponent } from './candy.component';
import { RavenErrorHandler } from './error-handler';
import { NetworkComponent } from './network.component';
export function settingsService_getLocale(settingsService: SettingsService) {
return settingsService.getLocale();
}
@NgModule({
imports: [BrowserModule, FormsModule, ReactiveFormsModule, HttpModule],
......@@ -31,7 +34,7 @@ import { NetworkComponent } from './network.component';
, {
provide: LOCALE_ID,
deps: [SettingsService],
useFactory: (settingsService: SettingsService) => settingsService.getLocale()
useFactory: settingsService_getLocale
}
// , {
// provide: ErrorHandler, useClass: RavenErrorHandler
......
......@@ -16,7 +16,7 @@
"release": "tsc && electron-builder",
"build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js",
"tsc": "tsc",
"i18n": "ng-xi18n --i18nFormat 'xlf2' && sed -i.bak 's/source-language=\"en\"/source-language=\"zh-CN\"/' messages.xlf",
"i18n": "ng-xi18n --i18nFormat xlf2 && sed -i.bak 's/source-language=\"en\"/source-language=\"zh-CN\"/' messages.xlf",
"i18n:upload": "npm run i18n && curl --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} --request PUT --header 'Content-type: multipart/form-data' --form content=@messages.xlf https://www.transifex.com/api/2/project/moecube/resource/messages/content/",
"i18n:translate": "open https://www.transifex.com/moecube/moecube/translate/#en_US/messages/108367258?translated=no",
"i18n:download": "curl --output locale/messages.en-US.xlf --retry 5 --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} https://www.transifex.com/api/2/project/moecube/resource/messages/translation/en_US/?file && sed -i.bak 's/\\&amp;/\\&/g; s/\\&lt;/</g; s/\\&gt;/>/g; s/\\&quot;/\"/g;' locale/messages.en-US.xlf",
......@@ -81,7 +81,7 @@
"rollup-plugin-node-resolve": "latest",
"rollup-plugin-uglify": "latest",
"tslint": "^3.15.1",
"typescript": "latest"
"typescript": "^2.9.2"
},
"build": {
"productName": "MyCard",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment