mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-04 18:03:45 -04:00
Fixed #2450: added i18n for new items in the victory modal.
This commit is contained in:
parent
dc90481a5c
commit
63596aa6b5
4 changed files with 9 additions and 3 deletions
app
locale
templates/play/level/modal
views/play/level/modal
|
@ -261,6 +261,7 @@
|
||||||
victory_hour_of_code_done_yes: "Yes, I'm finished with my Hour of Code™!"
|
victory_hour_of_code_done_yes: "Yes, I'm finished with my Hour of Code™!"
|
||||||
victory_experience_gained: "XP Gained"
|
victory_experience_gained: "XP Gained"
|
||||||
victory_gems_gained: "Gems Gained"
|
victory_gems_gained: "Gems Gained"
|
||||||
|
victory_new_item: "New Item"
|
||||||
victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
|
victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
|
||||||
victory_become_a_viking: "Become a Viking"
|
victory_become_a_viking: "Become a Viking"
|
||||||
guide_title: "Guide"
|
guide_title: "Guide"
|
||||||
|
|
|
@ -261,6 +261,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
|
||||||
victory_hour_of_code_done_yes: "是的, 完成了!"
|
victory_hour_of_code_done_yes: "是的, 完成了!"
|
||||||
victory_experience_gained: "获得经验"
|
victory_experience_gained: "获得经验"
|
||||||
victory_gems_gained: "获得宝石"
|
victory_gems_gained: "获得宝石"
|
||||||
|
victory_new_item: "新的物品"
|
||||||
# victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
|
# victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
|
||||||
# victory_become_a_viking: "Become a Viking"
|
# victory_become_a_viking: "Become a Viking"
|
||||||
guide_title: "指南"
|
guide_title: "指南"
|
||||||
|
|
|
@ -47,7 +47,10 @@ block modal-body-content
|
||||||
.reward-panel.item(data-item-thang-type=item.get('original'))
|
.reward-panel.item(data-item-thang-type=item.get('original'))
|
||||||
.reward-image-container(class=animate ? 'pending-reward-image' : 'show')
|
.reward-image-container(class=animate ? 'pending-reward-image' : 'show')
|
||||||
img(src=item.getPortraitURL())
|
img(src=item.getPortraitURL())
|
||||||
.reward-text= animate ? 'New Item' : item.get('name')
|
if animate
|
||||||
|
.reward-text(data-i18n="play_level.victory_new_item") New Item
|
||||||
|
else
|
||||||
|
.reward-text= i18n(item.attributes, 'name')
|
||||||
|
|
||||||
block modal-footer-content
|
block modal-footer-content
|
||||||
#totals
|
#totals
|
||||||
|
|
|
@ -68,7 +68,7 @@ module.exports = class HeroVictoryModal extends ModalView
|
||||||
for thangTypeOriginal in thangTypeOriginals
|
for thangTypeOriginal in thangTypeOriginals
|
||||||
thangType = new ThangType()
|
thangType = new ThangType()
|
||||||
thangType.url = "/db/thang.type/#{thangTypeOriginal}/version"
|
thangType.url = "/db/thang.type/#{thangTypeOriginal}/version"
|
||||||
thangType.project = ['original', 'rasterIcon', 'name', 'soundTriggers']
|
thangType.project = ['original', 'rasterIcon', 'name', 'soundTriggers', 'i18n']
|
||||||
@thangTypes[thangTypeOriginal] = @supermodel.loadModel(thangType, 'thang').model
|
@thangTypes[thangTypeOriginal] = @supermodel.loadModel(thangType, 'thang').model
|
||||||
|
|
||||||
@newEarnedAchievements = []
|
@newEarnedAchievements = []
|
||||||
|
@ -134,6 +134,7 @@ module.exports = class HeroVictoryModal extends ModalView
|
||||||
c.me = me
|
c.me = me
|
||||||
c.readyToRank = @level.get('type', true) is 'hero-ladder' and @session.readyToRank()
|
c.readyToRank = @level.get('type', true) is 'hero-ladder' and @session.readyToRank()
|
||||||
c.level = @level
|
c.level = @level
|
||||||
|
c.i18n = utils.i18n
|
||||||
|
|
||||||
elapsed = (new Date() - new Date(me.get('dateCreated')))
|
elapsed = (new Date() - new Date(me.get('dateCreated')))
|
||||||
isHourOfCode = me.get('hourOfCode') or elapsed < 120 * 60 * 1000
|
isHourOfCode = me.get('hourOfCode') or elapsed < 120 * 60 * 1000
|
||||||
|
@ -245,7 +246,7 @@ module.exports = class HeroVictoryModal extends ModalView
|
||||||
@lastTotalGems = totalGems
|
@lastTotalGems = totalGems
|
||||||
else if panel.item
|
else if panel.item
|
||||||
thangType = @thangTypes[panel.item]
|
thangType = @thangTypes[panel.item]
|
||||||
panel.textEl.text(thangType.get('name'))
|
panel.textEl.text utils.i18n(thangType.attributes, 'name')
|
||||||
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'item-unlocked', volume: 1 if 0.5 < ratio < 0.6
|
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'item-unlocked', volume: 1 if 0.5 < ratio < 0.6
|
||||||
else if panel.hero
|
else if panel.hero
|
||||||
thangType = @thangTypes[panel.hero]
|
thangType = @thangTypes[panel.hero]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue