Skip to content

Commit

Permalink
Update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Fafnur committed Feb 11, 2020
1 parent 28e5bde commit 7249e1c
Show file tree
Hide file tree
Showing 50 changed files with 317 additions and 233 deletions.
25 changes: 16 additions & 9 deletions apps/frontend/base/server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'zone.js/dist/zone-node';

import { APP_BASE_HREF } from '@angular/common';
import '@angular/localize/init';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { existsSync } from 'fs';
import { join } from 'path';

import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
Expand All @@ -15,19 +16,25 @@ export function app() {
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';

// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
}));
server.engine(
'html',
ngExpressEngine({
bootstrap: AppServerModule
})
);

server.set('view engine', 'html');
server.set('views', distFolder);

// Example Express Rest API endpoints
// app.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1y'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y'
})
);

// All regular routes use the Universal engine
server.get('*', (req, res) => {
Expand All @@ -52,7 +59,7 @@ function run() {
// The below code is to ensure that the server is run only when not requiring the bundle.
declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
const moduleFilename = mainModule && mainModule.filename || '';
const moduleFilename = (mainModule && mainModule.filename) || '';
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
run();
}
Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/base/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
7 changes: 2 additions & 5 deletions apps/frontend/base/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": []
"types": ["node"]
},
"files": [
"src/main.browser.ts",
"src/polyfills.ts"
],
"files": ["src/main.browser.ts", "src/polyfills.ts"],
"include": ["**/*.d.ts"]
}
9 changes: 4 additions & 5 deletions apps/frontend/base/tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"extends": "./tsconfig.app.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../dist/out-tsc-server"
"outDir": "../../../dist/out-tsc-server",
"types": ["node"]
},
"angularCompilerOptions": {
"entryModule": "./src/app/app.server.module#AppServerModule"
},
"files": [
"src/main.server.ts",
"server.ts"
]
"files": ["src/main.server.ts", "server.ts"],
"include": ["**/*.d.ts"]
}
25 changes: 16 additions & 9 deletions apps/frontend/common-styles/server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'zone.js/dist/zone-node';

import { APP_BASE_HREF } from '@angular/common';
import '@angular/localize/init';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { existsSync } from 'fs';
import { join } from 'path';

import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
Expand All @@ -15,19 +16,25 @@ export function app() {
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';

// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
}));
server.engine(
'html',
ngExpressEngine({
bootstrap: AppServerModule
})
);

server.set('view engine', 'html');
server.set('views', distFolder);

// Example Express Rest API endpoints
// app.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1y'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y'
})
);

// All regular routes use the Universal engine
server.get('*', (req, res) => {
Expand All @@ -52,7 +59,7 @@ function run() {
// The below code is to ensure that the server is run only when not requiring the bundle.
declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
const moduleFilename = mainModule && mainModule.filename || '';
const moduleFilename = (mainModule && mainModule.filename) || '';
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
run();
}
Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/common-styles/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
7 changes: 2 additions & 5 deletions apps/frontend/common-styles/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": []
"types": ["node"]
},
"files": [
"src/main.browser.ts",
"src/polyfills.ts"
],
"files": ["src/main.browser.ts", "src/polyfills.ts"],
"include": ["**/*.d.ts"]
}
9 changes: 4 additions & 5 deletions apps/frontend/common-styles/tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"extends": "./tsconfig.app.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../dist/out-tsc-server"
"outDir": "../../../dist/out-tsc-server",
"types": ["node"]
},
"angularCompilerOptions": {
"entryModule": "./src/app/app.server.module#AppServerModule"
},
"files": [
"src/main.server.ts",
"server.ts"
]
"files": ["src/main.server.ts", "server.ts"],
"include": ["**/*.d.ts"]
}
25 changes: 16 additions & 9 deletions apps/frontend/forms/server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'zone.js/dist/zone-node';

import { APP_BASE_HREF } from '@angular/common';
import '@angular/localize/init';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { existsSync } from 'fs';
import { join } from 'path';

import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
Expand All @@ -15,19 +16,25 @@ export function app() {
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';

// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
}));
server.engine(
'html',
ngExpressEngine({
bootstrap: AppServerModule
})
);

server.set('view engine', 'html');
server.set('views', distFolder);

// Example Express Rest API endpoints
// app.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1y'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y'
})
);

// All regular routes use the Universal engine
server.get('*', (req, res) => {
Expand All @@ -52,7 +59,7 @@ function run() {
// The below code is to ensure that the server is run only when not requiring the bundle.
declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
const moduleFilename = mainModule && mainModule.filename || '';
const moduleFilename = (mainModule && mainModule.filename) || '';
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
run();
}
Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/forms/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
7 changes: 2 additions & 5 deletions apps/frontend/forms/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": []
"types": ["node"]
},
"files": [
"src/main.browser.ts",
"src/polyfills.ts"
],
"files": ["src/main.browser.ts", "src/polyfills.ts"],
"include": ["**/*.d.ts"]
}
9 changes: 4 additions & 5 deletions apps/frontend/forms/tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"extends": "./tsconfig.app.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../dist/out-tsc-server"
"outDir": "../../../dist/out-tsc-server",
"types": ["node"]
},
"angularCompilerOptions": {
"entryModule": "./src/app/app.server.module#AppServerModule"
},
"files": [
"src/main.server.ts",
"server.ts"
]
"files": ["src/main.server.ts", "server.ts"],
"include": ["**/*.d.ts"]
}
25 changes: 16 additions & 9 deletions apps/frontend/graphql/server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'zone.js/dist/zone-node';

import { APP_BASE_HREF } from '@angular/common';
import '@angular/localize/init';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { existsSync } from 'fs';
import { join } from 'path';

import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
Expand All @@ -15,19 +16,25 @@ export function app() {
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';

// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
}));
server.engine(
'html',
ngExpressEngine({
bootstrap: AppServerModule
})
);

server.set('view engine', 'html');
server.set('views', distFolder);

// Example Express Rest API endpoints
// app.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1y'
}));
server.get(
'*.*',
express.static(distFolder, {
maxAge: '1y'
})
);

// All regular routes use the Universal engine
server.get('*', (req, res) => {
Expand All @@ -52,7 +59,7 @@ function run() {
// The below code is to ensure that the server is run only when not requiring the bundle.
declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
const moduleFilename = mainModule && mainModule.filename || '';
const moduleFilename = (mainModule && mainModule.filename) || '';
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
run();
}
Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/graphql/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
7 changes: 2 additions & 5 deletions apps/frontend/graphql/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": []
"types": ["node"]
},
"files": [
"src/main.browser.ts",
"src/polyfills.ts"
],
"files": ["src/main.browser.ts", "src/polyfills.ts"],
"include": ["**/*.d.ts"]
}
9 changes: 4 additions & 5 deletions apps/frontend/graphql/tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"extends": "./tsconfig.app.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../dist/out-tsc-server"
"outDir": "../../../dist/out-tsc-server",
"types": ["node"]
},
"angularCompilerOptions": {
"entryModule": "./src/app/app.server.module#AppServerModule"
},
"files": [
"src/main.server.ts",
"server.ts"
]
"files": ["src/main.server.ts", "server.ts"],
"include": ["**/*.d.ts"]
}
Loading

0 comments on commit 7249e1c

Please sign in to comment.