diff --git a/src/editor/ScratchJr.js b/src/editor/ScratchJr.js index edec776..634090f 100644 --- a/src/editor/ScratchJr.js +++ b/src/editor/ScratchJr.js @@ -16,6 +16,7 @@ import ScriptsPane from './ui/ScriptsPane'; import Events from '../utils/Events'; import BlockSpecs from './blocks/BlockSpecs'; import Runtime from './engine/Runtime'; +import Localization from '../utils/Localization'; import {libInit, gn, scaleMultiplier, newHTML, isAndroid, isTablet, getUrlVars, CSSTransition3D, frame} from '../utils/lib'; @@ -362,9 +363,11 @@ export default class ScratchJr { static saveProject (e, onDone) { if (ScratchJr.isEditable() && editmode == 'storyStarter' && storyStarted && !Project.error) { iOS.analyticsEvent('samples', 'story_starter_edited', Project.metadata.name); + // Localize sample project names + var sampleName = Localization.localize('SAMPLE_' + Project.metadata.name); // Get the new project name IO.uniqueProjectName({ - name: Project.metadata.name + name: sampleName }, function (jsonData) { var newName = jsonData.name; Project.metadata.name = newName; diff --git a/src/editor/ui/UI.js b/src/editor/ui/UI.js index 11076d8..bb08f38 100644 --- a/src/editor/ui/UI.js +++ b/src/editor/ui/UI.js @@ -316,8 +316,9 @@ export default class UI { if (ScratchJr.isEditable() && ScratchJr.editmode == 'storyStarter' && !Project.error) { iOS.analyticsEvent('samples', 'story_starter_edited', Project.metadata.name); // Get the new project name + var sampleName = Localization.localize('SAMPLE_' + Project.metadata.name); IO.uniqueProjectName({ - name: Project.metadata.name + name: sampleName }, function (jsonData) { var newName = jsonData.name; Project.metadata.name = newName;