Skip to content

Commit

Permalink
Merge branch 'master' into gh-2994
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Sep 27, 2024
2 parents ebe6d0e + 336ee26 commit 91f16d3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions content/better-bibtex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,13 @@ function parseLibraryKeyFromCitekey(libraryKey) {

$Patcher$.schedule(Zotero.API, 'getResultsFromParams', original => function Zotero_API_getResultsFromParams(params: Record<string, any>) {
try {
if (params.itemKey) {
if (params.objectType === 'item' && params.objectKey) {
const libraryID = params.libraryID || Zotero.Libraries.userLibraryID
params.itemKey = params.itemKey.map((itemKey: string) => {
const m = itemKey.match(/^(bbt:|@)(.+)/)
if (!m) return itemKey
const m = params.objectKey.match(/^(bbt:|@)(.+)/)
if (m) {
const citekey = Zotero.BetterBibTeX.KeyManager.first({ where: { libraryID, citationKey: m[2] }})
return citekey?.itemKey || itemKey
})
if (citekey) params.objectKey = citekey.itemKey
}
}
}
catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion locale/fr-FR/better-bibtex.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ better-bibtex_preferences_auto-export_run =
better-bibtex_preferences_auto-export_status = Statut
better-bibtex_preferences_auto-export_status_done = Terminé
better-bibtex_preferences_auto-export_status_error = Erreur
better-bibtex_preferences_auto-export_status_preparing = preparing { $translator }, { $pending } exports pending
better-bibtex_preferences_auto-export_status_preparing = préparation des exportations { $translator }, { $pending } en attente
better-bibtex_preferences_auto-export_status_running = En cours...
better-bibtex_preferences_auto-export_status_scheduled = Planifié
better-bibtex_preferences_auto-export_target = Fichier de sortie
Expand Down
2 changes: 1 addition & 1 deletion locale/zh-CN/better-bibtex.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ better-bibtex_preferences_auto-export_run =
better-bibtex_preferences_auto-export_status = 状态
better-bibtex_preferences_auto-export_status_done = 已完成
better-bibtex_preferences_auto-export_status_error = 错误
better-bibtex_preferences_auto-export_status_preparing = preparing { $translator }, { $pending } exports pending
better-bibtex_preferences_auto-export_status_preparing = 正在准备 { $translator },待导出:{ $pending }
better-bibtex_preferences_auto-export_status_running = 运行中
better-bibtex_preferences_auto-export_status_scheduled = 已预定
better-bibtex_preferences_auto-export_target = 输出文件
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zotero-better-bibtex",
"version": "6.7.236",
"version": "6.7.238",
"description": "Make Zotero useful for us LaTeX holdouts.",
"homepage": "https://retorque.re/zotero-better-bibtex",
"license": "ISC",
Expand Down

0 comments on commit 91f16d3

Please sign in to comment.