2022-12-30 14:24:24 +02:00
|
|
|
package presentation
|
|
|
|
|
2023-05-25 13:11:51 +02:00
|
|
|
import (
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/commands/types/enums"
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/i18n"
|
|
|
|
)
|
2022-12-30 14:24:24 +02:00
|
|
|
|
2023-05-25 13:11:51 +02:00
|
|
|
func FormatWorkingTreeStateTitle(tr *i18n.TranslationSet, rebaseMode enums.RebaseMode) string {
|
2022-12-30 14:24:24 +02:00
|
|
|
switch rebaseMode {
|
|
|
|
case enums.REBASE_MODE_REBASING:
|
2023-05-25 13:11:51 +02:00
|
|
|
return tr.RebasingStatus
|
2022-12-30 14:24:24 +02:00
|
|
|
case enums.REBASE_MODE_MERGING:
|
2023-05-25 13:11:51 +02:00
|
|
|
return tr.MergingStatus
|
2022-12-30 14:24:24 +02:00
|
|
|
default:
|
2023-05-25 13:11:51 +02:00
|
|
|
// should never actually display this
|
|
|
|
return "none"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func FormatWorkingTreeStateLower(tr *i18n.TranslationSet, rebaseMode enums.RebaseMode) string {
|
|
|
|
switch rebaseMode {
|
|
|
|
case enums.REBASE_MODE_REBASING:
|
|
|
|
return tr.LowercaseRebasingStatus
|
|
|
|
case enums.REBASE_MODE_MERGING:
|
|
|
|
return tr.LowercaseMergingStatus
|
|
|
|
default:
|
|
|
|
// should never actually display this
|
2022-12-30 14:24:24 +02:00
|
|
|
return "none"
|
|
|
|
}
|
|
|
|
}
|