Translate spell type (function/method/snippet/etc)

This commit is contained in:
phoenixeliot 2016-04-25 13:47:59 -07:00
parent 02d833639b
commit aa93a3ec6c
2 changed files with 10 additions and 1 deletions
app
locale
templates/play/level/tome

View file

@ -639,6 +639,13 @@
restricted_to_certain_heroes: "Only certain heroes can play this level."
skill_docs:
function: "function" # skill types
method: "method"
snippet: "snippet"
number: "number"
array: "array"
object: "object"
string: "string"
writable: "writable" # Hover over "attack" in Your Skills while playing a level to see most of this
read_only: "read-only"
action: "Action"

View file

@ -1,7 +1,9 @@
h4
span.prop-name= doc.shortName
| -
code.prop-type= doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type
code.prop-type(data-i18n='skill_docs.'+(doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type))
// In case there's no translation in en.coffee because we missed one
= (doc.type == 'function' && doc.owner == 'this') ? 'method' : doc.type
if doc.type != 'function'
| (
if writable