add some docnotes on the resolution to the problem

This commit is contained in:
bunnie 2021-08-12 01:42:58 +08:00
parent aaf16dcf5e
commit 3d65d7d5ed
2 changed files with 12 additions and 0 deletions

View file

@ -39,6 +39,11 @@
"zh": "现在正在初始化\n可能还要等一下\n不要重置或睡眠!\n",
"en-audio": "Initializing keys. This may take a while, don't reset or sleep the device."
},
"rootkeys.init.note_to_translator": {
"en": "It is important that every message in the `rootkeys.init` series have the same number of lines. Insert dummy \n characters if you require multi-line translations! Failure to do so can lead to a deadlock situation (read the code for more notes).",
"zh": "`rootkeys.init` 系列中的每条消息都具有相同的行数,这一点很重要。 如果您需要多行翻译,请插入虚拟 \n 字符!",
"en-audio": "It is important that every message in the `rootkeys.init` series have the same number of lines. Insert dummy \n characters if you require multi-line translations!"
},
"rootkeys.init.signing_loader": {
"en": "Signing loader.\nThis takes a few minutes.\nDo not reset or sleep!",
"zh": "签名引导程序\n可能还要等一下\n不要重置或睡眠!\n",

View file

@ -724,6 +724,13 @@ impl<'a> RootKeys {
/// is used to report the progress of the initialization routine. We assume the `Slider` box is set
/// up to report progress on a range of 0-100%.
///
/// IMPORTANT ASSUMPTION: It is assumed that all the progress messages in the translations do not
/// end up changing the size of the dialog box. This is because such changes in size would trigger
/// a redraw message that cannot be handled by the thread (because it's busy doing this), and
/// if enough of them get issued, eventually the thread deadlocks. If you are doing translations,
/// review your messages and add \n characters on shorter messages so that the overall height
/// of the dialog box remains constant throughout the operation!
///
/// This routine dispatches the following activities:
/// - generate signing private key (encrypted with update password)
/// - generate rootkey (encrypted with boot password)