@adminforth/i18n 2.1.1 → 2.1.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.
package/build.log
CHANGED
|
@@ -20,5 +20,5 @@ custom/package.json
|
|
|
20
20
|
custom/pnpm-lock.yaml
|
|
21
21
|
custom/tsconfig.json
|
|
22
22
|
|
|
23
|
-
sent 45,
|
|
24
|
-
total size is 44,
|
|
23
|
+
sent 45,592 bytes received 305 bytes 91,794.00 bytes/sec
|
|
24
|
+
total size is 44,424 speedup is 0.97
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
<span class="flag-icon"
|
|
24
24
|
:class="`flag-icon-${getCountryCodeFromLangCode(task.state?.lang)}`"
|
|
25
25
|
></span>
|
|
26
|
-
<component
|
|
27
|
-
:is="getCustomComponent({file: '@@/plugins/BackgroundJobsPlugin/StateToIcon.vue'})"
|
|
26
|
+
<component
|
|
27
|
+
:is="getCustomComponent({file: '@@/plugins/BackgroundJobsPlugin/StateToIcon.vue'})"
|
|
28
28
|
:status="task.status"
|
|
29
|
+
:error="task.state?.error"
|
|
29
30
|
/>
|
|
30
31
|
</div>
|
|
31
32
|
</div>
|
|
@@ -75,12 +76,15 @@ onMounted(async () => {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
});
|
|
78
|
-
|
|
79
|
+
websocket.subscribe(`/background-jobs-task-error/${props.job.id}`, (data: { taskIndex: number, status?: string, state?: Record<string, any> }) => {
|
|
80
|
+
console.log('Error received for task', data);
|
|
81
|
+
});
|
|
79
82
|
|
|
80
83
|
});
|
|
81
84
|
|
|
82
85
|
onUnmounted(() => {
|
|
83
86
|
websocket.unsubscribe(`/background-jobs-task-update/${props.job.id}`);
|
|
87
|
+
websocket.unsubscribe(`/background-jobs-task-error/${props.job.id}`);
|
|
84
88
|
});
|
|
85
89
|
|
|
86
90
|
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
<span class="flag-icon"
|
|
24
24
|
:class="`flag-icon-${getCountryCodeFromLangCode(task.state?.lang)}`"
|
|
25
25
|
></span>
|
|
26
|
-
<component
|
|
27
|
-
:is="getCustomComponent({file: '@@/plugins/BackgroundJobsPlugin/StateToIcon.vue'})"
|
|
26
|
+
<component
|
|
27
|
+
:is="getCustomComponent({file: '@@/plugins/BackgroundJobsPlugin/StateToIcon.vue'})"
|
|
28
28
|
:status="task.status"
|
|
29
|
+
:error="task.state?.error"
|
|
29
30
|
/>
|
|
30
31
|
</div>
|
|
31
32
|
</div>
|
|
@@ -75,12 +76,15 @@ onMounted(async () => {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
});
|
|
78
|
-
|
|
79
|
+
websocket.subscribe(`/background-jobs-task-error/${props.job.id}`, (data: { taskIndex: number, status?: string, state?: Record<string, any> }) => {
|
|
80
|
+
console.log('Error received for task', data);
|
|
81
|
+
});
|
|
79
82
|
|
|
80
83
|
});
|
|
81
84
|
|
|
82
85
|
onUnmounted(() => {
|
|
83
86
|
websocket.unsubscribe(`/background-jobs-task-update/${props.job.id}`);
|
|
87
|
+
websocket.unsubscribe(`/background-jobs-task-error/${props.job.id}`);
|
|
84
88
|
});
|
|
85
89
|
|
|
86
90
|
|
package/dist/index.js
CHANGED
|
@@ -908,7 +908,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
908
908
|
yield this.cache.set(cacheKey, result);
|
|
909
909
|
}
|
|
910
910
|
// if msg has '|' in it, then we need to aplly pluralization
|
|
911
|
-
if (msg.includes('|')) {
|
|
911
|
+
if (msg.includes('|') && pluralizationNumber !== undefined) {
|
|
912
912
|
result = this.applyPluralization(result, pluralizationNumber, lang);
|
|
913
913
|
}
|
|
914
914
|
if (params) {
|
package/index.ts
CHANGED
|
@@ -1116,7 +1116,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
1116
1116
|
await this.cache.set(cacheKey, result);
|
|
1117
1117
|
}
|
|
1118
1118
|
// if msg has '|' in it, then we need to aplly pluralization
|
|
1119
|
-
if (msg.includes('|')) {
|
|
1119
|
+
if (msg.includes('|') && pluralizationNumber !== undefined) {
|
|
1120
1120
|
result = this.applyPluralization(result, pluralizationNumber, lang);
|
|
1121
1121
|
}
|
|
1122
1122
|
|