Skip to content

Commit

Permalink
允许强制更新
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Apr 12, 2024
1 parent 7364676 commit fb8d251
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
<n-button @click="handleFormalizePunctuation" type="info">
规范符号
</n-button>
<n-button @click="translateHandle" type="info">重新翻译</n-button>
<n-button @click="translateHandle(true)" type="info"
>重新翻译</n-button
>
<n-button
@click="handleLLMTranslateRequest"
type="info"
Expand Down Expand Up @@ -232,8 +234,8 @@ const currentText = computed(() => {
];
});
const translateHandle = () => {
if (config.getTmpMachineTranslate(currentText.value)) return;
const translateHandle = (force = false) => {
if (!force || config.getTmpMachineTranslate(currentText.value)) return;
if (config.getSelectLine !== -1) {
const text = currentText.value
?.replaceAll("#n", "[#n]")
Expand Down

0 comments on commit fb8d251

Please sign in to comment.