@dhis2/analytics 23.6.7 → 23.7.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/CHANGELOG.md +21 -0
- package/build/cjs/components/FileMenu/DeleteDialog.js +2 -2
- package/build/cjs/components/FileMenu/RenameDialog.js +1 -1
- package/build/cjs/components/FileMenu/SaveAsDialog.js +1 -1
- package/build/cjs/components/FileMenu/utils.js +36 -9
- package/build/cjs/locales/ar/translations.json +4 -0
- package/build/cjs/locales/ar_EG/translations.json +4 -0
- package/build/cjs/locales/ar_IQ/translations.json +4 -0
- package/build/cjs/locales/ckb/translations.json +4 -0
- package/build/cjs/locales/cs/translations.json +4 -0
- package/build/cjs/locales/da/translations.json +4 -0
- package/build/cjs/locales/en/translations.json +4 -0
- package/build/cjs/locales/es/translations.json +4 -0
- package/build/cjs/locales/fr/translations.json +4 -0
- package/build/cjs/locales/id/translations.json +4 -0
- package/build/cjs/locales/km/translations.json +4 -0
- package/build/cjs/locales/lo/translations.json +4 -0
- package/build/cjs/locales/my/translations.json +4 -0
- package/build/cjs/locales/nb/translations.json +4 -0
- package/build/cjs/locales/nl/translations.json +4 -0
- package/build/cjs/locales/prs/translations.json +4 -0
- package/build/cjs/locales/ps/translations.json +4 -0
- package/build/cjs/locales/pt/translations.json +4 -0
- package/build/cjs/locales/pt_BR/translations.json +4 -0
- package/build/cjs/locales/ru/translations.json +4 -0
- package/build/cjs/locales/sv/translations.json +4 -0
- package/build/cjs/locales/tet/translations.json +4 -0
- package/build/cjs/locales/tg/translations.json +4 -0
- package/build/cjs/locales/uk/translations.json +4 -0
- package/build/cjs/locales/ur/translations.json +4 -0
- package/build/cjs/locales/uz/translations.json +4 -0
- package/build/cjs/locales/uz_Latn/translations.json +4 -0
- package/build/cjs/locales/vi/translations.json +4 -0
- package/build/cjs/locales/zh/translations.json +12 -8
- package/build/cjs/locales/zh_CN/translations.json +4 -0
- package/build/es/components/FileMenu/DeleteDialog.js +3 -3
- package/build/es/components/FileMenu/RenameDialog.js +2 -2
- package/build/es/components/FileMenu/SaveAsDialog.js +2 -2
- package/build/es/components/FileMenu/utils.js +23 -7
- package/build/es/locales/ar/translations.json +4 -0
- package/build/es/locales/ar_EG/translations.json +4 -0
- package/build/es/locales/ar_IQ/translations.json +4 -0
- package/build/es/locales/ckb/translations.json +4 -0
- package/build/es/locales/cs/translations.json +4 -0
- package/build/es/locales/da/translations.json +4 -0
- package/build/es/locales/en/translations.json +4 -0
- package/build/es/locales/es/translations.json +4 -0
- package/build/es/locales/fr/translations.json +4 -0
- package/build/es/locales/id/translations.json +4 -0
- package/build/es/locales/km/translations.json +4 -0
- package/build/es/locales/lo/translations.json +4 -0
- package/build/es/locales/my/translations.json +4 -0
- package/build/es/locales/nb/translations.json +4 -0
- package/build/es/locales/nl/translations.json +4 -0
- package/build/es/locales/prs/translations.json +4 -0
- package/build/es/locales/ps/translations.json +4 -0
- package/build/es/locales/pt/translations.json +4 -0
- package/build/es/locales/pt_BR/translations.json +4 -0
- package/build/es/locales/ru/translations.json +4 -0
- package/build/es/locales/sv/translations.json +4 -0
- package/build/es/locales/tet/translations.json +4 -0
- package/build/es/locales/tg/translations.json +4 -0
- package/build/es/locales/uk/translations.json +4 -0
- package/build/es/locales/ur/translations.json +4 -0
- package/build/es/locales/uz/translations.json +4 -0
- package/build/es/locales/uz_Latn/translations.json +4 -0
- package/build/es/locales/vi/translations.json +4 -0
- package/build/es/locales/zh/translations.json +12 -8
- package/build/es/locales/zh_CN/translations.json +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [23.7.2](https://github.com/dhis2/analytics/compare/v23.7.1...v23.7.2) (2022-03-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **translations:** sync translations from transifex (master) ([8b90433](https://github.com/dhis2/analytics/commit/8b90433d65124a1e79396bc15e399648e1a6edf9))
|
|
7
|
+
|
|
8
|
+
## [23.7.1](https://github.com/dhis2/analytics/compare/v23.7.0...v23.7.1) (2022-03-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **translations:** sync translations from transifex (master) ([0e19350](https://github.com/dhis2/analytics/commit/0e19350932d76ae76e2c1c7d06931786ae8d6bbe))
|
|
14
|
+
|
|
15
|
+
# [23.7.0](https://github.com/dhis2/analytics/compare/v23.6.7...v23.7.0) (2022-03-24)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **FileMenu:** use custom labels in dialog titles TECH-1035 ([#1173](https://github.com/dhis2/analytics/issues/1173)) ([4f02fdf](https://github.com/dhis2/analytics/commit/4f02fdf9d314f0705416442d39f50324d10552e4))
|
|
21
|
+
|
|
1
22
|
## [23.6.7](https://github.com/dhis2/analytics/compare/v23.6.6...v23.6.7) (2022-03-24)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -55,9 +55,9 @@ const DeleteDialog = ({
|
|
|
55
55
|
onClose: onClose,
|
|
56
56
|
dataTest: "file-menu-delete-modal"
|
|
57
57
|
}, /*#__PURE__*/_react.default.createElement(_ui.ModalTitle, null, _index.default.t('Delete {{fileType}}', {
|
|
58
|
-
fileType: type
|
|
58
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
59
59
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, null, _index.default.t('This {{fileType}} and related interpretations will be deleted. Continue?', {
|
|
60
|
-
fileType: type
|
|
60
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
61
61
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalActions, null, /*#__PURE__*/_react.default.createElement(_ui.ButtonStrip, null, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
62
62
|
onClick: onClose,
|
|
63
63
|
secondary: true,
|
|
@@ -76,7 +76,7 @@ const RenameDialog = ({
|
|
|
76
76
|
return /*#__PURE__*/_react.default.createElement(_ui.Modal, {
|
|
77
77
|
onClose: onClose
|
|
78
78
|
}, /*#__PURE__*/_react.default.createElement(_ui.ModalTitle, null, _index.default.t('Rename {{fileType}}', {
|
|
79
|
-
fileType: type
|
|
79
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
80
80
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, null, /*#__PURE__*/_react.default.createElement(_ui.InputField, {
|
|
81
81
|
label: _index.default.t('Name'),
|
|
82
82
|
disabled: loading,
|
|
@@ -42,7 +42,7 @@ const SaveAsDialog = ({
|
|
|
42
42
|
onClose: onClose,
|
|
43
43
|
dataTest: "file-menu-saveas-modal"
|
|
44
44
|
}, /*#__PURE__*/_react.default.createElement(_ui.ModalTitle, null, _index.default.t('Save {{fileType}} as', {
|
|
45
|
-
fileType: type
|
|
45
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
46
46
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, null, /*#__PURE__*/_react.default.createElement(_ui.InputField, {
|
|
47
47
|
label: _index.default.t('Name'),
|
|
48
48
|
required: true,
|
|
@@ -3,27 +3,54 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.appPathFor = exports.endpointFromFileType = exports.supportedFileTypes = void 0;
|
|
7
|
-
|
|
6
|
+
exports.appPathFor = exports.labelForFileType = exports.endpointFromFileType = exports.supportedFileTypes = exports.FILE_TYPE_EVENT_VISUALIZATION = exports.FILE_TYPE_MAP = exports.FILE_TYPE_VISUALIZATION = exports.FILE_TYPE_EVENT_REPORT = void 0;
|
|
7
|
+
|
|
8
|
+
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const FILE_TYPE_EVENT_REPORT = 'eventReport';
|
|
13
|
+
exports.FILE_TYPE_EVENT_REPORT = FILE_TYPE_EVENT_REPORT;
|
|
14
|
+
const FILE_TYPE_VISUALIZATION = 'visualization';
|
|
15
|
+
exports.FILE_TYPE_VISUALIZATION = FILE_TYPE_VISUALIZATION;
|
|
16
|
+
const FILE_TYPE_MAP = 'map';
|
|
17
|
+
exports.FILE_TYPE_MAP = FILE_TYPE_MAP;
|
|
18
|
+
const FILE_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
19
|
+
exports.FILE_TYPE_EVENT_VISUALIZATION = FILE_TYPE_EVENT_VISUALIZATION;
|
|
20
|
+
const supportedFileTypes = [FILE_TYPE_EVENT_REPORT, FILE_TYPE_VISUALIZATION, FILE_TYPE_MAP, FILE_TYPE_EVENT_VISUALIZATION];
|
|
8
21
|
exports.supportedFileTypes = supportedFileTypes;
|
|
9
22
|
|
|
10
|
-
const endpointFromFileType = fileType =>
|
|
23
|
+
const endpointFromFileType = fileType => "".concat(fileType, "s");
|
|
24
|
+
|
|
25
|
+
exports.endpointFromFileType = endpointFromFileType;
|
|
26
|
+
|
|
27
|
+
const labelForFileType = fileType => {
|
|
11
28
|
switch (fileType) {
|
|
12
|
-
case
|
|
13
|
-
|
|
29
|
+
case FILE_TYPE_EVENT_REPORT:
|
|
30
|
+
return _d2I18n.default.t('event report');
|
|
31
|
+
|
|
32
|
+
case FILE_TYPE_EVENT_VISUALIZATION:
|
|
33
|
+
return _d2I18n.default.t('line list');
|
|
34
|
+
|
|
35
|
+
case FILE_TYPE_MAP:
|
|
36
|
+
return _d2I18n.default.t('map');
|
|
37
|
+
|
|
38
|
+
case FILE_TYPE_VISUALIZATION:
|
|
39
|
+
return _d2I18n.default.t('visualization');
|
|
40
|
+
|
|
14
41
|
default:
|
|
15
|
-
return
|
|
42
|
+
return fileType;
|
|
16
43
|
}
|
|
17
44
|
};
|
|
18
45
|
|
|
19
|
-
exports.
|
|
46
|
+
exports.labelForFileType = labelForFileType;
|
|
20
47
|
|
|
21
48
|
const appPathFor = (fileType, id) => {
|
|
22
49
|
switch (fileType) {
|
|
23
|
-
case
|
|
50
|
+
case FILE_TYPE_VISUALIZATION:
|
|
24
51
|
return "dhis-web-data-visualizer/#/".concat(id);
|
|
25
52
|
|
|
26
|
-
case
|
|
53
|
+
case FILE_TYPE_MAP:
|
|
27
54
|
return "dhis-web-maps/index.html?id=".concat(id);
|
|
28
55
|
|
|
29
56
|
default:
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
"Description": "الوصف",
|
|
84
84
|
"Rename": "إعادة التسمية",
|
|
85
85
|
"Save {{fileType}} as": "",
|
|
86
|
+
"event report": "تقارير عن الأحداث",
|
|
87
|
+
"line list": "",
|
|
88
|
+
"map": "خريطة",
|
|
89
|
+
"visualization": "",
|
|
86
90
|
"Created by": "تم الإنشاء بواسطة",
|
|
87
91
|
"Anyone": "أي شخص",
|
|
88
92
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Popis",
|
|
82
82
|
"Rename": "Přejmenovat",
|
|
83
83
|
"Save {{fileType}} as": "Uložit {{fileType}} jako",
|
|
84
|
+
"event report": "zpráva o události",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "mapa",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Vytvořil",
|
|
85
89
|
"Anyone": "Kdokoliv",
|
|
86
90
|
"Only you": "Jen vy",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Rename",
|
|
81
81
|
"Save {{fileType}} as": "Save {{fileType}} as",
|
|
82
|
+
"event report": "event report",
|
|
83
|
+
"line list": "line list",
|
|
84
|
+
"map": "map",
|
|
85
|
+
"visualization": "visualization",
|
|
82
86
|
"Created by": "Created by",
|
|
83
87
|
"Anyone": "Anyone",
|
|
84
88
|
"Only you": "Only you",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descripción",
|
|
80
80
|
"Rename": "Renombrar",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "informe de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Creado por",
|
|
83
87
|
"Anyone": "Alguien",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Renommer",
|
|
81
81
|
"Save {{fileType}} as": "Enregistrer {{fileType}} comme",
|
|
82
|
+
"event report": "Rapport d'évènements",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "carte",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Créé par",
|
|
83
87
|
"Anyone": "Toute personne",
|
|
84
88
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Deskripsi",
|
|
79
79
|
"Rename": "Ganti nama",
|
|
80
80
|
"Save {{fileType}} as": "Simpan {{fileType}} sebagai",
|
|
81
|
+
"event report": "",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Dibuat oleh",
|
|
82
86
|
"Anyone": "Siapa saja",
|
|
83
87
|
"Only you": "Hanya kamu",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Beskrivelse",
|
|
80
80
|
"Rename": "Gi nytt navn",
|
|
81
81
|
"Save {{fileType}} as": "Lagre {{fileType}} som",
|
|
82
|
+
"event report": "hendelsesrapport",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "kart",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Opprettet av",
|
|
83
87
|
"Anyone": "Hvem som helst",
|
|
84
88
|
"Only you": "Bare deg",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "تشریح [ ژباړه ـ نښه ـ تشریح ]",
|
|
80
80
|
"Rename": "بیا نومول",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "لخوا ایجاد یا رامنځ ته شوی",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descrição",
|
|
80
80
|
"Rename": "Renomear",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "relatório de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Criado por",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Описание",
|
|
82
82
|
"Rename": "Переименовать",
|
|
83
83
|
"Save {{fileType}} as": "",
|
|
84
|
+
"event report": "Отчет случаев",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "Карта",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Создано",
|
|
85
89
|
"Anyone": "Любой",
|
|
86
90
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Тавсиф",
|
|
79
79
|
"Rename": "Қайта номлашч",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "ҳодиса/тадбир ҳисоботи",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "харита",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Кимдир",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Tavsif",
|
|
79
79
|
"Rename": "Қайта номлаш",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "hodisa/tadbir hisoboti",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "xarita",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Kimdir",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Miêu tả",
|
|
79
79
|
"Rename": "Đổi tên",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "báo cáo sự kiện",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "bản đồ",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Được tạo bởi",
|
|
82
86
|
"Anyone": "Bất kỳ ai",
|
|
83
87
|
"Only you": "",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"view only": "
|
|
2
|
+
"view only": "只查看",
|
|
3
3
|
"view and edit": "查看和编辑",
|
|
4
4
|
"all users ({{accessLevel}})": "所有用户 ({{accessLevel}})",
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "描述",
|
|
79
79
|
"Rename": "改名",
|
|
80
80
|
"Save {{fileType}} as": "将{{fileType}}另存为",
|
|
81
|
+
"event report": "事件报表",
|
|
82
|
+
"line list": "行列表",
|
|
83
|
+
"map": "地图",
|
|
84
|
+
"visualization": "可视化",
|
|
81
85
|
"Created by": "创建人",
|
|
82
86
|
"Anyone": "任何人",
|
|
83
87
|
"Only you": "只有你",
|
|
@@ -109,13 +113,13 @@
|
|
|
109
113
|
"No maps found. Click New map to get started.": "未找到地图。单击新地图开始。",
|
|
110
114
|
"No maps found. Try adjusting your search or filter options to find what you're looking for.": "未找到地图。尝试调整您的搜索或过滤选项以找到您要查找的内容。",
|
|
111
115
|
"New map": "新地图",
|
|
112
|
-
"Open a line list": "",
|
|
113
|
-
"Loading line lists": "",
|
|
114
|
-
"Couldn't load line lists": "",
|
|
115
|
-
"There was a problem loading line lists. Try again or contact your system administrator.": "",
|
|
116
|
-
"No line lists found. Click New line list to get started.": "",
|
|
117
|
-
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "",
|
|
118
|
-
"New line list": "",
|
|
116
|
+
"Open a line list": "打开一个行列表",
|
|
117
|
+
"Loading line lists": "加载行列表",
|
|
118
|
+
"Couldn't load line lists": "无法加载行列表",
|
|
119
|
+
"There was a problem loading line lists. Try again or contact your system administrator.": "加载行列表时出现问题。重试或联系您的系统管理员。",
|
|
120
|
+
"No line lists found. Click New line list to get started.": "未找到行列表。单击新行列表开始。",
|
|
121
|
+
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "未找到行列表。尝试调整您的搜索或过滤选项以找到您要查找的内容。",
|
|
122
|
+
"New line list": "新行列表",
|
|
119
123
|
"Options": "选项",
|
|
120
124
|
"Hide": "隐藏",
|
|
121
125
|
"Update": "更新",
|
|
@@ -3,7 +3,7 @@ import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button } fr
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import i18n from '../../locales/index.js';
|
|
6
|
-
import { supportedFileTypes, endpointFromFileType } from './utils.js';
|
|
6
|
+
import { supportedFileTypes, endpointFromFileType, labelForFileType } from './utils.js';
|
|
7
7
|
|
|
8
8
|
const getMutation = type => ({
|
|
9
9
|
resource: endpointFromFileType(type),
|
|
@@ -37,9 +37,9 @@ export const DeleteDialog = ({
|
|
|
37
37
|
onClose: onClose,
|
|
38
38
|
dataTest: "file-menu-delete-modal"
|
|
39
39
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, i18n.t('Delete {{fileType}}', {
|
|
40
|
-
fileType: type
|
|
40
|
+
fileType: labelForFileType(type)
|
|
41
41
|
})), /*#__PURE__*/React.createElement(ModalContent, null, i18n.t('This {{fileType}} and related interpretations will be deleted. Continue?', {
|
|
42
|
-
fileType: type
|
|
42
|
+
fileType: labelForFileType(type)
|
|
43
43
|
})), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
44
44
|
onClick: onClose,
|
|
45
45
|
secondary: true,
|
|
@@ -3,7 +3,7 @@ import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button, Inp
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useMemo, useState } from 'react';
|
|
5
5
|
import i18n from '../../locales/index.js';
|
|
6
|
-
import { supportedFileTypes, endpointFromFileType } from './utils.js';
|
|
6
|
+
import { supportedFileTypes, endpointFromFileType, labelForFileType } from './utils.js';
|
|
7
7
|
|
|
8
8
|
const getMutation = type => ({
|
|
9
9
|
resource: endpointFromFileType(type),
|
|
@@ -58,7 +58,7 @@ export const RenameDialog = ({
|
|
|
58
58
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
59
59
|
onClose: onClose
|
|
60
60
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, i18n.t('Rename {{fileType}}', {
|
|
61
|
-
fileType: type
|
|
61
|
+
fileType: labelForFileType(type)
|
|
62
62
|
})), /*#__PURE__*/React.createElement(ModalContent, null, /*#__PURE__*/React.createElement(InputField, {
|
|
63
63
|
label: i18n.t('Name'),
|
|
64
64
|
disabled: loading,
|
|
@@ -2,7 +2,7 @@ import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button, Inp
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import i18n from '../../locales/index.js';
|
|
5
|
-
import { supportedFileTypes } from './utils.js';
|
|
5
|
+
import { supportedFileTypes, labelForFileType } from './utils.js';
|
|
6
6
|
export const SaveAsDialog = ({
|
|
7
7
|
type,
|
|
8
8
|
object,
|
|
@@ -24,7 +24,7 @@ export const SaveAsDialog = ({
|
|
|
24
24
|
onClose: onClose,
|
|
25
25
|
dataTest: "file-menu-saveas-modal"
|
|
26
26
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, i18n.t('Save {{fileType}} as', {
|
|
27
|
-
fileType: type
|
|
27
|
+
fileType: labelForFileType(type)
|
|
28
28
|
})), /*#__PURE__*/React.createElement(ModalContent, null, /*#__PURE__*/React.createElement(InputField, {
|
|
29
29
|
label: i18n.t('Name'),
|
|
30
30
|
required: true,
|
|
@@ -1,18 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
export const
|
|
1
|
+
import i18n from '@dhis2/d2-i18n';
|
|
2
|
+
export const FILE_TYPE_EVENT_REPORT = 'eventReport';
|
|
3
|
+
export const FILE_TYPE_VISUALIZATION = 'visualization';
|
|
4
|
+
export const FILE_TYPE_MAP = 'map';
|
|
5
|
+
export const FILE_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
6
|
+
export const supportedFileTypes = [FILE_TYPE_EVENT_REPORT, FILE_TYPE_VISUALIZATION, FILE_TYPE_MAP, FILE_TYPE_EVENT_VISUALIZATION];
|
|
7
|
+
export const endpointFromFileType = fileType => "".concat(fileType, "s");
|
|
8
|
+
export const labelForFileType = fileType => {
|
|
3
9
|
switch (fileType) {
|
|
4
|
-
case
|
|
5
|
-
|
|
10
|
+
case FILE_TYPE_EVENT_REPORT:
|
|
11
|
+
return i18n.t('event report');
|
|
12
|
+
|
|
13
|
+
case FILE_TYPE_EVENT_VISUALIZATION:
|
|
14
|
+
return i18n.t('line list');
|
|
15
|
+
|
|
16
|
+
case FILE_TYPE_MAP:
|
|
17
|
+
return i18n.t('map');
|
|
18
|
+
|
|
19
|
+
case FILE_TYPE_VISUALIZATION:
|
|
20
|
+
return i18n.t('visualization');
|
|
21
|
+
|
|
6
22
|
default:
|
|
7
|
-
return
|
|
23
|
+
return fileType;
|
|
8
24
|
}
|
|
9
25
|
};
|
|
10
26
|
export const appPathFor = (fileType, id) => {
|
|
11
27
|
switch (fileType) {
|
|
12
|
-
case
|
|
28
|
+
case FILE_TYPE_VISUALIZATION:
|
|
13
29
|
return "dhis-web-data-visualizer/#/".concat(id);
|
|
14
30
|
|
|
15
|
-
case
|
|
31
|
+
case FILE_TYPE_MAP:
|
|
16
32
|
return "dhis-web-maps/index.html?id=".concat(id);
|
|
17
33
|
|
|
18
34
|
default:
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
"Description": "الوصف",
|
|
84
84
|
"Rename": "إعادة التسمية",
|
|
85
85
|
"Save {{fileType}} as": "",
|
|
86
|
+
"event report": "تقارير عن الأحداث",
|
|
87
|
+
"line list": "",
|
|
88
|
+
"map": "خريطة",
|
|
89
|
+
"visualization": "",
|
|
86
90
|
"Created by": "تم الإنشاء بواسطة",
|
|
87
91
|
"Anyone": "أي شخص",
|
|
88
92
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Popis",
|
|
82
82
|
"Rename": "Přejmenovat",
|
|
83
83
|
"Save {{fileType}} as": "Uložit {{fileType}} jako",
|
|
84
|
+
"event report": "zpráva o události",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "mapa",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Vytvořil",
|
|
85
89
|
"Anyone": "Kdokoliv",
|
|
86
90
|
"Only you": "Jen vy",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Rename",
|
|
81
81
|
"Save {{fileType}} as": "Save {{fileType}} as",
|
|
82
|
+
"event report": "event report",
|
|
83
|
+
"line list": "line list",
|
|
84
|
+
"map": "map",
|
|
85
|
+
"visualization": "visualization",
|
|
82
86
|
"Created by": "Created by",
|
|
83
87
|
"Anyone": "Anyone",
|
|
84
88
|
"Only you": "Only you",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descripción",
|
|
80
80
|
"Rename": "Renombrar",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "informe de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Creado por",
|
|
83
87
|
"Anyone": "Alguien",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Renommer",
|
|
81
81
|
"Save {{fileType}} as": "Enregistrer {{fileType}} comme",
|
|
82
|
+
"event report": "Rapport d'évènements",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "carte",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Créé par",
|
|
83
87
|
"Anyone": "Toute personne",
|
|
84
88
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Deskripsi",
|
|
79
79
|
"Rename": "Ganti nama",
|
|
80
80
|
"Save {{fileType}} as": "Simpan {{fileType}} sebagai",
|
|
81
|
+
"event report": "",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Dibuat oleh",
|
|
82
86
|
"Anyone": "Siapa saja",
|
|
83
87
|
"Only you": "Hanya kamu",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Beskrivelse",
|
|
80
80
|
"Rename": "Gi nytt navn",
|
|
81
81
|
"Save {{fileType}} as": "Lagre {{fileType}} som",
|
|
82
|
+
"event report": "hendelsesrapport",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "kart",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Opprettet av",
|
|
83
87
|
"Anyone": "Hvem som helst",
|
|
84
88
|
"Only you": "Bare deg",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "تشریح [ ژباړه ـ نښه ـ تشریح ]",
|
|
80
80
|
"Rename": "بیا نومول",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "لخوا ایجاد یا رامنځ ته شوی",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descrição",
|
|
80
80
|
"Rename": "Renomear",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "relatório de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Criado por",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Описание",
|
|
82
82
|
"Rename": "Переименовать",
|
|
83
83
|
"Save {{fileType}} as": "",
|
|
84
|
+
"event report": "Отчет случаев",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "Карта",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Создано",
|
|
85
89
|
"Anyone": "Любой",
|
|
86
90
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Тавсиф",
|
|
79
79
|
"Rename": "Қайта номлашч",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "ҳодиса/тадбир ҳисоботи",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "харита",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Кимдир",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Tavsif",
|
|
79
79
|
"Rename": "Қайта номлаш",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "hodisa/tadbir hisoboti",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "xarita",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Kimdir",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Miêu tả",
|
|
79
79
|
"Rename": "Đổi tên",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "báo cáo sự kiện",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "bản đồ",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Được tạo bởi",
|
|
82
86
|
"Anyone": "Bất kỳ ai",
|
|
83
87
|
"Only you": "",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"view only": "
|
|
2
|
+
"view only": "只查看",
|
|
3
3
|
"view and edit": "查看和编辑",
|
|
4
4
|
"all users ({{accessLevel}})": "所有用户 ({{accessLevel}})",
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "描述",
|
|
79
79
|
"Rename": "改名",
|
|
80
80
|
"Save {{fileType}} as": "将{{fileType}}另存为",
|
|
81
|
+
"event report": "事件报表",
|
|
82
|
+
"line list": "行列表",
|
|
83
|
+
"map": "地图",
|
|
84
|
+
"visualization": "可视化",
|
|
81
85
|
"Created by": "创建人",
|
|
82
86
|
"Anyone": "任何人",
|
|
83
87
|
"Only you": "只有你",
|
|
@@ -109,13 +113,13 @@
|
|
|
109
113
|
"No maps found. Click New map to get started.": "未找到地图。单击新地图开始。",
|
|
110
114
|
"No maps found. Try adjusting your search or filter options to find what you're looking for.": "未找到地图。尝试调整您的搜索或过滤选项以找到您要查找的内容。",
|
|
111
115
|
"New map": "新地图",
|
|
112
|
-
"Open a line list": "",
|
|
113
|
-
"Loading line lists": "",
|
|
114
|
-
"Couldn't load line lists": "",
|
|
115
|
-
"There was a problem loading line lists. Try again or contact your system administrator.": "",
|
|
116
|
-
"No line lists found. Click New line list to get started.": "",
|
|
117
|
-
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "",
|
|
118
|
-
"New line list": "",
|
|
116
|
+
"Open a line list": "打开一个行列表",
|
|
117
|
+
"Loading line lists": "加载行列表",
|
|
118
|
+
"Couldn't load line lists": "无法加载行列表",
|
|
119
|
+
"There was a problem loading line lists. Try again or contact your system administrator.": "加载行列表时出现问题。重试或联系您的系统管理员。",
|
|
120
|
+
"No line lists found. Click New line list to get started.": "未找到行列表。单击新行列表开始。",
|
|
121
|
+
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "未找到行列表。尝试调整您的搜索或过滤选项以找到您要查找的内容。",
|
|
122
|
+
"New line list": "新行列表",
|
|
119
123
|
"Options": "选项",
|
|
120
124
|
"Hide": "隐藏",
|
|
121
125
|
"Update": "更新",
|