Fix detekt issues
This commit is contained in:
parent
7d3a6deaab
commit
988c2369bb
@ -82,9 +82,11 @@ fun main() {
|
|||||||
"INSERT OR IGNORE INTO entry(traditional, simplified, pinyin_with_tone_marks, pinyin_with_tone_numbers, zhuyin, searchable_pinyin, searchable_pinyin_with_tone_numbers, cedict_definitions, cross_straits_definitions, moe_definitions, character_count, tones) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)"
|
"INSERT OR IGNORE INTO entry(traditional, simplified, pinyin_with_tone_marks, pinyin_with_tone_numbers, zhuyin, searchable_pinyin, searchable_pinyin_with_tone_numbers, cedict_definitions, cross_straits_definitions, moe_definitions, character_count, tones) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)"
|
||||||
)
|
)
|
||||||
cedictEntries.groupBy {
|
cedictEntries.groupBy {
|
||||||
"${it.traditional}${it.pinyinSyllables.joinToString(
|
"${it.traditional}${
|
||||||
|
it.pinyinSyllables.joinToString(
|
||||||
""
|
""
|
||||||
) { it.format(TransliterationSystem.PINYIN_WITH_TONE_NUMBERS).lowercase() }}"
|
) { it.format(TransliterationSystem.PINYIN_WITH_TONE_NUMBERS).lowercase() }
|
||||||
|
}"
|
||||||
}.entries.forEach { entries ->
|
}.entries.forEach { entries ->
|
||||||
val entry = entries.value.first()
|
val entry = entries.value.first()
|
||||||
val definitions = entries.value.reversed().flatMap { it.definitions }
|
val definitions = entries.value.reversed().flatMap { it.definitions }
|
||||||
@ -340,7 +342,8 @@ private fun createMoedictEntries(connection: Connection) {
|
|||||||
"SELECT id FROM entry WHERE traditional = '$traditional' AND pinyin_with_tone_numbers = '${
|
"SELECT id FROM entry WHERE traditional = '$traditional' AND pinyin_with_tone_numbers = '${
|
||||||
pronunciation.joinToString(
|
pronunciation.joinToString(
|
||||||
separator = " "
|
separator = " "
|
||||||
) { it.format(
|
) {
|
||||||
|
it.format(
|
||||||
TransliterationSystem.PINYIN_WITH_TONE_NUMBERS
|
TransliterationSystem.PINYIN_WITH_TONE_NUMBERS
|
||||||
).replace("u:", "ü").replace("v", "ü")
|
).replace("u:", "ü").replace("v", "ü")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user