Skip to content

Commit

Permalink
Fix Governance Dashboard display of Over-Allocated proposals (#346)
Browse files Browse the repository at this point in the history
* Fix Governance Dashboard display of Over-Allocated proposals

* Optimise budget + proposal state logic

* Remove unnecessary checks

* Add "Over Budget" text, de-capitalise proposal translations
  • Loading branch information
JSKitty committed Apr 17, 2024
1 parent 91bd9f7 commit 76a6dfa
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 97 deletions.
4 changes: 4 additions & 0 deletions assets/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3105,6 +3105,10 @@ select.form-control option {
color:#5bd376;
}

.votesOverAllocated {
color:#dfb04b;
}

.votesNo {
color:#df4b6c;
}
Expand Down
11 changes: 6 additions & 5 deletions locale/cnr/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ proposalFinalisationConfirming = "Potvrđivanje..." # Confirming...
proposalFinalisationRemaining = "preostalo" # remaining
proposalFinalisationExpired = "Predlog je istekao" # Proposal Expired
proposalFinalisationReady = "Spremno za slanje" # Ready to submit
proposalPassing = "PROLAZI" # PASSING
proposalFailing = "NE PROLAZI" # FAILING
proposalTooYoung = "PREMLAD" # TOO YOUNG
proposalFunded = "FINANSIRAN" # FUNDED
proposalNotFunded = "NIJE FINANSIRAN" # NOT FUNDED
proposalPassing = "Prolazi" # Passing
proposalFailing = "Ne prolazi" # Failing
proposalTooYoung = "Premlad" # Too Young
proposalFunded = "Finansiran" # Funded
proposalNotFunded = "Nije finansiran" # Not Funded
proposalPaymentsRemaining = "preostalih rata<br>od" # installment(s) remaining<br>of
proposalPaymentTotal = "ukupno" # total
proposalNetYes = "Neto Da" # Net Yes
Expand All @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/de/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ proposalFinalisationConfirming = "Bestätige..." # Confirming...
proposalFinalisationRemaining = "Verbleibend" # remaining
proposalFinalisationExpired = "Antrag ausgelaufen" # Proposal Expired
proposalFinalisationReady = "Bereit zum Einreichen" # Ready to submit
proposalPassing = "Bestehend" # PASSING
proposalFailing = "Scheiternd" # FAILING
proposalTooYoung = "noch zu Jung" # TOO YOUNG
proposalFunded = "Finanziert" # FUNDED
proposalNotFunded = "nicht Finanziert" # NOT FUNDED
proposalPassing = "Bestehend" # Passing
proposalFailing = "Scheiternd" # Failing
proposalTooYoung = "noch zu Jung" # Too Young
proposalFunded = "Finanziert" # Funded
proposalNotFunded = "nicht Finanziert" # Not Funded
proposalPaymentsRemaining = "Ausstehende Transaktion(en)<br>" # installment(s) remaining<br>of
proposalPaymentTotal = "Insgesamt" # total
proposalNetYes = "Netto Ja" # Net Yes
Expand Down Expand Up @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/en/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ proposalFinalisationConfirming = "Confirming..." # Confirming...
proposalFinalisationRemaining = "remaining" # remaining
proposalFinalisationExpired = "Proposal Expired" # Proposal Expired
proposalFinalisationReady = "Ready to submit" # Ready to submit
proposalPassing = "PASSING" # PASSING
proposalFailing = "FAILING" # FAILING
proposalTooYoung = "TOO YOUNG" # TOO YOUNG
proposalFunded = "FUNDED" # FUNDED
proposalNotFunded = "NOT FUNDED" # NOT FUNDED
proposalPassing = "Passing" # Passing
proposalFailing = "Failing" # Failing
proposalTooYoung = "Too Young" # Too Young
proposalFunded = "Funded" # Funded
proposalNotFunded = "Not Funded" # Not Funded
proposalPaymentsRemaining = "installment(s) remaining<br>of" # installment(s) remaining<br>of
proposalPaymentTotal = "total" # total
proposalNetYes = "Net Yes" # Net Yes
Expand All @@ -218,6 +218,7 @@ shieldAddress = "Shield address" # Shield address
cantShieldToExc = "This address does not support shield transfers" # This address does not support shield transfers
settingsToggleAutoLockWallet = "Auto Lock the Wallet" # Auto Lock the Wallet
saveWalletFile = "Save Wallet File" # Save Wallet File
proposalOverBudget = "Over Budget" # Over Budget
badSaplingRoot = "There was an error while syncing. Resyncing from scratch (Bad sapling root)" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/es-mx/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ proposalFinalisationConfirming = "Confirmando..." # Confirming...
proposalFinalisationRemaining = "restante" # remaining
proposalFinalisationExpired = "Propuesta Expirada" # Proposal Expired
proposalFinalisationReady = "Listo para enviarla" # Ready to submit
proposalPassing = "PASANDO" # PASSING
proposalFailing = "FRACASANDO" # FAILING
proposalTooYoung = "" # TOO YOUNG
proposalFunded = "FINANCIADA" # FUNDED
proposalNotFunded = "NO FINANCIADA" # NOT FUNDED
proposalPassing = "Pasando" # Passing
proposalFailing = "Fracasando" # Failing
proposalTooYoung = "Demasiado joven" # Too Young
proposalFunded = "Financiada" # Funded
proposalNotFunded = "No financiada" # Not Funded
proposalPaymentsRemaining = "plazo(s) restante(s)<br>de" # installment(s) remaining<br>of
proposalPaymentTotal = "total" # total
proposalNetYes = "Sí de la Red" # Net Yes
Expand Down Expand Up @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/fr/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ proposalFinalisationConfirming = "Confirmant..." # Confirming...
proposalFinalisationRemaining = "restants" # remaining
proposalFinalisationExpired = "Proposition expirée" # Proposal Expired
proposalFinalisationReady = "Prêt à soumettre" # Ready to submit
proposalPassing = "PASSANT" # PASSING
proposalFailing = "ÉCHOUANT" # FAILING
proposalTooYoung = "TROP JEUNE" # TOO YOUNG
proposalFunded = "FINANCÉE" # FUNDED
proposalNotFunded = "NON FINANCÉE" # NOT FUNDED
proposalPassing = "Passant" # Passing
proposalFailing = "Échouant" # Failing
proposalTooYoung = "Trop jeune" # Too Young
proposalFunded = "Financée" # Funded
proposalNotFunded = "Non financée" # Not Funded
proposalPaymentsRemaining = "l'installation(s) restants<br>de" # installment(s) remaining<br>of
proposalPaymentTotal = "totale" # total
proposalNetYes = "Net Oui" # Net Yes
Expand Down Expand Up @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/it/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ proposalFinalisationConfirming = "Confermando..." # Confirming...
proposalFinalisationRemaining = "rimanenti" # remaining
proposalFinalisationExpired = "Proposta scaduta" # Proposal Expired
proposalFinalisationReady = "Pronto per l'invio" # Ready to submit
proposalPassing = "PASSATA" # PASSING
proposalFailing = "FALLITA" # FAILING
proposalTooYoung = "TROPPO RECENTE" # TOO YOUNG
proposalFunded = "FINANZIATA" # FUNDED
proposalNotFunded = "NON FINANZIATA" # NOT FUNDED
proposalPassing = "Passata" # Passing
proposalFailing = "Fallita" # Failing
proposalTooYoung = "Troppo recente" # Too Young
proposalFunded = "Finanziata" # Funded
proposalNotFunded = "Non finanziata" # Not Funded
proposalPaymentsRemaining = "rata/e rimanenti<br>di" # installment(s) remaining<br>of
proposalPaymentTotal = "totale" # total
proposalNetYes = "Netto si" # Net Yes
Expand Down Expand Up @@ -218,6 +218,7 @@ shieldAddress = "Indirizzo shield" # Shield address
cantShieldToExc = "Questo indirizzo non supporta i trasferimenti shield" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/nl/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ proposalFinalisationConfirming = "Bevestigen..." # Confirming...
proposalFinalisationRemaining = "resterend" # remaining
proposalFinalisationExpired = "Voorstel verlopen" # Proposal Expired
proposalFinalisationReady = "Klaar om in te dienen" # Ready to submit
proposalPassing = "SLAAGT" # PASSING
proposalFailing = "MISLUKT" # FAILING
proposalTooYoung = "TE JONG" # TOO YOUNG
proposalFunded = "GEFINANCIERD" # FUNDED
proposalNotFunded = "NIET GEFINANCIERD" # NOT FUNDED
proposalPassing = "Slaagt" # Passing
proposalFailing = "Mislukt" # Failing
proposalTooYoung = "Te jong" # Too Young
proposalFunded = "Gefinancierd" # Funded
proposalNotFunded = "Niet gefinancierd" # Not Funded
proposalPaymentsRemaining = "termijn(en) resterend<br>van" # installment(s) remaining<br>of
proposalPaymentTotal = "totaal" # total
proposalNetYes = "Netto Ja" # Net Yes
Expand All @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/ph/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ proposalFinalisationConfirming = "Kinukumpirma..." # Confirming...
proposalFinalisationRemaining = "natitira" # remaining
proposalFinalisationExpired = "Proposal expired" # Proposal Expired
proposalFinalisationReady = "Handa ng ipasa" # Ready to submit
proposalPassing = "PASSING" # PASSING
proposalFailing = "FAILING" # FAILING
proposalTooYoung = "TOO YOUNG" # TOO YOUNG
proposalFunded = "FUNDED" # FUNDED
proposalNotFunded = "NOT FUNDED" # NOT FUNDED
proposalPassing = "Passing" # Passing
proposalFailing = "Failing" # Failing
proposalTooYoung = "Too Young" # Too Young
proposalFunded = "Funded" # Funded
proposalNotFunded = "Not Funded" # Not Funded
proposalPaymentsRemaining = "installment(s) remaining<br>of" # installment(s) remaining<br>of
proposalPaymentTotal = "Total" # total
proposalNetYes = "Net Yes" # Net Yes
Expand Down Expand Up @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
11 changes: 6 additions & 5 deletions locale/pl/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ proposalFinalisationConfirming = "Potwierdzam..." # Confirming...
proposalFinalisationRemaining = "pozostało" # remaining
proposalFinalisationExpired = "Propozycja Wygasła" # Proposal Expired
proposalFinalisationReady = "Gotowe do przesłania" # Ready to submit
proposalPassing = "ZATWIERDZONY" # PASSING
proposalFailing = "NIE ZATWIERDZONY" # FAILING
proposalTooYoung = "ZBYT NOWY" # TOO YOUNG
proposalFunded = "SFINANSOWANY" # FUNDED
proposalNotFunded = "NIE SFINANSOWANY" # NOT FUNDED
proposalPassing = "Zatwierdzony" # Passing
proposalFailing = "Nie zatwierdzony" # Failing
proposalTooYoung = "Zbyt nowy" # Too Young
proposalFunded = "Sfinansowany" # Funded
proposalNotFunded = "Nie sfinansowany" # Not Funded
proposalPaymentsRemaining = "rata(-y) pozostała(-e)<br>do spłaty" # installment(s) remaining<br>of
proposalPaymentTotal = "łącznie" # total
proposalNetYes = "Na Tak" # Net Yes
Expand All @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
3 changes: 2 additions & 1 deletion locale/pt-br/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ popupSeedPhraseBad = "Seed Phrase Inesperada" # Unexpected Seed Phrase
popupSeedPhraseBadNote = "A Seed Phrase é inválida ou não foi gerada pelo MPW.<br>Você ainda quer continuar" # The seed phrase is either invalid or was not generated by MPW.<br>Do you still want to proceed?
popupProposalAddress = "Endereço da proposta (Opcional)" # Proposal Address (Optional)
popupProposalEncryptFirst = "Você precisa pressionar \"{button}\" antes que possa criar propostas! " # You need to hit "{button}" before you can create proposals!
proposalTooYoung = "MUITO NOVA" # TOO YOUNG
proposalTooYoung = "Muito Nova" # Too Young
proposalNetYes = "Votos Sim" # Net Yes
syncStatusHistoryProgress = "Sincronizando chunks de histórico" # Syncing History Chunks {current} of {total}
syncStatusStarting = "<b>Sua carteira está sincronizando!</b><br>Você poderá usá-la completamente quando isso for feito" # <b>Your wallet is syncing!</b><br>You'll be able to use it fully once this is complete.
Expand All @@ -85,6 +85,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
3 changes: 2 additions & 1 deletion locale/pt-pt/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ popupSeedPhraseBad = "Frase inicial Inesperada" # Unexpected Seed Phrase
popupSeedPhraseBadNote = "A frase inicial é inválida ou não foi gerada pelo MPW.<br>Você ainda quer continuar" # The seed phrase is either invalid or was not generated by MPW.<br>Do you still want to proceed?
popupProposalAddress = "Endereço da proposta (facultativo)" # Proposal Address (Optional)
popupProposalEncryptFirst = "É necessário premir o botão \"{button}\" antes de poder criar propostas!" # You need to hit "{button}" before you can create proposals!
proposalTooYoung = "DEMASIADO JOVEM" # TOO YOUNG
proposalTooYoung = "Demasiado Jovem" # Too Young
proposalNetYes = "Sim Líquido" # Net Yes
syncStatusHistoryProgress = "Sincronização de fracções do histórico {atual} de {total}" # Syncing History Chunks {current} of {total}
syncStatusStarting = "<b>Sua carteira está sincronizando!</b><br>Você poderá usá-la totalmente quando isso for concluído." # <b>Your wallet is syncing!</b><br>You'll be able to use it fully once this is complete.
Expand All @@ -85,6 +85,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "" # Save Wallet File
proposalOverBudget = "" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
8 changes: 4 additions & 4 deletions locale/pt/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ proposalFinalisationConfirming = "A Confirmar" # Confirming...
proposalFinalisationRemaining = "restante" # remaining
proposalFinalisationExpired = "Proposta Expirada" # Proposal Expired
proposalFinalisationReady = "Pronto para enviar" # Ready to submit
proposalPassing = "PASSAGEM" # PASSING
proposalFailing = "FALHA" # FAILING
proposalFunded = "FINANCIADO/A" # FUNDED
proposalNotFunded = "NÃO FINANCIADO/A" # NOT FUNDED
proposalPassing = "Passagem" # Passing
proposalFailing = "Falha" # Failing
proposalFunded = "Financiado/a" # Funded
proposalNotFunded = "Não financiado/a" # Not Funded
proposalPaymentsRemaining = "parcela(s) restante(s)<br>de" # installment(s) remaining<br>of
proposalPaymentTotal = "Total" # total
popupConfirm = "Confirme" # Confirm
Expand Down
11 changes: 6 additions & 5 deletions locale/template/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ proposalFinalisationConfirming = "Confirming..."
proposalFinalisationRemaining = "remaining"
proposalFinalisationExpired = "Proposal Expired"
proposalFinalisationReady = "Ready to submit"
proposalPassing = "PASSING"
proposalFailing = "FAILING"
proposalTooYoung = "TOO YOUNG"
proposalFunded = "FUNDED"
proposalNotFunded = "NOT FUNDED"
proposalPassing = "Passing"
proposalFailing = "Failing"
proposalTooYoung = "Too Young"
proposalFunded = "Funded"
proposalNotFunded = "Not Funded"
proposalOverBudget = "Over Budget"
proposalPaymentsRemaining = "installment(s) remaining<br>of"
proposalPaymentTotal = "total"
proposalNetYes = "Net Yes"
Expand Down
11 changes: 6 additions & 5 deletions locale/uwu/translation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ proposalFinalisationConfirming = "Confwirming..." # Confirming...
proposalFinalisationRemaining = "left" # remaining
proposalFinalisationExpired = "Pwoposal Expired" # Proposal Expired
proposalFinalisationReady = "Ready tew submit" # Ready to submit
proposalPassing = "PASSING, YAY!" # PASSING
proposalFailing = "FAILING, NAY!" # FAILING
proposalTooYoung = "TOO YOUNG, BAKA!" # TOO YOUNG
proposalFunded = "FUNDED!" # FUNDED
proposalNotFunded = "NO MONIES" # NOT FUNDED
proposalPassing = "Passing, YAY!" # Passing
proposalFailing = "Failing, NAY!" # Failing
proposalTooYoung = "Too Young, BAKA!" # Too Young
proposalFunded = "Funded!" # Funded
proposalNotFunded = "No Monies!" # Not Funded
proposalPaymentsRemaining = "payment(s) remainingz<br>of" # installment(s) remaining<br>of
proposalPaymentTotal = "totalz" # total
proposalNetYes = "Net Yasss'es" # Net Yes
Expand Down Expand Up @@ -218,6 +218,7 @@ shieldAddress = "" # Shield address
cantShieldToExc = "" # This address does not support shield transfers
settingsToggleAutoLockWallet = "" # Auto Lock the Wallet
saveWalletFile = "Save Wawwet File" # Save Wallet File
proposalOverBudget = "Over Budgey" # Over Budget
badSaplingRoot = "" # There was an error while syncing. Resyncing from scratch (Bad sapling root)

[ALERTS]
Expand Down
Loading

0 comments on commit 76a6dfa

Please sign in to comment.