@sofit/view-locale 1.111.0 → 1.112.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/Jenkinsfile +0 -5
  2. package/{junit.xml → coverage/jest/results.xml} +11 -11
  3. package/coverage/lcov-report/base.css +224 -0
  4. package/coverage/lcov-report/block-navigation.js +79 -0
  5. package/coverage/lcov-report/favicon.png +0 -0
  6. package/coverage/lcov-report/index.html +171 -0
  7. package/coverage/lcov-report/lib/index.html +126 -0
  8. package/coverage/lcov-report/lib/index.ts.html +89 -0
  9. package/coverage/lcov-report/lib/runner.ts.html +530 -0
  10. package/coverage/lcov-report/lib/translations/common/auth.ts.html +95 -0
  11. package/coverage/lcov-report/lib/translations/common/benchmarking.ts.html +131 -0
  12. package/coverage/lcov-report/lib/translations/common/database-errors.ts.html +227 -0
  13. package/coverage/lcov-report/lib/translations/common/entity.ts.html +119 -0
  14. package/coverage/lcov-report/lib/translations/common/general.ts.html +149 -0
  15. package/coverage/lcov-report/lib/translations/common/index.html +201 -0
  16. package/coverage/lcov-report/lib/translations/common/internal-server-errors.ts.html +107 -0
  17. package/coverage/lcov-report/lib/translations/common/joi.ts.html +305 -0
  18. package/coverage/lcov-report/lib/translations/index.html +111 -0
  19. package/coverage/lcov-report/lib/translations/index.ts.html +662 -0
  20. package/coverage/lcov-report/lib/translations/integrations/index.html +126 -0
  21. package/coverage/lcov-report/lib/translations/integrations/inout.ts.html +107 -0
  22. package/coverage/lcov-report/lib/translations/integrations/pipefy.ts.html +107 -0
  23. package/coverage/lcov-report/lib/translations/modules/attachment.ts.html +89 -0
  24. package/coverage/lcov-report/lib/translations/modules/backup_vehicle.ts.html +299 -0
  25. package/coverage/lcov-report/lib/translations/modules/backup_vehicle_usage.ts.html +320 -0
  26. package/coverage/lcov-report/lib/translations/modules/carsharing_type.ts.html +119 -0
  27. package/coverage/lcov-report/lib/translations/modules/cash_basis.ts.html +89 -0
  28. package/coverage/lcov-report/lib/translations/modules/change_history.ts.html +242 -0
  29. package/coverage/lcov-report/lib/translations/modules/checklist.ts.html +215 -0
  30. package/coverage/lcov-report/lib/translations/modules/checklist_group.ts.html +188 -0
  31. package/coverage/lcov-report/lib/translations/modules/checklist_group_item.ts.html +200 -0
  32. package/coverage/lcov-report/lib/translations/modules/checklist_group_option.ts.html +140 -0
  33. package/coverage/lcov-report/lib/translations/modules/checklist_model.ts.html +152 -0
  34. package/coverage/lcov-report/lib/translations/modules/checklist_reply.ts.html +167 -0
  35. package/coverage/lcov-report/lib/translations/modules/city.ts.html +119 -0
  36. package/coverage/lcov-report/lib/translations/modules/company.ts.html +299 -0
  37. package/coverage/lcov-report/lib/translations/modules/cost_center.ts.html +248 -0
  38. package/coverage/lcov-report/lib/translations/modules/cost_sharing.ts.html +89 -0
  39. package/coverage/lcov-report/lib/translations/modules/cost_sharing_entity.ts.html +89 -0
  40. package/coverage/lcov-report/lib/translations/modules/customer.ts.html +287 -0
  41. package/coverage/lcov-report/lib/translations/modules/driver_control.ts.html +89 -0
  42. package/coverage/lcov-report/lib/translations/modules/driver_license_point.ts.html +89 -0
  43. package/coverage/lcov-report/lib/translations/modules/employee.ts.html +923 -0
  44. package/coverage/lcov-report/lib/translations/modules/employee_change_history.ts.html +242 -0
  45. package/coverage/lcov-report/lib/translations/modules/employee_hiring_regime.ts.html +107 -0
  46. package/coverage/lcov-report/lib/translations/modules/employee_role.ts.html +167 -0
  47. package/coverage/lcov-report/lib/translations/modules/expense.ts.html +89 -0
  48. package/coverage/lcov-report/lib/translations/modules/fine.ts.html +164 -0
  49. package/coverage/lcov-report/lib/translations/modules/fine_qualification.ts.html +239 -0
  50. package/coverage/lcov-report/lib/translations/modules/fine_qualification_integration_key.ts.html +164 -0
  51. package/coverage/lcov-report/lib/translations/modules/fine_resource.ts.html +143 -0
  52. package/coverage/lcov-report/lib/translations/modules/foreseen_maintenance_plan_service_item.ts.html +236 -0
  53. package/coverage/lcov-report/lib/translations/modules/foreseen_service_order_item.ts.html +89 -0
  54. package/coverage/lcov-report/lib/translations/modules/gas_pump_control.ts.html +89 -0
  55. package/coverage/lcov-report/lib/translations/modules/gate.ts.html +152 -0
  56. package/coverage/lcov-report/lib/translations/modules/gate_appointment.ts.html +89 -0
  57. package/coverage/lcov-report/lib/translations/modules/gate_appointment_diary.ts.html +89 -0
  58. package/coverage/lcov-report/lib/translations/modules/index.html +1431 -0
  59. package/coverage/lcov-report/lib/translations/modules/item.ts.html +503 -0
  60. package/coverage/lcov-report/lib/translations/modules/leasing_contract.ts.html +176 -0
  61. package/coverage/lcov-report/lib/translations/modules/leasing_measurement.ts.html +377 -0
  62. package/coverage/lcov-report/lib/translations/modules/maintenance_plan.ts.html +188 -0
  63. package/coverage/lcov-report/lib/translations/modules/maintenance_plan_service.ts.html +392 -0
  64. package/coverage/lcov-report/lib/translations/modules/measurement_unit.ts.html +155 -0
  65. package/coverage/lcov-report/lib/translations/modules/night_transport.ts.html +89 -0
  66. package/coverage/lcov-report/lib/translations/modules/parameter.ts.html +89 -0
  67. package/coverage/lcov-report/lib/translations/modules/pendency.ts.html +110 -0
  68. package/coverage/lcov-report/lib/translations/modules/qualification_severity.ts.html +179 -0
  69. package/coverage/lcov-report/lib/translations/modules/release_notification.ts.html +188 -0
  70. package/coverage/lcov-report/lib/translations/modules/request_occurrence.ts.html +89 -0
  71. package/coverage/lcov-report/lib/translations/modules/route.ts.html +119 -0
  72. package/coverage/lcov-report/lib/translations/modules/service_order.ts.html +188 -0
  73. package/coverage/lcov-report/lib/translations/modules/solicitation.ts.html +89 -0
  74. package/coverage/lcov-report/lib/translations/modules/solicitation_comment.ts.html +89 -0
  75. package/coverage/lcov-report/lib/translations/modules/solicitation_history.ts.html +89 -0
  76. package/coverage/lcov-report/lib/translations/modules/solicitation_watcher.ts.html +89 -0
  77. package/coverage/lcov-report/lib/translations/modules/state.ts.html +143 -0
  78. package/coverage/lcov-report/lib/translations/modules/stock_entry_item.ts.html +89 -0
  79. package/coverage/lcov-report/lib/translations/modules/stock_transfer.ts.html +89 -0
  80. package/coverage/lcov-report/lib/translations/modules/stock_transfer_item.ts.html +89 -0
  81. package/coverage/lcov-report/lib/translations/modules/sub_system.ts.html +167 -0
  82. package/coverage/lcov-report/lib/translations/modules/subsidiary.ts.html +248 -0
  83. package/coverage/lcov-report/lib/translations/modules/supplier.ts.html +416 -0
  84. package/coverage/lcov-report/lib/translations/modules/system.ts.html +143 -0
  85. package/coverage/lcov-report/lib/translations/modules/tire.ts.html +89 -0
  86. package/coverage/lcov-report/lib/translations/modules/tire_brand.ts.html +155 -0
  87. package/coverage/lcov-report/lib/translations/modules/tire_dimension.ts.html +155 -0
  88. package/coverage/lcov-report/lib/translations/modules/tire_drawing.ts.html +236 -0
  89. package/coverage/lcov-report/lib/translations/modules/transaction.ts.html +89 -0
  90. package/coverage/lcov-report/lib/translations/modules/trip.ts.html +152 -0
  91. package/coverage/lcov-report/lib/translations/modules/vehicle.ts.html +1511 -0
  92. package/coverage/lcov-report/lib/translations/modules/vehicle_axes.ts.html +143 -0
  93. package/coverage/lcov-report/lib/translations/modules/vehicle_booking.ts.html +218 -0
  94. package/coverage/lcov-report/lib/translations/modules/vehicle_brand.ts.html +155 -0
  95. package/coverage/lcov-report/lib/translations/modules/vehicle_bulk.ts.html +143 -0
  96. package/coverage/lcov-report/lib/translations/modules/vehicle_bulk_keys.ts.html +134 -0
  97. package/coverage/lcov-report/lib/translations/modules/vehicle_change_history.ts.html +287 -0
  98. package/coverage/lcov-report/lib/translations/modules/vehicle_deactivation_cause.ts.html +107 -0
  99. package/coverage/lcov-report/lib/translations/modules/vehicle_due.ts.html +155 -0
  100. package/coverage/lcov-report/lib/translations/modules/vehicle_event.ts.html +167 -0
  101. package/coverage/lcov-report/lib/translations/modules/vehicle_event_type.ts.html +107 -0
  102. package/coverage/lcov-report/lib/translations/modules/vehicle_fuel.ts.html +179 -0
  103. package/coverage/lcov-report/lib/translations/modules/vehicle_layout.ts.html +155 -0
  104. package/coverage/lcov-report/lib/translations/modules/vehicle_leasing.ts.html +308 -0
  105. package/coverage/lcov-report/lib/translations/modules/vehicle_maintenance_plan.ts.html +221 -0
  106. package/coverage/lcov-report/lib/translations/modules/vehicle_maintenance_plan_item.ts.html +89 -0
  107. package/coverage/lcov-report/lib/translations/modules/vehicle_maintenance_plan_service.ts.html +89 -0
  108. package/coverage/lcov-report/lib/translations/modules/vehicle_model.ts.html +227 -0
  109. package/coverage/lcov-report/lib/translations/modules/vehicle_model_version.ts.html +155 -0
  110. package/coverage/lcov-report/lib/translations/modules/vehicle_tag.ts.html +107 -0
  111. package/coverage/lcov-report/lib/translations/modules/warehouse.ts.html +188 -0
  112. package/coverage/lcov-report/lib/translations/modules/warehouse_item.ts.html +89 -0
  113. package/coverage/lcov-report/prettify.css +1 -0
  114. package/coverage/lcov-report/prettify.js +2 -0
  115. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  116. package/coverage/lcov-report/sorter.js +170 -0
  117. package/coverage/lcov.info +1458 -0
  118. package/dist/runner.js +1 -1
  119. package/dist/translations/modules/backup_vehicle_usage.js +2 -2
  120. package/jest.config.json +17 -2
  121. package/lib/runner.ts +1 -1
  122. package/lib/translations/modules/backup_vehicle_usage.ts +2 -2
  123. package/package.json +4 -3
package/dist/runner.js CHANGED
@@ -94,7 +94,7 @@ class Locale {
94
94
  fitEnumValidOptions(detail) {
95
95
  if (detail.context && detail.context.valids && detail.context.key && detail.type === 'any.allowOnly') {
96
96
  const tableName = detail.message.split('.')[0].replace('"', '');
97
- if (tableName) {
97
+ if (tableName && TRANSLATIONS[tableName]) {
98
98
  detail.context.valids = Object.keys(TRANSLATIONS[tableName].enums[detail.context.key]).map(key => {
99
99
  return this.reach(TRANSLATIONS[tableName].enums[detail.context.key][key], detail.context);
100
100
  }).join(', ');
@@ -47,8 +47,8 @@ exports.messages = {
47
47
  es: 'El vehículo de respaldo debe estar activo en la fecha de inicio ingresada. {{backup_vehicle}} fue deshabilitado en {{deactivation_date}}.'
48
48
  },
49
49
  employee_must_be_active: {
50
- ptBR: 'O colaborador deve estar ativo na data de início informada. {{employee}} foi demitido em {{demission_date}}.',
51
- es: 'El colaborador debe estar activo en la fecha de inicio ingresada. {{employee}} fue despedido en {{demission_date}}.'
50
+ ptBR: 'O colaborador deve estar ativo no período informado. {{employee}} foi demitido em {{demission_date}}.',
51
+ es: 'El colaborador debe estar activo en el período informado. {{employee}} fue despedido en {{demission_date}}.'
52
52
  },
53
53
  backup_vehicle_already_in_use: {
54
54
  ptBR: 'Não é possível salvar a utilização, pois o veículo reserva está em uso desde {{start_date}}, substituindo o veículo {{vehicle}}.',
package/jest.config.json CHANGED
@@ -10,8 +10,9 @@
10
10
  [
11
11
  "jest-junit",
12
12
  {
13
- "suiteName": "Sofit view locale tests",
14
- "output":"./coverage/jest/results.xml"
13
+ "suiteName": "Sofit View Locale tests",
14
+ "outputDirectory": "./coverage/jest",
15
+ "outputName": "results.xml"
15
16
  }
16
17
  ]
17
18
  ],
@@ -23,5 +24,19 @@
23
24
  "jsx",
24
25
  "json",
25
26
  "node"
27
+ ],
28
+ "collectCoverage": true,
29
+ "coverageDirectory": "<rootDir>/coverage",
30
+ "collectCoverageFrom": [
31
+ "lib/**",
32
+ "!src/translations/**"
33
+ ],
34
+ "coveragePathIgnorePatterns": [
35
+ "/node_modules/",
36
+ "/dist/"
37
+ ],
38
+ "coverageReporters": [
39
+ "text-summary",
40
+ "lcov"
26
41
  ]
27
42
  }
package/lib/runner.ts CHANGED
@@ -139,7 +139,7 @@ export class Locale {
139
139
 
140
140
  const tableName = detail.message.split('.')[0].replace('"', '');
141
141
 
142
- if (tableName) {
142
+ if (tableName && TRANSLATIONS[tableName]) {
143
143
 
144
144
  detail.context.valids = Object.keys(TRANSLATIONS[tableName].enums[detail.context.key]).map(key => {
145
145
 
@@ -59,8 +59,8 @@ export const messages = {
59
59
  es: 'El vehículo de respaldo debe estar activo en la fecha de inicio ingresada. {{backup_vehicle}} fue deshabilitado en {{deactivation_date}}.'
60
60
  },
61
61
  employee_must_be_active: {
62
- ptBR: 'O colaborador deve estar ativo na data de início informada. {{employee}} foi demitido em {{demission_date}}.',
63
- es: 'El colaborador debe estar activo en la fecha de inicio ingresada. {{employee}} fue despedido en {{demission_date}}.'
62
+ ptBR: 'O colaborador deve estar ativo no período informado. {{employee}} foi demitido em {{demission_date}}.',
63
+ es: 'El colaborador debe estar activo en el período informado. {{employee}} fue despedido en {{demission_date}}.'
64
64
  },
65
65
  backup_vehicle_already_in_use: {
66
66
  ptBR: 'Não é possível salvar a utilização, pois o veículo reserva está em uso desde {{start_date}}, substituindo o veículo {{vehicle}}.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sofit/view-locale",
3
- "version": "1.111.0",
3
+ "version": "1.112.0",
4
4
  "description": "Traduções do Sofit View",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,8 +20,9 @@
20
20
  "node": "12.18.0"
21
21
  },
22
22
  "dependencies": {
23
- "typescript": "^3.9.3",
24
- "@types/node": "^14.0.6"
23
+ "@types/node": "^14.0.6",
24
+ "coveralls": "^3.1.0",
25
+ "typescript": "^3.9.3"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@sofit/tslint-rules": "^2.2.0",