mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 13:11:12 -05:00
Switched to translated defaults when renaming costumes and sounds
This commit is contained in:
parent
af780f0f74
commit
b979275194
1 changed files with 3 additions and 2 deletions
|
@ -35,6 +35,7 @@ package scratch {
|
||||||
import interpreter.*;
|
import interpreter.*;
|
||||||
import primitives.VideoMotionPrims;
|
import primitives.VideoMotionPrims;
|
||||||
import sound.ScratchSoundPlayer;
|
import sound.ScratchSoundPlayer;
|
||||||
|
import translation.*;
|
||||||
import ui.media.MediaInfo;
|
import ui.media.MediaInfo;
|
||||||
import ui.BlockPalette;
|
import ui.BlockPalette;
|
||||||
import uiwidgets.DialogBox;
|
import uiwidgets.DialogBox;
|
||||||
|
@ -676,7 +677,7 @@ public class ScratchRuntime {
|
||||||
var obj:ScratchObj = app.viewedObj();
|
var obj:ScratchObj = app.viewedObj();
|
||||||
var costume:ScratchCostume = obj.currentCostume();
|
var costume:ScratchCostume = obj.currentCostume();
|
||||||
var oldName:String = costume.costumeName;
|
var oldName:String = costume.costumeName;
|
||||||
newName = obj.unusedCostumeName(newName || 'costume1');
|
newName = obj.unusedCostumeName(newName || Translator.map('costume1'));
|
||||||
costume.costumeName = newName;
|
costume.costumeName = newName;
|
||||||
updateArgs(obj.isStage ? allUsesOfBackdrop(oldName) : allUsesOfCostume(oldName), newName);
|
updateArgs(obj.isStage ? allUsesOfBackdrop(oldName) : allUsesOfCostume(oldName), newName);
|
||||||
}
|
}
|
||||||
|
@ -703,7 +704,7 @@ public class ScratchRuntime {
|
||||||
public function renameSound(s:ScratchSound, newName:String):void {
|
public function renameSound(s:ScratchSound, newName:String):void {
|
||||||
var obj:ScratchObj = app.viewedObj();
|
var obj:ScratchObj = app.viewedObj();
|
||||||
var oldName:String = s.soundName;
|
var oldName:String = s.soundName;
|
||||||
newName = obj.unusedSoundName(newName || 'sound1');
|
newName = obj.unusedSoundName(newName || Translator.map('sound1'));
|
||||||
s.soundName = newName;
|
s.soundName = newName;
|
||||||
allUsesOfSoundDo(oldName, function (a:BlockArg):void {
|
allUsesOfSoundDo(oldName, function (a:BlockArg):void {
|
||||||
a.setArgValue(newName);
|
a.setArgValue(newName);
|
||||||
|
|
Loading…
Reference in a new issue