windingwind / zotero-pdf-translate

Translate PDF, EPub, webpage, metadata, annotations, notes to the target language. Support 20+ translate services.
GNU Affero General Public License v3.0
7.25k stars 344 forks source link

[Bug] 翻译弹窗越过屏幕边缘 #824

Closed adventureRyan closed 4 months ago

adventureRyan commented 4 months ago

Is there an existing issue for this?

Have you checked the FAQ (https://github.com/windingwind/zotero-pdf-translate/issues/6)?

Are you using the latest Zotero and the latest plugin?

Environment

Describe the bug

当在屏幕右侧框选大段文字时,出现在右侧的弹窗会超过屏幕的边缘。

Screenshot_20240605_135305

Debug Output


1717567032307   addons.xpi  WARN    Checking /app/share/zotero/distribution/extensions for addons

[JavaScript Error: "NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsICommandLine.handleFlagWithParam]" {file: "resource:///modules/BrowserContentHandler.sys.mjs" line: 428}]
bch_handle@resource:///modules/BrowserContentHandler.sys.mjs:428:34

1717567032756   addons.webextension.zoteropdftranslate@euclpts.com  WARN    Loading extension 'zoteropdftranslate@euclpts.com': Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots

1717567032762   addons.webextension.zoteropdftranslate@euclpts.com  WARN    Loading extension 'zoteropdftranslate@euclpts.com': Reading manifest: Using experimental APIs requires a privileged add-on.

1717567033232   addons.xpi  WARN    Addon with ID undefined already installed, older version will be disabled

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Failed to load resource://services-settings/remote-settings.sys.mjs" {file: "resource://gre/modules/PartitioningExceptionListService.sys.mjs" line: 88}]

[JavaScript Error: "original is undefined" {file: "jar:file:///home/ryan/.zotero/zotero/dvr2o9n6.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/zoteropdftranslate.js" line: 5658}]

[JavaScript Error: "original is undefined" {file: "jar:file:///home/ryan/.zotero/zotero/dvr2o9n6.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/zoteropdftranslate.js" line: 5658}]

appName => Zotero, version => 7.0.0-beta.83+066eda731, os => Linux 6.6.30-x64v3-xanmod1 #0~20240502.g91a8bdf SMP PREEMPT_DYNAMIC Fri May  3 00:23:25 UTC, locale => zh-CN, extensions => Translate for Zotero (1.1.0-beta.45, extension), OpenH264 Video Codec provided by Cisco Systems, Inc. (1.8.1.2, plugin), Green Frog (0.13.0, extension, disabled), Zotero Style (2.6.7, extension, disabled), Better BibTex for Zotero (6.7.203, extension, disabled), DOI Manager (1.5.0, extension, disabled)

(3)(+0007871): Writing reader state to /home/ryan/Documents/workspace/Zotero/storage/2C85HRAJ/.zotero-reader-state

(3)(+0000556): [Translate for Zotero] runTranslationTask {}

(3)(+0000006): [Translate for Zotero] try itemLanguage en

(3)(+0000000): [Translate for Zotero] use autoDetect en

(3)(+0000001): [Translate for Zotero] try auto detect language

(3)(+0000000): [Translate for Zotero] try itemLanguage en

(3)(+0000000): [Translate for Zotero] use autoDetect en

(3)(+0000000): [Translate for Zotero] {"id":"OzGoudAW-1717567041663","type":"text","raw":"While such spatial-temporal-factorized methods can effectively model the long-range dependencies between graph nodes in the specific spacetime, they impede the direct flow of information across spacetime, limiting their ability to capture complex regional spatial-temporal joint dependencies. For instance, in the field of action recognition, most body gestures have co-occurring motions, such as locomotory movement, walking, which causes arm swinging. Similarly, in traffic prediction, the traffic speed or volume is always influenced by the traffic condition of upstream and similar roads across both space and time, with downstream roads closely correlating to the former and current situation of upstream roads. These information, which is critical to the task, is difficult to effectively captured by factorized model only. Therefore, the ability to leverage those complex cross-spacetime relationships is necessary for effective spatial-temporal modelling.","result":"","audio":[],"service":"deeplcustom","candidateServices":[],"itemId":298,"status":"processing","extraTasks":[],"langfrom":"en","langto":"zh-CN","callerID":"zoteropdftranslate@euclpts.com","secret":"http://127.1:62155/translate"}

(3)(+0000001): HTTP POST "{"text":"While such spatial-temporal-factorized methods can effectively model the long-range dependencies between graph nodes in the specific spacetime, they impede the direct flow of information across spacetime, limiting their ability to capture complex regional spatial-temporal joint dependencies. For instance, in the field of action recognition, most body gestures have co-occurring motions, such as locomotory movement, walking, which causes arm swinging. Similarly, in traffic prediction, the traffic speed or volume is always influenced by the traffic condition of upstream and similar roads across both space and time, with downstream roads closely correlating to the former and current situation of upstream roads. These information, which is critical to the task, is difficult to effectively captured by factorized model only. Therefore, the ability to leverage those complex cross-spacetime relationships is necessary for effective spatial-temporal modelling.","source_lang":"EN","target_lang":"ZH"}" to http://127.1:62155/translate

(3)(+0000113): Scheduling next feed update

(4)(+0000000): SELECT ( CASE WHEN lastCheck IS NULL THEN 0 ELSE strftime('%s', lastCheck) + refreshInterval * 60 - strftime('%s', 'now') END ) AS nextCheck FROM feeds WHERE refreshInterval IS NOT NULL ORDER BY nextCheck ASC LIMIT 1

(3)(+0000001): No feeds with auto-update

(4)(+0000000): SELECT libraryID AS id FROM feeds WHERE refreshInterval IS NOT NULL AND ( lastCheck IS NULL OR (julianday(lastCheck, 'utc') + (refreshInterval/1440.0) - julianday('now', 'utc')) <= 0 )

(3)(+0000000): Running update for feeds:

(3)(+0000001): All feed updates done

(3)(+0000000): Scheduling next feed update

(4)(+0000000): SELECT ( CASE WHEN lastCheck IS NULL THEN 0 ELSE strftime('%s', lastCheck) + refreshInterval * 60 - strftime('%s', 'now') END ) AS nextCheck FROM feeds WHERE refreshInterval IS NOT NULL ORDER BY nextCheck ASC LIMIT 1

(3)(+0000000): No feeds with auto-update

(3)(+0000605): HTTP POST http://127.1:62155/translate succeeded with 200

(3)(+0000010): [Translate for Zotero] try itemLanguage en

(3)(+0000000): [Translate for Zotero] use autoDetect en

(4)(+0001044): SELECT COUNT(*) FROM settings WHERE setting='mImport' AND key='cleanup'

(5)(+0014948): POST /connector/ping HTTP/1.1 Host: 127.0.0.1:23119 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Content-Type: application/json X-Zotero-Version: 5.0.126 X-Zotero-Connector-API-Version: 2 Content-Length: 2 Origin: moz-extension://7f4d34ef-09f7-42a1-8ce4-030c35f2c0bf Connection: keep-alive Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin

(5)(+0000006): HTTP/1.0 200 OK X-Zotero-Version: 7.0.0-beta.83+066eda731 X-Zotero-Connector-API-Version: 2 Content-Type: application/json {"prefs":{"automaticSnapshots":true,"googleDocsAddNoteEnabled":true,"translatorsHash":"1fede0fac88a2c84d680f4d258e9ab13"}}

(5)(+0000030): POST /connector/getTranslators HTTP/1.1 Host: 127.0.0.1:23119 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Content-Type: application/json X-Zotero-Version: 5.0.126 X-Zotero-Connector-API-Version: 2 Content-Length: 2 Origin: moz-extension://7f4d34ef-09f7-42a1-8ce4-030c35f2c0bf Connection: keep-alive Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin

(5)(+0000005): HTTP/1.0 200 OK X-Zotero-Version: 7.0.0-beta.83+066eda731 X-Zotero-Connector-API-Version: 2 Content-Type: application/json [{"translatorID":"f3e31f93-c18d-4ba3-9aa6-1963702b5762","translatorType":4,"label":"Ab Imperio","creator":"Avram Lyon","target":"^https?://(www\\.)?abimperio\\.net/","minVersion":"2.0","maxVersion":"","priority":100,"browserSupport":"gcs","inRepository":true,"lastUpdated":"2013-02-28 14:52:44"},{"translatorID":"92d45016-5f7b-4bcf-bb63-193033f02f2b","translatorType":4,"label":"ABC News Australia","creator":"Joyce Chia","target":"https?://(www\\.)?abc\\.net\\.au/news/","minVersion":"3.0","maxVersion":"","priority":100,"browserSupport":"gcsibv","inRepository":true,"lastUpdated":"2021-07-23 00:29:10"},{"translatorID":"d120a8a7-9d45-446e-8c18-ad9ef0a6bf47","translatorType":4,"label":"Access Engineering","creator":"Vinoth K - highwirepress.com","target":"^https?://www\\.accessengineeringlibrary\\.com/","minVersion":"3.0","maxVersion":"","priority":100,"browserSupport":"gcsibv","inRepository":true,"lastUpdated":"2023-09-09 09:42:36"},{"translatorID":"60e55b65-08cb-4a8f-8a61-c36338ec8754","translatorType":4,"label":"Access Medicine","creator":"Jaret M. Karnuta","target":"^https?://(0-)?(access(anesthesiology|cardiology|emergencymedicine|medicine|pediatrics|surgery)|neurology)\\.mhmedical\\.com","minVersion":"3.0","maxVersion":"","priority":100,"browserSupport":"gcsibv","inRepository":true,"lastUpdated":"2017-01-12 22:14:02"},{"translatorID":"558330ca-3531-467a-8003-86cd9602cc48","translatorType":4,"label":"Access Science","creator":"Vinoth K - highwirepress.com","target":"^https?://www\\.accessscience\\.com/","minVersion":"5.0","maxVersion":"","priority":100,"browserSupport":"gcsibv","inRepository":true,"lastUpdated":"2023-10-17 20:19:39"},{"translatorID":"2553b683-dc1b-4a1e-833a-7a7755326186","translatorType":4,"label":"ACLS Humanities EBook","creator":"Abe Jellinek","target":"^https?://www\\.fulcrum\\.org/","minVersion":"3.0","maxVersion":"","pr… (235630 chars)

(3)(+0004951): Starting full-text content processor

(4)(+0000000): Registering notifier observer 'fulltext_5u' for [sync]

Anything else?

No response

fengyuhang0113 commented 4 months ago

出现了同样的问题

windingwind commented 4 months ago

816