From 1e3907e92213cb55599807176830a1f34af0bb7d Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Mon, 18 Jun 2018 11:37:10 -0400 Subject: [PATCH] Localize category labels Added formatMessage to the name attribute for: * music * pen * translate * video motion Skipped speak extension - trademarked name Skipped extensions that are not yet localized at all. --- src/extensions/scratch3_music/index.js | 6 +++++- src/extensions/scratch3_pen/index.js | 6 +++++- src/extensions/scratch3_translate/index.js | 6 +++++- src/extensions/scratch3_video_sensing/index.js | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/extensions/scratch3_music/index.js b/src/extensions/scratch3_music/index.js index 4450a69e8..852c9261a 100644 --- a/src/extensions/scratch3_music/index.js +++ b/src/extensions/scratch3_music/index.js @@ -623,7 +623,11 @@ class Scratch3MusicBlocks { getInfo () { return { id: 'music', - name: 'Music', + name: formatMessage({ + id: 'music.categoryName', + default: 'Music', + description: 'Label for the Music extension category' + }), menuIconURI: menuIconURI, blockIconURI: blockIconURI, blocks: [ diff --git a/src/extensions/scratch3_pen/index.js b/src/extensions/scratch3_pen/index.js index e4211b328..4c46ce370 100644 --- a/src/extensions/scratch3_pen/index.js +++ b/src/extensions/scratch3_pen/index.js @@ -282,7 +282,11 @@ class Scratch3PenBlocks { getInfo () { return { id: 'pen', - name: 'Pen', + name: formatMessage({ + id: 'pen.categoryName', + default: 'Pen', + description: 'Label for the pen extension category' + }), blockIconURI: blockIconURI, blocks: [ { diff --git a/src/extensions/scratch3_translate/index.js b/src/extensions/scratch3_translate/index.js index 1d0c2ec05..787b8545f 100644 --- a/src/extensions/scratch3_translate/index.js +++ b/src/extensions/scratch3_translate/index.js @@ -86,7 +86,11 @@ class Scratch3TranslateBlocks { getInfo () { return { id: 'translate', - name: 'Translate', + name: formatMessage({ + id: 'translate.categoryName', + default: 'Translate', + description: 'Label for the translate extension category' + }), menuIconURI: '', // TODO: Add the final icons. blockIconURI: '', blocks: [ diff --git a/src/extensions/scratch3_video_sensing/index.js b/src/extensions/scratch3_video_sensing/index.js index c6e29f85b..afe8f44a1 100644 --- a/src/extensions/scratch3_video_sensing/index.js +++ b/src/extensions/scratch3_video_sensing/index.js @@ -372,7 +372,11 @@ class Scratch3VideoSensingBlocks { // Return extension definition return { id: 'videoSensing', - name: 'Video Motion', + name: formatMessage({ + id: 'videoSensing.categoryName', + default: 'Video Motion', + description: 'Label for the video motion extension category' + }), blocks: [ { // @todo this hat needs to be set itself to restart existing