Skip to content

Commit

Permalink
Merge pull request #59 from LINCnil/develop
Browse files Browse the repository at this point in the history
Merge develop
  • Loading branch information
Patrick Mengual authored Jan 26, 2018
2 parents 362aade + e5ef65f commit 55f79b4
Show file tree
Hide file tree
Showing 7 changed files with 717 additions and 616 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ export class OverviewRisksComponent implements OnInit {
const dataTags = [
{
id: 1,
name: 'Impacts potentiels',
name: this._translateService.instant('overview-risks.potential_impacts'),
reference_to: [321, 331, 341]
},
{
id: 2,
name: 'Menaces',
name: this._translateService.instant('overview-risks.threat'),
reference_to: [322, 332, 342]
},
{
id: 3,
name: 'Sources',
name: this._translateService.instant('overview-risks.sources'),
reference_to: [323, 333, 343]
},
{
id: 4,
name: 'Mesures',
name: this._translateService.instant('overview-risks.measures'),
reference_to: [324, 334, 344]
}
];
Expand Down Expand Up @@ -245,15 +245,20 @@ export class OverviewRisksComponent implements OnInit {
private async parseQuestions(questionGauges, g, x, y) {
let i = 0;
const data = [];
const gauges_value = { 1: 'Négligeable', 2: 'Limitée', 3: 'Importante', 4: 'Maximale' };
const gauges_value = {
1: this._translateService.instant('overview-risks.negligible'),
2: this._translateService.instant('overview-risks.limited'),
3: this._translateService.instant('overview-risks.important'),
4: this._translateService.instant('overview-risks.maximal')
};
return new Promise((resolve, reject) => {
questionGauges.forEach(async question => {
i++;
const answerModel = new Answer();
await answerModel.getByReferenceAndPia(this._piaService.pia.id, question.id);
if (answerModel.data && answerModel.data.gauge > 0) {
const value = answerModel.data.gauge;
const name = this._translateService.instant(question.highlight_words).split(' ')[0];
const name = this._translateService.instant('overview-risks.' + question.cartography);
y += 25;
g.append('text').attr('x', x).attr('y', y).text(name + ' :').attr('class', 'gauge_prefix');
g.append('text').attr('x', x + (name.length * 7)).attr('y', y).text(gauges_value[value]).attr('class', 'gauge_bold');
Expand Down
58 changes: 37 additions & 21 deletions src/assets/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@
"card_rocket_content": "Začínáme! <br><br>Chcete-li iniciovat PIA,<br> klikněte na Nová PIA"
},
"cards": {
"new_pia": "Nová PIA",
"placeholder_new_pia": "Nová PIA",
"or": "nebo",
"import_pia": "Importovat PIA",
"placeholder_import_pia": "Importovat PIA",
"title_close_creation": "Zavřít",
"pia_name": "PIA",
"placeholder_pia_name": "PIA název",
"author": "Upravil",
"placeholder_author": "Křestní jméno, Příjmení",
"evaluation": "Posouzení",
"placeholder_evaluation": "Křestní jméno, Příjmení",
"validation": "Validation",
"placeholder_validation": "Křestní jméno, Příjmení",
"date": "Datum",
"status": "Stav",
"creation_status": "Vytvořeno",
"start": "Start",
"placeholder_start": "Všechna pole musí být vyplněna",
"item": {
"new_pia": "Nová PIA",
"placeholder_new_pia": "Nová PIA",
"or": "nebo",
"import_pia": "Importovat PIA",
"placeholder_import_pia": "Importovat PIA",
"title_close_creation": "Zavřít",
"pia_name": "PIA",
"placeholder_pia_name": "PIA název",
"author": "Upravil",
"placeholder_author": "Křestní jméno, Příjmení",
"evaluation": "Posouzení",
"placeholder_evaluation": "Křestní jméno, Příjmení",
"validation": "Validation",
"placeholder_validation": "Křestní jméno, Příjmení",
"date": "Datum",
"status": "Stav",
"creation_status": "Vytvořeno",
"start": "Start",
"placeholder_start": "Všechna pole musí být vyplněna",
"item": {
"tools": {
"edit": "Upravit informace",
"export": "Exportovat",
Expand Down Expand Up @@ -959,7 +959,23 @@
"title": "Stránka nebyla nalezena.",
"content": "If you encounter other problems or if you have suggestions for improvement,<br>you can send them back via this form: <a href=\"https://www.cnil.fr/fr/webform/vos-retours-sur-loutil-pia\" target=\"_blank\">https://www.cnil.fr/fr/webform/vos-retours-sur-loutil-pia</a>"
},
"cartography": {
"overview-risks": {
"potential_impacts": "Potential impacts",
"threat": "Threat",
"sources": "Sources",
"measures": "Measures",
"negligible": "Zanedbatelné",
"limited": "Omezené",
"important": "Důležité",
"maximal": "Maximální",
"risk-access_x": "Severity",
"risk-access_y": "Likelihood",
"risk-change_x": "Severity",
"risk-change_y": "Likelihood",
"risk-disappearance_x": "Severity",
"risk-disappearance_y": "Likelihood"
},
"cartography": {
"negligible": "Zanedbatelné",
"limited": "Omezené",
"important": "Důležité",
Expand Down
58 changes: 37 additions & 21 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@
"card_rocket_content": "Get started !<br><br>To initiate a PIA,<br> click on New PIA"
},
"cards": {
"new_pia": "New PIA",
"placeholder_new_pia": "New PIA",
"or": "or",
"import_pia": "Import PIA",
"placeholder_import_pia": "Import PIA",
"title_close_creation": "Close",
"pia_name": "PIA",
"placeholder_pia_name": "PIA's title",
"author": "Editing",
"placeholder_author": "Firstname, lastname",
"evaluation": "Review",
"placeholder_evaluation": "Firstname, lastname",
"validation": "Validation",
"placeholder_validation": "Firstname, lastname",
"date": "Date",
"status": "Status",
"creation_status": "Creation",
"start": "Start",
"placeholder_start": "All fields must be filled",
"item": {
"new_pia": "New PIA",
"placeholder_new_pia": "New PIA",
"or": "or",
"import_pia": "Import PIA",
"placeholder_import_pia": "Import PIA",
"title_close_creation": "Close",
"pia_name": "PIA",
"placeholder_pia_name": "PIA's title",
"author": "Editing",
"placeholder_author": "Firstname, lastname",
"evaluation": "Review",
"placeholder_evaluation": "Firstname, lastname",
"validation": "Validation",
"placeholder_validation": "Firstname, lastname",
"date": "Date",
"status": "Status",
"creation_status": "Creation",
"start": "Start",
"placeholder_start": "All fields must be filled",
"item": {
"tools": {
"edit": "Edit information",
"export": "Export",
Expand Down Expand Up @@ -958,7 +958,23 @@
"title": "Page not found.",
"content": "If you encounter other problems or if you have suggestions for improvement,<br>you can send them back via this form: <a href=\"https://www.cnil.fr/fr/webform/vos-retours-sur-loutil-pia\" target=\"_blank\">https://www.cnil.fr/fr/webform/vos-retours-sur-loutil-pia</a>"
},
"cartography": {
"overview-risks": {
"potential_impacts": "Potential impacts",
"threat": "Threat",
"sources": "Sources",
"measures": "Measures",
"negligible": "Negligible",
"limited": "Limited",
"important": "Important",
"maximal": "Maximal",
"risk-access_x": "Severity",
"risk-access_y": "Likelihood",
"risk-change_x": "Severity",
"risk-change_y": "Likelihood",
"risk-disappearance_x": "Severity",
"risk-disappearance_y": "Likelihood"
},
"cartography": {
"negligible": "Negligible",
"limited": "Limited",
"important": "Important",
Expand Down
16 changes: 16 additions & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,22 @@
"title": "Page introuvable.",
"content": "Si vous rencontrez d’autres problèmes ou si vous avez des suggestions d’amélioration,<br>vous pouvez nous les faire remonter via ce formulaire : <a href=\"https://www.cnil.fr/fr/webform/vos-retours-sur-loutil-pia\" target=\"_blank\">https://www.cnil.fr/fr/webform/vos-retours-sur-loutil-pia</a>"
},
"overview-risks": {
"potential_impacts": "Impacts potentiels",
"threat": "Menaces",
"sources": "Sources",
"measures": "Mesures",
"negligible": "Négligeable",
"limited": "Limitée",
"important": "Importante",
"maximal": "Maximale",
"risk-access_x": "Gravité",
"risk-access_y": "Vraisemblance",
"risk-change_x": "Gravité",
"risk-change_y": "Vraisemblance",
"risk-disappearance_x": "Gravité",
"risk-disappearance_y": "Vraisemblance"
},
"cartography": {
"negligible": "Négligeable",
"limited": "Limitée",
Expand Down
Loading

0 comments on commit 55f79b4

Please sign in to comment.