Skip to content

Commit e0683a8

Browse files
committed
chore: move image gallery toggle option string to strings file
1 parent 94ecb42 commit e0683a8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/extensionsIntegrated/Phoenix-live-preview/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ define(function (require, exports, module) {
116116
// live preview image ribbon gallery preference (whether to show image gallery when clicking images)
117117
const PREFERENCE_PROJECT_IMAGE_RIBBON = "livePreviewImageRibbon";
118118
PreferencesManager.definePreference(PREFERENCE_PROJECT_IMAGE_RIBBON, "boolean", true, {
119-
description: "Show image gallery when clicked"
119+
description: Strings.LIVE_PREVIEW_EDIT_IMAGE_RIBBON
120120
});
121121

122122
const LIVE_PREVIEW_PANEL_ID = "live-preview-panel";
@@ -425,7 +425,7 @@ define(function (require, exports, module) {
425425
if (isEditFeaturesActive) {
426426
items.push("---");
427427
items.push(Strings.LIVE_PREVIEW_EDIT_HIGHLIGHT_ON);
428-
items.push("Show image gallery when clicked");
428+
items.push(Strings.LIVE_PREVIEW_EDIT_IMAGE_RIBBON);
429429
}
430430

431431
const rawMode = PreferencesManager.get(PREFERENCE_LIVE_PREVIEW_MODE) || _getDefaultMode();
@@ -451,7 +451,7 @@ define(function (require, exports, module) {
451451
return `✓ ${Strings.LIVE_PREVIEW_EDIT_HIGHLIGHT_ON}`;
452452
}
453453
return `${'\u00A0'.repeat(4)}${Strings.LIVE_PREVIEW_EDIT_HIGHLIGHT_ON}`;
454-
} else if (item === "Show image gallery when clicked") {
454+
} else if (item === Strings.LIVE_PREVIEW_EDIT_IMAGE_RIBBON) {
455455
const isImageRibbonEnabled = PreferencesManager.get(PREFERENCE_PROJECT_IMAGE_RIBBON) !== false;
456456
if(isImageRibbonEnabled) {
457457
return `✓ ${item}`;
@@ -505,7 +505,7 @@ define(function (require, exports, module) {
505505
const newMode = currentMode !== "click" ? "click" : "hover";
506506
PreferencesManager.set(PREFERENCE_PROJECT_ELEMENT_HIGHLIGHT, newMode);
507507
return; // Don't dismiss highlights for this option
508-
} else if (item === "Show image gallery when clicked") {
508+
} else if (item === Strings.LIVE_PREVIEW_EDIT_IMAGE_RIBBON) {
509509
// Don't allow image ribbon toggle if edit features are not active
510510
if (!isEditFeaturesActive) {
511511
return;

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ define({
195195
"LIVE_PREVIEW_MODE_HIGHLIGHT": "Highlight Mode",
196196
"LIVE_PREVIEW_MODE_EDIT": "Edit Mode",
197197
"LIVE_PREVIEW_EDIT_HIGHLIGHT_ON": "Edit Highlights on Hover",
198+
"LIVE_PREVIEW_EDIT_IMAGE_RIBBON": "Show image gallery when clicked",
198199
"LIVE_PREVIEW_MODE_PREFERENCE": "{0} shows only the webpage, {1} connects the webpage to your code - click on elements to jump to their code and vice versa, {2} provides highlighting along with advanced element manipulation",
199200
"LIVE_PREVIEW_CONFIGURE_MODES": "Configure Live Preview Modes",
200201
"LIVE_PREVIEW_PRO_FEATURE_TITLE": "Pro Feature",

0 commit comments

Comments
 (0)