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"
|
blocks: "Blocks" # As in "this shield blocks this much damage"
|
||||||
skills: "Skills"
|
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:
|
save_load:
|
||||||
granularity_saved_games: "Saved"
|
granularity_saved_games: "Saved"
|
||||||
granularity_change_history: "History"
|
granularity_change_history: "History"
|
||||||
|
|
|
@ -3,57 +3,71 @@ h4
|
||||||
| -
|
| -
|
||||||
code.prop-type= doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type
|
code.prop-type= doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type
|
||||||
if doc.type != 'function'
|
if doc.type != 'function'
|
||||||
|
| (
|
||||||
if writable
|
if writable
|
||||||
| (writable)
|
span(data-i18n="skill_docs.writable") writable
|
||||||
else
|
else
|
||||||
| (read-only)
|
span(data-i18n="skill_docs.read_only") read-only
|
||||||
|
| )
|
||||||
|
|
||||||
.description
|
.description
|
||||||
p!= marked(doc.description || 'Still undocumented, sorry.')
|
p!= marked(doc.description || 'Still undocumented, sorry.')
|
||||||
if cooldowns && (cooldowns.cooldown || cooldowns.specificCooldown)
|
if cooldowns && (cooldowns.cooldown || cooldowns.specificCooldown)
|
||||||
p
|
p
|
||||||
span
|
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}"
|
code "#{cooldowns.name}"
|
||||||
| .
|
| .
|
||||||
span.spl
|
span.spl
|
||||||
| Cooldown:
|
span(data-i18n="skill_docs.action_cooldown") Takes
|
||||||
|
span.spr :
|
||||||
code= cooldowns.cooldown
|
code= cooldowns.cooldown
|
||||||
| s.
|
| s.
|
||||||
if cooldowns.specificCooldown
|
if cooldowns.specificCooldown
|
||||||
span.spl
|
span.spl
|
||||||
| Specific cooldown:
|
span(data-i18n="skill_docs.action_specific_cooldown") Cooldown
|
||||||
|
span.spr :
|
||||||
code= cooldowns.specificCooldown
|
code= cooldowns.specificCooldown
|
||||||
| s.
|
| s.
|
||||||
if cooldowns.damage
|
if cooldowns.damage
|
||||||
span.spl
|
span.spl
|
||||||
| Damage:
|
span(data-i18n="skill_docs.action_damage") Damage
|
||||||
|
span.spr :
|
||||||
code= cooldowns.damage
|
code= cooldowns.damage
|
||||||
| .
|
| .
|
||||||
if cooldowns.range
|
if cooldowns.range
|
||||||
span.spl
|
span.spl
|
||||||
| Range:
|
span(data-i18n="skill_docs.action_range") Range
|
||||||
|
span.spr :
|
||||||
code= cooldowns.range
|
code= cooldowns.range
|
||||||
| m.
|
| m.
|
||||||
if cooldowns.radius
|
if cooldowns.radius
|
||||||
span.spl
|
span.spl
|
||||||
| Radius:
|
span(data-i18n="skill_docs.action_radius") Radius
|
||||||
|
span.spr :
|
||||||
code= cooldowns.radius
|
code= cooldowns.radius
|
||||||
| m.
|
| m.
|
||||||
if cooldowns.duration
|
if cooldowns.duration
|
||||||
span.spl
|
span.spl
|
||||||
| Duration:
|
span(data-i18n="skill_docs.action_duration") Duration
|
||||||
|
span.spr :
|
||||||
code= cooldowns.duration
|
code= cooldowns.duration
|
||||||
| s.
|
| s.
|
||||||
|
|
||||||
if !selectedMethod
|
if !selectedMethod
|
||||||
if doc.example
|
if doc.example
|
||||||
p.example
|
p.example
|
||||||
strong Example:
|
strong
|
||||||
|
span(data-i18n="skill_docs.example") Example
|
||||||
|
| :
|
||||||
div!= marked("```\n" + doc.example + "```")
|
div!= marked("```\n" + doc.example + "```")
|
||||||
else if doc.type == 'function' && argumentExamples.length
|
else if doc.type == 'function' && argumentExamples.length
|
||||||
p.example
|
p.example
|
||||||
strong Example:
|
strong
|
||||||
|
span(data-i18n="skill_docs.example") Example
|
||||||
|
| :
|
||||||
div
|
div
|
||||||
if language == 'javascript'
|
if language == 'javascript'
|
||||||
code= doc.owner + '.' + doc.name + '(' + argumentExamples.join(', ') + ');'
|
code= doc.owner + '.' + doc.name + '(' + argumentExamples.join(', ') + ');'
|
||||||
|
@ -70,36 +84,48 @@ if !selectedMethod
|
||||||
|
|
||||||
if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
|
if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
|
||||||
p.value
|
p.value
|
||||||
strong Current Value:
|
strong
|
||||||
|
span(data-i18n="skill_docs.current_value") Current Value
|
||||||
|
span.spr :
|
||||||
pre
|
pre
|
||||||
code.current-value(data-prop=doc.name)= value
|
code.current-value(data-prop=doc.name)= value
|
||||||
|
|
||||||
if doc.args && doc.args.length
|
if doc.args && doc.args.length
|
||||||
p.args
|
p.args
|
||||||
strong Parameters:
|
strong
|
||||||
|
span(data-i18n="skill_docs.parameters") Parameters
|
||||||
|
span.spr :
|
||||||
for arg in doc.args
|
for arg in doc.args
|
||||||
div
|
div
|
||||||
code= arg.name
|
code= arg.name
|
||||||
| :
|
span.spr :
|
||||||
code= arg.type
|
code= arg.type
|
||||||
if arg.example
|
if arg.example
|
||||||
| (ex:
|
| (
|
||||||
|
span(data-i18n="skill_docs.ex") ex
|
||||||
|
span.spr :
|
||||||
code= arg.example
|
code= arg.example
|
||||||
| )
|
| )
|
||||||
if arg.description
|
if arg.description
|
||||||
div!= marked(arg.description)
|
div!= marked(arg.description)
|
||||||
if arg.default
|
if arg.default
|
||||||
div
|
div
|
||||||
em Default value:
|
em
|
||||||
|
span(data-i18n="skill_docs.default_value") Default value
|
||||||
|
span.spr :
|
||||||
code= arg.default
|
code= arg.default
|
||||||
|
|
||||||
if doc.returns
|
if doc.returns
|
||||||
p.returns
|
p.returns
|
||||||
strong Returns:
|
strong
|
||||||
|
span(data-i18n="skill_docs.returns") Returns
|
||||||
|
span.spr :
|
||||||
div
|
div
|
||||||
code= doc.returns.type
|
code= doc.returns.type
|
||||||
if doc.returns.example
|
if doc.returns.example
|
||||||
| (ex:
|
| (
|
||||||
|
span(data-i18n="skill_docs.ex") ex
|
||||||
|
span.spr :
|
||||||
code= doc.returns.example
|
code= doc.returns.example
|
||||||
| )
|
| )
|
||||||
if doc.returns.description
|
if doc.returns.description
|
||||||
|
@ -107,7 +133,9 @@ if doc.returns
|
||||||
|
|
||||||
if item
|
if item
|
||||||
p
|
p
|
||||||
em Granted by #{item.get('name')}.
|
em
|
||||||
|
span.spr(data-i18n="skill_docs.granted_by") Granted by
|
||||||
|
| #{item.get('name')}.
|
||||||
|
|
||||||
if selectedMethod
|
if selectedMethod
|
||||||
p
|
p
|
||||||
|
|
Loading…
Reference in a new issue