Skip to content

Commit 1df1859

Browse files
authored
add: tooltip for the icon in sidebar (#1185)
* chore: make prompt area adjustable * chore: add tooltip for the icon in sidebar
1 parent 1fa3585 commit 1df1859

File tree

7 files changed

+10
-3
lines changed

7 files changed

+10
-3
lines changed

addon/locale/en-US/addon.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ field-titleTranslation=Title Translation
155155
field-abstractTranslation=Abstract Translation
156156
157157
status-translating=Translating...
158-
158+
sideBarIcon-title=Translate Annotation
159159
160160
service-libretranslate=LibreTranslate
161161
service-libretranslate-secret-pass=Config

addon/locale/it-IT/addon.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ field-titleTranslation=Traduzione del titolo
129129
field-abstractTranslation=Traduzione dell'Abstract
130130
131131
status-translating=Traduzione in corso...
132+
sideBarIcon-title=Translate Annotation
132133
133134
service-libretranslate=LibreTranslate
134135
service-libretranslate-secret-pass=Configura

addon/locale/zh-CN/addon.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ field-titleTranslation=标题翻译
154154
field-abstractTranslation=摘要翻译
155155
156156
status-translating=正在翻译...
157+
sideBarIcon-title=翻译注释
157158
158159
service-libretranslate=LibreTranslate
159160
service-libretranslate-secret-pass=配置

src/modules/reader.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { config } from "../../package.json";
22
import { SVGIcon } from "../utils/config";
33
import { addTranslateAnnotationTask } from "../utils/task";
4+
import { getString } from "../utils/locale";
45

56
export function registerReaderInitializer() {
67
Zotero.Reader.registerEventListener(
@@ -24,6 +25,7 @@ export function registerReaderInitializer() {
2425
classList: ["icon"],
2526
properties: {
2627
innerHTML: SVGIcon,
28+
title: getString("sideBarIcon-title"),
2729
},
2830
listeners: [
2931
{

src/modules/settings/claude.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export async function claudeStatusCallback(status: boolean) {
120120
},
121121
},
122122
{
123-
tag: "input",
123+
tag: "textarea",
124124
id: "prompt",
125125
attributes: {
126126
"data-bind": "prompt",

src/modules/settings/gpt.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ async function gptStatusCallback(
2929
gridTemplateColumns: "1fr 4fr",
3030
rowGap: "10px",
3131
columnGap: "5px",
32+
minWidth: "400px",
33+
minHeight: "200px",
3234
},
3335
children: [
3436
{
@@ -131,7 +133,7 @@ async function gptStatusCallback(
131133
},
132134
},
133135
{
134-
tag: "input",
136+
tag: "textarea",
135137
id: "prompt",
136138
attributes: {
137139
"data-bind": "prompt",

typings/i10n.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type FluentMessageId =
1919
| 'itemPaneSection-header'
2020
| 'itemPaneSection-openStandalone'
2121
| 'itemPaneSection-sidenav'
22+
| 'sideBarIcon-title'
2223
| 'itemmenu-more-label'
2324
| 'itemmenu-retranslateAbstract-label'
2425
| 'itemmenu-retranslateTitle-label'

0 commit comments

Comments
 (0)