Add operator keywords and truth values to translations
Add and tweak code translations Translate shortened words to complete words
This commit is contained in:
parent
ff48734a52
commit
9cb6e99942
2 changed files with 35 additions and 3 deletions
app
|
@ -190,20 +190,52 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
|
||||||
code:
|
code:
|
||||||
if: "if" # Keywords--these translations show up on hover, so please translate them all, even if it's kind of long. (In the code editor, they will still be in English.)
|
if: "if" # Keywords--these translations show up on hover, so please translate them all, even if it's kind of long. (In the code editor, they will still be in English.)
|
||||||
else: "else"
|
else: "else"
|
||||||
elif: "elif"
|
elif: "else if"
|
||||||
while: "while"
|
while: "while"
|
||||||
loop: "loop"
|
loop: "loop"
|
||||||
for: "for"
|
for: "for"
|
||||||
break: "break"
|
break: "break"
|
||||||
continue: "continue"
|
continue: "continue"
|
||||||
|
pass: "pass"
|
||||||
|
return: "return"
|
||||||
then: "then"
|
then: "then"
|
||||||
do: "do"
|
do: "do"
|
||||||
end: "end"
|
end: "end"
|
||||||
function: "function"
|
function: "function"
|
||||||
def: "def" # (short for "define")
|
def: "define"
|
||||||
|
var: "variable"
|
||||||
self: "self"
|
self: "self"
|
||||||
hero: "hero"
|
hero: "hero"
|
||||||
this: "this"
|
this: "this"
|
||||||
|
or: "or"
|
||||||
|
"||": "or"
|
||||||
|
and: "and"
|
||||||
|
"&&": "and"
|
||||||
|
not: "not"
|
||||||
|
"!": "not"
|
||||||
|
"=": "assign" # For this section, conjugate it like it's the verb part of a sentence when possible
|
||||||
|
"==": "equals"
|
||||||
|
"===": "strictly equals"
|
||||||
|
"!=": "does not equal"
|
||||||
|
"!==": "does not strictly equal"
|
||||||
|
">": "is greater than"
|
||||||
|
">=": "is greater than or equal"
|
||||||
|
"<": "is less than"
|
||||||
|
"<=": "is less than or equal"
|
||||||
|
"*": "multiplied by"
|
||||||
|
"/": "divided by"
|
||||||
|
"+": "plus"
|
||||||
|
"-": "minus"
|
||||||
|
"+=": "add and assign"
|
||||||
|
"-=": "subtract and assign"
|
||||||
|
True: "True"
|
||||||
|
true: "true"
|
||||||
|
False: "False"
|
||||||
|
false: "false"
|
||||||
|
undefined: "undefined"
|
||||||
|
null: "null"
|
||||||
|
nil: "nil"
|
||||||
|
None: "None"
|
||||||
|
|
||||||
share_progress_modal:
|
share_progress_modal:
|
||||||
blurb: "You’re making great progress! Tell your parent how much you've learned with CodeCombat."
|
blurb: "You’re making great progress! Tell your parent how much you've learned with CodeCombat."
|
||||||
|
|
|
@ -37,7 +37,7 @@ module.exports = class SpellTranslationView extends CocoView
|
||||||
@$el.show().css(@pos)
|
@$el.show().css(@pos)
|
||||||
|
|
||||||
isIdentifier: (t) ->
|
isIdentifier: (t) ->
|
||||||
t and (t.type in ['identifier', 'keyword'] or t.value is 'this')
|
t and (_.any([/identifier/, /keyword/], (regex) -> regex.test(t.type)) or t.value is 'this')
|
||||||
|
|
||||||
onMouseMove: (e) =>
|
onMouseMove: (e) =>
|
||||||
return if @destroyed
|
return if @destroyed
|
||||||
|
|
Reference in a new issue