@hedia/recommendation-screen 1.8.2 → 2.0.2

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 (283) hide show
  1. package/.github/workflows/ci.yml +0 -0
  2. package/.github/workflows/publish.yml +48 -0
  3. package/.github/workflows/version-check.yml +45 -0
  4. package/.linguirc +0 -0
  5. package/.npmpackagejsonlintrc.json +0 -0
  6. package/.prettierignore +0 -0
  7. package/.prettierrc +0 -0
  8. package/App.d.ts +4 -5
  9. package/App.jsx +23 -34
  10. package/App.tsx +36 -41
  11. package/Changelog.md +0 -0
  12. package/README.md +0 -0
  13. package/android/app/BUCK +0 -0
  14. package/android/app/build.gradle +0 -0
  15. package/android/app/build_defs.bzl +0 -0
  16. package/android/app/debug.keystore +0 -0
  17. package/android/app/proguard-rules.pro +0 -0
  18. package/android/app/src/debug/AndroidManifest.xml +0 -0
  19. package/android/app/src/debug/java/com/hediarecommendationscreen/ReactNativeFlipper.java +0 -0
  20. package/android/app/src/main/AndroidManifest.xml +0 -0
  21. package/android/app/src/main/assets/fonts/AntDesign.ttf +0 -0
  22. package/android/app/src/main/assets/fonts/Entypo.ttf +0 -0
  23. package/android/app/src/main/assets/fonts/EvilIcons.ttf +0 -0
  24. package/android/app/src/main/assets/fonts/Feather.ttf +0 -0
  25. package/android/app/src/main/assets/fonts/FontAwesome.ttf +0 -0
  26. package/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf +0 -0
  27. package/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf +0 -0
  28. package/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf +0 -0
  29. package/android/app/src/main/assets/fonts/Foundation.ttf +0 -0
  30. package/android/app/src/main/assets/fonts/Ionicons.ttf +0 -0
  31. package/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf +0 -0
  32. package/android/app/src/main/assets/fonts/MaterialIcons.ttf +0 -0
  33. package/android/app/src/main/assets/fonts/Octicons.ttf +0 -0
  34. package/android/app/src/main/assets/fonts/Roboto-Black.ttf +0 -0
  35. package/android/app/src/main/assets/fonts/Roboto-BlackItalic.ttf +0 -0
  36. package/android/app/src/main/assets/fonts/Roboto-Bold.ttf +0 -0
  37. package/android/app/src/main/assets/fonts/Roboto-BoldItalic.ttf +0 -0
  38. package/android/app/src/main/assets/fonts/Roboto-Italic.ttf +0 -0
  39. package/android/app/src/main/assets/fonts/Roboto-Light.ttf +0 -0
  40. package/android/app/src/main/assets/fonts/Roboto-LightItalic.ttf +0 -0
  41. package/android/app/src/main/assets/fonts/Roboto-Medium.ttf +0 -0
  42. package/android/app/src/main/assets/fonts/Roboto-MediumItalic.ttf +0 -0
  43. package/android/app/src/main/assets/fonts/Roboto-Regular.ttf +0 -0
  44. package/android/app/src/main/assets/fonts/Roboto-Thin.ttf +0 -0
  45. package/android/app/src/main/assets/fonts/Roboto-ThinItalic.ttf +0 -0
  46. package/android/app/src/main/assets/fonts/SimpleLineIcons.ttf +0 -0
  47. package/android/app/src/main/assets/fonts/Zocial.ttf +0 -0
  48. package/android/app/src/main/java/com/hediarecommendationscreen/MainActivity.java +0 -0
  49. package/android/app/src/main/java/com/hediarecommendationscreen/MainApplication.java +0 -0
  50. package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  51. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  52. package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  53. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  54. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  55. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  56. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  57. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  58. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  59. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  60. package/android/app/src/main/res/values/color.xml +0 -0
  61. package/android/app/src/main/res/values/strings.xml +0 -0
  62. package/android/app/src/main/res/values/styles.xml +0 -0
  63. package/android/build.gradle +0 -0
  64. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  65. package/android/gradle/wrapper/gradle-wrapper.properties +0 -0
  66. package/android/gradle.properties +0 -0
  67. package/android/gradlew.bat +0 -0
  68. package/android/settings.gradle +0 -0
  69. package/app.json +0 -0
  70. package/assets/fonts/Roboto/LICENSE.txt +0 -0
  71. package/assets/fonts/Roboto/Roboto-Black.ttf +0 -0
  72. package/assets/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  73. package/assets/fonts/Roboto/Roboto-Bold.ttf +0 -0
  74. package/assets/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  75. package/assets/fonts/Roboto/Roboto-Italic.ttf +0 -0
  76. package/assets/fonts/Roboto/Roboto-Light.ttf +0 -0
  77. package/assets/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  78. package/assets/fonts/Roboto/Roboto-Medium.ttf +0 -0
  79. package/assets/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  80. package/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
  81. package/assets/fonts/Roboto/Roboto-Thin.ttf +0 -0
  82. package/assets/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  83. package/babel.config.js +0 -0
  84. package/ignore-git.sh +1 -1
  85. package/ignore-publish.sh +2 -1
  86. package/index.d.ts +2 -2
  87. package/index.js +2 -3
  88. package/index.ts +2 -2
  89. package/ios/HediaRecommendationScreen/AppDelegate.h +0 -0
  90. package/ios/HediaRecommendationScreen/AppDelegate.m +0 -0
  91. package/ios/HediaRecommendationScreen/Base.lproj/LaunchScreen.xib +0 -0
  92. package/ios/HediaRecommendationScreen/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
  93. package/ios/HediaRecommendationScreen/Images.xcassets/Contents.json +0 -0
  94. package/ios/HediaRecommendationScreen/Info.plist +0 -0
  95. package/ios/HediaRecommendationScreen/main.m +0 -0
  96. package/ios/HediaRecommendationScreen-tvOS/Info.plist +0 -0
  97. package/ios/HediaRecommendationScreen-tvOSTests/Info.plist +0 -0
  98. package/ios/HediaRecommendationScreen.xcodeproj/project.pbxproj +0 -0
  99. package/ios/HediaRecommendationScreen.xcodeproj/xcshareddata/xcschemes/HediaRecommendationScreen-tvOS.xcscheme +0 -0
  100. package/ios/HediaRecommendationScreen.xcodeproj/xcshareddata/xcschemes/HediaRecommendationScreen.xcscheme +0 -0
  101. package/ios/HediaRecommendationScreen.xcworkspace/contents.xcworkspacedata +0 -0
  102. package/ios/HediaRecommendationScreen.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  103. package/ios/HediaRecommendationScreenTests/HediaRecommendationScreenTests.m +0 -0
  104. package/ios/HediaRecommendationScreenTests/Info.plist +0 -0
  105. package/ios/Podfile +0 -0
  106. package/ios/Podfile.lock +0 -0
  107. package/jest.config.js +0 -0
  108. package/jest.mock.js +0 -0
  109. package/metro.config.js +0 -0
  110. package/package.json +8 -10
  111. package/react-native.config.js +0 -0
  112. package/src/RecommendationScreen.d.ts +18 -20
  113. package/src/RecommendationScreen.jsx +26 -15
  114. package/src/RecommendationScreen.tsx +60 -37
  115. package/src/__tests__/RecommendationScreen.test.d.ts +0 -0
  116. package/src/__tests__/RecommendationScreen.test.jsx +163 -138
  117. package/src/__tests__/RecommendationScreen.test.tsx +256 -159
  118. package/src/__tests__/RecommendationUtils.test.d.ts +0 -0
  119. package/src/__tests__/RecommendationUtils.test.js +30 -39
  120. package/src/__tests__/RecommendationUtils.test.ts +38 -43
  121. package/src/__tests__/Translate.test.d.ts +0 -0
  122. package/src/__tests__/Translate.test.jsx +13 -12
  123. package/src/__tests__/Translate.test.tsx +15 -14
  124. package/src/__tests__/Utils.test.d.ts +0 -0
  125. package/src/__tests__/Utils.test.js +22 -20
  126. package/src/__tests__/Utils.test.ts +32 -21
  127. package/src/__tests__/Validations.test.d.ts +0 -0
  128. package/src/__tests__/Validations.test.js +59 -33
  129. package/src/__tests__/Validations.test.ts +83 -41
  130. package/src/__tests__/components/Activity.test.d.ts +0 -0
  131. package/src/__tests__/components/Activity.test.jsx +39 -18
  132. package/src/__tests__/components/Activity.test.tsx +99 -45
  133. package/src/__tests__/components/Emotion.test.d.ts +0 -0
  134. package/src/__tests__/components/Emotion.test.jsx +34 -25
  135. package/src/__tests__/components/Emotion.test.tsx +41 -24
  136. package/src/__tests__/components/Header.test.d.ts +0 -0
  137. package/src/__tests__/components/Header.test.jsx +10 -9
  138. package/src/__tests__/components/Header.test.tsx +12 -11
  139. package/src/__tests__/components/InfoBars.test.d.ts +0 -0
  140. package/src/__tests__/components/InfoBars.test.jsx +1 -0
  141. package/src/__tests__/components/InfoBars.test.tsx +7 -6
  142. package/src/__tests__/components/InvisibleNumberInput.test.d.ts +0 -0
  143. package/src/__tests__/components/InvisibleNumberInput.test.jsx +40 -24
  144. package/src/__tests__/components/InvisibleNumberInput.test.tsx +41 -17
  145. package/src/__tests__/components/LimitationMessage.test.d.ts +0 -0
  146. package/src/__tests__/components/LimitationMessage.test.jsx +11 -30
  147. package/src/__tests__/components/LimitationMessage.test.tsx +15 -13
  148. package/src/__tests__/components/MoodIcon.test.d.ts +0 -0
  149. package/src/__tests__/components/MoodIcon.test.jsx +12 -8
  150. package/src/__tests__/components/MoodIcon.test.tsx +13 -5
  151. package/src/__tests__/components/RecommendationModal.test.d.ts +0 -0
  152. package/src/__tests__/components/RecommendationModal.test.jsx +22 -21
  153. package/src/__tests__/components/RecommendationModal.test.tsx +29 -27
  154. package/src/__tests__/components/RecommendedCarbs.test.d.ts +0 -0
  155. package/src/__tests__/components/RecommendedCarbs.test.jsx +7 -10
  156. package/src/__tests__/components/RecommendedCarbs.test.tsx +9 -10
  157. package/src/__tests__/components/RecommendedInsulin.test.d.ts +0 -0
  158. package/src/__tests__/components/RecommendedInsulin.test.jsx +57 -41
  159. package/src/__tests__/components/RecommendedInsulin.test.tsx +57 -31
  160. package/src/__tests__/components/Remeasure.test.d.ts +0 -0
  161. package/src/__tests__/components/Remeasure.test.jsx +7 -3
  162. package/src/__tests__/components/Remeasure.test.tsx +11 -3
  163. package/src/__tests__/components/TransferToLogbook.test.d.ts +0 -0
  164. package/src/__tests__/components/TransferToLogbook.test.jsx +2 -2
  165. package/src/__tests__/components/TransferToLogbook.test.tsx +2 -2
  166. package/src/__tests__/components/TwoOptionModal.test.d.ts +0 -0
  167. package/src/__tests__/components/TwoOptionModal.test.jsx +5 -4
  168. package/src/__tests__/components/TwoOptionModal.test.tsx +6 -4
  169. package/src/__tests__/utils.d.ts +7 -2
  170. package/src/__tests__/utils.jsx +59 -15
  171. package/src/__tests__/utils.tsx +63 -16
  172. package/src/assets/activity/Cyclist.png +0 -0
  173. package/src/assets/activity/Other.png +0 -0
  174. package/src/assets/activity/Runner.png +0 -0
  175. package/src/assets/activity/Swimmer.png +0 -0
  176. package/src/assets/activity/Walk.png +0 -0
  177. package/src/assets/mood/happy.png +0 -0
  178. package/src/assets/mood/happy_active.png +0 -0
  179. package/src/assets/mood/neutral.png +0 -0
  180. package/src/assets/mood/neutral_active.png +0 -0
  181. package/src/assets/mood/sad.png +0 -0
  182. package/src/assets/mood/sad_active.png +0 -0
  183. package/src/assets/mood/semi_happy.png +0 -0
  184. package/src/assets/mood/semi_happy_active.png +0 -0
  185. package/src/assets/mood/semi_sad.png +0 -0
  186. package/src/assets/mood/semi_sad_active.png +0 -0
  187. package/src/components/Header.d.ts +0 -0
  188. package/src/components/Header.jsx +2 -1
  189. package/src/components/Header.tsx +2 -1
  190. package/src/components/Icon.js +0 -0
  191. package/src/components/InfoBars.d.ts +1 -1
  192. package/src/components/InfoBars.jsx +0 -0
  193. package/src/components/InfoBars.tsx +1 -1
  194. package/src/components/InvisibleNumberInput.d.ts +2 -1
  195. package/src/components/InvisibleNumberInput.jsx +7 -2
  196. package/src/components/InvisibleNumberInput.tsx +10 -3
  197. package/src/components/LimitationMessage.d.ts +1 -1
  198. package/src/components/LimitationMessage.jsx +3 -2
  199. package/src/components/LimitationMessage.tsx +3 -1
  200. package/src/components/LineSeparator.d.ts +0 -0
  201. package/src/components/LineSeparator.jsx +0 -0
  202. package/src/components/LineSeparator.tsx +0 -0
  203. package/src/components/RecentInsulin.d.ts +0 -0
  204. package/src/components/RecentInsulin.jsx +3 -2
  205. package/src/components/RecentInsulin.tsx +3 -0
  206. package/src/components/RecommendationModal.d.ts +4 -4
  207. package/src/components/RecommendationModal.jsx +10 -9
  208. package/src/components/RecommendationModal.tsx +19 -8
  209. package/src/components/RecommendedCarbs.d.ts +4 -3
  210. package/src/components/RecommendedCarbs.jsx +12 -9
  211. package/src/components/RecommendedCarbs.tsx +31 -16
  212. package/src/components/RecommendedInsulin.d.ts +7 -7
  213. package/src/components/RecommendedInsulin.jsx +11 -7
  214. package/src/components/RecommendedInsulin.tsx +24 -12
  215. package/src/components/Remeasure.d.ts +2 -2
  216. package/src/components/Remeasure.jsx +7 -2
  217. package/src/components/Remeasure.tsx +10 -4
  218. package/src/components/TransferToLogbook.d.ts +0 -0
  219. package/src/components/TransferToLogbook.jsx +2 -1
  220. package/src/components/TransferToLogbook.tsx +2 -0
  221. package/src/components/TwoOptionModal.d.ts +5 -3
  222. package/src/components/TwoOptionModal.jsx +44 -13
  223. package/src/components/TwoOptionModal.tsx +50 -14
  224. package/src/components/activity/Activity.d.ts +2 -3
  225. package/src/components/activity/Activity.jsx +5 -2
  226. package/src/components/activity/Activity.tsx +7 -5
  227. package/src/components/activity/ActivityIcon.d.ts +1 -1
  228. package/src/components/activity/ActivityIcon.jsx +9 -8
  229. package/src/components/activity/ActivityIcon.tsx +12 -10
  230. package/src/components/activity/ActivityIntensity.d.ts +1 -1
  231. package/src/components/activity/ActivityIntensity.jsx +2 -8
  232. package/src/components/activity/ActivityIntensity.tsx +3 -12
  233. package/src/components/mood/Emotion.d.ts +5 -4
  234. package/src/components/mood/Emotion.jsx +4 -3
  235. package/src/components/mood/Emotion.tsx +9 -7
  236. package/src/components/mood/MoodIcon.d.ts +2 -2
  237. package/src/components/mood/MoodIcon.jsx +3 -2
  238. package/src/components/mood/MoodIcon.tsx +4 -2
  239. package/src/locale/CleanLanguage.ts +0 -0
  240. package/src/locale/da/messages.js +1 -1
  241. package/src/locale/da/messages.po +115 -107
  242. package/src/locale/de/messages.js +1 -1
  243. package/src/locale/de/messages.po +115 -107
  244. package/src/locale/en/messages.js +1 -1
  245. package/src/locale/en/messages.po +118 -110
  246. package/src/locale/es/messages.js +1 -1
  247. package/src/locale/es/messages.po +112 -104
  248. package/src/locale/fr/messages.js +1 -1
  249. package/src/locale/fr/messages.po +111 -103
  250. package/src/locale/i18nUtils.d.ts +3 -4
  251. package/src/locale/i18nUtils.js +13 -12
  252. package/src/locale/i18nUtils.ts +14 -14
  253. package/src/locale/it/messages.js +1 -1
  254. package/src/locale/it/messages.po +113 -105
  255. package/src/types/enum.d.ts +52 -44
  256. package/src/types/enum.js +67 -56
  257. package/src/types/enum.ts +58 -34
  258. package/src/types/types.d.ts +9 -23
  259. package/src/types/types.js +0 -0
  260. package/src/types/types.ts +9 -25
  261. package/src/utils/AttentionMessages.d.ts +1 -4
  262. package/src/utils/AttentionMessages.jsx +8 -30
  263. package/src/utils/AttentionMessages.tsx +11 -16
  264. package/src/utils/Constants.d.ts +0 -0
  265. package/src/utils/Constants.js +0 -0
  266. package/src/utils/Constants.ts +0 -0
  267. package/src/utils/RecommendationError.d.ts +2 -0
  268. package/src/utils/RecommendationError.jsx +45 -40
  269. package/src/utils/RecommendationError.tsx +17 -4
  270. package/src/utils/RecommendationUtils.d.ts +7 -8
  271. package/src/utils/RecommendationUtils.js +15 -7
  272. package/src/utils/RecommendationUtils.ts +24 -14
  273. package/src/utils/Translations.d.ts +2 -0
  274. package/src/utils/Translations.js +10 -0
  275. package/src/utils/Translations.ts +9 -0
  276. package/src/utils/Utils.d.ts +4 -5
  277. package/src/utils/Utils.js +6 -5
  278. package/src/utils/Utils.ts +10 -8
  279. package/src/utils/Validations.d.ts +10 -9
  280. package/src/utils/Validations.js +61 -65
  281. package/src/utils/Validations.ts +76 -81
  282. package/tsconfig.json +2 -2
  283. package/tslint.json +0 -0
@@ -13,325 +13,333 @@ msgstr ""
13
13
  "Language-Team: \n"
14
14
  "Plural-Forms: \n"
15
15
 
16
- #: src/RecommendationScreen.tsx:182
16
+ #: src/RecommendationScreen.tsx:195
17
17
  msgid "Active Insulin"
18
18
  msgstr "Insuline active"
19
19
 
20
- #: src/components/activity/Activity.tsx:17
20
+ #: src/components/activity/Activity.tsx:18
21
21
  msgid "Activity"
22
22
  msgstr "Activité"
23
23
 
24
- #: src/components/RecommendedCarbs.tsx:55
24
+ #: src/components/RecommendedCarbs.tsx:56
25
25
  msgid "Additional"
26
26
  msgstr "Supplémentaire"
27
27
 
28
- #: src/components/LimitationMessage.tsx:14
29
- #: src/components/RecommendationModal.tsx:59
30
- #: src/components/RecommendedCarbs.tsx:30
31
- #: src/components/RecommendedInsulin.tsx:34
28
+ #: src/components/LimitationMessage.tsx:15
29
+ #: src/components/RecommendationModal.tsx:60
30
+ #: src/components/RecommendedCarbs.tsx:31
31
+ #: src/components/RecommendedInsulin.tsx:36
32
32
  msgid "Attention"
33
33
  msgstr "Attention"
34
34
 
35
- #: src/components/activity/Activity.tsx:32
35
+ #: src/components/activity/Activity.tsx:33
36
36
  msgid "Based on the selected activity your insulin recommendation is reduced by:"
37
37
  msgstr "Sur la base de l’activité sélectionnée, votre recommandation d’insuline est réduite de :"
38
38
 
39
- #: src/RecommendationScreen.tsx:183
39
+ #: src/RecommendationScreen.tsx:196
40
40
  msgid "Blood Glucose Level"
41
- msgstr "Glycémie"
41
+ msgstr "Taux de glycémie"
42
42
 
43
- #: src/RecommendationScreen.tsx:184
43
+ #: src/RecommendationScreen.tsx:197
44
44
  msgid "Blood Ketone Level"
45
45
  msgstr "Taux de cétonémie"
46
46
 
47
- #: src/components/RecommendedCarbs.tsx:105
47
+ #: src/components/RecommendedCarbs.tsx:108
48
48
  msgid "Carbohydrates"
49
49
  msgstr "Glucides"
50
50
 
51
- #: src/RecommendationScreen.tsx:206
51
+ #: src/RecommendationScreen.tsx:217
52
52
  msgid "Close calculation"
53
53
  msgstr "Fermer le calcul"
54
54
 
55
- #: src/utils/AttentionMessages.tsx:30
55
+ #: src/utils/AttentionMessages.tsx:27
56
56
  msgid "Consider not to initiate physical activity before your blood glucose level is within the recommended ranges prior to physical activity."
57
57
  msgstr "Envisagez de ne pas commencer d’activité physique avant que votre taux de glycémie ne soit dans la plage recommandée avant l’activité physique."
58
58
 
59
- #: src/components/RecommendedCarbs.tsx:108
59
+ #: src/components/RecommendedCarbs.tsx:111
60
60
  msgid "Entered"
61
61
  msgstr "Saisi"
62
62
 
63
- #: src/utils/RecommendationError.tsx:23
64
- msgid "Error. Hedia Calculator does not support an insulin dose greater than {0} units"
65
- msgstr "Erreur. La calculatrice Hedia ne prend pas en charge une dose d’insuline supérieure à {0} unités"
63
+ #: src/utils/RecommendationError.tsx:27
64
+ msgid "Error. Hedia Calculator could not find your recent boluses"
65
+ msgstr ""
66
66
 
67
- #: src/utils/RecommendationError.tsx:24
67
+ #: src/utils/RecommendationError.tsx:25
68
+ msgid "Error. Hedia Calculator does not support an insulin dose greater than {SAFETY_INSULIN_LIMIT} units"
69
+ msgstr "Erreur. La calculatrice Hedia ne prend pas en charge une dose d’insuline supérieure à {SAFETY_INSULIN_LIMIT} unités"
70
+
71
+ #: src/utils/RecommendationError.tsx:26
68
72
  msgid "Error. Hedia Calculator does not support insulin recommendations with boluses older than 4 hours"
69
73
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge des recommandations d’insuline avec des bolus plus anciens que 4 heures"
70
74
 
71
- #: src/utils/RecommendationError.tsx:14
75
+ #: src/utils/RecommendationError.tsx:22
76
+ msgid "Error. Hedia Calculator does not support the blood glucose level of your latest logbook entry from the last 6 hours."
77
+ msgstr ""
78
+
79
+ #: src/utils/RecommendationError.tsx:15
72
80
  msgid "Error. Hedia Calculator does not support your activity intensity value"
73
81
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre valeur d’intensité d’activité"
74
82
 
75
- #: src/utils/RecommendationError.tsx:15
83
+ #: src/utils/RecommendationError.tsx:16
76
84
  msgid "Error. Hedia Calculator does not support your activity type value"
77
85
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre valeur de type d’activité"
78
86
 
79
- #: src/utils/RecommendationError.tsx:20
87
+ #: src/utils/RecommendationError.tsx:21
80
88
  msgid "Error. Hedia Calculator does not support your current blood glucose level."
81
- msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre glycémie actuelle."
89
+ msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre taux de glycémie actuel."
82
90
 
83
- #: src/utils/RecommendationError.tsx:29
91
+ #: src/utils/RecommendationError.tsx:32
84
92
  msgid "Error. Hedia Calculator does not support your current blood glucose unit."
85
93
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre unité de glycémie actuelle."
86
94
 
87
- #: src/utils/RecommendationError.tsx:21
95
+ #: src/utils/RecommendationError.tsx:23
88
96
  msgid "Error. Hedia Calculator does not support your current blood ketone level."
89
97
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre taux de cétonémie actuel."
90
98
 
91
- #: src/utils/RecommendationError.tsx:28
99
+ #: src/utils/RecommendationError.tsx:31
92
100
  msgid "Error. Hedia Calculator does not support your current blood ketone unit."
93
101
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre unité de cétonémie actuelle."
94
102
 
95
- #: src/utils/RecommendationError.tsx:27
103
+ #: src/utils/RecommendationError.tsx:30
96
104
  msgid "Error. Hedia Calculator does not support your current language."
97
105
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre langue actuelle."
98
106
 
99
- #: src/utils/RecommendationError.tsx:26
107
+ #: src/utils/RecommendationError.tsx:29
100
108
  msgid "Error. Hedia Calculator does not support your injection method."
101
109
  msgstr "Erreur. La calculatrice Hedia ne prend pas en charge votre méthode d’injection."
102
110
 
103
- #: src/utils/RecommendationError.tsx:12
111
+ #: src/utils/RecommendationError.tsx:13
104
112
  msgid "Error. Hedia Calculator only supports activities with a duration of maximum 60 minutes."
105
113
  msgstr "Erreur. La calculatrice Hedia ne prend en charge que des activités d’une durée maximale de 60 minutes."
106
114
 
107
- #: src/utils/RecommendationError.tsx:11
115
+ #: src/utils/RecommendationError.tsx:12
108
116
  msgid "Error. Please verify that your activity settings are set up correctly."
109
117
  msgstr "Erreur. Veuillez vérifier que vos paramètres d’activité sont correctement paramétrés."
110
118
 
111
- #: src/utils/RecommendationError.tsx:16
119
+ #: src/utils/RecommendationError.tsx:17
112
120
  msgid "Error. Please verify that your activity target blood glucose value is correct."
113
- msgstr "Erreur. Veuillez vérifier que votre glycémie désirée pendant l’activité est correct."
121
+ msgstr "Erreur. Veuillez vérifier que votre taux de glycémie cible d’activité est correct."
114
122
 
115
- #: src/utils/RecommendationError.tsx:18
123
+ #: src/utils/RecommendationError.tsx:19
116
124
  msgid "Error. Please verify that your insulin sensitivity value is correct."
117
125
  msgstr "Erreur. Veuillez vérifier que votre valeur de sensibilité à l’insuline est correcte."
118
126
 
119
- #: src/utils/RecommendationError.tsx:19
127
+ #: src/utils/RecommendationError.tsx:20
120
128
  msgid "Error. Please verify that your insulin to carb ratio value is correct."
121
129
  msgstr "Erreur. Veuillez vérifier que votre valeur de rapport insuline/glucides est correcte."
122
130
 
123
- #: src/utils/RecommendationError.tsx:22
131
+ #: src/utils/RecommendationError.tsx:24
124
132
  msgid "Error. Please verify that your target blood glucose value is correct."
125
- msgstr "Erreur. Veuillez vérifier que votre glycémie cible est correct."
133
+ msgstr "Erreur. Veuillez vérifier que votre taux de glycémie cible est correct."
126
134
 
127
- #: src/utils/RecommendationError.tsx:25
135
+ #: src/utils/RecommendationError.tsx:28
128
136
  msgid "Error. Please verify your notifications settings."
129
137
  msgstr "Erreur. Veuillez vérifier vos paramètres de notification."
130
138
 
131
- #: src/components/RecommendedCarbs.tsx:104
139
+ #: src/components/RecommendedCarbs.tsx:107
132
140
  msgid "Food"
133
141
  msgstr "Aliments"
134
142
 
135
- #: src/components/activity/ActivityIntensity.tsx:9
143
+ #: src/utils/Translations.ts:6
136
144
  msgid "Hard"
137
145
  msgstr "Difficile"
138
146
 
139
- #: src/components/RecentInsulin.tsx:16
147
+ #: src/components/RecentInsulin.tsx:17
140
148
  msgid "Have you taken insulin within the last 4 hours?"
141
149
  msgstr "Avez-vous pris de l’insuline au cours des 4 dernières heures ?"
142
150
 
143
- #: src/utils/RecommendationError.tsx:13
151
+ #: src/utils/RecommendationError.tsx:14
144
152
  msgid "Hedia Calculator does not support activities that finished more than 4 hours ago."
145
153
  msgstr "La calculatrice Hedia ne prend pas en charge des activités terminées il y a plus de 4 heures."
146
154
 
147
- #: src/utils/RecommendationError.tsx:17
155
+ #: src/utils/RecommendationError.tsx:18
148
156
  msgid "Hedia Calculator does not support insulin recommendations with more than 300 grams of carbohydrates present."
149
157
  msgstr "La calculatrice Hedia ne prend pas en charge des recommandations d’insuline avec plus de 300 grammes de glucides présents."
150
158
 
151
- #: src/utils/AttentionMessages.tsx:44
152
- msgid "Hedia does not support more than {0} units of insulin per calculation."
153
- msgstr "Hedia ne prend pas en charge plus de {0} unités d’insuline par calcul."
159
+ #: src/utils/AttentionMessages.tsx:41
160
+ msgid "Hedia does not support more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation."
161
+ msgstr "Hedia ne prend pas en charge plus de {SAFETY_INSULIN_LIMIT} unités d’insuline par calcul."
154
162
 
155
- #: src/utils/AttentionMessages.tsx:42
156
- msgid "Hedia doesn't support more than {0} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {1}% to {2} units for this calculation."
157
- msgstr "Hedia ne prend pas en charge plus de {0} unités d’insuline par calcul, mais en raison de l’activité physique que vous avez saisie, ce chiffre a été encore réduit de {1} % à {2} unités pour ce calcul."
163
+ #: src/utils/AttentionMessages.tsx:39
164
+ msgid "Hedia doesn't support more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {0}% to {1} units for this calculation."
165
+ msgstr "Hedia ne prend pas en charge plus de {SAFETY_INSULIN_LIMIT} unités d’insuline par calcul, mais en raison de l’activité physique que vous avez saisie, ce chiffre a été encore réduit de {0} % à {1} unités pour ce calcul."
158
166
 
159
- #: src/components/mood/Emotion.tsx:24
167
+ #: src/components/mood/Emotion.tsx:25
160
168
  msgid "How are you feeling?"
161
169
  msgstr "Comment vous sentez-vous ?"
162
170
 
163
- #: src/components/Header.tsx:23
171
+ #: src/components/Header.tsx:24
164
172
  msgid "INSULIN{0}RECOMMENDATION"
165
173
  msgstr "RECOMMANDATION{0}D’INSULINE"
166
174
 
167
- #: src/utils/AttentionMessages.tsx:29
175
+ #: src/utils/AttentionMessages.tsx:26
168
176
  msgid "If it is possible, postpone your planned exercise."
169
177
  msgstr "Si possible, reportez votre activité prévu."
170
178
 
171
- #: src/components/RecommendationModal.tsx:42
179
+ #: src/components/RecommendationModal.tsx:43
172
180
  msgid "Instead of taking insulin"
173
181
  msgstr "Au lieu de prendre de l’insuline"
174
182
 
175
- #: src/components/activity/ActivityIntensity.tsx:7
183
+ #: src/utils/Translations.ts:4
176
184
  msgid "Light"
177
185
  msgstr "Légère"
178
186
 
179
- #: src/components/activity/ActivityIntensity.tsx:8
187
+ #: src/utils/Translations.ts:5
180
188
  msgid "Moderate"
181
189
  msgstr "Modérée"
182
190
 
183
- #: src/utils/AttentionMessages.tsx:45
191
+ #: src/utils/AttentionMessages.tsx:42
184
192
  msgid "More than 15 minutes has passed since this calculation was started."
185
193
  msgstr "Plus de 15 minutes se sont écoulées depuis le début de ce calcul."
186
194
 
187
- #: src/components/RecommendationModal.tsx:22
195
+ #: src/components/RecommendationModal.tsx:23
188
196
  msgid "NO"
189
197
  msgstr "NON"
190
198
 
191
- #: src/components/RecentInsulin.tsx:25
199
+ #: src/components/RecentInsulin.tsx:26
192
200
  msgid "No"
193
201
  msgstr "Non"
194
202
 
195
- #: src/RecommendationScreen.tsx:210
203
+ #: src/RecommendationScreen.tsx:221
196
204
  msgid "No, return to dashboard"
197
205
  msgstr "Non, retour au tableau de bord"
198
206
 
199
- #: src/components/Remeasure.tsx:36
207
+ #: src/components/Remeasure.tsx:38
200
208
  msgid "OFF"
201
209
  msgstr "DÉSACTIVÉ"
202
210
 
203
- #: src/components/LimitationMessage.tsx:20
204
- #: src/components/RecommendationModal.tsx:19
205
- #: src/components/RecommendationModal.tsx:66
206
- #: src/components/RecommendedCarbs.tsx:32
207
- #: src/components/RecommendedInsulin.tsx:36
211
+ #: src/components/LimitationMessage.tsx:21
212
+ #: src/components/RecommendationModal.tsx:20
213
+ #: src/components/RecommendationModal.tsx:67
214
+ #: src/components/RecommendedCarbs.tsx:33
215
+ #: src/components/RecommendedInsulin.tsx:38
208
216
  msgid "OK"
209
217
  msgstr "OK"
210
218
 
211
- #: src/utils/AttentionMessages.tsx:46
219
+ #: src/utils/AttentionMessages.tsx:43
212
220
  msgid "Please go through the calculation steps with new measurements to ensure a safe recommendation."
213
221
  msgstr "Veuillez suivre les étapes de calcul avec de nouvelles mesures pour vous assurer d’obtenir une recommandation sûre."
214
222
 
215
- #: src/utils/AttentionMessages.tsx:50
223
+ #: src/utils/AttentionMessages.tsx:47
216
224
  msgid "Recommendation from {day} at {time} was not transfered to your logbook.{0}Did you use the recommendation?"
217
225
  msgstr "La recommandation du {day} à {time} n’a pas été transférée à votre journal de bord.{0}Avez-vous suivi la recommandation ?"
218
226
 
219
- #: src/components/RecommendedCarbs.tsx:50
227
+ #: src/components/RecommendedCarbs.tsx:51
220
228
  msgid "Recommended"
221
229
  msgstr "Recommandé"
222
230
 
223
- #: src/components/RecentInsulin.tsx:12
224
- #: src/components/RecommendedInsulin.tsx:52
231
+ #: src/components/RecentInsulin.tsx:13
232
+ #: src/components/RecommendedInsulin.tsx:54
225
233
  msgid "Recommended amount of insulin"
226
234
  msgstr "Dose recommandée d’insuline"
227
235
 
228
- #: src/components/Remeasure.tsx:32
236
+ #: src/components/Remeasure.tsx:34
229
237
  msgid "Remind me to remeasure in"
230
238
  msgstr "Rappelez-moi de mesurer ma glycémie dans"
231
239
 
232
- #: src/RecommendationScreen.tsx:210
240
+ #: src/RecommendationScreen.tsx:221
233
241
  msgid "Return to dashboard"
234
242
  msgstr "Retour au tableau de bord"
235
243
 
236
- #: src/RecommendationScreen.tsx:206
244
+ #: src/RecommendationScreen.tsx:217
237
245
  msgid "Save data before closing?"
238
246
  msgstr "Enregistrer les données avant de fermer ?"
239
247
 
240
- #: src/RecommendationScreen.tsx:206
248
+ #: src/RecommendationScreen.tsx:217
241
249
  msgid "Save to logbook"
242
250
  msgstr "Enregistrer dans le journal de bord"
243
251
 
244
- #: src/RecommendationScreen.tsx:210
252
+ #: src/RecommendationScreen.tsx:221
245
253
  msgid "Start new calculation"
246
254
  msgstr "Commencer un nouveau calcul"
247
255
 
248
- #: src/components/RecommendedCarbs.tsx:77
256
+ #: src/components/RecommendedCarbs.tsx:78
249
257
  msgid "Total"
250
258
  msgstr "Total"
251
259
 
252
- #: src/components/TransferToLogbook.tsx:25
260
+ #: src/components/TransferToLogbook.tsx:26
253
261
  msgid "Transfer to logbook"
254
262
  msgstr "Transfert au journal de bord"
255
263
 
256
- #: src/components/TransferToLogbook.tsx:28
264
+ #: src/components/TransferToLogbook.tsx:29
257
265
  msgid "Transferred to logbook"
258
266
  msgstr "Transféré au journal de bord"
259
267
 
260
- #: src/components/RecommendedInsulin.tsx:58
268
+ #: src/components/RecommendedInsulin.tsx:62
261
269
  msgid "Units"
262
270
  msgstr "Unités"
263
271
 
264
- #: src/components/activity/ActivityIcon.tsx:25
272
+ #: src/components/activity/ActivityIcon.tsx:27
265
273
  msgid "Untitled Activity"
266
274
  msgstr "Activité sans titre"
267
275
 
268
- #: src/components/RecommendationModal.tsx:32
276
+ #: src/components/RecommendationModal.tsx:33
269
277
  msgid "We recommend eating an additional:"
270
278
  msgstr "Nous vous recommandons de manger en plus :"
271
279
 
272
- #: src/components/RecommendationModal.tsx:47
280
+ #: src/components/RecommendationModal.tsx:48
273
281
  msgid "Would you like to add this to your current calculation?"
274
282
  msgstr "Souhaitez-vous ajouter cela à votre calcul actuel ?"
275
283
 
276
- #: src/components/RecentInsulin.tsx:22
284
+ #: src/components/RecentInsulin.tsx:23
277
285
  msgid "Yes"
278
286
  msgstr "Oui"
279
287
 
280
- #: src/RecommendationScreen.tsx:210
288
+ #: src/RecommendationScreen.tsx:221
281
289
  msgid "Yes, save to logbook"
282
290
  msgstr "Oui, enregistrer dans le journal de bord"
283
291
 
284
- #: src/utils/AttentionMessages.tsx:31
292
+ #: src/utils/AttentionMessages.tsx:28
285
293
  msgid "You have a high blood glucose level."
286
294
  msgstr "Vous avez une valeur de glycémie élevée."
287
295
 
288
- #: src/utils/AttentionMessages.tsx:32
296
+ #: src/utils/AttentionMessages.tsx:29
289
297
  msgid "You should take rapid-acting insulin and measure ketones."
290
298
  msgstr "Vous devriez prendre de l’insuline à action rapide et mesurer les cétones."
291
299
 
292
- #: src/utils/AttentionMessages.tsx:28
300
+ #: src/utils/AttentionMessages.tsx:25
293
301
  msgid "You will be reminded to measure your blood glucose level in 15 min."
294
302
  msgstr "Il vous sera rappelé de mesurer votre valeur de glycémie dans 15 mn."
295
303
 
296
- #: src/utils/AttentionMessages.tsx:27
304
+ #: src/utils/AttentionMessages.tsx:24
297
305
  msgid "Your blood glucose level is very low."
298
306
  msgstr "Votre valeur de glycémie est très faible."
299
307
 
300
- #: src/utils/AttentionMessages.tsx:26
308
+ #: src/utils/AttentionMessages.tsx:23
301
309
  msgid "Your blood glucose level is very low. Take glucagon or eat carbohydrates if possible. Seek medical attention."
302
- msgstr "Votre valeur de glycémie est très faible. Prenez du glucagon ou mangez des glucides si possible. Consultez un médecin."
310
+ msgstr "Votre taux de glycémie est très faible. Prenez du glucagon ou mangez des glucides si possible. Consultez un médecin."
303
311
 
304
- #: src/utils/AttentionMessages.tsx:33
305
- msgid "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons. Hedia never recommends more than {1} units of insulin per calculation."
306
- msgstr "Votre recommandation aurait été supérieure à {0} unités d’insuline, mais elle a été limitée pour des raisons de sécurité. Hedia ne recommande jamais plus de {1} unités d’insuline par calcul."
312
+ #: src/utils/AttentionMessages.tsx:32
313
+ msgid "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons.{1} Hedia never recommends more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {2}% to {3}."
314
+ msgstr "Votre recommandation aurait été supérieure à {0} unités d’insuline, mais elle a été limitée pour des raisons de sécurité.{1} Hedia ne recommande jamais plus de {SAFETY_INSULIN_LIMIT} unités d’insuline par calcul, mais en raison de l’activité physique saisie, elle a été réduite de {2}% à {3}."
307
315
 
308
- #: src/utils/AttentionMessages.tsx:35
309
- msgid "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons.{1} Hedia never recommends more than {2} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {3}% to {4}."
310
- msgstr "Votre recommandation aurait été supérieure à {0} unités d’insuline, mais elle a été limitée pour des raisons de sécurité.{1} Hedia ne recommande jamais plus de {2} unités d’insuline par calcul, mais en raison de l’activité physique saisie, elle a été réduite de {3}% à {4}."
316
+ #: src/utils/AttentionMessages.tsx:30
317
+ msgid "Your recommendation would have been higher than {SAFETY_INSULIN_LIMIT} units of insulin, but it has been limited for safety reasons. Hedia never recommends more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation."
318
+ msgstr "Votre recommandation aurait été supérieure à {SAFETY_INSULIN_LIMIT} unités d’insuline, mais elle a été limitée pour des raisons de sécurité. Hedia ne recommande jamais plus de {SAFETY_INSULIN_LIMIT} unités d’insuline par calcul."
311
319
 
312
- #: src/RecommendationScreen.tsx:206
320
+ #: src/RecommendationScreen.tsx:217
313
321
  msgid "Your saved data will be used for future calculations."
314
322
  msgstr "Vos données enregistrées seront utilisées pour des calculs ultérieurs."
315
323
 
316
- #: src/components/RecommendedCarbs.tsx:69
317
- #: src/components/RecommendedCarbs.tsx:79
318
- #: src/components/RecommendedCarbs.tsx:110
324
+ #: src/components/RecommendedCarbs.tsx:70
325
+ #: src/components/RecommendedCarbs.tsx:80
326
+ #: src/components/RecommendedCarbs.tsx:113
319
327
  msgid "grams"
320
328
  msgstr "grammes"
321
329
 
322
- #: src/components/RecommendationModal.tsx:38
330
+ #: src/components/RecommendationModal.tsx:39
323
331
  msgid "grams of carbohydrates"
324
332
  msgstr "grammes de glucides"
325
333
 
326
- #: src/components/Remeasure.tsx:39
334
+ #: src/components/Remeasure.tsx:41
327
335
  msgid "hours"
328
336
  msgstr "heures"
329
337
 
330
- #: src/components/activity/Activity.tsx:24
338
+ #: src/components/activity/Activity.tsx:25
331
339
  msgid "min"
332
340
  msgstr "min"
333
341
 
334
342
  #: src/components/InfoBars.tsx:19
335
- #: src/RecommendationScreen.tsx:182
343
+ #: src/RecommendationScreen.tsx:195
336
344
  msgid "units"
337
345
  msgstr "unités"
@@ -1,6 +1,5 @@
1
- import { Catalogs, I18n } from "@lingui/core";
1
+ import { Languages } from "@hedia/types";
2
+ import { I18n } from "@lingui/core";
2
3
  import "moment/min/locales";
3
- import { Language } from "../types/enum.js";
4
- export declare const languageCatalogs: Catalogs;
5
4
  export declare const i18n: I18n;
6
- export declare function changeLanguage(language: Language): I18n;
5
+ export declare function changeLanguage(language: Languages): I18n;
@@ -3,27 +3,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.changeLanguage = exports.i18n = exports.languageCatalogs = void 0;
6
+ exports.changeLanguage = exports.i18n = void 0;
7
+ const types_1 = require("@hedia/types");
7
8
  const core_1 = require("@lingui/core");
8
9
  const moment_1 = __importDefault(require("moment"));
9
10
  // tslint:disable-next-line:no-import-side-effect
10
11
  require("moment/min/locales");
11
- exports.languageCatalogs = {
12
- da: require(`./da/messages.js`),
13
- en: require(`./en/messages.js`),
14
- de: require(`./de/messages.js`),
15
- es: require(`./es/messages.js`),
16
- fr: require(`./fr/messages.js`),
17
- it: require(`./it/messages.js`),
12
+ const languageMap = {
13
+ [types_1.Languages.da]: require(`./da/messages.js`),
14
+ [types_1.Languages.en]: require(`./en/messages.js`),
15
+ [types_1.Languages.de]: require(`./de/messages.js`),
16
+ [types_1.Languages.es]: require(`./es/messages.js`),
17
+ [types_1.Languages.fr]: require(`./fr/messages.js`),
18
+ [types_1.Languages.it]: require(`./it/messages.js`),
18
19
  };
19
20
  exports.i18n = core_1.setupI18n({
20
- language: `en`,
21
- catalogs: exports.languageCatalogs,
21
+ language: types_1.Languages.en,
22
+ catalogs: languageMap,
22
23
  });
23
24
  function changeLanguage(language) {
24
- exports.languageCatalogs[language] ? exports.i18n.activate(language) : exports.i18n.activate(`en`);
25
+ languageMap[language] ? exports.i18n.activate(language) : exports.i18n.activate(types_1.Languages.en);
25
26
  // Temporary way of setting the moment locale to en-gb since we currently identify GB English with "en".
26
- const linguiLocale = language === `en` ? `en-gb` : language;
27
+ const linguiLocale = language === types_1.Languages.en ? `en-gb` : language;
27
28
  moment_1.default.locale(linguiLocale);
28
29
  return exports.i18n;
29
30
  }
@@ -1,27 +1,27 @@
1
- import { Catalogs, I18n, setupI18n } from "@lingui/core";
1
+ import { Languages } from "@hedia/types";
2
+ import { Catalog, I18n, setupI18n } from "@lingui/core";
2
3
  import moment from "moment";
3
4
  // tslint:disable-next-line:no-import-side-effect
4
5
  import "moment/min/locales";
5
- import { Language } from "../types/enum.js";
6
6
 
7
- export const languageCatalogs: Catalogs = {
8
- da: require(`./da/messages.js`),
9
- en: require(`./en/messages.js`),
10
- de: require(`./de/messages.js`),
11
- es: require(`./es/messages.js`),
12
- fr: require(`./fr/messages.js`),
13
- it: require(`./it/messages.js`),
7
+ const languageMap: Record<Languages, Catalog> = {
8
+ [Languages.da]: require(`./da/messages.js`),
9
+ [Languages.en]: require(`./en/messages.js`),
10
+ [Languages.de]: require(`./de/messages.js`),
11
+ [Languages.es]: require(`./es/messages.js`),
12
+ [Languages.fr]: require(`./fr/messages.js`),
13
+ [Languages.it]: require(`./it/messages.js`),
14
14
  };
15
15
 
16
16
  export const i18n = setupI18n({
17
- language: `en`,
18
- catalogs: languageCatalogs,
17
+ language: Languages.en,
18
+ catalogs: languageMap,
19
19
  });
20
20
 
21
- export function changeLanguage(language: Language): I18n {
22
- languageCatalogs[language] ? i18n.activate(language) : i18n.activate(`en`);
21
+ export function changeLanguage(language: Languages): I18n {
22
+ languageMap[language] ? i18n.activate(language) : i18n.activate(Languages.en);
23
23
  // Temporary way of setting the moment locale to en-gb since we currently identify GB English with "en".
24
- const linguiLocale = language === `en` ? `en-gb` : language;
24
+ const linguiLocale = language === Languages.en ? `en-gb` : language;
25
25
  moment.locale(linguiLocale);
26
26
  return i18n;
27
27
  }
@@ -1 +1 @@
1
- /* eslint-disable */module.exports={languageData:{"plurals":function(n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return n==11||n==8||n==80||n==800?"many":"other";return n==1&&v0?"one":"other"}},messages:{"Active Insulin":"Insulina attiva","Activity":"Attivit\xE0 fisica","Additional":"Ulteriori","Attention":"Attenzione","Based on the selected activity your insulin recommendation is reduced by:":"In base all'attivit\xE0 selezionata, la prescrizione per l'insulina \xE8 ridotta di:","Blood Glucose Level":"Indice glicemico","Blood Ketone Level":"Livello di chetoni nel sangue","Carbohydrates":"Carboidrati","Close calculation":"Chiudi calcolo","Consider not to initiate physical activity before your blood glucose level is within the recommended ranges prior to physical activity.":"Ricorda di non iniziare l'attivit\xE0 fisica prima che il livello di glucosio nel sangue non sia rientrato negli intervalli raccomandati prima dell'attivit\xE0 fisica.","Entered":"Inserito","Error. Hedia Calculator does not support an insulin dose greater than {0} units":function(a){return["Errore. Hedia Calculator non supporta una dose di insulina superiore a ",a("0")," unit\xE0"]},"Error. Hedia Calculator does not support insulin recommendations with boluses older than 4 hours":"Errore. Hedia Calculator non supporta le raccomandazioni di insulina con boli pi\xF9 vecchi di 4 ore","Error. Hedia Calculator does not support your activity intensity value":"Errore. Hedia Calculator non supporta il valore dell'intensit\xE0 dell'attivit\xE0","Error. Hedia Calculator does not support your activity type value":"Errore. Hedia Calculator non supporta il valore del tipo di attivit\xE0","Error. Hedia Calculator does not support your current blood glucose level.":"Errore. Hedia Calculator non supporta la tua glicemia attuale.","Error. Hedia Calculator does not support your current blood glucose unit.":"Errore. Hedia Calculator non supporta l'attuale unit\xE0 misura di glucosio nel sangue.","Error. Hedia Calculator does not support your current blood ketone level.":"Errore. Hedia Calculator non supporta l'attuale livello di chetoni nel sangue.","Error. Hedia Calculator does not support your current blood ketone unit.":"Errore. Hedia Calculator non supporta l'attuale unit\xE0 di misura di chetoni del sangue.","Error. Hedia Calculator does not support your current language.":"Errore. Hedia Calculator non supporta la lingua corrente.","Error. Hedia Calculator does not support your injection method.":"Errore. Hedia Calculator non supporta il metodo di iniezione.","Error. Hedia Calculator only supports activities with a duration of maximum 60 minutes.":"Errore. Hedia Calculator supporta solo attivit\xE0 della durata massima di 60 minuti.","Error. Please verify that your activity settings are set up correctly.":"Errore. Verificare che le impostazioni delle attivit\xE0 siano impostate correttamente.","Error. Please verify that your activity target blood glucose value is correct.":"Errore. Verificare che il indice glicemico desiderato durante l\u2019attivit\xE0 sia corretto.","Error. Please verify that your insulin sensitivity value is correct.":"Errore. Verificare che il valore della sensibilit\xE0 all'insulina sia corretto.","Error. Please verify that your insulin to carb ratio value is correct.":"Errore. Verificare che il valore del rapporto insulina/carboidrati sia corretto.","Error. Please verify that your target blood glucose value is correct.":"Errore. Verificare che il valore obiettivo della glicemia sia corretto.","Error. Please verify your notifications settings.":"Errore. Verificare le impostazioni di notifica.","Food":"Cibo","Hard":"Intensa","Have you taken insulin within the last 4 hours?":"Hai assunto insulina nelle ultime 4 ore?","Hedia Calculator does not support activities that finished more than 4 hours ago.":"Hedia Calculator non supporta attivit\xE0 che siano terminate pi\xF9 di 4 ore fa.","Hedia Calculator does not support insulin recommendations with more than 300 grams of carbohydrates present.":"Hedia Calculator non supporta le prescrizioni di insulina con pi\xF9 di 300 grammi di carboidrati presenti.","Hedia does not support more than {0} units of insulin per calculation.":function(a){return["Hedia non supporta pi\xF9 di ",a("0")," unit\xE0 di insulina per ogni calcolo."]},"Hedia doesn't support more than {0} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {1}% to {2} units for this calculation.":function(a){return["Hedia non supporta pi\xF9 di ",a("0")," unit\xE0 di insulina per ogni calcolo, ma, a seguito dell'attivit\xE0 fisica che hai inserito, \xE8 stata ulteriormente ridotta del ",a("1"),"% a ",a("2")," unit\xE0 per questo calcolo."]},"How are you feeling?":"Come ti senti?","INSULIN{0}RECOMMENDATION":function(a){return["PRESCRIZIONE DI",a("0"),"INSULINA"]},"If it is possible, postpone your planned exercise.":"Se possibile, posticipa l'allenamento pianificato.","Instead of taking insulin":"Invece di assumere insulina","Light":"Leggera","Moderate":"Moderata","More than 15 minutes has passed since this calculation was started.":"Sono passati pi\xF9 di 15 minuti dall'inizio di questo calcolo.","NO":"NO","No":"No","No, return to dashboard":"No, torna al pannello di controllo","OFF":"SPENTO","OK":"OK","Please go through the calculation steps with new measurements to ensure a safe recommendation.":"Completa tutte le fasi del calcolo con nuove misurazioni per assicurare una prescrizione sicura.","Recommendation from {day} at {time} was not transfered to your logbook.{0}Did you use the recommendation?":function(a){return["La prescrizione del ",a("day")," alle ",a("time")," non \xE8 stata trasferita nel tuo diario.",a("0")," Hai usato la prescrizione?"]},"Recommended":"Prescritta","Recommended amount of insulin":"Quantit\xE0 prescritta di insulina","Remind me to remeasure in":"Ricordami di misurare nuovamente tra","Return to dashboard":"Torna al pannello di controllo","Save data before closing?":"Salvare i dati prima della chiusura?","Save to logbook":"Salva nel diario","Start new calculation":"Inizia il nuovo calcolo","Total":"Totale","Transfer to logbook":"Trasferisci al diario","Transferred to logbook":"Trasferito al diario","Units":"Unit\xE0","Untitled Activity":"Attivit\xE0 senza titolo","We recommend eating an additional:":"Consigliamo di ingerire una quantit\xE0 supplementare:","Would you like to add this to your current calculation?":"Vuoi aggiungere questo al tuo calcolo corrente?","Yes":"S\xEC","Yes, save to logbook":"S\xEC, salva nel diario","You have a high blood glucose level.":"Hai un alto indice glicemico.","You should take rapid-acting insulin and measure ketones.":"Devi assumere insulina ad azione rapida e misurare i chetoni.","You will be reminded to measure your blood glucose level in 15 min.":"Ti verr\xE0 ricordato di misurare il indice glicemico tra 15 min.","Your blood glucose level is very low.":"Il indice glicemico \xE8 molto basso.","Your blood glucose level is very low. Take glucagon or eat carbohydrates if possible. Seek medical attention.":"Il indice glicemico \xE8 molto basso. Assumi glucagon o ingerisci carboidrati, se possibile. Rivolgiti a un medico.","Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons. Hedia never recommends more than {1} units of insulin per calculation.":function(a){return["La tua prescrizione sarebbe stata superiore a ",a("0")," unit\xE0 di insulina, ma \xE8 stata limitata per motivi di sicurezza. Hedia non prescrive mai pi\xF9 di ",a("1")," unit\xE0 di insulina per calcolo."]},"Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons.{1} Hedia never recommends more than {2} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {3}% to {4}.":function(a){return["La tua prescrizione sarebbe stata superiore a ",a("0")," unit\xE0 di insulina, ma \xE8 stata limitata per motivi di sicurezza.",a("1")," Hedia non prescrive mai pi\xF9 di ",a("2")," unit\xE0 di insulina per calcolo, ma a seguito dell'attivit\xE0 fisica che hai inserito, questa \xE8 stata ulteriormente ridotta del ",a("3"),"% a ",a("4"),"."]},"Your saved data will be used for future calculations.":"I dati salvati saranno utilizzati per calcoli futuri.","grams":"grammi","grams of carbohydrates":"grammi di carboidrati","hours":"ore","min":"min","units":"unit\xE0"}};
1
+ /* eslint-disable */module.exports={languageData:{"plurals":function(n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return n==11||n==8||n==80||n==800?"many":"other";return n==1&&v0?"one":"other"}},messages:{"Active Insulin":"Insulina attiva","Activity":"Attivit\xE0 fisica","Additional":"Ulteriori","Attention":"Attenzione","Based on the selected activity your insulin recommendation is reduced by:":"In base all'attivit\xE0 selezionata, la prescrizione per l'insulina \xE8 ridotta di:","Blood Glucose Level":"Livello di glucosio nel sangue","Blood Ketone Level":"Livello di chetoni nel sangue","Carbohydrates":"Carboidrati","Close calculation":"Chiudi calcolo","Consider not to initiate physical activity before your blood glucose level is within the recommended ranges prior to physical activity.":"Ricorda di non iniziare l'attivit\xE0 fisica prima che il livello di glucosio nel sangue non sia rientrato negli intervalli raccomandati prima dell'attivit\xE0 fisica.","Entered":"Inserito","Error. Hedia Calculator could not find your recent boluses":"Error. Hedia Calculator could not find your recent boluses","Error. Hedia Calculator does not support an insulin dose greater than {SAFETY_INSULIN_LIMIT} units":function(a){return["Errore. Hedia Calculator non supporta una dose di insulina superiore a ",a("SAFETY_INSULIN_LIMIT")," unit\xE0"]},"Error. Hedia Calculator does not support insulin recommendations with boluses older than 4 hours":"Errore. Hedia Calculator non supporta le raccomandazioni di insulina con boli pi\xF9 vecchi di 4 ore","Error. Hedia Calculator does not support the blood glucose level of your latest logbook entry from the last 6 hours.":"Error. Hedia Calculator does not support the blood glucose level of your latest logbook entry from the last 6 hours.","Error. Hedia Calculator does not support your activity intensity value":"Errore. Hedia Calculator non supporta il valore dell'intensit\xE0 dell'attivit\xE0","Error. Hedia Calculator does not support your activity type value":"Errore. Hedia Calculator non supporta il valore del tipo di attivit\xE0","Error. Hedia Calculator does not support your current blood glucose level.":"Errore. Hedia Calculator non supporta il livello attuale di glucosio nel sangue.","Error. Hedia Calculator does not support your current blood glucose unit.":"Errore. Hedia Calculator non supporta l'attuale unit\xE0 misura di glucosio nel sangue.","Error. Hedia Calculator does not support your current blood ketone level.":"Errore. Hedia Calculator non supporta l'attuale livello di chetoni nel sangue.","Error. Hedia Calculator does not support your current blood ketone unit.":"Errore. Hedia Calculator non supporta l'attuale unit\xE0 di misura di chetoni del sangue.","Error. Hedia Calculator does not support your current language.":"Errore. Hedia Calculator non supporta la lingua corrente.","Error. Hedia Calculator does not support your injection method.":"Errore. Hedia Calculator non supporta il metodo di iniezione.","Error. Hedia Calculator only supports activities with a duration of maximum 60 minutes.":"Errore. Hedia Calculator supporta solo attivit\xE0 della durata massima di 60 minuti.","Error. Please verify that your activity settings are set up correctly.":"Errore. Verificare che le impostazioni delle attivit\xE0 siano impostate correttamente.","Error. Please verify that your activity target blood glucose value is correct.":"Errore. Verificare che il valore obiettivo della glicemia dell\u2019attivit\xE0 sia corretto.","Error. Please verify that your insulin sensitivity value is correct.":"Errore. Verificare che il valore della sensibilit\xE0 all'insulina sia corretto.","Error. Please verify that your insulin to carb ratio value is correct.":"Errore. Verificare che il valore del rapporto insulina/carboidrati sia corretto.","Error. Please verify that your target blood glucose value is correct.":"Errore. Verificare che il valore obiettivo della glicemia sia corretto.","Error. Please verify your notifications settings.":"Errore. Verificare le impostazioni di notifica.","Food":"Cibo","Hard":"Intensa","Have you taken insulin within the last 4 hours?":"Hai assunto insulina nelle ultime 4 ore?","Hedia Calculator does not support activities that finished more than 4 hours ago.":"Hedia Calculator non supporta attivit\xE0 che siano terminate pi\xF9 di 4 ore fa.","Hedia Calculator does not support insulin recommendations with more than 300 grams of carbohydrates present.":"Hedia Calculator non supporta le prescrizioni di insulina con pi\xF9 di 300 grammi di carboidrati presenti.","Hedia does not support more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation.":function(a){return["Hedia non supporta pi\xF9 di ",a("SAFETY_INSULIN_LIMIT")," unit\xE0 di insulina per ogni calcolo."]},"Hedia doesn't support more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {0}% to {1} units for this calculation.":function(a){return["Hedia non supporta pi\xF9 di ",a("SAFETY_INSULIN_LIMIT")," unit\xE0 di insulina per ogni calcolo, ma, a seguito dell'attivit\xE0 fisica che hai inserito, \xE8 stata ulteriormente ridotta del ",a("0"),"% a ",a("1")," unit\xE0 per questo calcolo."]},"How are you feeling?":"Come ti senti?","INSULIN{0}RECOMMENDATION":function(a){return["PRESCRIZIONE DI",a("0"),"INSULINA"]},"If it is possible, postpone your planned exercise.":"Se possibile, posticipa l'allenamento pianificato.","Instead of taking insulin":"Invece di assumere insulina","Light":"Leggera","Moderate":"Moderata","More than 15 minutes has passed since this calculation was started.":"Sono passati pi\xF9 di 15 minuti dall'inizio di questo calcolo.","NO":"NO","No":"No","No, return to dashboard":"No, torna al pannello di controllo","OFF":"SPENTO","OK":"OK","Please go through the calculation steps with new measurements to ensure a safe recommendation.":"Completa tutte le fasi del calcolo con nuove misurazioni per assicurare una prescrizione sicura.","Recommendation from {day} at {time} was not transfered to your logbook.{0}Did you use the recommendation?":function(a){return["La prescrizione del ",a("day")," alle ",a("time")," non \xE8 stata trasferita nel tuo diario.",a("0")," Hai usato la prescrizione?"]},"Recommended":"Prescritta","Recommended amount of insulin":"Quantit\xE0 prescritta di insulina","Remind me to remeasure in":"Ricordami di misurare nuovamente tra","Return to dashboard":"Torna al pannello di controllo","Save data before closing?":"Salvare i dati prima della chiusura?","Save to logbook":"Salva nel diario","Start new calculation":"Inizia il nuovo calcolo","Total":"Totale","Transfer to logbook":"Trasferisci al diario","Transferred to logbook":"Trasferito al diario","Units":"Unit\xE0","Untitled Activity":"Attivit\xE0 senza titolo","We recommend eating an additional:":"Consigliamo di ingerire una quantit\xE0 supplementare:","Would you like to add this to your current calculation?":"Vuoi aggiungere questo al tuo calcolo corrente?","Yes":"S\xEC","Yes, save to logbook":"S\xEC, salva nel diario","You have a high blood glucose level.":"Hai un alto livello di glucosio nel sangue.","You should take rapid-acting insulin and measure ketones.":"Devi assumere insulina ad azione rapida e misurare i chetoni.","You will be reminded to measure your blood glucose level in 15 min.":"Ti verr\xE0 ricordato di misurare il livello di glucosio nel sangue tra 15 min.","Your blood glucose level is very low.":"Il livello di glucosio nel sangue \xE8 molto basso.","Your blood glucose level is very low. Take glucagon or eat carbohydrates if possible. Seek medical attention.":"Il livello di glucosio nel sangue \xE8 molto basso. Assumi glucagon o ingerisci carboidrati, se possibile. Rivolgiti a un medico.","Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons.{1} Hedia never recommends more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {2}% to {3}.":function(a){return["La tua prescrizione sarebbe stata superiore a ",a("0")," unit\xE0 di insulina, ma \xE8 stata limitata per motivi di sicurezza.",a("1")," Hedia non prescrive mai pi\xF9 di ",a("SAFETY_INSULIN_LIMIT")," unit\xE0 di insulina per calcolo, ma a seguito dell'attivit\xE0 fisica che hai inserito, questa \xE8 stata ulteriormente ridotta del ",a("2"),"% a ",a("3"),"."]},"Your recommendation would have been higher than {SAFETY_INSULIN_LIMIT} units of insulin, but it has been limited for safety reasons. Hedia never recommends more than {SAFETY_INSULIN_LIMIT} units of insulin per calculation.":function(a){return["La tua prescrizione sarebbe stata superiore a ",a("SAFETY_INSULIN_LIMIT")," unit\xE0 di insulina, ma \xE8 stata limitata per motivi di sicurezza. Hedia non prescrive mai pi\xF9 di ",a("SAFETY_INSULIN_LIMIT")," unit\xE0 di insulina per calcolo."]},"Your saved data will be used for future calculations.":"I dati salvati saranno utilizzati per calcoli futuri.","grams":"grammi","grams of carbohydrates":"grammi di carboidrati","hours":"ore","min":"min","units":"unit\xE0"}};