diff --git a/README.md b/README.md index 7ebf0ba8..d2ef16be 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,7 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac ## Further help +Before using ng for the first time in this project, use `npm i` to install needed npm modules. + To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). + diff --git a/angular.json b/angular.json index ef8d1169..df9c8dac 100644 --- a/angular.json +++ b/angular.json @@ -30,7 +30,11 @@ "styles": [ "src/styles.scss" ], - "scripts": [] + "scripts": [ + "node_modules/marked/lib/marked.js", + "node_modules/prismjs/prism.js", + "node_modules/prismjs/components/prism-css.min.js" + ] }, "configurations": { "production": { diff --git a/package-lock.json b/package-lock.json index 3898eb0b..dfaf5ed8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "framadate", - "version": "0.0.0", + "name": "framadate-funky-frontend", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -328,8 +328,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -350,14 +349,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -372,20 +369,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -502,8 +496,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -515,7 +508,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -530,7 +522,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -538,14 +529,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -564,7 +553,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -645,8 +633,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -658,7 +645,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -744,8 +730,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -781,7 +766,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -801,7 +785,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -845,14 +828,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -1192,6 +1173,22 @@ "webpack-sources": "1.3.0" } }, + "@ngx-translate/core": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-11.0.1.tgz", + "integrity": "sha512-nBCa1ZD9fAUY/3eskP3Lql2fNg8OMrYIej1/5GRsfcutx9tG/5fZLCv9m6UCw1aS+u4uK/vXjv1ctG/FdMvaWg==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@ngx-translate/http-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-4.0.0.tgz", + "integrity": "sha512-x8LumqydWD7eX9yQTAVeoCM9gFUIGVTUjZqbxdAUavAA3qVnk9wCQux7iHLPXpydl8vyQmLoPQR+fFU+DUDOMA==", + "requires": { + "tslib": "^1.9.0" + } + }, "@schematics/angular": { "version": "8.2.1", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-8.2.1.tgz", @@ -1250,6 +1247,11 @@ "@types/jasmine": "*" } }, + "@types/marked": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.6.5.tgz", + "integrity": "sha512-6kBKf64aVfx93UJrcyEZ+OBM5nGv4RLsI6sR1Ar34bpgvGVRoyTgpxn4ZmtxOM5aDTAaaznYuYUH8bUX3Nk3YA==" + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -2604,6 +2606,17 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "clipboard": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", + "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "optional": true, + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -2736,8 +2749,7 @@ "commander": { "version": "2.20.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" }, "commondir": { "version": "1.0.1", @@ -3238,6 +3250,12 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "optional": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -4297,6 +4315,15 @@ } } }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "optional": true, + "requires": { + "delegate": "^3.1.2" + } + }, "graceful-fs": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.1.tgz", @@ -4310,9 +4337,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.0.tgz", + "integrity": "sha512-xkRtOt3/3DzTKMOt3xahj2M/EqNhY988T+imYSlMgs5fVhLN2fmKVVj0LtEGmb+3UUYV5Qmm1052Mm3dIQxOvw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -5669,8 +5696,7 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5787,8 +5813,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -5830,7 +5855,6 @@ "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5849,7 +5873,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5943,7 +5966,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6029,8 +6051,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -6066,7 +6087,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6130,14 +6150,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -6247,6 +6265,14 @@ "source-map-support": "^0.5.5" } }, + "katex": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.11.1.tgz", + "integrity": "sha512-5oANDICCTX0NqYIyAiFCCwjQ7ERu3DQG2JFHLbYOf+fXaMoH8eg/zOq5WSYJsKMi/QebW+Eh3gSM+oss1H/bww==", + "requires": { + "commander": "^2.19.0" + } + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -6530,6 +6556,11 @@ "object-visit": "^1.0.0" } }, + "marked": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==" + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -6934,6 +6965,18 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "ngx-markdown": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/ngx-markdown/-/ngx-markdown-8.2.1.tgz", + "integrity": "sha512-59LG8rEoOwDsZyyJckp+QDnW/c5wMaRpNkb6TWktlBVTfQKyAYHr6BuSskVbZ4y8nsj54UQg0CDFLBOfUiqOwA==", + "requires": { + "@types/marked": "^0.6.5", + "katex": "^0.11.1", + "marked": "^0.7.0", + "prismjs": "^1.16.0", + "tslib": "^1.9.0" + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -7794,6 +7837,14 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prismjs": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", + "integrity": "sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==", + "requires": { + "clipboard": "^2.0.0" + } + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -8579,6 +8630,12 @@ "ajv-keywords": "^3.1.0" } }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", + "optional": true + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -9711,6 +9768,12 @@ "setimmediate": "^1.0.4" } }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "optional": true + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -11174,8 +11237,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -11218,8 +11280,7 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", @@ -11230,8 +11291,7 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -11348,8 +11408,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -11361,7 +11420,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -11384,14 +11442,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -11410,7 +11466,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -11491,8 +11546,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -11504,7 +11558,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -11590,8 +11643,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -11627,7 +11679,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -11647,7 +11698,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -11691,14 +11741,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/package.json b/package.json index a8ccedcd..19a49403 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,51 @@ { - "name": "framadate", - "version": "0.0.0", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "~8.2.0", - "@angular/common": "~8.2.0", - "@angular/compiler": "~8.2.0", - "@angular/core": "~8.2.0", - "@angular/forms": "~8.2.0", - "@angular/platform-browser": "~8.2.0", - "@angular/platform-browser-dynamic": "~8.2.0", - "@angular/router": "~8.2.0", - "rxjs": "~6.4.0", - "tslib": "^1.10.0", - "zone.js": "~0.9.1" - }, - "devDependencies": { - "@angular-devkit/build-angular": "~0.802.1", - "@angular/cli": "~8.2.1", - "@angular/compiler-cli": "~8.2.0", - "@angular/language-service": "~8.2.0", - "@types/node": "~8.9.4", - "@types/jasmine": "~3.3.8", - "@types/jasminewd2": "~2.0.3", - "codelyzer": "^5.0.0", - "jasmine-core": "~3.4.0", - "jasmine-spec-reporter": "~4.2.1", - "karma": "~4.1.0", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.1", - "karma-jasmine": "~2.0.1", - "karma-jasmine-html-reporter": "^1.4.0", - "protractor": "~5.4.0", - "ts-node": "~7.0.0", - "tslint": "~5.15.0", - "typescript": "~3.5.3" - } + "name": "framadate-funky-frontend", + "version": "0.1.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e", + "trans": "ng xi18n --output-path=src/locale --i18n-locale=fr" + }, + "private": true, + "dependencies": { + "@angular/animations": "~8.2.0", + "@angular/common": "~8.2.0", + "@angular/compiler": "~8.2.0", + "@angular/core": "~8.2.0", + "@angular/forms": "~8.2.0", + "@angular/platform-browser": "~8.2.0", + "@angular/platform-browser-dynamic": "~8.2.0", + "@angular/router": "~8.2.0", + "@ngx-translate/core": "^11.0.1", + "@ngx-translate/http-loader": "^4.0.0", + "ngx-markdown": "^8.2.1", + "rxjs": "~6.4.0", + "tslib": "^1.10.0", + "zone.js": "~0.9.1" + }, + "devDependencies": { + "@angular-devkit/build-angular": "~0.802.1", + "@angular/cli": "~8.2.1", + "@angular/compiler-cli": "~8.2.0", + "@angular/language-service": "~8.2.0", + "@types/node": "~8.9.4", + "@types/jasmine": "~3.3.8", + "@types/jasminewd2": "~2.0.3", + "codelyzer": "^5.0.0", + "jasmine-core": "~3.4.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~4.1.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~2.0.1", + "karma-jasmine": "~2.0.1", + "karma-jasmine-html-reporter": "^1.4.0", + "protractor": "~5.4.0", + "ts-node": "~7.0.0", + "tslint": "~5.15.0", + "typescript": "~3.5.3" + } } diff --git a/src/app/app.component.html b/src/app/app.component.html index 8e697f5e..5f46244f 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,17 +1,25 @@
- -

- Frama - date -

- - Ceci est une démo - -
+ +

+ Frama + date +

+ +
+
+
+ + +
+

{{"Title"|translate}}

+
+ {{"Intro"|translate:user}} +
+
- +
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 701853e3..32109cdf 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,10 +1,26 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; +import {TranslateService} from "@ngx-translate/core"; @Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.scss'] }) export class AppComponent { - title = 'framadate'; + title = 'framadate'; + //translation demo: + minutes = 12; + user = { + name: 'Arthur', + age: 42 + }; + + constructor(private translate: TranslateService) { + this.translate.setDefaultLang('fr'); + } + + switchLanguage(language: string) { + this.translate.use(language); + } + } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8da4e668..6c6e47fa 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -21,14 +21,36 @@ import {EndConfirmationComponent} from './pages/end-confirmation/end-confirmatio import {CreateOrRetrieveComponent} from './pages/create-or-retrieve/create-or-retrieve.component'; import {CalendarComponent} from './calendar/calendar.component'; import localeFr from '@angular/common/locales/fr'; +import localeEn from '@angular/common/locales/en'; import {VotingSummaryComponent} from './pages/voting-summary/voting-summary.component'; import {VotingGraphComponent} from './pages/voting-graph/voting-graph.component'; import {VotingChoiceComponent} from './pages/voting-choice/voting-choice.component'; import {PasswordComponent} from './pages/password/password.component'; import {HomeComponent} from './pages/home/home.component'; import {VoteChoiceComponent} from './vote-choice/vote-choice.component'; +import {HttpClient, HttpClientModule} from '@angular/common/http'; +import { MarkdownModule } from 'ngx-markdown'; +import { + MissingTranslationHandler, + MissingTranslationHandlerParams, + TranslateLoader, + TranslateModule, + TranslateService +} from '@ngx-translate/core'; +import {TranslateHttpLoader} from '@ngx-translate/http-loader'; + +export class MyMissingTranslationHandler implements MissingTranslationHandler { + handle(params: MissingTranslationHandlerParams) { + return 'some value'; + } +} registerLocaleData(localeFr, 'fr'); +registerLocaleData(localeEn, 'en'); + +export function HttpLoaderFactory(http: HttpClient) { + return new TranslateHttpLoader(http); +} @NgModule({ declarations: [ @@ -58,10 +80,24 @@ registerLocaleData(localeFr, 'fr'); CommonModule, BrowserModule, AppRoutingModule, + MarkdownModule.forRoot(), + TranslateModule.forRoot({ + missingTranslationHandler: { + provide: MissingTranslationHandler, + useClass: MyMissingTranslationHandler, + }, + // useDefaultLang: false, + loader: { + provide: TranslateLoader, + useFactory: HttpLoaderFactory, + deps: [HttpClient] + } + }), + HttpClientModule, FormsModule, RouterModule.forRoot(Routes) ], - providers: [{provide: LOCALE_ID, useValue: "fr-FR"}], + providers: [TranslateService], bootstrap: [AppComponent] }) export class AppModule { diff --git a/src/app/debugger/debugger.component.html b/src/app/debugger/debugger.component.html index ba8cddca..1af1e473 100644 --- a/src/app/debugger/debugger.component.html +++ b/src/app/debugger/debugger.component.html @@ -1,27 +1,29 @@
- - -

- infos de debug -

-
- + +

+ infos de debug +

+ + {{"config.demo"|translate}} + +
+
@@ -62,5 +64,5 @@ i18n (click)="config.sendForm()" > - Envoyer le formulaire + Envoyer le formulaire diff --git a/src/app/pages/answers/answers.component.html b/src/app/pages/answers/answers.component.html index ce775fd6..9ea5719a 100644 --- a/src/app/pages/answers/answers.component.html +++ b/src/app/pages/answers/answers.component.html @@ -1,7 +1,7 @@
-

- Choisir les propositions -

+

+ Choisir les propositions +

Vous pouvez utiliser la syntaxe markdown diff --git a/src/app/pages/base-page/base.component.html b/src/app/pages/base-page/base.component.html index a864ed80..5567fdea 100644 --- a/src/app/pages/base-page/base.component.html +++ b/src/app/pages/base-page/base.component.html @@ -1,2 +1,4 @@

Ce composant est celui de base pour les pages

-C'est parfait! + + {{"config.perfect"|translate}} + diff --git a/src/app/pages/create-or-retrieve/create-or-retrieve.component.html b/src/app/pages/create-or-retrieve/create-or-retrieve.component.html index 10bb98ed..50753eca 100644 --- a/src/app/pages/create-or-retrieve/create-or-retrieve.component.html +++ b/src/app/pages/create-or-retrieve/create-or-retrieve.component.html @@ -1,56 +1,55 @@
-

- Créer un sondage -

-

- Planifiez des rendez-vous avec vos amis ou votre famille ou créez un sondage avec du texte, des images ou des - liens… un sondage quoi ! -

-
- -
+ + > + + +
-

- Mes sondages -

-
- - - -
+

+ {{"config.find_my_polls"|translate}} +

+
+ + + +
diff --git a/src/app/pages/dates/dates.component.html b/src/app/pages/dates/dates.component.html index 6e7196e1..9c2a8776 100644 --- a/src/app/pages/dates/dates.component.html +++ b/src/app/pages/dates/dates.component.html @@ -1,58 +1,56 @@
- Config spécialement pour les dates + {{"dates.title"|translate}}
- - -
- {{config.dateList.length}} - - choix de Dates + {{config.dateList.length}} + + {{"dates.count_dates"|translate}} -
- +
+ - -
+ +
- C'est parfait! + C'est parfait! diff --git a/src/app/pages/end-confirmation/end-confirmation.component.html b/src/app/pages/end-confirmation/end-confirmation.component.html index d354ec5c..91cf9484 100644 --- a/src/app/pages/end-confirmation/end-confirmation.component.html +++ b/src/app/pages/end-confirmation/end-confirmation.component.html @@ -1,9 +1,6 @@

- Et c'est tout pour nous! + {{"resume.title"|translate}}

-

Votre sondage "{{ config.title }}" a bien été crée
- Voici les liens d'accès au sondage,conservez les soigneusement -

-

Coté administrateur-ice-eux

-

Coté sondés

-

recevoir les liens par e-mail

+

{{"resume.admins"|translate}}

+

{{"resume.users"|translate}}

+

{{"resume.link_mail"|translate}}

diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index c9bd2bcf..caf34540 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -1,80 +1,83 @@
+ +

+ {{"creation.title"|translate}} +

+ + {{"creation.want"|translate}} + + - -

- Pour commencer -

- - Je veux créer un sondage - - - - -
+ + - - +
-
-
- - -
-
+ + +
- - +
+ + +
-
+
+ + +
diff --git a/src/app/pages/pictures/pictures.component.html b/src/app/pages/pictures/pictures.component.html index ddd7b9f9..07d0b7b2 100644 --- a/src/app/pages/pictures/pictures.component.html +++ b/src/app/pages/pictures/pictures.component.html @@ -1,6 +1,6 @@

- Images + Images

ok diff --git a/src/app/pages/resume/resume.component.html b/src/app/pages/resume/resume.component.html index 1cc9fdc1..70f6636d 100644 --- a/src/app/pages/resume/resume.component.html +++ b/src/app/pages/resume/resume.component.html @@ -2,9 +2,9 @@ Résumé avant validation
- TODO -
-		{{config |json}}
-	
+
+ {{questions.id+1}}. {{questions.text}} +
+
diff --git a/src/app/pages/visibility/visibility.component.html b/src/app/pages/visibility/visibility.component.html index ec5df6f9..b7c58321 100644 --- a/src/app/pages/visibility/visibility.component.html +++ b/src/app/pages/visibility/visibility.component.html @@ -1,14 +1,14 @@

- Visibilité des réponses + {{"visibility.title"|translate}}

- Votes + {{"visibility.votes"|translate}}

- Archivage + {{"visibility.archiving"|translate}}

- Accès au sondage + {{"visibility.access"|translate}}

C'est parfait! diff --git a/src/app/ui/navigation/navigation.component.html b/src/app/ui/navigation/navigation.component.html index c234b935..c7fa566b 100644 --- a/src/app/ui/navigation/navigation.component.html +++ b/src/app/ui/navigation/navigation.component.html @@ -1,29 +1,29 @@ \ No newline at end of file + diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json new file mode 100644 index 00000000..14073764 --- /dev/null +++ b/src/assets/i18n/en.json @@ -0,0 +1,64 @@ +{ + "Title": "Translation example", + "Intro": "Hello I am {{name}}, I am {{age}} years old.", + "home": { + "title": "home's title" + }, + "config": { + "demo": "this is a demo", + "demo_other": "this is an other demo", + "continue": "Continue", + "perfect": "That's perfect", + "title": "Create a poll", + "letsgo": "Lets go!", + "description": "Shedule appointments with your friends or your family, or create a pool with text, pictures or links… A real survey!", + "find_my_polls": "Where are my polls ?", + "find_helper": "I am looking for polls linked to my email", + "find_button": "Find my polls" + }, + "creation": { + "title": "To begin with", + "want": "I want to create a poll", + "kind": { + "classic": "classic", + "date": "special dates" + }, + "choose_title": "Whom title will be", + "choose_title_placeholder": "title", + "name": "I can also specify my name if i want", + "name_placeholder": "my name", + "description": "and the description would be", + "description_placeholder": "summary of the poll's purpose" + }, + "dates": { + "title": "Config especially for the dates", + "hours_different": "I want to put slots for each day", + "multiple": { + "identical": "same", + "different": "possibly different" + }, + "add": "Add a date range", + "count_dates": "choices of dates" + }, + "choices": { + "title": "Write the proposals", + "helper": "You can use markdown syntax", + "answer_preset_1": "Demo answer 1", + "answer_preset_2": "answer 2", + "answer_preset_3": "and D, the answer D", + "add": "Add", + "continue": "Let's see how it goes" + }, + "resume": { + "title": "And that's all for us!", + "admins": "Admin side", + "users": "Respondent side", + "links_mail": "Receive links by email" + }, + "visibility": { + "title": "Visibility of answers", + "votes": "Votes", + "archiving": "Archiving", + "access": "Access to the pool" + } +} diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json new file mode 100644 index 00000000..44ba5fac --- /dev/null +++ b/src/assets/i18n/fr.json @@ -0,0 +1,64 @@ +{ + "Title": "Example de traduction", + "Intro": "Bonjour je m'appelle {{name}}, j'ai {{age}} ans.", + "home": { + "title": "le titre de la home" + }, + "config": { + "demo": "C'est une démo traduite en Français", + "demo_other": "C'est une autre démo traduite en Français", + "continue": "Continuer", + "perfect": "C'est parfait", + "title": "Créer un sondage", + "letsgo": "C'est parti'", + "description": "Planifiez des rendez-vous avec vos amis ou votre famille ou créez un sondage avec du texte, des images ou des liens… un sondage quoi !", + "find_my_polls": "Où sont mes sondages ?", + "find_helper": "Je cherche les sondages qui correspondent à mon mail", + "find_button": "Retrouver mes sondages" + }, + "creation": { + "title": "Pour commencer ", + "want": "Je veux créer un sondage", + "kind": { + "classic": "classique", + "date": "spécial dates" + }, + "choose_title": "Dont le titre sera", + "choose_title_placeholder": "titre", + "name": "Je peux aussi préciser mon nom si je le souhaite", + "name_placeholder": "mon nom", + "description": "et la description serait", + "description_placeholder": "description" + }, + "dates": { + "title": "Config spécialement pour les dates ", + "hours_different": "Je souhaite mettre des créneaux horaires pour chaque journée", + "multiple": { + "identical": "identiques", + "different": "possiblement différentes" + }, + "add": "Ajouter une plage de dates", + "count_dates": "choix de dates" + }, + "choices": { + "title": "Choisir les propositions", + "helper": "vous pouvez utiliser la syntaxe markdown ", + "answer_preset_1": "réponse de démo 1", + "answer_preset_2": "réponse 2", + "answer_preset_3": "la réponse D", + "add": "Ajouter", + "continue": "Voyons ce que ça donne" + }, + "resume": { + "title": "Et c'est tout pour nous !", + "admins": "Coté administrateur-ice-eux", + "users": "Coté sondés", + "links_mail": "recevoir les liens par e-mail" + }, + "visibility": { + "title": "Visibilité des réponses", + "votes": "Votes", + "archiving": "Archivage", + "access": "Accès au sondage" + } +} diff --git a/src/assets/scss/molecules/_logo.scss b/src/assets/scss/molecules/_logo.scss index 41ee0682..0ea0cae3 100644 --- a/src/assets/scss/molecules/_logo.scss +++ b/src/assets/scss/molecules/_logo.scss @@ -1,3 +1,8 @@ +.logo_first, .logo_second { + padding-left: 0; + padding-right: 0; +} + .logo_first { color: $logo_color; } diff --git a/src/index.html b/src/index.html index 5ed1d6c4..00a293a7 100644 --- a/src/index.html +++ b/src/index.html @@ -1,16 +1,16 @@ - - Framadate - + + Framadate + - - + + - + - + diff --git a/src/locale/messages.fr.xlf b/src/locale/messages.fr.xlf deleted file mode 100644 index e69de29b..00000000 diff --git a/messages.xlf b/src/locale/messages.xlf similarity index 72% rename from messages.xlf rename to src/locale/messages.xlf index b0cfa003..ba35cf85 100644 --- a/messages.xlf +++ b/src/locale/messages.xlf @@ -1,59 +1,39 @@ - + - + - Ceci est une démo - + Ceci est une démo + src/app/app.component.html 7 + introduction header saying just demo + demo title - + - Pour commencer - + Updated + - src/app/form-container/form-container.component.html - 4 - - - - - Je veux créer un sondage - - - src/app/form-container/form-container.component.html + src/app/app.component.html 10 - - - Dont le titre sera - + + {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} } - src/app/form-container/form-container.component.html - 34 + src/app/app.component.html + 11 - - - et la description serait - + + placeholder à traduire - src/app/form-container/form-container.component.html - 64 - - - - - Continuer - - - src/app/form-container/form-container.component.html - 82 + src/app/app.component.html + 13 @@ -75,9 +55,9 @@ 10 - + - Config spécialement pour les dates + Config spécialement pour les dates src/app/pages/dates/dates.component.html @@ -102,9 +82,9 @@ 20 - + - Ajouter une plage de dates + Ajouter une plage de dates src/app/pages/dates/dates.component.html @@ -120,10 +100,10 @@ 35 - + - infos de debug - + infos de debug + src/app/debugger/debugger.component.html 4 @@ -156,90 +136,90 @@ 51 - + - Envoyer le formulaire + Envoyer le formulaire src/app/debugger/debugger.component.html 64 - + - Visibilité des réponses + Visibilité des réponses src/app/pages/visibility/visibility.component.html 1 - + - Votes + Votes src/app/pages/visibility/visibility.component.html 4 - + - Archivage + Archivage src/app/pages/visibility/visibility.component.html 7 - + - Accès au sondage + Accès au sondage src/app/pages/visibility/visibility.component.html 11 - + - Résumé avant validation + Résumé avant validation src/app/pages/resume/resume.component.html 1 - + - Images + Images src/app/pages/pictures/pictures.component.html - 1 + 2 - + - Choisir les propositions - + Choisir les propositions + src/app/pages/answers/answers.component.html 2 - + - vous pouvez utiliser la syntaxe markdown - + vous pouvez utiliser la syntaxe markdown + src/app/pages/answers/answers.component.html 6 - + - Et c'est tout pour nous! + Et c'est tout pour nous! src/app/pages/end-confirmation/end-confirmation.component.html @@ -267,20 +247,20 @@ 6 - + - Créer un sondage - + Créer un sondage + src/app/pages/create-or-retrieve/create-or-retrieve.component.html 2 - + - Planifiez des rendez-vous avec vos amis ou votre famille ou créez un sondage avec du texte, des images ou des - liens… un sondage quoi ! - + Planifiez des rendez-vous avec vos amis ou votre famille ou créez un sondage avec du texte, des images ou des + liens… un sondage quoi ! + src/app/pages/create-or-retrieve/create-or-retrieve.component.html 8 @@ -295,24 +275,69 @@ 19 - + - Où sont mes sondages ? - + Où sont mes sondages ? + src/app/pages/create-or-retrieve/create-or-retrieve.component.html 29 - + - Je cherche les sondages qui correspondent à mon mail : - + Je cherche les sondages qui correspondent à mon mail : + src/app/pages/create-or-retrieve/create-or-retrieve.component.html 40 + + + Pour commencer + + + src/app/pages/home/home.component.html + 4 + + + + + Je veux créer un sondage + + + src/app/pages/home/home.component.html + 10 + + + + + Dont le titre sera + + + src/app/pages/home/home.component.html + 34 + + + + + et la description serait + + + src/app/pages/home/home.component.html + 64 + + + + + Continuer + + + src/app/pages/home/home.component.html + 82 + +