mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
Used internationalised strings for level not found message
This commit is contained in:
parent
e3a81137e0
commit
11c5f7419a
4 changed files with 2 additions and 6 deletions
|
@ -93,9 +93,6 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@supermodel.populateModel @level
|
||||
|
||||
onSupermodelError: ->
|
||||
# msg = $.i18n.t('play_level.level_load_error',
|
||||
# defaultValue: "Level could not be loaded.")
|
||||
# $('body').append('<div class="alert">' + msg + '</div>')
|
||||
|
||||
onSupermodelLoadedOne: (e) ->
|
||||
@update()
|
||||
|
|
|
@ -4,7 +4,7 @@ block content
|
|||
|
||||
if notFound
|
||||
div(class="alert alert-warning")
|
||||
h2 Oops, the level "#{notFound}" was not found!
|
||||
h2 #{notFoundMessage}
|
||||
|
||||
h1(data-i18n="play.choose_your_level") Choose Your Level
|
||||
p
|
||||
|
|
|
@ -98,8 +98,6 @@ module.exports = class PlayLevelView extends View
|
|||
|
||||
onLevelLoadError: (e) =>
|
||||
application.router.navigate "/play?not_found=#{@levelID}", {trigger: true}
|
||||
# msg = $.i18n.t('play_level.level_load_error', defaultValue: "Level could not be loaded.")
|
||||
# @$el.html('<div class="alert"><h2>Whoops we were not able to find ' + @levelID + '!</h2><p>' + msg + '</p><p>Please select a valid level from the <a href="/play">levels</a> page.</p></div>')
|
||||
|
||||
setLevel: (@level, @supermodel) ->
|
||||
@god?.level = @level.serialize @supermodel
|
||||
|
|
|
@ -9,6 +9,7 @@ module.exports = class PlayView extends View
|
|||
context = super(context)
|
||||
context.home = true
|
||||
context.notFound = @getQueryVariable 'not_found'
|
||||
context.notFoundMessage = $.i18n.t('play_level.level_load_error') + context.notFound
|
||||
tutorials = [
|
||||
{
|
||||
name: 'Rescue Mission'
|
||||
|
|
Loading…
Reference in a new issue