Replace hard-coded strings for env.t on views/shared/profiles folder.

This commit is contained in:
Marcelo Sizer 2014-01-11 16:11:45 -02:00
parent 1ec534a650
commit 8188f173bc
2 changed files with 98 additions and 81 deletions

View file

@ -15,8 +15,9 @@
div(ng-if='profile.backer.npc')
.achievement.achievement-helm
h5
span.label.label-npc {{profile.backer.npc}} NPC
small Backed the Kickstarter project at the maximum level!
span.label.label-npc {{profile.backer.npc}}
=env.t('npc')
small=env.t('npcText')
hr
div(ng-if='profile.contributor.level || user._id == profile._id')
@ -24,70 +25,78 @@
div(ng-class='{muted: !profile.contributor.level}')
h5
span.label(ng-if='profile.contributor.level', class='label-contributor-{{profile.contributor.level}}') {{contribText(profile.contributor, profile.backer)}}
span.label(ng-if='!profile.contributor.level') Contributor
small.
Has contributed to HabitRPG (code, design, pixel art, legal advice, docs, etc). Want this badge? <a href='http://habitrpg.wikia.com/wiki/Contributing_to_HabitRPG' target='_blank'>Read more</a>.
span.label(ng-if='!profile.contributor.level')=env.t('contribName')
small=env.t('contribText')
a(href='http://habitrpg.wikia.com/wiki/Contributing_to_HabitRPG', target='_blank')=env.t('readMore')
| .
hr
div(ng-if='profile.backer.tier')
.achievement.achievement-heart
h5 Kickstarter Backer - ${{profile.backer.tier}} Tier
small Backed the Kickstarter Project
h5=env.t('kickstartName1')
${{profile.backer.tier}}
=env.t('kickstartName2')
small=env.t('kickstarterText')
hr
div(ng-if='profile.achievements.streak || user._id == profile._id')
.achievement.achievement-thermometer(ng-show='profile.achievements.streak')
div(ng-class='{muted: !profile.achievements.streak}')
h5 {{profile.achievements.streak || 0 }} Streak Achievement(s)
small Has performed {{profile.achievements.streak || 0 }} 21-day streaks on Dailies
h5 {{profile.achievements.streak || 0 }}
=env.t('streakName')
small=env.t('streakText1')
{{profile.achievements.streak || 0 }}
=env.t('streakText2')
hr
div(ng-if='profile.achievements.ultimateGear || user._id == profile._id')
.achievement.achievement-armor(ng-show='profile.achievements.ultimateGear')
div(ng-class='{muted: !profile.achievements.ultimateGear}')
h5 Ultimate Gear
small Has upgraded to the maximum weapon and armor set
h5=env.t('ultimateGearName')
small=env.t('ultimateGearText')
hr
div(ng-if='profile.achievements.beastMaster || user._id == profile._id')
.achievement.achievement-rat(ng-show='profile.achievements.beastMaster')
div(ng-class='{muted: !profile.achievements.beastMaster}')
h5 Beast Master
small Has found all 90 pets (insanely difficult, give this user props!)
h5=env.t('beastMastName')
small=env.t('beastMastText')
hr
div(ng-if='profile.achievements.rebirths')
.achievement.achievement-sun
h5(ng-if='profile.achievements.rebirths == 1') Began a New Adventure
h5(ng-if='profile.achievements.rebirths > 1') Began {{profile.achievements.rebirths}} New Adventures
small.
Used an Orb of Rebirth to start over after attaining Level {{profile.achievements.rebirthLevel}}.
h5(ng-if='profile.achievements.rebirths == 1')=env.t('rebirthBegan')
h5(ng-if='profile.achievements.rebirths > 1')=env.t('rebirthText1')
{{profile.achievements.rebirths}}
=env.t('rebirthText2')
small=env.t('rebirthOrb')
{{profile.achievements.rebirthLevel}}.
hr
div(ng-if='profile.achievements.helpedHabit')
.achievement.achievement-tree
h5 Helped Habit Grow
small.
Helped HabitRPG grow by filling out <a href='http://community.habitrpg.com/node/290' target='_blank'>this survey.</a>
h5=env.t('helpedHabit')
small=env.t('helpedText1')
a(href='http://community.habitrpg.com/node/290', target='_blank')=env.t('helpedText2')
hr
div(ng-if='profile.achievements.originalUser || profile.achievements.veteran')
.achievement.achievement-cake
div(ng-if='profile.achievements.veteran')
h5 Veteran
small
| Has weathered Habit The Grey (our pre Angular website), and has gained many battle-scars from its bugs.
h5=env.t('veteran')
small=env.t('veteranText')
div(ng-if='profile.achievements.originalUser')
h5 Original User!
small
| One of the <em>very</em> original early adopters, Talk about alpha tester!
h5=env.t('originalUser')
small=env.t('originaUserText1')
em=env.t('originaUserText2')
=env.t('originaUserText3')
hr
div(ng-if='profile.achievements.challenges || user._id == profile._id')
// This is a very strange icon to use. revisit
.achievement.achievement-karaoke(ng-show='profile.achievements.challenges')
div(ng-class='{muted: !profile.achievements.challenges}')
h5 Was the winner in the following challenges
h5=env.t('challengeWinner')
table.table.table-striped
tr(ng-repeat='chal in profile.achievements.challenges')
td {{chal}}
@ -96,7 +105,7 @@
div(ng-if='profile.achievements.quests || user._id == profile._id')
.achievement.achievement-alien(ng-show='profile.achievements.quests')
div(ng-class='{muted: !profile.achievements.quests}')
h5 Completed the following quests
h5=env.t('completedQuests')
table.table.table-striped
tr(ng-repeat='(k,v) in profile.achievements.quests')
td {{Content.quests[k].text}}
@ -105,6 +114,8 @@
div(ng-if='profile.achievements.snowball')
.achievement.achievement-snowball
h5 Annoying Friends
small Got snowballed {{profile.achievements.snowball}} times by party members.
h5=env.t('annoyingFriends')
small=env.t('annoyingFriends1')
{{profile.achievements.snowball}}
=env.t('annoyingFriends2')
hr

View file

@ -1,75 +1,81 @@
h4 Stats
h4.stats-equipment=env.t('equipment')
table.table.table-striped
tr
td
strong Health
| : {{profile.stats.hp | number:0}} / 50
tr
td
strong Gold
| : {{profile.stats.gp | number:0}}
tr
td
strong Level
| : {{profile.stats.lvl}}
tr
td
strong Experience
| : {{profile.stats.exp | number:0}} / {{Shared.tnl(profile.stats.lvl)}}
h4.stats-equipment(ng-show='user.flags.itemsEnabled') Equipment
table.table.table-striped(ng-show='user.flags.itemsEnabled')
// FIXME this isn't refreshing properly. On first party modal, correct. Second party modal click gives the previous gear. It's always one behind.
tr(ng-repeat='(k,v) in profile.items.gear.equipped', ng-init='piece=Content.gear.flat[v]', ng-show='piece')
tr(ng-repeat='(k,v) in user.items.gear.equipped', ng-init='piece=Content.gear.flat[v]', ng-show='piece')
td
strong {{piece.text}}:&nbsp;
span(ng-repeat='stat in ["str","con","per","int"]', ng-show='piece[stat]') {{piece[stat]}} {{stat.toUpperCase()}}&nbsp;
h4 Attributes
h4=env.t('stats')
table.table.table-striped
tr(ng-repeat='(k,v) in {str:"Strength (STR)",int:"Intelligence (INT)",con:"Constitution (CON)",per:"Perception (PER)"}')
tr
td
strong=env.t('health')
| : {{profile.stats.hp | number:0}} / 50
tr
td
strong=env.t('gold')
| : {{profile.stats.gp | number:0}}
tr
td
strong=env.t('level')
| : {{profile.stats.lvl}}
tr
td
strong=env.t('experience')
| : {{profile.stats.exp | number:0}} / {{Shared.tnl(profile.stats.lvl)}}
h4=env.t('attributes')
table.table.table-striped
tr(ng-repeat='(k,v) in {str:"Strength",int:"Intelligence",con:"Constitution",per:"Perception"}')
td
i.icon-question-sign(ng-show='k=="str"', popover-title='Strength', popover-placement='right', popover='Strength reduces task threat (redness), increases the Gold and Experience boost from random "critical hits," and helps deal damage to boss monsters.', popover-trigger='mouseenter', style='margin-right:3px')
i.icon-question-sign(ng-show='k=="con"', popover-title='Constitution', popover-placement='right', popover='Constitution reduces the damage you take, whether from negative Habits, missed Dailies, or the attacks of boss monsters.', popover-trigger='mouseenter', style='margin-right:3px')
i.icon-question-sign(ng-show='k=="per"', popover-title='Perception', popover-placement='right', popover='Perception increases how much Gold you earn, and starting at level 4, increases the chance of finding items when scoring tasks.', popover-trigger='mouseenter', style='margin-right:3px')
i.icon-question-sign(ng-show='k=="int"', popover-title='Intelligence', popover-placement='right', popover='Intelligence increases how much Experience you earn, and once you\'ve unlocked Classes, determines your maximum Mana available for class abilities.', popover-trigger='mouseenter', style='margin-right:3px')
strong {{v}}: {{profile._statsComputed[k]}}
td
ul(style='list-style-type:none')
li
i.icon-question-sign(popover-title='Level Bonus', popover-trigger='mouseenter', popover-placement='top', popover="Each attribute gets a bonus equal to half of (your Level minus 1).")
| Level: {{(profile.stats.lvl - 1) / 2}}&nbsp;
li(ng-show='user.flags.itemsEnabled')
i.icon-question-sign(popover-title='Equipment', popover-trigger='mouseenter', popover-placement='top', popover="Attribute bonuses provided by your equipped battle gear. See the Equipment tab under Inventory to select your battle gear.")
| Equipment: {{Content.gear.flat[profile.items.gear.equipped.weapon][k] + Content.gear.flat[profile.items.gear.equipped.armor][k] + Content.gear.flat[profile.items.gear.equipped.head][k] + Content.gear.flat[profile.items.gear.equipped.shield][k] || 0}}&nbsp;
li(ng-show='user.flags.itemsEnabled')
i.icon-question-sign(popover-title='Class Equipment Bonus', popover-trigger='mouseenter', popover-placement='top', popover="Your class (Warrior, if you haven't unlocked or selected another class) uses its own equipment more effectively than gear from other classes. Equipped gear from your current class gets a 50% boost to the attribute bonus it grants.")
| Class Equip Bonus: {{profile._statsComputed[k] - profile.stats.buffs[k] - ((profile.stats.lvl - 1) / 2) - Content.gear.flat[profile.items.gear.equipped.weapon][k] - Content.gear.flat[profile.items.gear.equipped.armor][k] - Content.gear.flat[profile.items.gear.equipped.head][k] - Content.gear.flat[profile.items.gear.equipped.shield][k] - profile.stats[k]}}&nbsp;
li(ng-show='user.flags.classSelected && !user.preferences.disableClasses')
i.icon-question-sign(popover-title='Allocated Points', popover-trigger='mouseenter', popover-placement='top', popover="Attribute points you've earned and assigned. Assign points using the Character Build column.")
| Allocated: {{profile.stats[k] || 0}}&nbsp;
i.icon-question-sign(popover-title=env.t('levelBonus'), popover-trigger='mouseenter', popover-placement='top', popover=env.t('levelBonusText'))
|
=env.t('level')
|: {{(profile.stats.lvl - 1) / 2}}&nbsp;
li
i.icon-question-sign(popover-title='Buffs', popover-trigger='mouseenter', popover-placement='top', popover="Attribute bonuses provided by abilities you or your party members have used. Starting at level 11, the abilities you can use are found in the Rewards column on your Tasks page.")
| Buffs: {{profile.stats.buffs[k] || 0}}&nbsp;
i.icon-question-sign(popover-title=env.t('equipment'), popover-trigger='mouseenter', popover-placement='top', popover=env.t('equipmentBonusText'))
|
=env.t('equipment')
|: {{Content.gear.flat[profile.items.gear.equipped.weapon][k] + Content.gear.flat[profile.items.gear.equipped.armor][k] + Content.gear.flat[profile.items.gear.equipped.head][k] + Content.gear.flat[profile.items.gear.equipped.shield][k] || 0}}&nbsp;
li
i.icon-question-sign(popover-title=env.t('classBonus'), popover-trigger='mouseenter', popover-placement='top', popover=env.t('classBonusText'))
|
=env.t('classEquipBonus')
|: {{profile._statsComputed[k] - profile.stats.buffs[k] - ((profile.stats.lvl - 1) / 2) - Content.gear.flat[profile.items.gear.equipped.weapon][k] - Content.gear.flat[profile.items.gear.equipped.armor][k] - Content.gear.flat[profile.items.gear.equipped.head][k] - Content.gear.flat[profile.items.gear.equipped.shield][k] - profile.stats[k]}}&nbsp;
li
i.icon-question-sign(popover-title=env.t('allocatedPoints'), popover-trigger='mouseenter', popover-placement='top', popover=env.t('allocatedPointsText'))
|
=env.t('allocated')
|: {{profile.stats[k] || 0}}&nbsp;
li
i.icon-question-sign(popover-title=env.t('buffs'), popover-trigger='mouseenter', popover-placement='top', popover=env.t('buffsText'))
|
=env.t('buffs')
|: {{profile.stats.buffs[k] || 0}}&nbsp;
tr(ng-if='profile.stats.buffs.stealth')
td
strong Stealth: {{profile.stats.buffs.stealth}}&nbsp;
i.icon-question-sign(popover-title='Stealth', popover-trigger='mouseenter', popover-placement='right', popover="When a new day begins, you will avoid damage from this many missed Dailies.")
strong=env.t('stealth')
|: {{profile.stats.buffs.stealth}}&nbsp;
i.icon-question-sign(popover-title=env.t('stealth'), popover-trigger='mouseenter', popover-placement='right', popover=env.t('stealthNewDay'))
td
tr(ng-if='profile.stats.buffs.streaks')
td
strong Streaks Frozen&nbsp;
i.icon-question-sign(popover-title='Streaks Frozen', popover-trigger='mouseenter', popover-placement='right', popover="Streaks on missed Dailies will not reset at the end of the day.")
strong=env.t('streaksFrozen')
|
i.icon-question-sign(popover-title=env.t('streaksFrozen'), popover-trigger='mouseenter', popover-placement='right', popover=env.t('streaksFrozenText'))
td
h4(ng-show='user.flags.dropsEnabled') Pets
table.table.table-striped(ng-show='user.flags.dropsEnabled')
h4=env.t('pets')
table.table.table-striped
tr
td
strong Pets Found
strong=env.t('petsFound')
| : {{profile.petCount}}
// Dunno why this doesn't work //
// tr
td
strong Mounts Tamed
| : {{profile.mountCount}} //
strong=env.t('mountsTamed')
| : {{mountCount}} //