Skip to content

Commit

Permalink
Rename feature to tag synchronisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic-DallOsto committed Jul 28, 2024
1 parent c38822f commit 539ee96
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions addon/chrome/content/preferences.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,24 @@
<!-- Automatic Tagging -->
<groupbox>
<label>
<html:h2 data-l10n-id="pref-set-read-status-tags-title"></html:h2>
<html:h2 data-l10n-id="pref-tag-synchronisation-title"></html:h2>
</label>
<checkbox
id="zotero-prefpane-__addonRef__-set-read-status-tags"
preference="extensions.zotero.__addonRef__.set-read-status-tags"
data-l10n-id="pref-set-read-status-tags"
id="zotero-prefpane-__addonRef__-tag-synchronisation"
preference="extensions.zotero.__addonRef__.tag-synchronisation"
data-l10n-id="pref-tag-synchronisation"
onclick="Zotero.__addonInstance__.prefsMenu.tagSynchronisationToggled(window)"
/>
<hbox>
<html:button
id="tags-to-readstatus"
onclick="Zotero.__addonInstance__.data.zoteroReadingListOverlay.updateAllItemsReadStatusesToMatchTags()"
data-l10n-id="pref-set-read-status-tags-button-tags-to-readstatus"
data-l10n-id="pref-tag-synchronisation-button-tags-to-readstatus"
/>
<html:button
id="readstatus-to-tags"
onclick="Zotero.__addonInstance__.data.zoteroReadingListOverlay.updateAllItemsTagsToMatchReadStatuses()"
data-l10n-id="pref-set-read-status-tags-button-readstatus-to-tags"
data-l10n-id="pref-tag-synchronisation-button-readstatus-to-tags"
/>
</hbox>
</groupbox>
Expand Down
2 changes: 1 addition & 1 deletion addon/locale/en-US/addon.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ status-not_reading = Not Reading
prefs-title = Reading List
enable-tag-synchronisation-title = Update tags to match read statuses?
enable-tag-synchronisation-prompt = You just enabled read status and tag synchronisation. Do you want to update all items' tags to match their read statuses?
enable-tag-synchronisation-prompt = You just enabled tag and read status synchronisation. Do you want to update all items' tags to match their read statuses?
tags-to-readstatus-message-progress = { $numItems ->
[one] Updating item read statuses to match tags for { $numItems } item in library
*[other] Updating item read statuses to match tags for { $numItems } items in library
Expand Down
8 changes: 4 additions & 4 deletions addon/locale/en-US/preferences.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pref-enable-keyboard-shortcuts =
.label = Enable keyboard shortcuts (Alt+0,1,2,3,4,5, ...). This disables Zotero's column sorting shortcuts!
pref-label-new-items =
.label = Automatically label items as "New" when you add them to Zotero
pref-set-read-status-tags =
pref-tag-synchronisation =
.label = Automatically set a Zotero tag matching an item's read status
pref-label-items-when-opening-file =
.label = Automatically change the read status of items when opening an attached file
Expand All @@ -19,9 +19,9 @@ pref-statuslabeltable-button-add = Add New Status
pref-statuslabeltable-button-save = Save
pref-statuslabeltable-button-reset = Reset to Default
pref-set-read-status-tags-title = Automatic Tags to Match Read Status
pref-set-read-status-tags-button-tags-to-readstatus = Update Read Status to Match Tags
pref-set-read-status-tags-button-readstatus-to-tags = Update Tags to Match Read Status
pref-tag-synchronisation-title = Tag and Read Status Synchronisation
pref-tag-synchronisation-button-tags-to-readstatus = Update Read Status to Match Tags
pref-tag-synchronisation-button-readstatus-to-tags = Update Tags to Match Read Status
pref-openitemtable-title = Custom Status Changes When Opening Item
pref-openitemtable-header-statusfrom = Status From
Expand Down
8 changes: 4 additions & 4 deletions src/modules/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const ENABLE_KEYBOARD_SHORTCUTS_PREF = "enable-keyboard-shortcuts";
export const STATUS_NAME_AND_ICON_LIST_PREF = "statuses-and-icons-list";
export const STATUS_CHANGE_ON_OPEN_ITEM_LIST_PREF =
"status-change-on-open-item-list";
export const SET_READ_STATUS_TAGS_PREF = "set-read-status-tags";
export const TAG_SYNCHRONISATION = "tag-synchronisation";

/**
* Return selected regular items
Expand Down Expand Up @@ -121,7 +121,7 @@ export default class ZoteroReadingList {
DEFAULT_STATUS_CHANGE_TO,
),
);
initialiseDefaultPref(SET_READ_STATUS_TAGS_PREF, false);
initialiseDefaultPref(TAG_SYNCHRONISATION, false);
}

addPreferenceUpdateObservers() {
Expand Down Expand Up @@ -495,7 +495,7 @@ export default class ZoteroReadingList {
READ_DATE_EXTRA_FIELD,
new Date(Date.now()).toISOString(),
);
if (getPref(SET_READ_STATUS_TAGS_PREF)) {
if (getPref(TAG_SYNCHRONISATION)) {
this.setItemReadStatusTag(item, statusName, false);
}
if (save) {
Expand Down Expand Up @@ -528,7 +528,7 @@ export default class ZoteroReadingList {
clearItemReadStatus(item: Zotero.Item) {
clearItemExtraProperty(item, READ_STATUS_EXTRA_FIELD);
clearItemExtraProperty(item, READ_DATE_EXTRA_FIELD);
if (getPref(SET_READ_STATUS_TAGS_PREF)) {
if (getPref(TAG_SYNCHRONISATION)) {
this.clearItemReadStatusTags(item);
}
void item.saveTx();
Expand Down
2 changes: 1 addition & 1 deletion src/prefs-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const OPEN_ITEM_HIDDEN_ROW = "openitem-table-hidden-row";
const OPEN_ITEM_CHECKBOX =
"zotero-prefpane-zotero-reading-list-label-items-when-opening-file";
const TAG_SYNCHRONISATION_CHECKBOX =
"zotero-prefpane-zotero-reading-list-set-read-status-tags";
"zotero-prefpane-zotero-reading-list-tag-synchronisation";
function onPrefsLoad(window: Window) {
setTableStatusNames(window);
setTableOpenItem(window);
Expand Down

0 comments on commit 539ee96

Please sign in to comment.