mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
* make the labs card copy plain Rewrite the Labs card titles and lines in words a regular user understands: YOLO mode says the message sends itself, Live text and Failure notices name the small recording indicator, Vocabulary help says which speech models it affects, and the key-side cards name Option, Command, Shift, and Control. Audit every other card, updating the CLI descriptions, all nine translated languages, the website lab catalog, the feature docs, and the render goldens. * fix labs copy review findings Restore the ISO qualifier on the section-key card, spell out that double-tap and hold-through shortcuts contain no letter or number key, cover all Global mode stages in the API text card, and name the print command in the print-start copy. Restore the developer API card titles, fix the Annotate capture wording, and retranslate the affected strings. Remove every replaced translation key and stale lab-name reference. * fix second labs copy review Update the live typing test and YOLO goldens. Add a Windows variant of the hold-through-keys copy naming Ctrl, Alt, Shift, and the Windows key. Remove the last unused rewrite-by-voice translation key, keep Annotate untranslated in the replay title, and clean the remaining old lab-name comments. * use the Polish Annotate pane name in its replay title Polish calls the Annotate pane Adnotacje, so the Annotate last 15 seconds title says Ostatnie 15 sekund w Adnotacjach again. Other languages keep Annotate because their pane name is Annotate.
47 lines
1.5 KiB
Rust
47 lines
1.5 KiB
Rust
//! Labs › Rewrite by voice's card while on: the words that start a one-off
|
||
//! instruction, with the reason under them while a draft doesn't pass
|
||
//! validation.
|
||
|
||
use rune::{El, col, row, text};
|
||
use rune_kit::TextInput;
|
||
|
||
use super::super::Ui;
|
||
use super::super::controls::{DESCRIPTION, Paint};
|
||
use crate::desktop::i18n::tr;
|
||
|
||
/// How wide the phrase field is inside its card.
|
||
const PHRASE_WIDTH: f32 = 150.0;
|
||
|
||
pub(super) fn body(ui: &Ui, p: Paint) -> El {
|
||
let problem = crate::dictation::voice_prompt::phrase_problem(ui.lab_store.phrase.text.trim());
|
||
let field = TextInput::new(&ui.lab_store.phrase)
|
||
.placeholder(crate::dictation::voice_prompt::DEFAULT_PHRASE)
|
||
.width(Some(PHRASE_WIDTH))
|
||
.invalid(problem.is_some())
|
||
.on_edit(|ui: &mut Ui| &mut ui.lab_store.phrase)
|
||
.build(p.k)
|
||
.key("voice-prompt-phrase");
|
||
let mut body = col().key("voice-prompt").gap(4.0).child(
|
||
row()
|
||
.key("voice-prompt-phrase-row")
|
||
.gap(8.0)
|
||
.center_y()
|
||
.child(
|
||
text(tr("Phrase"))
|
||
.key("label")
|
||
.font(DESCRIPTION)
|
||
.color(p.muted()),
|
||
)
|
||
.child(field),
|
||
);
|
||
if let Some(problem) = problem {
|
||
body = body.child(
|
||
text(tr(problem.message()))
|
||
.key("voice-prompt-phrase-error")
|
||
.font(DESCRIPTION)
|
||
.color(p.danger())
|
||
.wrap(),
|
||
);
|
||
}
|
||
body
|
||
}
|