mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Adding i18n to skill docs.
This commit is contained in:
parent
ffaa42cb9b
commit
f248de0dc5
2 changed files with 66 additions and 20 deletions
|
@ -351,6 +351,24 @@
|
|||
blocks: "Blocks" # As in "this shield blocks this much damage"
|
||||
skills: "Skills"
|
||||
|
||||
skill_docs:
|
||||
writable: "writable" # Hover over "attack" in Your Skills while playing a level to see most of this
|
||||
read_only: "read-only"
|
||||
action_name: "name"
|
||||
action_cooldown: "Takes"
|
||||
action_specific_cooldown: "Cooldown"
|
||||
action_damage: "Damage"
|
||||
action_range: "Range"
|
||||
action_radius: "Radius"
|
||||
action_duration: "Duration"
|
||||
example: "Example"
|
||||
ex: "ex" # Abbreviation of "example"
|
||||
current_value: "Current Value"
|
||||
default_value: "Default value"
|
||||
parameters: "Parameters"
|
||||
returns: "Returns"
|
||||
granted_by: "Granted by"
|
||||
|
||||
save_load:
|
||||
granularity_saved_games: "Saved"
|
||||
granularity_change_history: "History"
|
||||
|
|
|
@ -3,57 +3,71 @@ h4
|
|||
| -
|
||||
code.prop-type= doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type
|
||||
if doc.type != 'function'
|
||||
| (
|
||||
if writable
|
||||
| (writable)
|
||||
span(data-i18n="skill_docs.writable") writable
|
||||
else
|
||||
| (read-only)
|
||||
span(data-i18n="skill_docs.read_only") read-only
|
||||
| )
|
||||
|
||||
.description
|
||||
p!= marked(doc.description || 'Still undocumented, sorry.')
|
||||
if cooldowns && (cooldowns.cooldown || cooldowns.specificCooldown)
|
||||
p
|
||||
span
|
||||
| #{cooldowns.type == 'spell' ? 'Spell' : 'Action'} name:
|
||||
| #{cooldowns.type == 'spell' ? 'Spell' : 'Action'}
|
||||
span.spl(data-i18n="skill_docs.action_name") name
|
||||
span.spr :
|
||||
code "#{cooldowns.name}"
|
||||
| .
|
||||
span.spl
|
||||
| Cooldown:
|
||||
span(data-i18n="skill_docs.action_cooldown") Takes
|
||||
span.spr :
|
||||
code= cooldowns.cooldown
|
||||
| s.
|
||||
if cooldowns.specificCooldown
|
||||
span.spl
|
||||
| Specific cooldown:
|
||||
span(data-i18n="skill_docs.action_specific_cooldown") Cooldown
|
||||
span.spr :
|
||||
code= cooldowns.specificCooldown
|
||||
| s.
|
||||
if cooldowns.damage
|
||||
span.spl
|
||||
| Damage:
|
||||
span(data-i18n="skill_docs.action_damage") Damage
|
||||
span.spr :
|
||||
code= cooldowns.damage
|
||||
| .
|
||||
if cooldowns.range
|
||||
span.spl
|
||||
| Range:
|
||||
span(data-i18n="skill_docs.action_range") Range
|
||||
span.spr :
|
||||
code= cooldowns.range
|
||||
| m.
|
||||
if cooldowns.radius
|
||||
span.spl
|
||||
| Radius:
|
||||
span(data-i18n="skill_docs.action_radius") Radius
|
||||
span.spr :
|
||||
code= cooldowns.radius
|
||||
| m.
|
||||
if cooldowns.duration
|
||||
span.spl
|
||||
| Duration:
|
||||
span(data-i18n="skill_docs.action_duration") Duration
|
||||
span.spr :
|
||||
code= cooldowns.duration
|
||||
| s.
|
||||
|
||||
if !selectedMethod
|
||||
if doc.example
|
||||
p.example
|
||||
strong Example:
|
||||
strong
|
||||
span(data-i18n="skill_docs.example") Example
|
||||
| :
|
||||
div!= marked("```\n" + doc.example + "```")
|
||||
else if doc.type == 'function' && argumentExamples.length
|
||||
p.example
|
||||
strong Example:
|
||||
strong
|
||||
span(data-i18n="skill_docs.example") Example
|
||||
| :
|
||||
div
|
||||
if language == 'javascript'
|
||||
code= doc.owner + '.' + doc.name + '(' + argumentExamples.join(', ') + ');'
|
||||
|
@ -70,36 +84,48 @@ if !selectedMethod
|
|||
|
||||
if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
|
||||
p.value
|
||||
strong Current Value:
|
||||
strong
|
||||
span(data-i18n="skill_docs.current_value") Current Value
|
||||
span.spr :
|
||||
pre
|
||||
code.current-value(data-prop=doc.name)= value
|
||||
|
||||
if doc.args && doc.args.length
|
||||
p.args
|
||||
strong Parameters:
|
||||
strong
|
||||
span(data-i18n="skill_docs.parameters") Parameters
|
||||
span.spr :
|
||||
for arg in doc.args
|
||||
div
|
||||
code= arg.name
|
||||
| :
|
||||
span.spr :
|
||||
code= arg.type
|
||||
if arg.example
|
||||
| (ex:
|
||||
| (
|
||||
span(data-i18n="skill_docs.ex") ex
|
||||
span.spr :
|
||||
code= arg.example
|
||||
| )
|
||||
if arg.description
|
||||
div!= marked(arg.description)
|
||||
if arg.default
|
||||
div
|
||||
em Default value:
|
||||
em
|
||||
span(data-i18n="skill_docs.default_value") Default value
|
||||
span.spr :
|
||||
code= arg.default
|
||||
|
||||
if doc.returns
|
||||
p.returns
|
||||
strong Returns:
|
||||
strong
|
||||
span(data-i18n="skill_docs.returns") Returns
|
||||
span.spr :
|
||||
div
|
||||
code= doc.returns.type
|
||||
if doc.returns.example
|
||||
| (ex:
|
||||
| (
|
||||
span(data-i18n="skill_docs.ex") ex
|
||||
span.spr :
|
||||
code= doc.returns.example
|
||||
| )
|
||||
if doc.returns.description
|
||||
|
@ -107,7 +133,9 @@ if doc.returns
|
|||
|
||||
if item
|
||||
p
|
||||
em Granted by #{item.get('name')}.
|
||||
em
|
||||
span.spr(data-i18n="skill_docs.granted_by") Granted by
|
||||
| #{item.get('name')}.
|
||||
|
||||
if selectedMethod
|
||||
p
|
||||
|
|
Loading…
Reference in a new issue