-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create an extension #255
base: main
Are you sure you want to change the base?
Create an extension #255
Conversation
hi,seems you are from ccw? if you do, could you release this extension to ccw extension playground?so others can test it and give you a feedback。 |
tbh maybe i don't care if this pr is merged... merge it if you want and if it works. i can get another alt account and this account can go nonexistent + i can always quit the internet. So yeah, ignore what i just said, last year went rough with him and i don't wanna see theShovel guy ever again. thanks |
Thanks, it's been posted in Experimental Square |
Better timer You're going to create an extension
if you are porting turbowarp extensions, please put them under the TurboWarp folder inside a folder for the original author of the extension |
More timers should be under TurboWarp/Lily and strings extension should be under TurbWarp/CST1229 |
Thank you very much, revised |
Can you ask about it? Are you a CCW, and if so, are you an HCN? |
learning to ignore harmful information can help us surf the Internet better |
正确的。不过我看了下积木和代码,我觉得这个美化工具扩展,可能不符合进我们扩展库的标准
这两条,看起来更像是提高情绪价值的? 当然,如果你很喜欢这种类型的扩展,你可以学习并制作一个自己的,这种扩展更合适走“扩展试验广场”的方式审核发布。
会更容易通过审核 |
好的,感谢建议 |
It is recommended that you seek the original author's permission before porting other people's extensions and indicate who the original author is in your PR, as it may otherwise lead to unnecessary misunderstandings. |
@fath11 is a foreigner from cocrea (the overseas version of the CCW community) and has contributed greatly to the Gandi expansion and plugins, so he has REVIEW credentials. He is not HCN. |
go to "File Changes" tab in PRs and click the "+" icon next to the codes, type stuff and click "start a review" |
Ooh-ooh! Thank you for that! |
|
||
{ | ||
opcode: "pauseTimer", | ||
blockType: Scratch.BlockType.COMMAND, | ||
extensions: ["colours_sensing"], | ||
text: "暂停计时器[TIMER]", | ||
arguments: { | ||
TIMER: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue: "timer", | ||
}, | ||
}, | ||
}, | ||
{ | ||
opcode: "resumeTimer", | ||
blockType: Scratch.BlockType.COMMAND, | ||
extensions: ["colours_sensing"], | ||
text: "恢复计时器[TIMER]", | ||
arguments: { | ||
TIMER: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue: "timer", | ||
}, | ||
}, | ||
}, | ||
|
||
"---", | ||
|
||
{ | ||
opcode: "setTimer", | ||
blockType: Scratch.BlockType.COMMAND, | ||
extensions: ["colours_sensing"], | ||
text: "设置计时器[TIMER]为[NUM]", | ||
arguments: { | ||
TIMER: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue: "timer", | ||
}, | ||
NUM: { | ||
type: Scratch.ArgumentType.NUMBER, | ||
defaultValue: "10", | ||
}, | ||
}, | ||
}, | ||
{ | ||
opcode: "changeTimer", | ||
blockType: Scratch.BlockType.COMMAND, | ||
extensions: ["colours_sensing"], | ||
text: "更改计时器[TIMER]将其增加[NUM]", | ||
arguments: { | ||
TIMER: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue: "timer", | ||
}, | ||
NUM: { | ||
type: Scratch.ArgumentType.NUMBER, | ||
defaultValue: "10", | ||
}, | ||
}, | ||
}, | ||
|
||
"---", | ||
|
||
{ | ||
opcode: "removeTimer", | ||
blockType: Scratch.BlockType.COMMAND, | ||
extensions: ["colours_sensing"], | ||
text: "删除计时器[TIMER]", | ||
arguments: { | ||
TIMER: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue: "timer", | ||
}, | ||
}, | ||
}, | ||
{ | ||
opcode: "removeTimers", | ||
blockType: Scratch.BlockType.COMMAND, | ||
extensions: ["colours_sensing"], | ||
text: "删除全部计时器", | ||
}, | ||
{ | ||
opcode: "timerExists", | ||
blockType: Scratch.BlockType.BOOLEAN, | ||
extensions: ["colours_sensing"], | ||
text: "计时器[TIMER]存在吗?", | ||
arguments: { | ||
TIMER: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue: "timer", | ||
}, | ||
}, | ||
}, | ||
{ | ||
opcode: "listExistingTimers", | ||
blockType: Scratch.BlockType.REPORTER, | ||
extensions: ["colours_sensing"], | ||
text: "列出所有计时器", | ||
disableMonitor: false, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add an I10n translation, use the translate method in the global scratch object or in the incoming scratch object, rather than modifying the relevant text directly. This is no different from no Chinese translation, which is unfriendly to overseas users
// Original: CST1229 <https://scratch.mit.edu/users/CST1229/> | ||
// License: MIT AND MPL-2.0 | ||
|
||
/* generated l10n code */Scratch.translate.setup({"es":{"_Text":"Texto"},"fi":{"_Text":"Teksti"},"it":{"_Text":"Testo"},"ja":{"_Text":"テキスト"},"ko":{"_Text":"텍스트"},"nb":{"_Text":"Tekst"},"nl":{"_Exactly Title Case":"Alleen Beginhoofdletters","_MiXeD CaSe":"DoOr eLkAaR","_Text":"Tekst","_Title Case":"Alles Met Beginhoofdletter","_UPPERCASE":"HOOFDLETTERS","_[STRING] matches regex /[REGEX]/[FLAGS]?":"[STRING] komt overeen met regex /[REGEX]/[FLAGS]?","_convert [STRING] to [TEXTCASE]":"zet [STRING] om naar [TEXTCASE]","_count [SUBSTRING] in [STRING]":"aantal [SUBSTRING] in [STRING]","_count regex /[REGEX]/[FLAGS] in [STRING]":"aantal overeenkomsten van regex /[REGEX]/[FLAGS] met [STRING]","_index of [SUBSTRING] in [STRING]":"positie van [SUBSTRING] in [STRING]","_is [OPERAND1] identical to [OPERAND2]?":"[OPERAND1] identiek aan [OPERAND2]?","_item [ITEM] of [STRING] matched by regex /[REGEX]/[FLAGS]":"item [ITEM] van [STRING] waarmee regex /[REGEX]/[FLAGS] overeenkomt","_item [ITEM] of [STRING] split by [SPLIT]":"item [ITEM] van [STRING] gesplitst door [SPLIT]","_letters [LETTER1] to [LETTER2] of [STRING]":"letters [LETTER1] t/m [LETTER2] van [STRING]","_lowercase":"kleine letters","_repeat [STRING] [REPEAT] times":"herhaal [STRING] [REPEAT] keer","_replace [SUBSTRING] in [STRING] with [REPLACE]":"vervang [SUBSTRING] in [STRING] door [REPLACE]","_replace regex /[REGEX]/[FLAGS] in [STRING] with [REPLACE]":"vervang regex /[REGEX]/[FLAGS] in [STRING] door [REPLACE]","_unicode [NUM] as letter":"unicode [NUM] als letter","_unicode of [STRING]":"unicode van [STRING]"},"pt-br":{"_Text":"Texto"},"ru":{"_Exactly Title Case":"Настоящий Тайтл Кейс","_MiXeD CaSe":"СмЕшАнНыЙ КеЙс","_Text":"Текст","_Title Case":"Тайтл Кейс","_UPPERCASE":"ВЕРХНИЙ РЕГИСТР","_[STRING] matches regex /[REGEX]/[FLAGS]?":"[STRING] совпадает с regex'ом /[REGEX]/[FLAGS]?","_convert [STRING] to [TEXTCASE]":"сконвертировать строку [STRING] в [TEXTCASE]","_count [SUBSTRING] in [STRING]":"количество [SUBSTRING] в [STRING]","_count regex /[REGEX]/[FLAGS] in [STRING]":"посчитать regex /[REGEX]/[FLAGS] в [STRING]","_index of [SUBSTRING] in [STRING]":"индекс [SUBSTRING] в [STRING]","_is [OPERAND1] identical to [OPERAND2]?":"[OPERAND1] идентичный с [OPERAND2]?","_is [STRING] [TEXTCASE]?":"строка [STRING] это [TEXTCASE]?","_item [ITEM] of [STRING] matched by regex /[REGEX]/[FLAGS]":"предмет [ITEM] строки [STRING] совпадающий regex'ом /[REGEX]/[FLAGS]","_item [ITEM] of [STRING] split by [SPLIT]":"предмет [ITEM] строки [STRING] распределённый [SPLIT]","_letters [LETTER1] to [LETTER2] of [STRING]":"буквы с [LETTER1] до [LETTER2] строки [STRING]","_lowercase":"нижний регистр","_repeat [STRING] [REPEAT] times":"повторить [STRING] [REPEAT] раз","_replace [SUBSTRING] in [STRING] with [REPLACE]":"заменить [SUBSTRING] в [STRING] на [REPLACE]","_replace regex /[REGEX]/[FLAGS] in [STRING] with [REPLACE]":"заменить regex /[REGEX]/[FLAGS] в [STRING] на [REPLACE]","_unicode [NUM] as letter":"юникод [NUM] как букву","_unicode of [STRING]":"юникод [STRING]"},"tr":{"_Text":"Metin"},"uk":{"_Text":"Текст"},"zh-cn":{"_Exactly Title Case":"精确标题","_MiXeD CaSe":"混合大小写","_Text":"文本","_Title Case":"标题","_UPPERCASE":"大写","_[STRING] matches regex /[REGEX]/[FLAGS]?":"[STRING] 满足正则表达式 /[REGEX]/[FLAGS]?","_convert [STRING] to [TEXTCASE]":"转换[STRING]为[TEXTCASE]","_count [SUBSTRING] in [STRING]":"[STRING]中[SUBSTRING]的数量","_count regex /[REGEX]/[FLAGS] in [STRING]":"使用正则表达式 /[REGEX]/[FLAGS] 在 [STRING] 匹配的数量","_index of [SUBSTRING] in [STRING]":"[STRING]中[SUBSTRING]的位置","_is [OPERAND1] identical to [OPERAND2]?":"[OPERAND1]===[OPERAND2]","_is [STRING] [TEXTCASE]?":"[STRING]是[TEXTCASE]?","_item [ITEM] of [STRING] matched by regex /[REGEX]/[FLAGS]":"使用正则表达式 /[REGEX]/[FLAGS]匹配[STRING]的第[ITEM]个内容","_item [ITEM] of [STRING] split by [SPLIT]":"以[SPLIT]分割[STRING]后的第[ITEM]项","_letters [LETTER1] to [LETTER2] of [STRING]":"[STRING]的第[LETTER1]到第[LETTER2]位","_lowercase":"小写","_repeat [STRING] [REPEAT] times":"重复[REPEAT]个[STRING]","_replace [SUBSTRING] in [STRING] with [REPLACE]":"替换[STRING]中的[SUBSTRING]为[REPLACE]","_replace regex /[REGEX]/[FLAGS] in [STRING] with [REPLACE]":"使用正则表达式 /[REGEX]/[FLAGS] 在 [STRING]中替换为 [REPLACE]","_unicode [NUM] as letter":"unicode[NUM]对应的字符","_unicode of [STRING]":"[STRING]的unicode"}});/* end generated l10n code */(function (Scratch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently Gandi-IDE only supports zh-cn and en, it is recommended to remove redundant I10n configurations in order to reduce the file size.
// Original: CST1229 <https://scratch.mit.edu/users/CST1229/> | ||
// License: MIT AND MPL-2.0 | ||
|
||
/* generated l10n code */Scratch.translate.setup({"es":{"_Text":"Texto"},"fi":{"_Text":"Teksti"},"it":{"_Text":"Testo"},"ja":{"_Text":"テキスト"},"ko":{"_Text":"텍스트"},"nb":{"_Text":"Tekst"},"nl":{"_Exactly Title Case":"Alleen Beginhoofdletters","_MiXeD CaSe":"DoOr eLkAaR","_Text":"Tekst","_Title Case":"Alles Met Beginhoofdletter","_UPPERCASE":"HOOFDLETTERS","_[STRING] matches regex /[REGEX]/[FLAGS]?":"[STRING] komt overeen met regex /[REGEX]/[FLAGS]?","_convert [STRING] to [TEXTCASE]":"zet [STRING] om naar [TEXTCASE]","_count [SUBSTRING] in [STRING]":"aantal [SUBSTRING] in [STRING]","_count regex /[REGEX]/[FLAGS] in [STRING]":"aantal overeenkomsten van regex /[REGEX]/[FLAGS] met [STRING]","_index of [SUBSTRING] in [STRING]":"positie van [SUBSTRING] in [STRING]","_is [OPERAND1] identical to [OPERAND2]?":"[OPERAND1] identiek aan [OPERAND2]?","_item [ITEM] of [STRING] matched by regex /[REGEX]/[FLAGS]":"item [ITEM] van [STRING] waarmee regex /[REGEX]/[FLAGS] overeenkomt","_item [ITEM] of [STRING] split by [SPLIT]":"item [ITEM] van [STRING] gesplitst door [SPLIT]","_letters [LETTER1] to [LETTER2] of [STRING]":"letters [LETTER1] t/m [LETTER2] van [STRING]","_lowercase":"kleine letters","_repeat [STRING] [REPEAT] times":"herhaal [STRING] [REPEAT] keer","_replace [SUBSTRING] in [STRING] with [REPLACE]":"vervang [SUBSTRING] in [STRING] door [REPLACE]","_replace regex /[REGEX]/[FLAGS] in [STRING] with [REPLACE]":"vervang regex /[REGEX]/[FLAGS] in [STRING] door [REPLACE]","_unicode [NUM] as letter":"unicode [NUM] als letter","_unicode of [STRING]":"unicode van [STRING]"},"pt-br":{"_Text":"Texto"},"ru":{"_Exactly Title Case":"Настоящий Тайтл Кейс","_MiXeD CaSe":"СмЕшАнНыЙ КеЙс","_Text":"Текст","_Title Case":"Тайтл Кейс","_UPPERCASE":"ВЕРХНИЙ РЕГИСТР","_[STRING] matches regex /[REGEX]/[FLAGS]?":"[STRING] совпадает с regex'ом /[REGEX]/[FLAGS]?","_convert [STRING] to [TEXTCASE]":"сконвертировать строку [STRING] в [TEXTCASE]","_count [SUBSTRING] in [STRING]":"количество [SUBSTRING] в [STRING]","_count regex /[REGEX]/[FLAGS] in [STRING]":"посчитать regex /[REGEX]/[FLAGS] в [STRING]","_index of [SUBSTRING] in [STRING]":"индекс [SUBSTRING] в [STRING]","_is [OPERAND1] identical to [OPERAND2]?":"[OPERAND1] идентичный с [OPERAND2]?","_is [STRING] [TEXTCASE]?":"строка [STRING] это [TEXTCASE]?","_item [ITEM] of [STRING] matched by regex /[REGEX]/[FLAGS]":"предмет [ITEM] строки [STRING] совпадающий regex'ом /[REGEX]/[FLAGS]","_item [ITEM] of [STRING] split by [SPLIT]":"предмет [ITEM] строки [STRING] распределённый [SPLIT]","_letters [LETTER1] to [LETTER2] of [STRING]":"буквы с [LETTER1] до [LETTER2] строки [STRING]","_lowercase":"нижний регистр","_repeat [STRING] [REPEAT] times":"повторить [STRING] [REPEAT] раз","_replace [SUBSTRING] in [STRING] with [REPLACE]":"заменить [SUBSTRING] в [STRING] на [REPLACE]","_replace regex /[REGEX]/[FLAGS] in [STRING] with [REPLACE]":"заменить regex /[REGEX]/[FLAGS] в [STRING] на [REPLACE]","_unicode [NUM] as letter":"юникод [NUM] как букву","_unicode of [STRING]":"юникод [STRING]"},"tr":{"_Text":"Metin"},"uk":{"_Text":"Текст"},"zh-cn":{"_Exactly Title Case":"精确标题","_MiXeD CaSe":"混合大小写","_Text":"文本","_Title Case":"标题","_UPPERCASE":"大写","_[STRING] matches regex /[REGEX]/[FLAGS]?":"[STRING] 满足正则表达式 /[REGEX]/[FLAGS]?","_convert [STRING] to [TEXTCASE]":"转换[STRING]为[TEXTCASE]","_count [SUBSTRING] in [STRING]":"[STRING]中[SUBSTRING]的数量","_count regex /[REGEX]/[FLAGS] in [STRING]":"使用正则表达式 /[REGEX]/[FLAGS] 在 [STRING] 匹配的数量","_index of [SUBSTRING] in [STRING]":"[STRING]中[SUBSTRING]的位置","_is [OPERAND1] identical to [OPERAND2]?":"[OPERAND1]===[OPERAND2]","_is [STRING] [TEXTCASE]?":"[STRING]是[TEXTCASE]?","_item [ITEM] of [STRING] matched by regex /[REGEX]/[FLAGS]":"使用正则表达式 /[REGEX]/[FLAGS]匹配[STRING]的第[ITEM]个内容","_item [ITEM] of [STRING] split by [SPLIT]":"以[SPLIT]分割[STRING]后的第[ITEM]项","_letters [LETTER1] to [LETTER2] of [STRING]":"[STRING]的第[LETTER1]到第[LETTER2]位","_lowercase":"小写","_repeat [STRING] [REPEAT] times":"重复[REPEAT]个[STRING]","_replace [SUBSTRING] in [STRING] with [REPLACE]":"替换[STRING]中的[SUBSTRING]为[REPLACE]","_replace regex /[REGEX]/[FLAGS] in [STRING] with [REPLACE]":"使用正则表达式 /[REGEX]/[FLAGS] 在 [STRING]中替换为 [REPLACE]","_unicode [NUM] as letter":"unicode[NUM]对应的字符","_unicode of [STRING]":"[STRING]的unicode"}});/* end generated l10n code */(function (Scratch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you need to add namespace to the translation to prevent global translation pollution
Oh, and the change I requested is not authoritative, so if there are subsequent requests from HCN, please refer to HCN for the relevant requirements |
} | ||
} | ||
|
||
Scratch.extensions.register(new StringsExt()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although Gandi now supports this expanded registration method, this does not configure the cover art and author name, use the tempExt method on the window object
} | ||
} | ||
|
||
Scratch.extensions.register(new StringsExt()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although Gandi now supports this expanded registration method, this does not configure the cover art and author name, use the tempExt method on the window object
More Timers should be inside TurboWarp/LilyMakesThings not TurboWarp/BetterTimer |
Added timer extension and text tool extension