@@ -21,91 +21,91 @@ program.name('tl').usage('[command] [options]');
21
21
program
22
22
. command ( 'archive' )
23
23
. alias ( 'a' )
24
- . description ( 'Display archived items' )
24
+ . description ( Localization . instance . get ( 'help.archive' ) )
25
25
. action ( ( ) => {
26
26
taskline . displayArchive ( ) . catch ( ( ) => { } ) ;
27
27
} ) ;
28
28
29
29
program
30
30
. command ( 'begin <ids>' )
31
31
. alias ( 'b' )
32
- . description ( 'Start/pause task' )
32
+ . description ( Localization . instance . get ( 'help.begin' ) )
33
33
. action ( ids => {
34
34
taskline . beginTasks ( ids ) . catch ( ( ) => { } ) ;
35
35
} ) ;
36
36
37
37
program
38
38
. command ( 'cancel <ids>' )
39
- . description ( 'Cancel/revive task' )
39
+ . description ( Localization . instance . get ( 'help.cancel' ) )
40
40
. action ( ids => {
41
41
taskline . cancelTasks ( ids ) . catch ( ( ) => { } ) ;
42
42
} ) ;
43
43
44
44
program
45
45
. command ( 'check <ids>' )
46
46
. alias ( 'c' )
47
- . description ( 'Check/uncheck task' )
47
+ . description ( Localization . instance . get ( 'help.check' ) )
48
48
. action ( ids => {
49
49
taskline . checkTasks ( ids ) . catch ( ( ) => { } ) ;
50
50
} ) ;
51
51
52
52
program
53
53
. command ( 'clear' )
54
- . description ( 'Delete all checked items' )
54
+ . description ( Localization . instance . get ( 'help.clear' ) )
55
55
. action ( ( ) => {
56
56
taskline . clear ( ) . catch ( ( ) => { } ) ;
57
57
} ) ;
58
58
59
59
program
60
60
. command ( 'config' )
61
- . description ( 'Display active config')
61
+ . description ( Localization . instance . get ( 'help. config') )
62
62
. action ( ( ) => {
63
63
taskline . displayConfig ( ) ;
64
64
} ) ;
65
65
66
66
program
67
67
. command ( 'copy <ids>' )
68
68
. alias ( 'y' )
69
- . description ( 'Copy description to clipboard' )
69
+ . description ( Localization . instance . get ( 'help.copy' ) )
70
70
. action ( ids => {
71
71
taskline . copyToClipboard ( ids ) . catch ( ( ) => { } ) ;
72
72
} ) ;
73
73
74
74
program
75
75
. command ( 'delete <ids>' )
76
76
. alias ( 'd' )
77
- . description ( 'Delete item' )
77
+ . description ( Localization . instance . get ( 'help.delete' ) )
78
78
. action ( ids => {
79
79
taskline . deleteItems ( ids ) . catch ( ( ) => { } ) ;
80
80
} ) ;
81
81
82
82
program
83
83
. command ( 'due <ids> <dueDate>' )
84
- . description ( 'Update duedateof task' )
84
+ . description ( Localization . instance . get ( 'help.due' ) )
85
85
. action ( ( ids , dueDate ) => {
86
86
taskline . updateDueDate ( ids , dueDate ) . catch ( ( ) => { } ) ;
87
87
} ) ;
88
88
89
89
program
90
90
. command ( 'edit <id> <description>' )
91
91
. alias ( 'e' )
92
- . description ( 'Edit item description' )
92
+ . description ( Localization . instance . get ( 'help.edit' ) )
93
93
. action ( ( id , description ) => {
94
94
taskline . editDescription ( id , description ) . catch ( ( ) => { } ) ;
95
95
} ) ;
96
96
97
97
program
98
98
. command ( 'find <terms>' )
99
99
. alias ( 'f' )
100
- . description ( 'Search for items' )
100
+ . description ( Localization . instance . get ( 'help.find' ) )
101
101
. action ( query => {
102
102
taskline . findItems ( query ) . catch ( ( ) => { } ) ;
103
103
} ) ;
104
104
105
105
program
106
106
. command ( 'list <terms>' )
107
107
. alias ( 'l' )
108
- . description ( 'List items by attributes' )
108
+ . description ( Localization . instance . get ( 'help.list' ) )
109
109
. action ( terms => {
110
110
taskline . listByAttributes ( terms ) . then ( grouped => {
111
111
taskline . displayStats ( grouped ) ;
@@ -115,15 +115,15 @@ program
115
115
program
116
116
. command ( 'move <ids> <boards' )
117
117
. alias ( 'm' )
118
- . description ( 'Move item between boards' )
118
+ . description ( Localization . instance . get ( 'help.move' ) )
119
119
. action ( ( ids , boards ) => {
120
120
taskline . moveBoards ( ids , boards ) . catch ( ( ) => { } ) ;
121
121
} ) ;
122
122
123
123
program
124
124
. command ( 'note <description>' )
125
125
. alias ( 'n' )
126
- . description ( 'Create note')
126
+ . description ( Localization . instance . get ( 'help. note') )
127
127
. option ( '-b, --board <board>' , 'Board' )
128
128
. action ( ( description , opts ) => {
129
129
taskline . createNote ( description , opts . board ) . catch ( ( ) => { } ) ;
@@ -132,7 +132,7 @@ program
132
132
program
133
133
. command ( 'priority <id> <priority>' )
134
134
. alias ( 'p' )
135
- . description ( 'Update priority of task' )
135
+ . description ( Localization . instance . get ( 'help. priority' ) )
136
136
. action ( ( id , priority ) => {
137
137
taskline . updatePriority ( id , priority ) . catch ( ( ) => { } ) ;
138
138
} ) ;
@@ -141,23 +141,23 @@ program
141
141
. command ( 'restore <ids>' )
142
142
143
143
. alias ( 'r' )
144
- . description ( 'Restore items from archive' )
144
+ . description ( Localization . instance . get ( 'help.restore' ) )
145
145
. action ( ids => {
146
146
taskline . restoreItems ( ids ) . catch ( ( ) => { } ) ;
147
147
} ) ;
148
148
149
149
program
150
150
. command ( 'star <ids>' )
151
151
. alias ( 's' )
152
- . description ( 'Star/unstar item' )
152
+ . description ( Localization . instance . get ( 'help.star' ) )
153
153
. action ( ids => {
154
154
taskline . starItems ( ids ) . catch ( ( ) => { } ) ;
155
155
} ) ;
156
156
157
157
program
158
158
. command ( 'task <description>' ) // Sub-command name
159
159
. alias ( 't' ) // Alternative sub-command is `al`
160
- . description ( 'Create task') // Command description
160
+ . description ( Localization . instance . get ( 'help. task') ) // Command description
161
161
. option ( '-b, --board <board>' , 'Board' )
162
162
. option ( '-p, --priority <priority>' , 'Priority' )
163
163
. option ( '-d, --due <date>' , 'Due date' )
@@ -172,7 +172,7 @@ program
172
172
program
173
173
. command ( 'timeline' )
174
174
. alias ( 'i' )
175
- . description ( 'Display timeline view' )
175
+ . description ( Localization . instance . get ( 'help. timeline' ) )
176
176
. action ( ( ) => {
177
177
taskline . displayByDate ( ) . then ( grouped => {
178
178
taskline . displayStats ( grouped ) ;
@@ -181,7 +181,7 @@ program
181
181
182
182
program
183
183
. command ( 'refactor' )
184
- . description ( 'Rearrange the IDs of all items' )
184
+ . description ( Localization . instance . get ( 'help.refactor' ) )
185
185
. action ( ( ) => {
186
186
taskline . refactorIDs ( ) . catch ( ( ) => { } ) ;
187
187
} ) ;
@@ -198,7 +198,7 @@ if (process.argv.length === 2) {
198
198
}
199
199
200
200
program . on ( 'command:*' , function ( ) {
201
- console . error ( 'Invalid command: %s\nSee --help for a list of available commands. ', program . args . join ( ' ' ) ) ;
201
+ console . error ( Localization . instance . getf ( 'errors.invalidCommand ', { params : program . args } ) ) ;
202
202
process . exit ( 1 ) ;
203
203
} ) ;
204
204
0 commit comments