Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

fix(android): in English, Japanese and Korean, a to-do's owner no longer shows as 对方, 你 or 说话人2

wquguruea9dd622de5a
diff --git a/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt b/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt
index 70a9485..21a097e 100644
--- a/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt
+++ b/android/app/src/main/kotlin/com/wquguru/cicada/NotesViews.kt
@@ -348,7 +348,7 @@ object NotesViews {
}
if (!compact && notes.todos.isNotEmpty()) {
body.addView(ui.notesLabel(L("待办")), ui.lp(top = 22))
- for (t in notes.todos) body.addView(todo(ui, t.text, t.owner), ui.lp(top = 8))
+ for (t in notes.todos) body.addView(todo(ui, t.withOwner), ui.lp(top = 8))
}
return body
}
@@ -531,9 +531,9 @@ object NotesViews {
addView(ui.text(text, size, Palette.ink).apply { leading(if (size >= Ui.Type.BODY) Ui.Type.LINE else 1.35f) }, ui.weight())
}
- fun todo(ui: Ui, text: String, owner: String?) = LinearLayout(ui.context).apply {
+ fun todo(ui: Ui, text: String) = LinearLayout(ui.context).apply {
orientation = LinearLayout.HORIZONTAL
addView(View(ui.context).apply { background = ui.rounded(0, 8, Palette.tertiary, 1.5) }, LinearLayout.LayoutParams(ui.dp(16), ui.dp(16)).apply { topMargin = ui.dp(5); rightMargin = ui.dp(10) })
- addView(ui.notesText(text + (owner?.let { " · $it" } ?: "")), ui.weight())
+ addView(ui.notesText(text), ui.weight())
}
}
diff --git a/android/cli/src/main/kotlin/cicada/cli/Tests.kt b/android/cli/src/main/kotlin/cicada/cli/Tests.kt
index d84fa9f..26c0790 100644
--- a/android/cli/src/main/kotlin/cicada/cli/Tests.kt
+++ b/android/cli/src/main/kotlin/cicada/cli/Tests.kt
@@ -22,6 +22,7 @@ object Tests {
home.mkdirs()
val tests: List<Pair<String, () -> Unit>> = listOf(
"sessionJsonMatchesTheMac" to ::sessionJsonMatchesTheMac,
+ "todoOwnersShowInTheUiLanguage" to ::todoOwnersShowInTheUiLanguage,
"readsAMacRecordAndWritesItBackByteForByte" to ::readsAMacRecord,
"keepsTheMacsImportAndRoomFields" to ::keepsTheMacsImportAndRoomFields,
"jsonEdgeCases" to ::jsonEdgeCases,
@@ -700,6 +701,17 @@ object Tests {
equal("1 句", Strings.LF("%lld 句", 1), "Chinese has no plural forms")
}
+ fun todoOwnersShowInTheUiLanguage() {
+ val notes = MeetingNotes(summary = "s", todos = mutableListOf(NoteItem("Ship it", "对方"), NoteItem("Review", "说话人2"), NoteItem("Call", "Anna"), NoteItem("Plan")))
+ try {
+ loadStrings("en")
+ equal(listOf("Ship it (Them)", "Review (Speaker 2)", "Call (Anna)", "Plan"), notes.todos.map { it.withOwner }, "English")
+ check(TranscriptExport.notesMarkdown(notes).contains("- [ ] Ship it (Them)\n"), "markdown export")
+ } finally { loadStrings("zh-Hans") }
+ equal("Ship it(对方)", notes.todos[0].withOwner, "Chinese as stored")
+ equal("对方", notes.todos[0].owner, "the record keeps the Chinese label")
+ }
+
fun pluralsFromTheMacsStringsdict() {
loadStrings("en")
equal("1 line", Strings.LF("%lld 句", 1), "one")
diff --git a/android/core/src/main/kotlin/cicada/Export.kt b/android/core/src/main/kotlin/cicada/Export.kt
index 605863a..8b26ae1 100644
--- a/android/core/src/main/kotlin/cicada/Export.kt
+++ b/android/core/src/main/kotlin/cicada/Export.kt
@@ -99,7 +99,7 @@ object TranscriptExport {
b.append("\n")
}
if (n.conclusions.isNotEmpty()) b.append("### ${Strings.L("结论")}\n\n").append(n.conclusions.joinToString("") { "- ${it.text}\n" }).append("\n")
- if (n.todos.isNotEmpty()) b.append("### ${Strings.L("待办")}\n\n").append(n.todos.joinToString("") { "- [ ] ${it.text}" + (it.owner?.let { o -> "($o)" } ?: "") + "\n" }).append("\n")
+ if (n.todos.isNotEmpty()) b.append("### ${Strings.L("待办")}\n\n").append(n.todos.joinToString("") { "- [ ] ${it.withOwner}\n" }).append("\n")
if (n.terms.isNotEmpty()) b.append("### ${Strings.L("人名和术语")}\n\n").append(n.terms.joinToString("") { "- **${it.name}** ${it.note}\n" }).append("\n")
return b.toString()
}
@@ -164,7 +164,7 @@ object TranscriptExport {
add("", 6.0, after = 4.0)
}
if (n.conclusions.isNotEmpty()) { add(Strings.L("结论"), 12.0, bold = true, after = 3.0); for (c in n.conclusions) add("• ${c.text}", 11.0, after = 2.0) }
- if (n.todos.isNotEmpty()) { add(Strings.L("待办"), 12.0, bold = true, after = 3.0); for (t in n.todos) add("☐ ${t.text}" + (t.owner?.let { "($it)" } ?: ""), 11.0, after = 2.0) }
+ if (n.todos.isNotEmpty()) { add(Strings.L("待办"), 12.0, bold = true, after = 3.0); for (t in n.todos) add("☐ ${t.withOwner}", 11.0, after = 2.0) }
add(Strings.L("文字记录"), 15.0, bold = true, after = 6.0)
}
val numbers = SpeakerLabels.numbers(s.lines); val names = SpeakerLabels.names(s)
diff --git a/android/core/src/main/kotlin/cicada/Models.kt b/android/core/src/main/kotlin/cicada/Models.kt
index dc2eb98..345f394 100644
--- a/android/core/src/main/kotlin/cicada/Models.kt
+++ b/android/core/src/main/kotlin/cicada/Models.kt
@@ -197,6 +197,18 @@ class NoteItem(
var t: Double? = null,
) {
fun toJson(): Map<String, Any?> = mapOf("text" to text, "owner" to owner, "support" to support, "t" to t)
+
+ /// The owner as stored ("你", "对方", "说话人2" or a name) in the UI language.
+ val ownerShown: String? get() {
+ val o = owner ?: return null
+ when (o) { "你", "对方", "未识别" -> return Strings.L(o) }
+ if (o.startsWith("说话人")) o.substring(3).trim().toIntOrNull()?.let { return Strings.LF("说话人 %lld", it) }
+ return o
+ }
+
+ /// The to-do with its owner after it: "(对方)" in Chinese, " (Them)" in English.
+ val withOwner: String get() = text + (ownerShown?.let { Strings.LF("待办的负责人 %@", it) } ?: "")
+
companion object {
fun from(o: Map<String, Any?>) = NoteItem(o["text"].str() ?: "", o["owner"].str(), o["support"].int() ?: 0, o["t"].num())
}
diff --git a/site/changelog.json b/site/changelog.json
index 6e22280..d8e1e38 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -94,6 +94,14 @@
"title": "Android 英文、日文、韩文界面的词表里,改写法的提示说“点按”,不再说“用鼠标点击”。",
"text": "手机上没有鼠标,提示跟着改成 Tap / タップ / 탭。"
},
+ {
+ "kind": "fixed",
+ "platforms": [
+ "android"
+ ],
+ "title": "Android 英文、日文、韩文界面里,待办后面的负责人不再显示成中文的“对方”“你”“说话人2”。",
+ "text": "纪要和导出的 Markdown、Word 里都用界面语言显示(Them、You、Speaker 2),写法和 Mac 一样放在括号里;会议记录里仍按原样存着。"
+ },
{
"kind": "fixed",
"platforms": [