Add shared primary voice profiles and editor
This commit is contained in:
1 parent
5ca137c879
commit
03896de84e
7 files changed
+590
-4
No files matched your search
@@ -26,7 +26,10 @@ const (
|
||||
Range
|
||||
)
|
||||
|
||||
type Option struct{ ID, Label string }
|
||||
type Option struct {
|
||||
ID, Label string
|
||||
Literal bool // User-provided labels bypass translation.
|
||||
}
|
||||
|
||||
// Entry describes one setting. Label and option labels are English message
|
||||
// IDs passed through the menu's translator.
|
||||
@@ -267,6 +270,9 @@ func (m *Menu) describe(entry Entry, value Value, options []Option) (text string
|
||||
}
|
||||
for _, option := range options {
|
||||
if option.ID == value.Choice {
|
||||
if option.Literal {
|
||||
return option.Label, false
|
||||
}
|
||||
return m.Messages.T(option.Label), false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user