From b386f2ec2b8111ec8be889875581b3631fc0c0a4 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 9 Dec 2024 12:54:34 +0100 Subject: [PATCH 1/2] Add translation key for source layers --- src/fontra/client/lang/de.js | 1 + src/fontra/client/lang/en.js | 1 + src/fontra/client/lang/fr.js | 1 + src/fontra/client/lang/ja.js | 1 + src/fontra/client/lang/nl.js | 1 + src/fontra/client/lang/zh-CN.js | 1 + src/fontra/views/editor/panel-designspace-navigation.js | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fontra/client/lang/de.js b/src/fontra/client/lang/de.js index ffe982baa..4303f3826 100644 --- a/src/fontra/client/lang/de.js +++ b/src/fontra/client/lang/de.js @@ -291,6 +291,7 @@ export const strings = { "sidebar.designspace-navigation.glyph-axes": "Glyph-Achsen", "sidebar.designspace-navigation.glyph-axes.edit": "Glyph-Achsen bearbeiten", "sidebar.designspace-navigation.glyph-axes.reset": "Glyph-Achsen zurücksetzen", + "sidebar.designspace-navigation.glyph-source-layers": "Source layers", "sidebar.designspace-navigation.glyph-sources": "Glyph-Sourcen", "sidebar.designspace-navigation.glyph-sources.name": "Source Name", "sidebar.designspace-navigation.glyph-sources.status": "Status", diff --git a/src/fontra/client/lang/en.js b/src/fontra/client/lang/en.js index 099afe589..58d37bf1a 100644 --- a/src/fontra/client/lang/en.js +++ b/src/fontra/client/lang/en.js @@ -284,6 +284,7 @@ export const strings = { "sidebar.designspace-navigation.glyph-axes": "Glyph axes", "sidebar.designspace-navigation.glyph-axes.edit": "Edit glyph axes", "sidebar.designspace-navigation.glyph-axes.reset": "Reset glyph axes", + "sidebar.designspace-navigation.glyph-source-layers": "Source layers", "sidebar.designspace-navigation.glyph-sources": "Glyph sources", "sidebar.designspace-navigation.glyph-sources.name": "source name", "sidebar.designspace-navigation.glyph-sources.status": "status", diff --git a/src/fontra/client/lang/fr.js b/src/fontra/client/lang/fr.js index df68ca107..29cc1e6f5 100644 --- a/src/fontra/client/lang/fr.js +++ b/src/fontra/client/lang/fr.js @@ -295,6 +295,7 @@ export const strings = { "sidebar.designspace-navigation.glyph-axes": "Axes du glyphe", "sidebar.designspace-navigation.glyph-axes.edit": "Éditer les axes du glyphe", "sidebar.designspace-navigation.glyph-axes.reset": "Réinitialiser les axes du glyphe", + "sidebar.designspace-navigation.glyph-source-layers": "Source layers", "sidebar.designspace-navigation.glyph-sources": "Sources du glyphe", "sidebar.designspace-navigation.glyph-sources.name": "nom de la source", "sidebar.designspace-navigation.glyph-sources.status": "statut", diff --git a/src/fontra/client/lang/ja.js b/src/fontra/client/lang/ja.js index c54c5f7c9..ed8bbb065 100644 --- a/src/fontra/client/lang/ja.js +++ b/src/fontra/client/lang/ja.js @@ -288,6 +288,7 @@ export const strings = { "sidebar.designspace-navigation.glyph-axes": "グリフの補完軸", "sidebar.designspace-navigation.glyph-axes.edit": "グリフの補完軸を編集", "sidebar.designspace-navigation.glyph-axes.reset": "グリフの補完軸をリセット", + "sidebar.designspace-navigation.glyph-source-layers": "Source layers", "sidebar.designspace-navigation.glyph-sources": "グリフソース", "sidebar.designspace-navigation.glyph-sources.name": "ソース名", "sidebar.designspace-navigation.glyph-sources.status": "ステータス", diff --git a/src/fontra/client/lang/nl.js b/src/fontra/client/lang/nl.js index dc97dcbc9..152ba03a9 100644 --- a/src/fontra/client/lang/nl.js +++ b/src/fontra/client/lang/nl.js @@ -288,6 +288,7 @@ export const strings = { "sidebar.designspace-navigation.glyph-axes": "Glyph assen", "sidebar.designspace-navigation.glyph-axes.edit": "Wijzig glyph assen", "sidebar.designspace-navigation.glyph-axes.reset": "Reset glyph assen", + "sidebar.designspace-navigation.glyph-source-layers": "Source layers", "sidebar.designspace-navigation.glyph-sources": "Glyph sources", "sidebar.designspace-navigation.glyph-sources.name": "sourcenaam", "sidebar.designspace-navigation.glyph-sources.status": "status", diff --git a/src/fontra/client/lang/zh-CN.js b/src/fontra/client/lang/zh-CN.js index b357cc151..20fefb101 100644 --- a/src/fontra/client/lang/zh-CN.js +++ b/src/fontra/client/lang/zh-CN.js @@ -273,6 +273,7 @@ export const strings = { "sidebar.designspace-navigation.glyph-axes": "字形参数轴", "sidebar.designspace-navigation.glyph-axes.edit": "编辑字形参数轴", "sidebar.designspace-navigation.glyph-axes.reset": "重置字形参数轴", + "sidebar.designspace-navigation.glyph-source-layers": "Source layers", "sidebar.designspace-navigation.glyph-sources": "字形源", "sidebar.designspace-navigation.glyph-sources.name": "源名称", "sidebar.designspace-navigation.glyph-sources.status": "状态", diff --git a/src/fontra/views/editor/panel-designspace-navigation.js b/src/fontra/views/editor/panel-designspace-navigation.js index 1e19d7158..4c76252ba 100644 --- a/src/fontra/views/editor/panel-designspace-navigation.js +++ b/src/fontra/views/editor/panel-designspace-navigation.js @@ -191,7 +191,7 @@ export default class DesignspaceNavigationPanel extends Panel { }, { id: "glyph-layers-accordion-item", - label: "Source layers", // XXXX TODO add translate strings + label: translate("sidebar.designspace-navigation.glyph-source-layers"), open: true, content: html.div( { From 7c415cbe6bc0605f73ffb125dc2d59d94e1378e9 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 9 Dec 2024 13:32:08 +0100 Subject: [PATCH 2/2] Enable source layers, menus --- src/fontra/views/editor/editor.js | 4 ++-- src/fontra/views/editor/panel-designspace-navigation.js | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/fontra/views/editor/editor.js b/src/fontra/views/editor/editor.js index 5a42ec058..eba608d3d 100644 --- a/src/fontra/views/editor/editor.js +++ b/src/fontra/views/editor/editor.js @@ -1397,8 +1397,8 @@ export class EditorController extends ViewController { { actionIdentifier: "action.select-next-glyph" }, { actionIdentifier: "action.select-previous-source" }, { actionIdentifier: "action.select-next-source" }, - // { actionIdentifier: "action.select-previous-source-layer" }, - // { actionIdentifier: "action.select-next-source-layer" }, + { actionIdentifier: "action.select-previous-source-layer" }, + { actionIdentifier: "action.select-next-source-layer" }, ], }); diff --git a/src/fontra/views/editor/panel-designspace-navigation.js b/src/fontra/views/editor/panel-designspace-navigation.js index 4c76252ba..b31988437 100644 --- a/src/fontra/views/editor/panel-designspace-navigation.js +++ b/src/fontra/views/editor/panel-designspace-navigation.js @@ -830,10 +830,6 @@ export default class DesignspaceNavigationPanel extends Panel { } async _updateSourceLayersList() { - // TODO: the background layers feature is not yet functional, disable for now - this.glyphLayersAccordionItem.hidden = true; - return; - const sourceIndex = this.sceneModel.sceneSettings.selectedSourceIndex; const haveLayers = this.sceneModel.selectedGlyph?.isEditing && sourceIndex != undefined;