Resolve "Finish handling of internationalization in vuejs: handling translation of "translatable string""

This commit is contained in:
LenaertsJ 2025-05-28 14:40:26 +00:00 committed by Julien Fastré
parent dc44c46667
commit 649ad26721
22 changed files with 118 additions and 464 deletions

View File

@ -1,52 +1,4 @@
[
{
"path": "assets/translator.js",
"line": 4,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'getLocale' is defined but never used.",
"hash": "4de7bfba61e745c3cf5323aad048092c7c17ccf8"
},
{
"path": "assets/translator.js",
"line": 5,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'setLocale' is defined but never used.",
"hash": "a7eabf4524aa4b2a7fd30de6d1ce61a3623c00db"
},
{
"path": "docs/source/development/user-interface/js-functions/show_hide.js",
"line": 12,
"column": 26,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'event' is defined but never used.",
"hash": "6d66a79b37a676e44177f5e22c83250315d23c96"
},
{
"path": "docs/source/development/user-interface/js-functions/show_hide.js",
"line": 29,
"column": 26,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'event' is defined but never used.",
"hash": "ecfe1d9da55e96316b21de60db959be5f9e20f59"
},
{
"path": "src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc.vue",
"line": 136,
"column": 39,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'reject' is defined but never used.",
"hash": "4faa92668b8548e3b747568ef9a3671708c0fbf9"
},
{
"path": "src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc.vue",
"line": 211,
"column": 47,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'reject' is defined but never used.",
"hash": "d1fd4d809f01ecad48418336edca270335fccff9"
},
{
"path": "src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/index.js",
"line": 18,
@ -63,14 +15,6 @@
"message": "'event' is defined but never used.",
"hash": "cf0cf378f71403f62a6425f384ccbbdec433d1f2"
},
{
"path": "src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/store.js",
"line": 90,
"column": 13,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'resources' is assigned a value but never used.",
"hash": "342d8aad3e080ba262239e5f5c6fc419f388ca33"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/module/Invite/answer.js",
"line": 7,
@ -223,14 +167,6 @@
"message": "'changedEvent' is assigned a value but never used.",
"hash": "a7a81a6bf09d00c0364e3aa8207ffad853f0547b"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue",
"line": 444,
"column": 5,
"ruleId": "@typescript-eslint/ban-ts-comment",
"message": "Use \"@ts-expect-error\" instead of \"@ts-ignore\", as \"@ts-ignore\" will do nothing if the following line is error-free.",
"hash": "1b8a1b6b081d3f14ed319619e6031039668cd736"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue",
"line": 77,
@ -279,30 +215,6 @@
"message": "'_' is defined but never used.",
"hash": "5bf7ba0b0200fb6788d50df669e6b7701f8a87bb"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts",
"line": 259,
"column": 62,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'_' is defined but never used.",
"hash": "a06407a3b44a8e5865525e37e7620d20100c1e32"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts",
"line": 350,
"column": 48,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'_' is defined but never used.",
"hash": "fabe51c847e3842b4a4fda0b581f10b466cbd098"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts",
"line": 374,
"column": 48,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'_' is defined but never used.",
"hash": "7547f6801ac63196c32ffc61d2be7ad5bf113cc8"
},
{
"path": "src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/fullcalendar.ts",
"line": 57,
@ -639,54 +551,6 @@
"message": "'StoredObjectVersion' is defined but never used.",
"hash": "2fadbe9e331a66f44b54782acc1420c4b487e1f6"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue",
"line": 336,
"column": 20,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'reactive' is defined but never used.",
"hash": "433bed446eb37784c380d5c82bb364221af80969"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue",
"line": 354,
"column": 1,
"ruleId": "@typescript-eslint/ban-ts-comment",
"message": "Use \"@ts-expect-error\" instead of \"@ts-ignore\", as \"@ts-ignore\" will do nothing if the following line is error-free.",
"hash": "b104a4e3ccf06c4a16fd83076e2b3f2dc27b2d91"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue",
"line": 363,
"column": 5,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'download_and_decrypt_doc' is defined but never used.",
"hash": "77340aab22ce01c7ed6518a96586f4219299dd36"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue",
"line": 757,
"column": 16,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'r' is defined but never used.",
"hash": "c4cc95fa4538bfd3a61bdc2d5ffcae8c96178af6"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue",
"line": 779,
"column": 5,
"ruleId": "@typescript-eslint/no-unused-expressions",
"message": "Expected an assignment or function call and instead saw an expression.",
"hash": "c5f5d0e73bd179d79b60b53a3dc1c6d676bee287"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts",
"line": 2,
"column": 1,
"ruleId": "@typescript-eslint/ban-ts-comment",
"message": "Use \"@ts-expect-error\" instead of \"@ts-ignore\", as \"@ts-ignore\" will do nothing if the following line is error-free.",
"hash": "b60ce5d41e38f02a016f25170e065e86fd7863ec"
},
{
"path": "src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/index.ts",
"line": 34,
@ -919,46 +783,6 @@
"message": "'offset' is never reassigned. Use 'const' instead.",
"hash": "244b65de0ab0791ec89219058c5cb4f2e11622c7"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts",
"line": 176,
"column": 25,
"ruleId": "@typescript-eslint/no-explicit-any",
"message": "Unexpected any. Specify a different type.",
"hash": "78974307acb7b584f0c2196fbb47fc914b5c7a32"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts",
"line": 186,
"column": 9,
"ruleId": "prefer-const",
"message": "'promises' is never reassigned. Use 'const' instead.",
"hash": "2e178f566f5da9822a5dd46b29738829fbd1adf7"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts",
"line": 232,
"column": 26,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'response' is defined but never used.",
"hash": "0a036a266bd7bba398df10163e9704e6ea6167f3"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts",
"line": 240,
"column": 28,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'response' is defined but never used.",
"hash": "86c054fe1edcb6b24e6d0aefd64cd445e7614a52"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts",
"line": 260,
"column": 5,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'response' is defined but never used.",
"hash": "a45a603d1877899ba33744991bc21cfa4bedb17d"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/lib/download-report/download-report.js",
"line": 18,
@ -1071,14 +895,6 @@
"message": "'popoverList' is assigned a value but never used.",
"hash": "2fd1da06ffc0a1025552cd02b7838cb5ee70006c"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/index.ts",
"line": 7,
"column": 16,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'editor' is defined but never used.",
"hash": "a1ee37171b35396754af104e4815484e1bd2a5ec"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts",
"line": 53,
@ -1135,38 +951,6 @@
"message": "Expected a `for-of` loop instead of a `for` loop with this simple iteration.",
"hash": "aac391029a9094c0024acd4748728d0345d43d62"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js",
"line": 4,
"column": 8,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'NotificationReadAllToggle' is defined but never used.",
"hash": "85b91b57af8f355c4da6175f0cd10543e8c21298"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js",
"line": 8,
"column": 55,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'e' is defined but never used.",
"hash": "07f4feb1fc536257245672cadc5e4a6eff3dfd11"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js",
"line": 26,
"column": 5,
"ruleId": "@typescript-eslint/no-unused-expressions",
"message": "Expected an assignment or function call and instead saw an expression.",
"hash": "ade0f5ef31462024600ac17130a26e0429e27039"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js",
"line": 176,
"column": 57,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'e' is defined but never used.",
"hash": "733b101d5fc60b4b4d0539d772cec69590baae19"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js",
"line": 10,
@ -1753,19 +1537,19 @@
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue",
"line": 75,
"line": 76,
"column": 13,
"ruleId": "vue/no-mutating-props",
"message": "Unexpected mutation of \"entity\" prop.",
"hash": "f2e288dcddf773ed3a79b238327af8a48961e861"
"hash": "373a2e31f110d138c66d77f1faf5dc61545c55af"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue",
"line": 80,
"line": 81,
"column": 13,
"ruleId": "vue/no-mutating-props",
"message": "Unexpected mutation of \"entity\" prop.",
"hash": "836965dc8fa085f98d31f3ce261dcdf27d1ef6a4"
"hash": "421eb6a63224b4b1d81b216677a710c5c99ddee3"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue",
@ -1871,30 +1655,6 @@
"message": "'props' is assigned a value but never used.",
"hash": "29fe0a5d52e46c479aa2e7bb23fb55c53df7b22e"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue",
"line": 142,
"column": 32,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'w' is defined but never used.",
"hash": "ad12fc3b08dbfc9c24ae65d2a59c7bd5cecb39f2"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue",
"line": 146,
"column": 33,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'w' is defined but never used.",
"hash": "d28435fe2f60f5d3c22ab2b4cb59a6bd2cd0f947"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue",
"line": 155,
"column": 15,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'popoverList' is assigned a value but never used.",
"hash": "933d1a8c7c3d9321347218a08588cdf4c352f422"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/PickWorkflow.vue",
"line": 114,
@ -1943,14 +1703,6 @@
"message": "The element inside `<transition>` is expected to have a `v-if` or `v-show` directive.",
"hash": "0594fb9d0984f4dd1612671aca21b571087ab8ee"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue",
"line": 59,
"column": 22,
"ruleId": "vue/require-valid-default-prop",
"message": "Type of the default value for 'modalDialogClass' prop must be a function.",
"hash": "51033a0b54bc839ce532e609bc58a2686818c895"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts",
"line": 60,
@ -1959,14 +1711,6 @@
"message": "Unexpected any. Specify a different type.",
"hash": "61fa9887fddae8f7c4fd60cd21827fb034d5bb7f"
},
{
"path": "src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.ts",
"line": 66,
"column": 9,
"ruleId": "@typescript-eslint/ban-ts-comment",
"message": "Use \"@ts-expect-error\" instead of \"@ts-ignore\", as \"@ts-ignore\" will do nothing if the following line is error-free.",
"hash": "370ce59576610d7a292501effe428366011585f4"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/page/accompanying_course_index/masonry.js",
"line": 4,
@ -2023,94 +1767,6 @@
"message": "'app' is assigned a value but never used.",
"hash": "aaaaa63e7a60443b8cbf8191feb9142852ebdf1c"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 436,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'dateToISO' is defined but never used.",
"hash": "2ec2e571f3e30aa4c2be2d27bb2e8e0911f2b73f"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 437,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'ISOToDate' is defined but never used.",
"hash": "e798ef13db37e7acb223e3df29da4ce8dbbd3ae6"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 438,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'ISOToDatetime' is defined but never used.",
"hash": "76ca9c82007f9040643d2a8cf2689ebe1110823e"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 451,
"column": 10,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'buildLinkCreate' is defined but never used.",
"hash": "0dbad8bda4c2da8b4489288fdaf8e4e42583c399"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 512,
"column": 5,
"ruleId": "vue/no-unused-components",
"message": "The \"AddressRenderBox\" component has been registered but not used.",
"hash": "1fa5e8a5a2e917188fd4b5f5d215601e1be5ea9a"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 514,
"column": 5,
"ruleId": "vue/no-unused-components",
"message": "The \"PickTemplate\" component has been registered but not used.",
"hash": "b68269999f017d4125854ca86a09f355f046c5fb"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 699,
"column": 25,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'data' is defined but never used.",
"hash": "66ec68e084b27a818062ebf5d612bdd4598f1cc6"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue",
"line": 710,
"column": 25,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'data' is defined but never used.",
"hash": "fed92eac022439396e7c1a7dd5f00cf9b958c1e2"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue",
"line": 136,
"column": 26,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'e' is defined but never used.",
"hash": "d762b8ac0404258c3f69a602e838c141e7260af0"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue",
"line": 142,
"column": 28,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'event' is defined but never used.",
"hash": "49bc6a911e9dd1170d487d095920c519784a84bc"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/AddEvaluation.vue",
"line": 142,
"column": 35,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'link' is defined but never used.",
"hash": "537ba2743fe9b6894692e6a481d82557f533b75f"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue",
"line": 79,
@ -2119,46 +1775,6 @@
"message": "Elements in iteration expect to have 'v-bind:key' directives.",
"hash": "422f53925922e59655d0f71624c19af75d41628c"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue",
"line": 275,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'dateToISO' is defined but never used.",
"hash": "1fb4dee6397e578ac9e4587fcf81b35ce1bfe3d9"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue",
"line": 276,
"column": 3,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'ISOToDate' is defined but never used.",
"hash": "ea360950c17604fe63003333c7a5a9c303887ca6"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue",
"line": 281,
"column": 10,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'mapGetters' is defined but never used.",
"hash": "ec02e9573e9ee7cc13e25fda951b748ba8ae8f93"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue",
"line": 600,
"column": 7,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'event' is defined but never used.",
"hash": "b7f25f6178570c873ffb8eefd349b967bb9afb17"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue",
"line": 601,
"column": 7,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'link' is defined but never used.",
"hash": "b60571c99af4afc2933bedef97fa6f745ce45a0f"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/index.js",
"line": 12,
@ -2223,14 +1839,6 @@
"message": "'app' is assigned a value but never used.",
"hash": "b025959acb471750c92952656e7a60ba28f5da0a"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Positioning.vue",
"line": 82,
"column": 31,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'app' is defined but never used.",
"hash": "aad0b0d7e4bc2ea9f0a0dd7b6c696a82da14f25a"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/index.js",
"line": 13,
@ -2311,30 +1919,6 @@
"message": "'UserRenderBoxBadge' is defined but never used.",
"hash": "99eba0d8633b2c9497417f4f61ec4194dbb2a96b"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue",
"line": 430,
"column": 17,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'e' is defined but never used.",
"hash": "e48c11f9011de90dab15b426baf77030ffae7e22"
},
{
"path": "src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue",
"line": 448,
"column": 33,
"ruleId": "@typescript-eslint/no-unused-vars",
"message": "'reject' is defined but never used.",
"hash": "dfd37ec320e99059374135a72bfd53978e7e66ae"
},
{
"path": "src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue",
"line": 371,
"column": 21,
"ruleId": "@typescript-eslint/no-unused-expressions",
"message": "Expected an assignment or function call and instead saw an expression.",
"hash": "ed6f5ae90514bf9fc967f2eb7a3ce06344a5f8af"
},
{
"path": "src/Bundle/ChillWopiBundle/src/Resources/public/module/pending/index.ts",
"line": 4,
@ -2374,13 +1958,5 @@
"ruleId": "@typescript-eslint/no-explicit-any",
"message": "Unexpected any. Specify a different type.",
"hash": "7513ea552a0a649ce4ab93b6cf9d40bfef4f68d9"
},
{
"path": "webpack.config.js",
"line": 77,
"column": 28,
"ruleId": "@typescript-eslint/no-empty-function",
"message": "Unexpected empty arrow function.",
"hash": "a8e433351f1c8bc89a95c8570dd0781d59e26103"
}
]

View File

@ -33,6 +33,7 @@
import { mapState, mapGetters } from "vuex";
import VueMultiselect from "vue-multiselect";
import NewLocation from "./Location/NewLocation.vue";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
import {
trans,
ACTIVITY_LOCATION,
@ -77,15 +78,15 @@ export default {
},
methods: {
labelAccompanyingCourseLocation(value) {
return `${value.address.text} (${value.locationType.title.fr})`;
return `${value.address.text} (${localizeString(value.locationType.title)})`;
},
customLabel(value) {
return value.locationType
? value.name
? value.name === "__AccompanyingCourseLocation__"
? this.labelAccompanyingCourseLocation(value)
: `${value.name} (${value.locationType.title.fr})`
: value.locationType.title.fr
: `${value.name} (${localizeString(value.locationType.title)})`
: localizeString(value.locationType.title)
: "";
},
},

View File

@ -44,7 +44,7 @@
:value="t"
:key="t.id"
>
{{ t.title.fr }}
{{ localizeString(t.title) }}
</option>
</select>
<label>{{
@ -126,6 +126,7 @@ import AddAddress from "ChillMainAssets/vuejs/Address/components/AddAddress.vue"
import { mapState } from "vuex";
import { getLocationTypes } from "../../api";
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
import {
SAVE,
ACTIVITY_LOCATION_FIELDS_EMAIL,
@ -270,6 +271,7 @@ export default {
this.getLocationTypesList();
},
methods: {
localizeString,
checkForm() {
let cond = true;
this.errors = [];

View File

@ -20,7 +20,10 @@
</option>
<template v-for="t in templates" :key="t.id">
<option :value="t.id">
{{ t.name.fr || "Aucun nom défini" }}
{{
localizeString(t.name) ||
"Aucun nom défini"
}}
</option>
</template>
</select>

View File

@ -41,7 +41,7 @@
>
<option value="" selected disabled>Zoom</option>
<option v-for="z in zoomLevels" :value="z.zoom" :key="z.id">
{{ z.label.fr }}
{{ localizeString(z.label) }}
</option>
</select>
<template v-if="pageCount > 1">
@ -173,7 +173,7 @@
>
<option value="" selected disabled>Zoom</option>
<option v-for="z in zoomLevels" :value="z.zoom" :key="z.id">
{{ z.label.fr }}
{{ localizeString(z.label) }}
</option>
</select>
<template v-if="pageCount > 1">
@ -395,6 +395,7 @@ import {
SIGNATURES_GO_TO_SIGNATURE_UNIQUE,
trans,
} from "translator";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
// @ts-ignore incredible but the console.log is needed
import * as PdfWorker from "pdfjs-dist/build/pdf.worker.mjs";

View File

@ -0,0 +1,41 @@
import { TranslatableString } from "ChillMainAssets/types";
/**
* Localizes a translatable string object based on the current locale.
* A fallback logic is implemented in case no translation is available for the current locale.
*
* @param translatableString Object containing translations for different locales
* @param locale defaults to browser locale
* @returns The localized string or null if no translation is available
*/
export function localizeString(
translatableString: TranslatableString | null | undefined,
locale?: string,
): string {
if (!translatableString || Object.keys(translatableString).length === 0) {
return "";
}
const currentLocale = locale || navigator.language.split("-")[0] || "fr";
if (translatableString[currentLocale]) {
return translatableString[currentLocale];
}
// Define fallback locales
const fallbackLocales: string[] = ["fr", "en"];
for (const fallbackLocale of fallbackLocales) {
if (translatableString[fallbackLocale]) {
return translatableString[fallbackLocale];
}
}
// No fallback translation found, use the first available
const availableLocales = Object.keys(translatableString);
if (availableLocales.length > 0) {
return translatableString[availableLocales[0]];
}
return "";
}

View File

@ -66,10 +66,7 @@ export interface UserAssociatedInterface {
id: number;
}
export interface TranslatableString {
fr?: string;
nl?: string;
}
export type TranslatableString = Record<string, string>;
export interface Postcode {
id: number;

View File

@ -22,6 +22,7 @@
<script>
import VueMultiselect from "vue-multiselect";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "CountrySelection",
@ -68,7 +69,7 @@ export default {
)[0];
},
transName({ name }) {
return name.fr; //TODO multilang
return localizeString(name);
},
selectCountry(value) {
//console.log('select country', value);

View File

@ -32,7 +32,7 @@
class="chill-entity entity-social-issue"
>
<span class="badge bg-chill-l-gray text-dark">
{{ i.title.fr }}
{{ localizeString(i.title) }}
</span>
</span>
</td>
@ -77,6 +77,7 @@
import { mapState, mapGetters } from "vuex";
import TabTable from "./TabTable";
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "MyAccompanyingCourses",
@ -96,6 +97,7 @@ export default {
},
},
methods: {
localizeString,
getUrl(c) {
return `/fr/parcours/${c.id}`;
},

View File

@ -26,7 +26,7 @@
>
<td>{{ $d(e.maxDate.datetime, "short") }}</td>
<td>
{{ e.evaluation.title.fr }}
{{ localizeString(e.evaluation.title) }}
</td>
<td>
<span class="chill-entity entity-social-issue">
@ -97,6 +97,7 @@
import { mapState, mapGetters } from "vuex";
import TabTable from "./TabTable";
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly";
import { localizeString } from "../../lib/localizationHelper/localizationHelper";
export default {
name: "MyEvaluations",
@ -116,6 +117,7 @@ export default {
},
},
methods: {
localizeString,
getUrl(e) {
switch (e.type) {
case "accompanying_period_work_evaluation":

View File

@ -1,6 +1,6 @@
<template>
<template v-for="(container, index) in data.containers" :key="index">
<h4>{{ container.layer.name.fr }}</h4>
<h4>{{ localizeString(container.layer.name) }}</h4>
<ul>
<li v-for="(unit, index) in container.units" :key="index">
{{ unit.unitName }} ({{ unit.unitRefId }})
@ -20,6 +20,7 @@ import {
getAllGeographicalUnitLayers,
} from "../../../../lib/api/address";
import { onMounted, reactive } from "vue";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export interface AddressDetailsGeographicalLayersProp {
address: Address;

View File

@ -30,7 +30,7 @@
{{ address.postcode.name }}
</p>
<p v-if="null !== address.country" class="country">
{{ address.country.name.fr }}
{{ localizeString(address.country.name) }}
</p>
</div>
</template>
@ -84,9 +84,11 @@
import Confidential from "ChillMainAssets/vuejs/_components/Confidential.vue";
import AddressDetailsButton from "ChillMainAssets/vuejs/_components/AddressDetails/AddressDetailsButton.vue";
import { trans, ADDRESS_VALID_FROM, ADDRESS_VALID_TO } from "translator";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "AddressRenderBox",
methods: { localizeString },
components: {
Confidential,
AddressDetailsButton,

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { UserGroup } from "../../../types";
import { computed } from "vue";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
interface UserGroupRenderBoxProps {
userGroup: UserGroup;
@ -18,7 +19,7 @@ const styles = computed<{ color: string; "background-color": string }>(() => {
<template>
<span class="badge-user-group" :style="styles">{{
userGroup.label.fr
localizeString(userGroup.label)
}}</span>
</template>

View File

@ -2,10 +2,10 @@
<span class="chill-entity entity-user">
{{ user.label }}
<span class="user-job" v-if="user.user_job !== null"
>({{ user.user_job.label.fr }})</span
>({{ localizeString(user.user_job.label) }})</span
>
<span class="main-scope" v-if="user.main_scope !== null"
>({{ user.main_scope.name.fr }})</span
>({{ localizeString(user.main_scope.name) }})</span
>
<span
v-if="user.isAbsent"
@ -17,8 +17,15 @@
</template>
<script>
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "UserRenderBoxBadge",
methods: {
localizeString() {
return localizeString;
},
},
props: ["user"],
};
</script>

View File

@ -11,7 +11,7 @@
:value="s"
/>
<label class="form-check-label">
{{ s.name.fr }}
{{ localizeString(s.name) }}
</label>
</div>
</div>
@ -24,6 +24,7 @@
<script>
import { mapState, mapGetters } from "vuex";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "Scopes",
@ -48,6 +49,7 @@ export default {
},
},
methods: {
localizeString,
restore() {
console.log("restore");
},

View File

@ -78,7 +78,7 @@
<!-- results which **are** attached to an objective -->
<div v-for="g in goalsPicked" :key="g.goal.id">
<div class="item-title" @click="removeGoal(g)">
<span class="removable">{{ g.goal.title.fr }}</span>
<span class="removable">{{ localizeString(g.goal.title) }}</span>
</div>
<div>
<add-result :goal="g.goal" destination="goal"></add-result>
@ -122,7 +122,7 @@
@click="addGoal(g)"
:key="g.id"
>
<span>{{ g.title.fr }}</span>
<span>{{ localizeString(g.title) }}</span>
</li>
</ul>
</template>
@ -167,7 +167,7 @@
@click="addEvaluation(e)"
:key="e.id"
>
<span>{{ e.title.fr }}</span>
<span>{{ localizeString(e.title) }}</span>
</li>
</ul>
</div>
@ -472,6 +472,7 @@ import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue";
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
const i18n = {
messages: {
@ -673,6 +674,7 @@ export default {
},
},
methods: {
localizeString,
toggleSelect() {
this.isExpanded = !this.isExpanded;
},

View File

@ -2,7 +2,7 @@
<div>
<a id="evaluations"></a>
<div class="item-title" :title="evaluation.id || 'no id yet'">
<span>{{ evaluation.evaluation.title.fr }}</span>
<span>{{ localizeString(evaluation.evaluation.title) }}</span>
</div>
<div class="item-url mt-3 mb-4" v-if="evaluation.evaluation.url">
@ -69,6 +69,7 @@ import FormEvaluation from "./FormEvaluation.vue";
import Modal from "ChillMainAssets/vuejs/_components/Modal";
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
import { buildLinkCreate } from "ChillMainAssets/lib/entity-workflow/api";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
const i18n = {
messages: {
@ -129,17 +130,18 @@ export default {
},
},
methods: {
localizeString,
removeEvaluation(e) {
this.$store.commit("removeEvaluation", e);
return;
},
toggleEditEvaluation(e) {
toggleEditEvaluation() {
this.$store.commit("toggleEvaluationEdit", { key: this.evaluation.key });
},
submitForm() {
this.toggleEditEvaluation();
},
goToGenerateWorkflow({ event, link, workflowName }) {
goToGenerateWorkflow({ workflowName }) {
const callback = (data) => {
let evaluationId = data.accompanyingPeriodWorkEvaluations.find(
(e) => e.key === this.evaluation.key,

View File

@ -7,7 +7,7 @@
<ul class="list-suggest remove-items">
<li v-for="r in pickedResults" @click="removeResult(r)" :key="r.id">
<span>
{{ r.title.fr }}
{{ localizeString(r.title) }}
</span>
</li>
</ul>
@ -50,7 +50,7 @@
@click="addResult(r)"
:key="r.id"
>
<span>{{ r.title.fr }}</span>
<span>{{ localizeString(r.title) }}</span>
</li>
</ul>
</template>
@ -66,6 +66,8 @@
</template>
<script>
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
const i18n = {
messages: {
fr: {
@ -124,6 +126,7 @@ export default {
},
},
methods: {
localizeString,
toggleSelect() {
this.isExpanded = !this.isExpanded;
},

View File

@ -28,7 +28,7 @@
:key="t.id"
:value="t.id"
>
{{ t.label.fr }}
{{ localizeString(t.label) }}
</option>
</select>
</div>
@ -83,9 +83,11 @@
<script>
import CurrentHousehold from "./CurrentHousehold";
import { mapGetters, mapState } from "vuex";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "Dates",
methods: { localizeString },
components: {
CurrentHousehold,
},

View File

@ -38,7 +38,7 @@
}"
@click="moveToPosition(conc.person.id, position.id)"
>
{{ position.label.fr }}
{{ localizeString(position.label) }}
</button>
</div>
</div>
@ -57,6 +57,7 @@ import { mapGetters, mapState } from "vuex";
import CurrentHousehold from "./CurrentHousehold";
import PersonComment from "./PersonComment";
import PersonText from "../../_components/Entity/PersonText.vue";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "Positioning",
@ -79,7 +80,7 @@ export default {
this.$store.getters.concUnpositionned.length === 0
);
},
allowHolderForConcerned: (app) => (conc) => {
allowHolderForConcerned: () => (conc) => {
console.log("allow holder for concerned", conc);
if (conc.position === null) {
return false;
@ -89,6 +90,7 @@ export default {
},
},
methods: {
localizeString,
moveToPosition(person_id, position_id) {
this.$store.dispatch("markPosition", { person_id, position_id });
},

View File

@ -79,7 +79,7 @@
:value="personAltNamesLabels[i]"
@input="onAltNameInput"
/>
<label :for="a.key">{{ a.labels.fr }}</label>
<label :for="a.key">{{ localizeString(a.labels) }}</label>
</div>
<!-- TODO fix placeholder if undefined
@ -117,7 +117,7 @@
{{ $t("person.civility.placeholder") }}
</option>
<option v-for="c in config.civilities" :value="c.id" :key="c.id">
{{ c.name.fr }}
{{ localizeString(c.name) }}
</option>
</select>
<label>{{ $t("person.civility.title") }}</label>
@ -219,6 +219,7 @@ import {
} from "../../_api/OnTheFly";
import PersonRenderBox from "../Entity/PersonRenderBox.vue";
import AddAddress from "ChillMainAssets/vuejs/Address/components/AddAddress.vue";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "OnTheFlyPerson",
@ -427,7 +428,8 @@ export default {
}
},
methods: {
checkErrors(e) {
localizeString,
checkErrors() {
this.errors = [];
if (this.person.lastName === "") {
this.errors.push("Le nom ne doit pas être vide.");
@ -445,7 +447,7 @@ export default {
loadData() {
getPerson(this.id).then(
(person) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.person = person;
//console.log('get person', this.person);
resolve();

View File

@ -102,7 +102,7 @@
:key="civility.id"
:value="civility"
>
{{ civility.name.fr }}
{{ localizeString(civility.name) }}
</option>
</select>
</div>
@ -257,6 +257,7 @@ import AddAddress from "ChillMainAssets/vuejs/Address/components/AddAddress";
import { getThirdparty } from "../../_api/OnTheFly";
import BadgeEntity from "ChillMainAssets/vuejs/_components/BadgeEntity.vue";
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "OnTheFlyThirdParty",
@ -339,6 +340,7 @@ export default {
},
},
methods: {
localizeString,
loadData() {
return getThirdparty(this.id).then(
(thirdparty) =>