kopia lustrzana https://github.com/backface/turtlestitch
renamed localization extension prims
rodzic
a1f4d87446
commit
5efac790b5
|
|
@ -11,7 +11,7 @@
|
|||
* new MOUSE POSITION primitive reporter in the SENSING category
|
||||
* new "position" choice in OF reporter's attribute dropdown, reports a list of XY coordinates
|
||||
* new "categories" choice in MY reporter's dropdown, reports an ordered list of all category names whose indices match the "category" reported elsewhere
|
||||
* new localization extension primitives (prefixed "loc_")
|
||||
* new localization extension primitives in the "ide" category
|
||||
* new "Tad" costume series, thanks, Meghan and Brian!
|
||||
* **Notable Changes:**
|
||||
* exporting a library includes dependencies (auto-select all referenced blocks)
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
### 2022-04-05
|
||||
* gui, extensions: refactored callback synch for language-switching
|
||||
* extensions: renamed localization extension prims
|
||||
|
||||
### 2022-04-04
|
||||
* objects: added speech-balloon-value-association support for ASK menu items
|
||||
|
|
|
|||
|
|
@ -789,10 +789,8 @@ SnapExtensions.primitives.set(
|
|||
);
|
||||
*/
|
||||
|
||||
// Localization (loc_):
|
||||
|
||||
SnapExtensions.primitives.set(
|
||||
'loc_translate(text)',
|
||||
'ide_translate(text)',
|
||||
function (text, proc) {
|
||||
proc.assertType(text, 'text');
|
||||
return localize(text);
|
||||
|
|
@ -800,20 +798,21 @@ SnapExtensions.primitives.set(
|
|||
);
|
||||
|
||||
SnapExtensions.primitives.set(
|
||||
'loc_language()',
|
||||
'ide_language()',
|
||||
function () {
|
||||
return SnapTranslator.language;
|
||||
}
|
||||
);
|
||||
|
||||
SnapExtensions.primitives.set(
|
||||
'loc_set(language, [msg])',
|
||||
'ide_setlang(language, [msg])',
|
||||
function (lang, msg, proc) {
|
||||
var ide = this.parentThatIsA(IDE_Morph),
|
||||
disabled = ['receiveGo', 'receiveCondition', 'receiveMessage'],
|
||||
callback = null;
|
||||
ide.loadNewProject = false;
|
||||
if (isString(msg) && !contains(disabled, proc.topBlock.selector)) {
|
||||
// require an explicit user input to trigger a project reload
|
||||
callback = () => ide.broadcast(msg);
|
||||
}
|
||||
ide.setLanguage(lang, callback, true); // don't save language setting
|
||||
|
|
@ -821,7 +820,7 @@ SnapExtensions.primitives.set(
|
|||
);
|
||||
|
||||
SnapExtensions.primitives.set(
|
||||
'loc_translations()',
|
||||
'ide_translations()',
|
||||
function () {
|
||||
return new List(
|
||||
SnapTranslator.languages().map(lang =>
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue