forked from gitui-org/gitui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstrings.rs
298 lines (284 loc) · 8.93 KB
/
strings.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
pub static TITLE_STATUS: &str = "Unstaged Changes [w]";
pub static TITLE_DIFF: &str = "Diff: ";
pub static TITLE_INDEX: &str = "Staged Changes [s]";
pub static TAB_STATUS: &str = "Status [1]";
pub static TAB_LOG: &str = "Log [2]";
pub static TAB_STASHING: &str = "Stashing [3]";
pub static TAB_STASHES: &str = "Stashes [4]";
pub static TAB_DIVIDER: &str = " | ";
pub static CMD_SPLITTER: &str = " ";
pub static MSG_OPENING_EDITOR: &str = "opening editor...";
pub static MSG_TITLE_ERROR: &str = "Error";
pub static COMMIT_TITLE: &str = "Commit";
pub static COMMIT_TITLE_AMEND: &str = "Commit (Amend)";
pub static COMMIT_MSG: &str = "type commit message..";
pub static COMMIT_EDITOR_MSG: &str = r##"
# Edit your commit message
# Lines starting with '#' will be ignored"##;
pub static STASH_POPUP_TITLE: &str = "Stash";
pub static STASH_POPUP_MSG: &str = "type name (optional)";
pub static CONFIRM_TITLE_RESET: &str = "Reset";
pub static CONFIRM_TITLE_STASHDROP: &str = "Drop";
pub static CONFIRM_MSG_RESET: &str = "confirm file reset?";
pub static CONFIRM_MSG_STASHDROP: &str = "confirm stash drop?";
pub static CONFIRM_MSG_RESETHUNK: &str = "confirm reset hunk?";
pub static LOG_TITLE: &str = "Commit";
pub static STASHLIST_TITLE: &str = "Stashes";
pub static HELP_TITLE: &str = "Help: all commands";
pub static STASHING_FILES_TITLE: &str = "Files to Stash";
pub static STASHING_OPTIONS_TITLE: &str = "Options";
pub mod commit {
pub static DETAILS_AUTHOR: &str = "Author: ";
pub static DETAILS_COMMITTER: &str = "Committer: ";
pub static DETAILS_SHA: &str = "SHA: ";
pub static DETAILS_DATE: &str = "Date: ";
pub static DETAILS_TAGS: &str = "Tags: ";
pub static DETAILS_INFO_TITLE: &str = "Info";
pub static DETAILS_MESSAGE_TITLE: &str = "Message";
pub static DETAILS_FILES_TITLE: &str = "Files:";
pub static DETAILS_FILES_LOADING_TITLE: &str = "Files: loading";
}
pub mod order {
pub static NAV: i8 = 1;
}
pub mod commands {
use crate::components::CommandText;
static CMD_GROUP_GENERAL: &str = "-- General --";
static CMD_GROUP_DIFF: &str = "-- Diff --";
static CMD_GROUP_CHANGES: &str = "-- Changes --";
static CMD_GROUP_COMMIT: &str = "-- Commit --";
static CMD_GROUP_STASHING: &str = "-- Stashing --";
static CMD_GROUP_STASHES: &str = "-- Stashes --";
static CMD_GROUP_LOG: &str = "-- Log --";
///
pub static TOGGLE_TABS: CommandText = CommandText::new(
"Next [tab]",
"switch to next tab",
CMD_GROUP_GENERAL,
);
///
pub static TOGGLE_TABS_DIRECT: CommandText = CommandText::new(
"Tab [1234]",
"switch top level tabs directly",
CMD_GROUP_GENERAL,
);
///
pub static HELP_OPEN: CommandText = CommandText::new(
"Help [h]",
"open this help screen",
CMD_GROUP_GENERAL,
);
///
pub static NAVIGATE_TREE: CommandText = CommandText::new(
"Nav [\u{2190}\u{2191}\u{2192}\u{2193}]",
"navigate tree view",
CMD_GROUP_GENERAL,
);
///
pub static SCROLL: CommandText = CommandText::new(
"Scroll [\u{2191}\u{2193}]",
"scroll up or down in focused view",
CMD_GROUP_GENERAL,
);
///
pub static DIFF_HOME_END: CommandText = CommandText::new(
"Jump up/down [home,end,\u{2191} up,\u{2193} down]",
"scroll to top or bottom of diff",
CMD_GROUP_DIFF,
);
///
pub static DIFF_HUNK_ADD: CommandText = CommandText::new(
"Add hunk [enter]",
"adds selected hunk to stage",
CMD_GROUP_DIFF,
);
///
pub static DIFF_HUNK_REVERT: CommandText = CommandText::new(
"Revert hunk [D]",
"reverts selected hunk",
CMD_GROUP_DIFF,
);
///
pub static DIFF_HUNK_REMOVE: CommandText = CommandText::new(
"Remove hunk [enter]",
"removes selected hunk from stage",
CMD_GROUP_DIFF,
);
///
pub static CLOSE_POPUP: CommandText = CommandText::new(
"Close [esc]",
"close overlay (e.g commit, help)",
CMD_GROUP_GENERAL,
);
///
pub static CLOSE_MSG: CommandText = CommandText::new(
"Close [enter]",
"close msg popup (e.g msg)",
CMD_GROUP_GENERAL,
)
.hide_help();
///
pub static SELECT_STAGING: CommandText = CommandText::new(
"To stage [s]",
"focus/select staging area",
CMD_GROUP_GENERAL,
);
///
pub static SELECT_STATUS: CommandText = CommandText::new(
"To files [1,2]",
"focus/select file tree of staged or unstaged files",
CMD_GROUP_GENERAL,
);
///
pub static SELECT_UNSTAGED: CommandText = CommandText::new(
"To unstaged [w]",
"focus/select unstaged area",
CMD_GROUP_GENERAL,
);
///
pub static COMMIT_OPEN: CommandText = CommandText::new(
"Commit [c]",
"open commit popup (available in non-empty stage)",
CMD_GROUP_COMMIT,
);
///
pub static COMMIT_OPEN_EDITOR: CommandText = CommandText::new(
"Open editor [^e]",
"open commit editor (available in non-empty stage)",
CMD_GROUP_COMMIT,
);
///
pub static COMMIT_ENTER: CommandText = CommandText::new(
"Commit [enter]",
"commit (available when commit message is non-empty)",
CMD_GROUP_COMMIT,
);
///
pub static COMMIT_AMEND: CommandText = CommandText::new(
"Amend [^a]",
"amend last commit",
CMD_GROUP_COMMIT,
);
///
pub static EDIT_ITEM: CommandText = CommandText::new(
"Edit Item [e]",
"edit the currently selected file in an external editor",
CMD_GROUP_CHANGES,
);
///
pub static STAGE_ITEM: CommandText = CommandText::new(
"Stage Item [enter]",
"stage currently selected file or entire path",
CMD_GROUP_CHANGES,
);
///
pub static STAGE_ALL: CommandText = CommandText::new(
"Stage All [a]",
"stage all changes (in unstaged files)",
CMD_GROUP_CHANGES,
);
///
pub static UNSTAGE_ITEM: CommandText = CommandText::new(
"Unstage Item [enter]",
"unstage currently selected file or entire path",
CMD_GROUP_CHANGES,
);
///
pub static UNSTAGE_ALL: CommandText = CommandText::new(
"Unstage all [a]",
"unstage all files (in staged files)",
CMD_GROUP_CHANGES,
);
///
pub static RESET_ITEM: CommandText = CommandText::new(
"Reset Item [D]",
"revert changes in selected file or entire path",
CMD_GROUP_CHANGES,
);
///
pub static IGNORE_ITEM: CommandText = CommandText::new(
"Ignore [i]",
"Add file or path to .gitignore",
CMD_GROUP_CHANGES,
);
///
pub static DIFF_FOCUS_LEFT: CommandText = CommandText::new(
"Back [\u{2190}]", //←
"view and select changed files",
CMD_GROUP_GENERAL,
);
///
pub static DIFF_FOCUS_RIGHT: CommandText = CommandText::new(
"Diff [\u{2192}]", //→
"inspect file diff",
CMD_GROUP_GENERAL,
);
///
pub static QUIT: CommandText = CommandText::new(
"Quit [^c]",
"quit gitui application",
CMD_GROUP_GENERAL,
);
///
pub static RESET_CONFIRM: CommandText = CommandText::new(
"Confirm [enter]",
"resets the file in question",
CMD_GROUP_GENERAL,
);
///
pub static STASHING_SAVE: CommandText = CommandText::new(
"Save [s]",
"opens stash name input popup",
CMD_GROUP_STASHING,
);
///
pub static STASHING_TOGGLE_INDEXED: CommandText =
CommandText::new(
"Toggle Staged [i]",
"toggle including staged files into stash",
CMD_GROUP_STASHING,
);
///
pub static STASHING_TOGGLE_UNTRACKED: CommandText =
CommandText::new(
"Toggle Untracked [u]",
"toggle including untracked files into stash",
CMD_GROUP_STASHING,
);
///
pub static STASHING_CONFIRM_MSG: CommandText = CommandText::new(
"Stash [enter]",
"save files to stash",
CMD_GROUP_STASHING,
);
///
pub static STASHLIST_APPLY: CommandText = CommandText::new(
"Apply [enter]",
"apply selected stash",
CMD_GROUP_STASHES,
);
///
pub static STASHLIST_DROP: CommandText = CommandText::new(
"Drop [D]",
"drop selected stash",
CMD_GROUP_STASHES,
);
///
pub static STASHLIST_INSPECT: CommandText = CommandText::new(
"Inspect [\u{2192}]", //→
"open stash commit details (allows to diff files)",
CMD_GROUP_STASHES,
);
///
pub static LOG_DETAILS_TOGGLE: CommandText = CommandText::new(
"Details [enter]",
"open details of selected commit",
CMD_GROUP_LOG,
);
///
pub static LOG_DETAILS_OPEN: CommandText = CommandText::new(
"Inspect [\u{2192}]", //→
"inspect selected commit in detail",
CMD_GROUP_LOG,
);
}