Add git management description, fixes #130

This commit is contained in:
Jeremy Soller 2024-02-15 15:27:49 -07:00
parent 38058fb2e6
commit 8614be17f1
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
2 changed files with 13 additions and 2 deletions

View file

@ -13,6 +13,8 @@ line-count = Lines
## Git management
git-management = Git management
git-management-description = Git management is a developer tool used for version control operations.
git-management-loading = Loading Git management...
unstaged-changes = Unstaged changes
staged-changes = Staged changes

View file

@ -734,7 +734,10 @@ impl App {
|| widget::text("[-]").style(theme::Text::Color(destructive_color.into()));
let modified = || widget::text("[*]").style(theme::Text::Color(warning_color.into()));
let mut items = Vec::with_capacity(project_status.len().saturating_mul(3));
let mut items =
Vec::with_capacity(project_status.len().saturating_mul(3).saturating_add(1));
items.push(widget::text(fl!("git-management-description")).into());
for (project_name, project_path, status) in project_status.iter() {
let mut unstaged_items = Vec::with_capacity(status.len());
let mut staged_items = Vec::with_capacity(status.len());
@ -866,7 +869,13 @@ impl App {
.padding([spacing.space_xxs, spacing.space_none])
.into()
} else {
widget::text("TODO (TRANSLATE): Loading git status...").into()
widget::column::with_children(vec![
widget::text(fl!("git-management-description")).into(),
widget::text(fl!("git-management-loading")).into(),
])
.spacing(spacing.space_s)
.padding([spacing.space_xxs, spacing.space_none])
.into()
}
}