mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
Made gift dialog translatable
Addressing a bit beyond _#10 in the opening post of https://github.com/HabitRPG/habitrpg/issues/4522 Screenshot of before-after-proof: http://oi57.tinypic.com/11c9ldi.jpg
This commit is contained in:
parent
844c1ed178
commit
a788d51aa5
2 changed files with 17 additions and 10 deletions
|
|
@ -109,5 +109,12 @@
|
|||
"inviteByEmail": "Invite friends by email. If they join via your email, they'll automatically be invited to this group.",
|
||||
"byColon": "By:",
|
||||
"inviteNewUsers": "Invite New User(s)",
|
||||
"inviteAlertInfo2": "Or share this link (copy/paste):"
|
||||
"inviteAlertInfo2": "Or share this link (copy/paste):",
|
||||
"sendGiftHeading": "Send Gift to <%= name %>",
|
||||
"sendGiftGemsBalance": "From <%= number %> Gems",
|
||||
"sendGiftCost": "Total: $<%= cost %> USD",
|
||||
"sendGiftFromBalance": "From Balance",
|
||||
"sendGiftPurchase": "Purchase",
|
||||
"sendGiftMessagePlaceholder": "Personal message (optional)",
|
||||
"sendGiftSubscription": "<%= months %> Month(s): $<%= price %>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,14 +62,14 @@ script(type='text/ng-template', id='modals/private-message.html')
|
|||
|
||||
script(type='text/ng-template', id='modals/send-gift.html')
|
||||
.modal-header
|
||||
h4 Send Gift to {{::profile.profile.name}}
|
||||
h4=env.t('sendGiftHeading', {name: "{{profile.profile.name}}"})
|
||||
.modal-body
|
||||
.panel.panel-default(class="{{gift.type=='gems' ? 'panel-primary' : 'transparent'}}", ng-click='gift.type="gems"')
|
||||
.panel-heading
|
||||
.pull-right
|
||||
span(ng-show='gift.gems.fromBalance') From {{user.balance*4}} Gems
|
||||
span(ng-hide='gift.gems.fromBalance') Total: ${{gift.gems.amount/4}} USD
|
||||
| Gems
|
||||
span(ng-show='gift.gems.fromBalance')=env.t('sendGiftGemsBalance', {number: "{{user.balance*4}}"})
|
||||
span(ng-hide='gift.gems.fromBalance')=env.t('sendGiftCost', {cost: "{{gift.gems.amount/4}}"})
|
||||
=env.t('gemsPopoverTitle')
|
||||
.panel-body
|
||||
.row
|
||||
.col-md-6
|
||||
|
|
@ -77,19 +77,19 @@ script(type='text/ng-template', id='modals/send-gift.html')
|
|||
input.form-control(type='number', placeholder='Number of Gems', min='0', max='{{gift.gems.fromBalance ? user.balance*4 : ""}}', ng-model='gift.gems.amount')
|
||||
.col-md-6
|
||||
.btn-group
|
||||
a.btn.btn-default(ng-class="{active:gift.gems.fromBalance}", ng-click="gift.gems.fromBalance=true") From Balance
|
||||
a.btn.btn-default(ng-class="{active:!gift.gems.fromBalance}", ng-click="gift.gems.fromBalance=false") Purchase
|
||||
a.btn.btn-default(ng-class="{active:gift.gems.fromBalance}", ng-click="gift.gems.fromBalance=true")=env.t('sendGiftFromBalance')
|
||||
a.btn.btn-default(ng-class="{active:!gift.gems.fromBalance}", ng-click="gift.gems.fromBalance=false")=env.t('sendGiftPurchase')
|
||||
|
||||
.panel.panel-default(class="{{gift.type=='subscription' ? 'panel-primary' : 'transparent'}}", ng-click='gift.type="subscription"')
|
||||
.panel-heading Subscription
|
||||
.panel-heading=env.t('subscription')
|
||||
.panel-body
|
||||
.form-group
|
||||
.radio(ng-repeat='block in Content.subscriptionBlocks | toArray | omit:"discount==true" | orderBy:"months"')
|
||||
label
|
||||
input(type="radio", name="subRadio", ng-value="block.key", ng-model='gift.subscription.key')
|
||||
| {{block.months}} Month(s): ${{block.price}}
|
||||
=env.t('sendGiftSubscription', {price: '{{::block.price}}', months: '{{block.months}}'})
|
||||
|
||||
textarea.form-control(rows='3', ng-model='gift.message', placeholder='Personal message (optional)')
|
||||
textarea.form-control(rows='3', ng-model='gift.message', placeholder=env.t('sendGiftMessagePlaceholder'))
|
||||
include ../formatting-help
|
||||
|
||||
.modal-footer
|
||||
|
|
|
|||
Loading…
Reference in a new issue