@steedos/i18n 2.5.3-beta.2 → 2.5.3-beta.20
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.
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clearCacher = exports.getCacher = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* @Author: baozhoutao@steedos.com
|
|
6
|
+
* @Date: 2022-06-09 15:03:56
|
|
7
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
8
|
+
* @LastEditTime: 2022-06-09 15:47:58
|
|
9
|
+
* @Description:
|
|
10
|
+
*/
|
|
11
|
+
var CACHER_MAP = {};
|
|
12
|
+
var getCacher = function (name) {
|
|
13
|
+
if (!CACHER_MAP[name]) {
|
|
14
|
+
CACHER_MAP[name] = new Cacher();
|
|
15
|
+
}
|
|
16
|
+
return CACHER_MAP[name];
|
|
17
|
+
};
|
|
18
|
+
exports.getCacher = getCacher;
|
|
19
|
+
var clearCacher = function (name) {
|
|
20
|
+
if (CACHER_MAP[name]) {
|
|
21
|
+
CACHER_MAP[name].clear();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.clearCacher = clearCacher;
|
|
25
|
+
var Cacher = /** @class */ (function () {
|
|
26
|
+
function Cacher() {
|
|
27
|
+
this.cache = {};
|
|
28
|
+
this.hit = 0;
|
|
29
|
+
this.count = 0;
|
|
30
|
+
}
|
|
31
|
+
Cacher.prototype.getHitRate = function () {
|
|
32
|
+
return (this.hit / this.count * 100).toFixed(2) + "%";
|
|
33
|
+
};
|
|
34
|
+
Cacher.prototype.get = function (key) {
|
|
35
|
+
var data = this.cache[key];
|
|
36
|
+
this.count++;
|
|
37
|
+
if (data) {
|
|
38
|
+
this.hit++;
|
|
39
|
+
}
|
|
40
|
+
return data;
|
|
41
|
+
};
|
|
42
|
+
Cacher.prototype.set = function (key, value) {
|
|
43
|
+
this.cache[key] = value;
|
|
44
|
+
};
|
|
45
|
+
Cacher.prototype.clear = function () {
|
|
46
|
+
this.cache = {};
|
|
47
|
+
};
|
|
48
|
+
return Cacher;
|
|
49
|
+
}());
|
|
50
|
+
//# sourceMappingURL=cacher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacher.js","sourceRoot":"","sources":["../../src/translations/cacher.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,IAAM,UAAU,GAAG,EAAE,CAAC;AAEf,IAAM,SAAS,GAAG,UAAU,IAAY;IAC3C,IAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAC;QACjB,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,MAAM,EAAE,CAAC;KACnC;IACD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAA;AALY,QAAA,SAAS,aAKrB;AAEM,IAAM,WAAW,GAAG,UAAU,IAAqB;IACtD,IAAG,UAAU,CAAC,IAAI,CAAC,EAAC;QAChB,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;KAC5B;AACL,CAAC,CAAA;AAJY,QAAA,WAAW,eAIvB;AAED;IAII;QACI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,2BAAU,GAAV;QACI,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAC1D,CAAC;IACD,oBAAG,GAAH,UAAI,GAAW;QACX,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK,EAAG,CAAE;QACf,IAAG,IAAI,EAAC;YACJ,IAAI,CAAC,GAAG,EAAG,CAAC;SACf;QACD,OAAO,IAAI,CAAA;IACf,CAAC;IACD,oBAAG,GAAH,UAAI,GAAW,EAAE,KAAU;QACvB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC5B,CAAC;IACD,sBAAK,GAAL;QACI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;IACnB,CAAC;IACL,aAAC;AAAD,CAAC,AA1BD,IA0BC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/i18n",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.5.3-beta.
|
|
4
|
+
"version": "2.5.3-beta.20",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@steedos/cachers": "2.5.3-beta.
|
|
14
|
+
"@steedos/cachers": "2.5.3-beta.20",
|
|
15
15
|
"i18next": "^19.3.4",
|
|
16
16
|
"i18next-sprintf-postprocessor": "^0.2.2",
|
|
17
17
|
"underscore": "1.13.4"
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "32606d2d07b6e53a4d6c8ba079e6356f5a2dbb75"
|
|
26
26
|
}
|
|
@@ -1257,6 +1257,7 @@ CustomLabels:
|
|
|
1257
1257
|
pending: In Progress
|
|
1258
1258
|
completed: Finished
|
|
1259
1259
|
monitor: Monitor
|
|
1260
|
+
myfile: My File
|
|
1260
1261
|
FlowName: Workflow Name
|
|
1261
1262
|
My Approval: My Approval
|
|
1262
1263
|
My Applications: My Applications
|
|
@@ -1934,12 +1935,12 @@ CustomLabels:
|
|
|
1934
1935
|
process_delegation_rules_end_time: End Time
|
|
1935
1936
|
process_delegation_rules_start_must_lt_end: Strat time must less than end time
|
|
1936
1937
|
process_delegation_rules_description: "{$userName} delegated"
|
|
1938
|
+
process_delegation_rules_time_repeat: Please confirm that the order period overlaps with other request periods.
|
|
1937
1939
|
process_delegation_rules_cannot_deltegation_eachother: Only allow one-way delegation
|
|
1938
1940
|
instance_handler_name: Handler
|
|
1939
1941
|
instance_handler_organization_fullname: Organization
|
|
1940
1942
|
instance_approve_timeout_auto_submitted: Timeout auto submitted
|
|
1941
1943
|
categories_in_use: Category is in use and cannot be deleted
|
|
1942
|
-
process_delegation_rules_only_one: You already set process delegation rule
|
|
1943
1944
|
instance_approve_modal_modificationsave: saved
|
|
1944
1945
|
instance_print_traces_simplify: Simplify
|
|
1945
1946
|
instance_print_a4_vertical: A4Vertical
|
|
@@ -1164,6 +1164,7 @@ CustomLabels:
|
|
|
1164
1164
|
pending: 进行中
|
|
1165
1165
|
completed: 已完成
|
|
1166
1166
|
monitor: 监控箱
|
|
1167
|
+
myfile: 我的文件
|
|
1167
1168
|
FlowName: 名称
|
|
1168
1169
|
My Approval: 审核
|
|
1169
1170
|
My Applications: 我的申请单
|
|
@@ -1782,12 +1783,12 @@ CustomLabels:
|
|
|
1782
1783
|
process_delegation_rules_end_time: 委托结束
|
|
1783
1784
|
process_delegation_rules_start_must_lt_end: 开始时间应小于结束时间
|
|
1784
1785
|
process_delegation_rules_description: "{$userName}委托"
|
|
1786
|
+
process_delegation_rules_time_repeat: 委托时间段与其他委托时间段有重叠,请确认。
|
|
1785
1787
|
process_delegation_rules_cannot_deltegation_eachother: 只允许单向委托, 请更换被委托人或者调整委托时间
|
|
1786
1788
|
instance_handler_name: 处理人
|
|
1787
1789
|
instance_handler_organization_fullname: 部门
|
|
1788
1790
|
instance_approve_timeout_auto_submitted: 超时自动跳过
|
|
1789
1791
|
categories_in_use: 分类在使用中,不能删除
|
|
1790
|
-
process_delegation_rules_only_one: 您已设置委托规则,修改即可
|
|
1791
1792
|
instance_approve_modal_modificationsave: 您的修改保存成功
|
|
1792
1793
|
instance_print_traces_simplify: 精简
|
|
1793
1794
|
instance_print_a4_vertical: A4纵向
|