Skip to content

Commit

Permalink
encoding: Don't translate apple (#1167)
Browse files Browse the repository at this point in the history
btoa() errors on Chinese characters. The extension should be modified to
actually support those properly, but for now not translating apple will
avoid an error for Chinese users

#1166
  • Loading branch information
GarboMuffin authored Nov 26, 2023
1 parent b275d8a commit 2c2bb1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: btoa(Scratch.translate("apple")),
defaultValue: btoa("apple"), // don't translate because btoa() will error in Chinese ...
},
code: {
type: Scratch.ArgumentType.STRING,
Expand All @@ -460,7 +460,7 @@
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: Scratch.translate("apple"),
defaultValue: "apple",
},
hash: {
type: Scratch.ArgumentType.STRING,
Expand Down

0 comments on commit 2c2bb1d

Please sign in to comment.