foreman-tasks 7.2.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby_tests.yml +4 -0
  3. data/app/helpers/foreman_tasks/foreman_tasks_helper.rb +2 -2
  4. data/app/lib/actions/middleware/watch_delegated_proxy_sub_tasks.rb +1 -1
  5. data/app/models/foreman_tasks/recurring_logic.rb +13 -5
  6. data/app/views/foreman_tasks/api/recurring_logics/base.json.rabl +6 -1
  7. data/app/views/foreman_tasks/recurring_logics/index.html.erb +1 -1
  8. data/config/routes.rb +0 -1
  9. data/db/migrate/20211123170430_tasks_settings_to_dsl_category.rb +1 -1
  10. data/foreman-tasks.gemspec +2 -2
  11. data/lib/foreman_tasks/engine.rb +3 -8
  12. data/lib/foreman_tasks/version.rb +1 -1
  13. data/lib/tasks/gettext.rake +1 -1
  14. data/locale/de/foreman_tasks.po +12 -15
  15. data/locale/en/foreman_tasks.po +9 -12
  16. data/locale/es/foreman_tasks.po +12 -15
  17. data/locale/foreman_tasks.pot +19 -23
  18. data/locale/fr/foreman_tasks.po +12 -15
  19. data/locale/ja/foreman_tasks.po +12 -15
  20. data/locale/ka/foreman_tasks.po +12 -15
  21. data/locale/ko/foreman_tasks.po +10 -13
  22. data/locale/pt_BR/foreman_tasks.po +12 -15
  23. data/locale/ru/foreman_tasks.po +10 -13
  24. data/locale/zh_CN/foreman_tasks.po +12 -15
  25. data/locale/zh_TW/foreman_tasks.po +10 -13
  26. data/package.json +6 -6
  27. data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskButtons.js +1 -1
  28. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskButtons.test.js.snap +2 -2
  29. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.js +2 -2
  30. data/webpack/ForemanTasks/Components/TasksTable/Components/SelectAllAlert.js +9 -3
  31. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/SelectAllAlert.test.js.snap +23 -17
  32. data/webpack/ForemanTasks/Components/TasksTable/TasksBulkActions.js +3 -3
  33. data/webpack/ForemanTasks/Components/TasksTable/TasksTable.js +2 -2
  34. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTable.test.js.snap +1 -1
  35. metadata +13 -13
@@ -18,9 +18,6 @@ msgstr ""
18
18
  "Language: ka\n"
19
19
  "Plural-Forms: nplurals=2; plural=(n!=1);\n"
20
20
 
21
- msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
22
- msgstr "ავტომატური ჩატვირთვის ${taskReload ? 'გაჩერება' : 'გაშვება'}"
23
-
24
21
  msgid "%(last)s Last %(time)s"
25
22
  msgstr "%(last)s ბოლო %(time)-ჯერ"
26
23
 
@@ -72,8 +69,8 @@ msgstr "აქტიური ფილტრები:"
72
69
  msgid "Active or disabled recurring logic with purpose %s already exists"
73
70
  msgstr "აქტიური ან გამრთული განმეორებადი ლოგიკა დანიშნულებით %s უკვე არსებობს"
74
71
 
75
- msgid "All %s tasks are selected. "
76
- msgstr "მონიშნულია ყველა %s ამოცანა. "
72
+ msgid "All %s tasks are selected."
73
+ msgstr ""
77
74
 
78
75
  msgid "All proxies with the required feature are unavailable at the moment"
79
76
  msgstr "მოთხოვნილი ფუნქციების მქონე ყველა პროქსი ამჟამად მიუწვდომელია"
@@ -163,11 +160,8 @@ msgstr "კონფლიქტი ამოცანებთან:"
163
160
  msgid "Could not cancel step."
164
161
  msgstr "ბიჯის გაუქმების შეცდომა."
165
162
 
166
- msgid "Could not receive data: ${APIerror && APIerror.message}"
167
- msgstr "მონაცემების მიღების შეცდომა: ${APIerror && APIerror.message}"
168
-
169
- msgid "Could not receive data: ${error && error.message}"
170
- msgstr "მონაცემების მიღების შეცდომა: ${error && error.message}"
163
+ msgid "Could not receive data: %s"
164
+ msgstr ""
171
165
 
172
166
  msgid "Cron line"
173
167
  msgstr "Cron-ის სტრიქონი"
@@ -548,8 +542,8 @@ msgstr "ამ პრობლემის გადასაწყვეტა
548
542
  msgid "Select Action"
549
543
  msgstr "აირჩიეთ ქმედება"
550
544
 
551
- msgid "Select All"
552
- msgstr "ყველას მონიშვნა"
545
+ msgid "Select all {count} tasks"
546
+ msgstr ""
553
547
 
554
548
  msgid "Select row"
555
549
  msgstr "აირჩიეთ მწკრივი"
@@ -569,6 +563,9 @@ msgstr "განმეორებადი ლოგიკის დეტა
569
563
  msgid "Start at"
570
564
  msgstr "დასაწყისი"
571
565
 
566
+ msgid "Start auto-reloading"
567
+ msgstr ""
568
+
572
569
  msgid "Start before"
573
570
  msgstr "მითითებულ დრომდე გასვება"
574
571
 
@@ -584,6 +581,9 @@ msgstr "State"
584
581
  msgid "Step Canceled"
585
582
  msgstr "ბიჯი გაუქმებულია"
586
583
 
584
+ msgid "Stop auto-reloading"
585
+ msgstr ""
586
+
587
587
  msgid "Stop selected stoppable tasks"
588
588
  msgstr "მონიშნული გაჩერებადი ამოცანების გაჩერება"
589
589
 
@@ -846,9 +846,6 @@ msgstr "ამოცანა გაუქმებადი უნდა იყ
846
846
  msgid "task has to be resumable"
847
847
  msgstr "ამოცანა გაგრძელებადი უნდა იყოს"
848
848
 
849
- msgid "tasks."
850
- msgstr "ამოცანა."
851
-
852
849
  msgid "time"
853
850
  msgstr "დრო"
854
851
 
@@ -16,9 +16,6 @@ msgstr ""
16
16
  "Language: ko\n"
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
 
19
- msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
20
- msgstr ""
21
-
22
19
  msgid "%(last)s Last %(time)s"
23
20
  msgstr ""
24
21
 
@@ -70,7 +67,7 @@ msgstr ""
70
67
  msgid "Active or disabled recurring logic with purpose %s already exists"
71
68
  msgstr ""
72
69
 
73
- msgid "All %s tasks are selected. "
70
+ msgid "All %s tasks are selected."
74
71
  msgstr ""
75
72
 
76
73
  msgid "All proxies with the required feature are unavailable at the moment"
@@ -161,10 +158,7 @@ msgstr "태스크 충돌:"
161
158
  msgid "Could not cancel step."
162
159
  msgstr ""
163
160
 
164
- msgid "Could not receive data: ${APIerror && APIerror.message}"
165
- msgstr ""
166
-
167
- msgid "Could not receive data: ${error && error.message}"
161
+ msgid "Could not receive data: %s"
168
162
  msgstr ""
169
163
 
170
164
  msgid "Cron line"
@@ -546,8 +540,8 @@ msgstr ""
546
540
  msgid "Select Action"
547
541
  msgstr "작업 선택 "
548
542
 
549
- msgid "Select All"
550
- msgstr "모두 선택 "
543
+ msgid "Select all {count} tasks"
544
+ msgstr ""
551
545
 
552
546
  msgid "Select row"
553
547
  msgstr ""
@@ -567,6 +561,9 @@ msgstr "반복 로직 정보 표시"
567
561
  msgid "Start at"
568
562
  msgstr "시작 일시"
569
563
 
564
+ msgid "Start auto-reloading"
565
+ msgstr ""
566
+
570
567
  msgid "Start before"
571
568
  msgstr "다음 시간 전에 시작"
572
569
 
@@ -582,6 +579,9 @@ msgstr "상태 "
582
579
  msgid "Step Canceled"
583
580
  msgstr ""
584
581
 
582
+ msgid "Stop auto-reloading"
583
+ msgstr ""
584
+
585
585
  msgid "Stop selected stoppable tasks"
586
586
  msgstr ""
587
587
 
@@ -844,9 +844,6 @@ msgstr ""
844
844
  msgid "task has to be resumable"
845
845
  msgstr ""
846
846
 
847
- msgid "tasks."
848
- msgstr ""
849
-
850
847
  msgid "time"
851
848
  msgstr ""
852
849
 
@@ -20,9 +20,6 @@ msgstr ""
20
20
  "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 100000"
21
21
  "0 == 0 ? 1 : 2;\n"
22
22
 
23
- msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
24
- msgstr "${taskReload ? 'Stop' : 'Start'} auto-recarregamento"
25
-
26
23
  msgid "%(last)s Last %(time)s"
27
24
  msgstr "%(last)s Último %(time)s"
28
25
 
@@ -74,8 +71,8 @@ msgstr "Filtros ativos:"
74
71
  msgid "Active or disabled recurring logic with purpose %s already exists"
75
72
  msgstr "Lógica recorrente ativa ou desativada com finalidade %s já existe"
76
73
 
77
- msgid "All %s tasks are selected. "
78
- msgstr "Todas as tarefas %s são selecionadas. "
74
+ msgid "All %s tasks are selected."
75
+ msgstr ""
79
76
 
80
77
  msgid "All proxies with the required feature are unavailable at the moment"
81
78
  msgstr "Todos os proxies com o recurso exigido estão indisponíveis no momento"
@@ -165,11 +162,8 @@ msgstr "Conflitos com tarefas:"
165
162
  msgid "Could not cancel step."
166
163
  msgstr "Não foi possível cancelar a etapa."
167
164
 
168
- msgid "Could not receive data: ${APIerror && APIerror.message}"
169
- msgstr "Não foi possível receber dados: ${APIerror && APIerror.message}"
170
-
171
- msgid "Could not receive data: ${error && error.message}"
172
- msgstr "Não foi possível receber dados: ${error && error.message}"
165
+ msgid "Could not receive data: %s"
166
+ msgstr ""
173
167
 
174
168
  msgid "Cron line"
175
169
  msgstr "Cron line"
@@ -550,8 +544,8 @@ msgstr "Veja %{link} para mais detalhes sobre como resolver a questão"
550
544
  msgid "Select Action"
551
545
  msgstr "Selecionar Ação"
552
546
 
553
- msgid "Select All"
554
- msgstr "Selecionar tudo"
547
+ msgid "Select all {count} tasks"
548
+ msgstr ""
555
549
 
556
550
  msgid "Select row"
557
551
  msgstr "Selecionar linha"
@@ -571,6 +565,9 @@ msgstr "Exibir detalhes de lógica recorrente "
571
565
  msgid "Start at"
572
566
  msgstr "Iniciar em "
573
567
 
568
+ msgid "Start auto-reloading"
569
+ msgstr ""
570
+
574
571
  msgid "Start before"
575
572
  msgstr "Iniciar antes "
576
573
 
@@ -586,6 +583,9 @@ msgstr "Estado"
586
583
  msgid "Step Canceled"
587
584
  msgstr "Etapa cancelada"
588
585
 
586
+ msgid "Stop auto-reloading"
587
+ msgstr ""
588
+
589
589
  msgid "Stop selected stoppable tasks"
590
590
  msgstr "Parar tarefas paradas selecionadas"
591
591
 
@@ -849,9 +849,6 @@ msgstr "a tarefa tem de ser cancelável"
849
849
  msgid "task has to be resumable"
850
850
  msgstr "a tarefa tem de ser retomável"
851
851
 
852
- msgid "tasks."
853
- msgstr "tarefas."
854
-
855
852
  msgid "time"
856
853
  msgstr "tempo"
857
854
 
@@ -20,9 +20,6 @@ msgstr ""
20
20
  "4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=1"
21
21
  "1 && n%100<=14)? 2 : 3);\n"
22
22
 
23
- msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
24
- msgstr ""
25
-
26
23
  msgid "%(last)s Last %(time)s"
27
24
  msgstr ""
28
25
 
@@ -74,7 +71,7 @@ msgstr ""
74
71
  msgid "Active or disabled recurring logic with purpose %s already exists"
75
72
  msgstr ""
76
73
 
77
- msgid "All %s tasks are selected. "
74
+ msgid "All %s tasks are selected."
78
75
  msgstr ""
79
76
 
80
77
  msgid "All proxies with the required feature are unavailable at the moment"
@@ -165,10 +162,7 @@ msgstr "Конфликт с задачами:"
165
162
  msgid "Could not cancel step."
166
163
  msgstr ""
167
164
 
168
- msgid "Could not receive data: ${APIerror && APIerror.message}"
169
- msgstr ""
170
-
171
- msgid "Could not receive data: ${error && error.message}"
165
+ msgid "Could not receive data: %s"
172
166
  msgstr ""
173
167
 
174
168
  msgid "Cron line"
@@ -550,8 +544,8 @@ msgstr ""
550
544
  msgid "Select Action"
551
545
  msgstr "Действия"
552
546
 
553
- msgid "Select All"
554
- msgstr "Выбрать все"
547
+ msgid "Select all {count} tasks"
548
+ msgstr ""
555
549
 
556
550
  msgid "Select row"
557
551
  msgstr ""
@@ -571,6 +565,9 @@ msgstr "Показать параметры периодического вып
571
565
  msgid "Start at"
572
566
  msgstr "Время запуска"
573
567
 
568
+ msgid "Start auto-reloading"
569
+ msgstr ""
570
+
574
571
  msgid "Start before"
575
572
  msgstr "Не позже чем"
576
573
 
@@ -586,6 +583,9 @@ msgstr "Состояние"
586
583
  msgid "Step Canceled"
587
584
  msgstr ""
588
585
 
586
+ msgid "Stop auto-reloading"
587
+ msgstr ""
588
+
589
589
  msgid "Stop selected stoppable tasks"
590
590
  msgstr ""
591
591
 
@@ -848,9 +848,6 @@ msgstr ""
848
848
  msgid "task has to be resumable"
849
849
  msgstr ""
850
850
 
851
- msgid "tasks."
852
- msgstr ""
853
-
854
851
  msgid "time"
855
852
  msgstr ""
856
853
 
@@ -17,9 +17,6 @@ msgstr ""
17
17
  "Language: zh_CN\n"
18
18
  "Plural-Forms: nplurals=1; plural=0;\n"
19
19
 
20
- msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
21
- msgstr "${taskReload ? 'Stop' : 'Start'} 自动重新加载"
22
-
23
20
  msgid "%(last)s Last %(time)s"
24
21
  msgstr "%(last)s 最后 %(time)s"
25
22
 
@@ -71,8 +68,8 @@ msgstr "活跃的过滤器:"
71
68
  msgid "Active or disabled recurring logic with purpose %s already exists"
72
69
  msgstr "带有目的 %s 的活跃或禁用的周期性逻辑已存在"
73
70
 
74
- msgid "All %s tasks are selected. "
75
- msgstr "已选择所有%s任务。 "
71
+ msgid "All %s tasks are selected."
72
+ msgstr ""
76
73
 
77
74
  msgid "All proxies with the required feature are unavailable at the moment"
78
75
  msgstr "具备所需功能的所有代理暂时都不可用"
@@ -162,11 +159,8 @@ msgstr "与任务冲突 :"
162
159
  msgid "Could not cancel step."
163
160
  msgstr "无法取消步骤。"
164
161
 
165
- msgid "Could not receive data: ${APIerror && APIerror.message}"
166
- msgstr "无法接收数据:${APIerror && APIerror.message}"
167
-
168
- msgid "Could not receive data: ${error && error.message}"
169
- msgstr "无法接收数据:${error && error.message}"
162
+ msgid "Could not receive data: %s"
163
+ msgstr ""
170
164
 
171
165
  msgid "Cron line"
172
166
  msgstr "Cron 行"
@@ -547,8 +541,8 @@ msgstr "有关如何解决此问题的更多详细信息,请参见%{link}"
547
541
  msgid "Select Action"
548
542
  msgstr "选择操作"
549
543
 
550
- msgid "Select All"
551
- msgstr "选择所有"
544
+ msgid "Select all {count} tasks"
545
+ msgstr ""
552
546
 
553
547
  msgid "Select row"
554
548
  msgstr "选择行"
@@ -568,6 +562,9 @@ msgstr "显示重复逻辑详情"
568
562
  msgid "Start at"
569
563
  msgstr "开始于"
570
564
 
565
+ msgid "Start auto-reloading"
566
+ msgstr ""
567
+
571
568
  msgid "Start before"
572
569
  msgstr "在此时间前开始"
573
570
 
@@ -583,6 +580,9 @@ msgstr "状态"
583
580
  msgid "Step Canceled"
584
581
  msgstr "步骤已取消"
585
582
 
583
+ msgid "Stop auto-reloading"
584
+ msgstr ""
585
+
586
586
  msgid "Stop selected stoppable tasks"
587
587
  msgstr "停止所选的可停止的任务"
588
588
 
@@ -844,9 +844,6 @@ msgstr "任务必须可取消"
844
844
  msgid "task has to be resumable"
845
845
  msgstr "任务必须是可恢复的"
846
846
 
847
- msgid "tasks."
848
- msgstr "任务。"
849
-
850
847
  msgid "time"
851
848
  msgstr "时间"
852
849
 
@@ -17,9 +17,6 @@ msgstr ""
17
17
  "Language: zh_TW\n"
18
18
  "Plural-Forms: nplurals=1; plural=0;\n"
19
19
 
20
- msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
21
- msgstr ""
22
-
23
20
  msgid "%(last)s Last %(time)s"
24
21
  msgstr ""
25
22
 
@@ -71,7 +68,7 @@ msgstr ""
71
68
  msgid "Active or disabled recurring logic with purpose %s already exists"
72
69
  msgstr ""
73
70
 
74
- msgid "All %s tasks are selected. "
71
+ msgid "All %s tasks are selected."
75
72
  msgstr ""
76
73
 
77
74
  msgid "All proxies with the required feature are unavailable at the moment"
@@ -162,10 +159,7 @@ msgstr "和任務有衝突:"
162
159
  msgid "Could not cancel step."
163
160
  msgstr ""
164
161
 
165
- msgid "Could not receive data: ${APIerror && APIerror.message}"
166
- msgstr ""
167
-
168
- msgid "Could not receive data: ${error && error.message}"
162
+ msgid "Could not receive data: %s"
169
163
  msgstr ""
170
164
 
171
165
  msgid "Cron line"
@@ -547,8 +541,8 @@ msgstr ""
547
541
  msgid "Select Action"
548
542
  msgstr "選擇動作"
549
543
 
550
- msgid "Select All"
551
- msgstr "全部選擇"
544
+ msgid "Select all {count} tasks"
545
+ msgstr ""
552
546
 
553
547
  msgid "Select row"
554
548
  msgstr ""
@@ -568,6 +562,9 @@ msgstr "顯示週期邏輯的詳情"
568
562
  msgid "Start at"
569
563
  msgstr "開始於"
570
564
 
565
+ msgid "Start auto-reloading"
566
+ msgstr ""
567
+
571
568
  msgid "Start before"
572
569
  msgstr "在這之前開始"
573
570
 
@@ -583,6 +580,9 @@ msgstr "狀態"
583
580
  msgid "Step Canceled"
584
581
  msgstr ""
585
582
 
583
+ msgid "Stop auto-reloading"
584
+ msgstr ""
585
+
586
586
  msgid "Stop selected stoppable tasks"
587
587
  msgstr ""
588
588
 
@@ -845,9 +845,6 @@ msgstr ""
845
845
  msgid "task has to be resumable"
846
846
  msgstr ""
847
847
 
848
- msgid "tasks."
849
- msgstr ""
850
-
851
848
  msgid "time"
852
849
  msgstr ""
853
850
 
data/package.json CHANGED
@@ -23,18 +23,18 @@
23
23
  "url": "http://projects.theforeman.org/projects/foreman-tasks/issues"
24
24
  },
25
25
  "peerDependencies": {
26
- "@theforeman/vendor": "^10.1.0"
26
+ "@theforeman/vendor": ">= 10.1.0"
27
27
  },
28
28
  "dependencies": {
29
29
  "c3": "^0.4.11"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.7.0",
33
- "@theforeman/builder": "^10.1.0",
34
- "@theforeman/eslint-plugin-foreman": "^10.1.0",
35
- "@theforeman/stories": "^10.1.0",
36
- "@theforeman/test": "^10.1.0",
37
- "@theforeman/vendor-dev": "^10.1.0",
33
+ "@theforeman/builder": ">= 10.1.0",
34
+ "@theforeman/eslint-plugin-foreman": ">= 10.1.0",
35
+ "@theforeman/stories": ">= 10.1.0",
36
+ "@theforeman/test": ">= 10.1.0",
37
+ "@theforeman/vendor-dev": ">= 10.1.0",
38
38
  "babel-eslint": "^10.0.3",
39
39
  "eslint": "^6.7.2",
40
40
  "jed": "^1.1.1",
@@ -48,7 +48,7 @@ export const TaskButtons = ({
48
48
  <span
49
49
  className={`glyphicon glyphicon-refresh ${taskReload ? 'spin' : ''}`}
50
50
  />
51
- {__(`${taskReload ? 'Stop' : 'Start'} auto-reloading`)}
51
+ {taskReload ? __('Stop auto-reloading') : __('Start auto-reloading')}
52
52
  </Button>
53
53
  <Button
54
54
  className="dynflow-button"
@@ -19,7 +19,7 @@ exports[`Task rendering render with minimal Props 1`] = `
19
19
  <span
20
20
  className="glyphicon glyphicon-refresh "
21
21
  />
22
- Start auto-reloading
22
+ Start auto-reloading
23
23
  </Button>
24
24
  <Button
25
25
  active={false}
@@ -118,7 +118,7 @@ exports[`Task rendering render with some Props 1`] = `
118
118
  <span
119
119
  className="glyphicon glyphicon-refresh spin"
120
120
  />
121
- Stop auto-reloading
121
+ Stop auto-reloading
122
122
  </Button>
123
123
  <Button
124
124
  active={false}
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Tab, Tabs } from 'patternfly-react';
4
- import { translate as __ } from 'foremanReact/common/I18n';
4
+ import { translate as __, sprintf } from 'foremanReact/common/I18n';
5
5
  import { STATUS } from 'foremanReact/constants';
6
6
  import MessageBox from 'foremanReact/components/common/MessageBox';
7
7
  import Task from './Components/Task';
@@ -49,7 +49,7 @@ const TaskDetails = ({
49
49
  <MessageBox
50
50
  key="task-details-error"
51
51
  icontype="error-circle-o"
52
- msg={__(`Could not receive data: ${APIerror && APIerror.message}`)}
52
+ msg={sprintf(__('Could not receive data: %s'), APIerror?.message)}
53
53
  />
54
54
  );
55
55
  }
@@ -1,3 +1,4 @@
1
+ import { FormattedMessage } from 'react-intl';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import { Alert, Button } from 'patternfly-react';
@@ -17,14 +18,19 @@ export const SelectAllAlert = ({
17
18
  Math.min(itemCount, perPage)
18
19
  )}
19
20
  <Button bsStyle="link" onClick={selectAllRows}>
20
- {__('Select All')}
21
- <b> {itemCount} </b> {__('tasks.')}
21
+ <FormattedMessage
22
+ id="select-all-tasks"
23
+ values={{
24
+ count: <b>{itemCount}</b>,
25
+ }}
26
+ defaultMessage={__('Select all {count} tasks')}
27
+ />
22
28
  </Button>
23
29
  </React.Fragment>
24
30
  );
25
31
  const undoSelectText = (
26
32
  <React.Fragment>
27
- {sprintf(__(`All %s tasks are selected. `), itemCount)}
33
+ {sprintf(__('All %s tasks are selected.'), itemCount)}
28
34
  <Button bsStyle="link" onClick={unselectAllRows}>
29
35
  {__('Undo selection')}
30
36
  </Button>
@@ -6,7 +6,7 @@ exports[`SelectAllAlert renders SelectAllAlert with all rows selected 1`] = `
6
6
  onDismiss={null}
7
7
  type="info"
8
8
  >
9
- All 7 tasks are selected.
9
+ All 7 tasks are selected.
10
10
  <Button
11
11
  active={false}
12
12
  block={false}
@@ -35,14 +35,17 @@ exports[`SelectAllAlert renders SelectAllAlert with perPage > itemCout 1`] = `
35
35
  disabled={false}
36
36
  onClick={[MockFunction]}
37
37
  >
38
- Select All
39
- <b>
40
-
41
- 7
42
-
43
- </b>
44
-
45
- tasks.
38
+ <FormattedMessage
39
+ defaultMessage="Select all {count} tasks"
40
+ id="select-all-tasks"
41
+ values={
42
+ Object {
43
+ "count": <b>
44
+ 7
45
+ </b>,
46
+ }
47
+ }
48
+ />
46
49
  </Button>
47
50
  </Alert>
48
51
  `;
@@ -62,14 +65,17 @@ exports[`SelectAllAlert renders SelectAllAlert without all rows selected 1`] = `
62
65
  disabled={false}
63
66
  onClick={[MockFunction]}
64
67
  >
65
- Select All
66
- <b>
67
-
68
- 7
69
-
70
- </b>
71
-
72
- tasks.
68
+ <FormattedMessage
69
+ defaultMessage="Select all {count} tasks"
70
+ id="select-all-tasks"
71
+ values={
72
+ Object {
73
+ "count": <b>
74
+ 7
75
+ </b>,
76
+ }
77
+ }
78
+ />
73
79
  </Button>
74
80
  </Alert>
75
81
  `;
@@ -53,7 +53,7 @@ const handleErrorResume = (error, dispatch) => {
53
53
  dispatch({ type: TASKS_RESUME_FAILURE, error });
54
54
  dispatch(
55
55
  addToast(
56
- errorToastData(`${__(`Cannot resume tasks at the moment`)} ${error}`)
56
+ errorToastData(`${__('Cannot resume tasks at the moment')} ${error}`)
57
57
  )
58
58
  );
59
59
  };
@@ -112,7 +112,7 @@ const handleErrorCancel = (error, dispatch) => {
112
112
  dispatch({ type: TASKS_CANCEL_FAILURE, error });
113
113
  dispatch(
114
114
  addToast(
115
- errorToastData(`${__(`Cannot cancel tasks at the moment`)} ${error}`)
115
+ errorToastData(`${__('Cannot cancel tasks at the moment')} ${error}`)
116
116
  )
117
117
  );
118
118
  };
@@ -175,7 +175,7 @@ const handleErrorForceCancel = (error, dispatch) => {
175
175
  dispatch(
176
176
  addToast(
177
177
  errorToastData(
178
- `${__(`Cannot force cancel tasks at the moment`)} ${error}`
178
+ `${__('Cannot force cancel tasks at the moment')} ${error}`
179
179
  )
180
180
  )
181
181
  );
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { Table } from 'foremanReact/components/common/table';
4
4
  import { STATUS } from 'foremanReact/constants';
5
5
  import MessageBox from 'foremanReact/components/common/MessageBox';
6
- import { translate as __ } from 'foremanReact/common/I18n';
6
+ import { translate as __, sprintf } from 'foremanReact/common/I18n';
7
7
  import Pagination from 'foremanReact/components/Pagination';
8
8
  import { getURIQuery } from 'foremanReact/common/helpers';
9
9
  import createTasksTableSchema from './TasksTableSchema';
@@ -68,7 +68,7 @@ const TasksTable = ({
68
68
  <MessageBox
69
69
  key="tasks-table-error"
70
70
  icontype="error-circle-o"
71
- msg={__(`Could not receive data: ${error && error.message}`)}
71
+ msg={sprintf(__('Could not receive data: %s'), error?.message)}
72
72
  />
73
73
  );
74
74
  }
@@ -4,7 +4,7 @@ exports[`TasksTable rendering render with error Props 1`] = `
4
4
  <MessageBox
5
5
  icontype="error-circle-o"
6
6
  key="tasks-table-error"
7
- msg="Could not receive data: null"
7
+ msg="Could not receive data: "
8
8
  />
9
9
  `;
10
10