mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Using extendedName.
This commit is contained in:
parent
ce8b3bc83c
commit
851bf39c5c
4 changed files with 7 additions and 4 deletions
|
@ -146,7 +146,8 @@ _.extend ThangTypeSchema.properties,
|
|||
type: 'number'
|
||||
description: 'Snap to this many meters in the y-direction.'
|
||||
components: c.array {title: 'Components', description: 'Thangs are configured by changing the Components attached to them.', uniqueItems: true, format: 'thang-components-array'}, ThangComponentSchema # TODO: uniqueness should be based on 'original', not whole thing
|
||||
i18n: {type: 'object', format: 'i18n', props: ['name', 'description'], description: 'Help translate this ThangType\'s name and description.'}
|
||||
i18n: {type: 'object', format: 'i18n', props: ['name', 'description', 'extendedName'], description: 'Help translate this ThangType\'s name and description.'}
|
||||
extendedName: {type: 'string', title: 'Extended Hero Name', description: 'The long form of the hero\'s name. Ex.: "Captain Anya Weston".'}
|
||||
|
||||
ThangTypeSchema.required = []
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ ThangType = require 'models/ThangType'
|
|||
module.exports = class ThangTypeI18NView extends I18NEditModelView
|
||||
id: "thang-type-i18n-view"
|
||||
modelClass: ThangType
|
||||
|
||||
|
||||
buildTranslationList: ->
|
||||
lang = @selectedLanguage
|
||||
@model.markToRevert() unless @model.hasLocalChanges()
|
||||
|
@ -12,4 +12,5 @@ module.exports = class ThangTypeI18NView extends I18NEditModelView
|
|||
if i18n
|
||||
name = @model.get('name')
|
||||
@wrapRow('Name', ['name'], name, i18n[lang]?.name, [])
|
||||
@wrapRow('Description', ['description'], @model.get('description'), i18n[lang]?.description, [], 'markdown')
|
||||
@wrapRow('Description', ['description'], @model.get('description'), i18n[lang]?.description, [], 'markdown')
|
||||
@wrapRow('Extended Hero Name', ['extendedName'], @model.get('extendedName'), i18n[lang]?.extendedName, [])
|
||||
|
|
|
@ -27,7 +27,7 @@ module.exports = class PlayHeroesModal extends ModalView
|
|||
@confirmButtonI18N = options.confirmButtonI18N ? "common.save"
|
||||
@heroes = new CocoCollection([], {model: ThangType})
|
||||
@heroes.url = '/db/thang.type?view=heroes'
|
||||
@heroes.setProjection ['original','name','slug','soundTriggers','featureImage','gems','heroClass','description','components']
|
||||
@heroes.setProjection ['original','name','slug','soundTriggers','featureImage','gems','heroClass','description','components','extendedName']
|
||||
@listenToOnce @heroes, 'sync', @onHeroesLoaded
|
||||
@supermodel.loadCollection(@heroes, 'heroes')
|
||||
@stages = {}
|
||||
|
|
|
@ -40,6 +40,7 @@ ThangTypeHandler = class ThangTypeHandler extends Handler
|
|||
'description'
|
||||
'gems'
|
||||
'heroClass'
|
||||
'extendedName'
|
||||
]
|
||||
|
||||
hasAccess: (req) ->
|
||||
|
|
Loading…
Reference in a new issue