Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
0.13.1: Payment history footer message needs correct past/future context
Browse files Browse the repository at this point in the history
Fixes #6059
  • Loading branch information
mrose17 committed Jan 20, 2017
1 parent 187fa9a commit f660a9e
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 27 deletions.
1 change: 0 additions & 1 deletion app/extensions/brave/locales/bn-BD/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Bitcoin কিনুন
viewPaymentHistory=View Payment History…
paymentHistoryTitle=আপনার Payment ইতিহাস
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.

This comment has been minimized.

Copy link
@luixxiul

luixxiul Jan 20, 2017

Contributor

@mrose17 should this be removed instead of being replaced with paymentHistoryNextFooterText?

This comment has been minimized.

Copy link
@mrose17

mrose17 Jan 20, 2017

Author Member

yes -- i am informed by @bbondy that entries in non en-US properties file shouldn't be copies of the text in the en-US properties file.... you'll see that if a properties file has a non english entry, it got renamed, otherwise it's removed...

paymentHistoryOKText=ঠিক আছে
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/bn-IN/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Buy Bitcoin
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/cs/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Použít jakoukoli peněženku BTC, která dokáže přesu
bitcoinBuy=Koupit bitcoin
viewPaymentHistory=Podívat se na historii plateb...
paymentHistoryTitle=Historie vašich plateb
paymentHistoryFooterText=Další příspěvek platbou je {{reconcileDate}}.
paymentHistoryNextFooterText=Další příspěvek platbou je {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Platby Brave
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/de-DE/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Ein BTC Konto mit dem Bitcoins auf Ihr Brave Konto übertr
bitcoinBuy=Bitcoin kaufen
viewPaymentHistory=Transaktionsverlauf ansehen...
paymentHistoryTitle=Ihr Zahlungsverlauf
paymentHistoryFooterText=Ihre nächste Einzahlung ist am {{reconcileDate}}.
paymentHistoryNextFooterText=Ihre nächste Einzahlung ist am {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
7 changes: 5 additions & 2 deletions app/extensions/brave/locales/en-US/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ monthlyBudget=monthly budget
status=status
statusOnError=Brave Wallet can't be reached.
statusNextReconcileDate=Contribution due date is {{reconcileDate}}.
statusNextReconcileToday=Contribution due date is today.
createWallet=create wallet
createWalletStatus=Click the Create Wallet button to get started.
creatingWallet=creating…
Expand All @@ -48,10 +49,12 @@ bitcoin=Bitcoin
bitcoinAdd=Use your existing Bitcoin wallet/account
bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave wallet.
bitcoinBuy=Buy Bitcoin
noPaymentHistory=Your first payment contribution will be {{reconcileDate}}
noPaymentHistory=Your first contribution will be {{reconcileDate}}
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryNextFooterText=Your next contribution is {{reconcileDate}}.
paymentHistoryDueFooterText=Your next contribution is due.
paymentHistoryOverdueFooterText=Your next contribution is overdue.
paymentHistoryOKText=OK
hideExcluded=Only show included sites
bravePayments=Brave Payments
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/es/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Utilice cualquier cartera BTC que pueda transferir Bitcoin
bitcoinBuy=Comprar Bitcoin
viewPaymentHistory=Ver historial de pagos…
paymentHistoryTitle=Su historial de pagos
paymentHistoryFooterText=Tu próxima contribución de pago es {{reconcileDate}}.
paymentHistoryNextFooterText=Tu próxima contribución de pago es {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/eu/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Edozein BTC diru-zor erabili zure Brave Bitcoinera transfe
bitcoinBuy=Bitcoina erosi
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Zure ordainketen historia
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=Ados
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/fr-FR/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Utilisez n'importe quel porte-monnaie Bitcoin qui peut tra
bitcoinBuy=Acheter des Bitcoin
viewPaymentHistory=Voir l'historique des paiements...
paymentHistoryTitle=Votre historique de paiement
paymentHistoryFooterText=Votre prochaine contribution de paiement est le {{reconcileDate}}.
paymentHistoryNextFooterText=Votre prochaine contribution de paiement est le {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/hi-IN/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Buy Bitcoin
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/id-ID/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Gunakan dompet BTC apa saja yang dapat mentransfer Bitcoin
bitcoinBuy=Beli Bitcoin
viewPaymentHistory=Lihat Riwayat Pembayaran...
paymentHistoryTitle=Riwayat Pemayaran Anda
paymentHistoryFooterText=Kontribusi pembayaran Anda selanjutnya adalah {{reconcileDate}}.
paymentHistoryNextFooterText=Kontribusi pembayaran Anda selanjutnya adalah {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Pembayaran Brave
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/it-IT/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Usa un qualsiasi portafoglio BTC in grado di trasferire Bi
bitcoinBuy=Acquista Bitcoin
viewPaymentHistory=Visualizza cronologia pagamenti...
paymentHistoryTitle=Cronologia dei tuoi pagamenti
paymentHistoryFooterText=Il tuo prossimo invio di pagamento è {{reconcileDate}}.
paymentHistoryNextFooterText=Il tuo prossimo invio di pagamento è {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/ja-JP/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=ビットコインをBraveウォレットに転送でき
bitcoinBuy=ビットコインを買う
viewPaymentHistory=支払履歴を表示
paymentHistoryTitle=支払履歴
paymentHistoryFooterText=次の寄付支払日は{{reconcileDate}}です。
paymentHistoryNextFooterText=次の寄付支払日は{{reconcileDate}}です。
paymentHistoryOKText=はい
bravePayments=Brave Payments
beta=ベータ
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/ko-KR/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=당신의 Brave 지갑에 비트 코인을 전송할 수
bitcoinBuy=비트코인 구매하기
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Payment 기록
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=확인
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/ms-MY/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Guna sebarang dompet BTC yang membolehkan anda menghantar
bitcoinBuy=Beli Bitcoin
viewPaymentHistory=Papar Sejarah Pembayaran
paymentHistoryTitle=Sejarah Pembayaran Anda
paymentHistoryFooterText=Serahan pembayaran sumbangan anda seterusnya ialah {{reconcileDate}}.
paymentHistoryNextFooterText=Serahan pembayaran sumbangan anda seterusnya ialah {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/nl-NL/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Buy Bitcoin
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/pl-PL/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Kup Bitcoin
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/pt-BR/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Use qualquer carteira BTC para transferir Bitcoin para a s
bitcoinBuy=Compra Bitcoin
viewPaymentHistory=Ver Histórico de Pagamentos...
paymentHistoryTitle=Seu Histórico de Pagamentos
paymentHistoryFooterText=Sua próxima contribuição de pagamento é em {{reconcileDate}}.
paymentHistoryNextFooterText=Sua próxima contribuição de pagamento é em {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Pagamentos Brave
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/ru/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Используйте любой BTC кошелек, ко
bitcoinBuy=Купить Bitcoin
viewPaymentHistory=Просмотр истории платежей...
paymentHistoryTitle=Ваша история платежей
paymentHistoryFooterText=Ваш следующий взнос {{reconcileDate}}
paymentHistoryNextFooterText=Ваш следующий взнос {{reconcileDate}}
paymentHistoryOKText=ОК
bravePayments=Brave Payments
beta=бета
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/sl/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Uporabi poljubno denarnico BTC, ki lahko prenaša Bitcoine
bitcoinBuy=Kupi Bitcoin
viewPaymentHistory=Pokaži zgodovino plačil ...
paymentHistoryTitle=Zgodovina vaših plačil
paymentHistoryFooterText=Vaš naslednji plačilni prislevek je {{reconcileDate}}.
paymentHistoryNextFooterText=Vaš naslednji plačilni prislevek je {{reconcileDate}}.
paymentHistoryOKText=V redu
bravePayments=Plačila Brave
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/ta/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Buy Bitcoin
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/te/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Buy Bitcoin
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Your Payment History
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=OK
bravePayments=Brave Payments
beta=beta
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/tr-TR/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave
bitcoinBuy=Bitcoin al
viewPaymentHistory=View Payment History…
paymentHistoryTitle=Ödeme Geçmişi
paymentHistoryFooterText=Your next payment contribution is {{reconcileDate}}.
paymentHistoryOKText=Tamam
bravePayments=Brave Payments
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/uk/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=Використайте будь-який BTC гаман
bitcoinBuy=Купити Bitcoin
viewPaymentHistory=Перегляд історії платежів…
paymentHistoryTitle=Ваша історія платежів
paymentHistoryFooterText=Ваш наступний платіжний внесок {{reconcileDate}}.
paymentHistoryNextFooterText=Ваш наступний платіжний внесок {{reconcileDate}}.
paymentHistoryOKText=ОК
bravePayments=Brave платежі
beta=beta
Expand Down
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/zh-CN/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bitcoinAddDescription=所有BTC钱包都可以转移比特币到您的Brave钱
bitcoinBuy=购买比特币
viewPaymentHistory=查看付款历史…
paymentHistoryTitle=您的付款历史
paymentHistoryFooterText=您的下一次支付缴款日期为 {{reconcileDate}}。
paymentHistoryNextFooterText=您的下一次支付缴款日期为 {{reconcileDate}}。
paymentHistoryOKText=好
bravePayments=Brave 支付
beta=测试版
Expand Down
20 changes: 18 additions & 2 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -1050,13 +1050,20 @@ class PaymentsTab extends ImmutableComponent {
return null
}
const timestamp = ledgerData.get('reconcileStamp')
const now = new Date().getTime()
let l10nDataId = 'paymentHistoryNextFooterText'
if (timestamp <= now) {
l10nDataId = (timestamp <= (now - (24 * 60 * 60 * 1000)))
? 'paymentHistoryOverdueFooterText' : 'paymentHistoryDueFooterText'
}

const nextReconcileDateRelative = formattedTimeFromNow(timestamp)
const l10nDataArgs = {
reconcileDate: nextReconcileDateRelative
}
return <div className='paymentHistoryFooter'>
<div className='nextPaymentSubmission'>
<span data-l10n-id='paymentHistoryFooterText' data-l10n-args={JSON.stringify(l10nDataArgs)} />
<span data-l10n-id={l10nDataId} data-l10n-args={JSON.stringify(l10nDataArgs)} />
</div>
<Button l10nId='paymentHistoryOKText' className='okButton primaryButton' onClick={this.props.hideOverlay.bind(this, 'paymentHistory')} />
</div>
Expand Down Expand Up @@ -1222,15 +1229,24 @@ class PaymentsTab extends ImmutableComponent {
}

get nextReconcileMessage () {
const ledgerData = this.props.ledgerData
const nextReconcileDateRelative = this.nextReconcileDate
if (!nextReconcileDateRelative) {
return null
}

const timestamp = ledgerData.get('reconcileStamp')
const now = new Date().getTime()
let l10nDataId = 'statusNextReconcileDate'
if (timestamp <= now) {
l10nDataId = (timestamp <= (now - (24 * 60 * 60 * 1000)))
? 'paymentHistoryOverdueFooterText' : 'statusNextReconcileToday'
}

const l10nDataArgs = {
reconcileDate: nextReconcileDateRelative
}
return <div className='nextReconcileDate' data-l10n-args={JSON.stringify(l10nDataArgs)} data-l10n-id='statusNextReconcileDate' />
return <div className='nextReconcileDate' data-l10n-args={JSON.stringify(l10nDataArgs)} data-l10n-id={l10nDataId} />
}

get ledgerDataErrorText () {
Expand Down

0 comments on commit f660a9e

Please sign in to comment.