Skip to content

Commit ef64309

Browse files
authored
[ProposePage] add short proposal explainers per type. (#1765)
* [proposePage] Add info text for the proposals * fix lint * minor wording improvement * fmt * english: replace meetup with gathering * translations: improve location bounds * translations: spend native uses the community treasury * german: replace Community with Gemeinschaft * german: Treasury -> Gemeinschaftsreserve * german: fmt * german: nominales Einkommen -> Grundeinkommen * german: fix updateDemurrageExplainer translation that was deleted
1 parent 7b6e0e8 commit ef64309

File tree

7 files changed

+97
-12
lines changed

7 files changed

+97
-12
lines changed

app/lib/l10n/arb/app_de.arb

+16-8
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"canUseFaucetOnlyWithCurrentAccount": "Du kannst das Faucet nur benutzen, wenn das angezeigte Konto das zurzeit gewählte Konto ist.",
5050
"changeYourPin": "PIN ändern",
5151
"checkEmailApp": "Keine Email-App installiert",
52-
"chosenRightCommunity": "Die Daten sind für eine andere Community. Bitte wechsle die Community um Geld zu senden.",
52+
"chosenRightCommunity": "Die Daten sind für eine andere Gemeinschaft. Bitte wechsle die Gemeinschaft um Geld zu senden.",
5353
"claim": "Einfordern",
5454
"claimRewardsNotificationBody": "Du hast dein Gemeinschaftseinkommen bereits erhalten.",
5555
"claimRewardsNotificationTitle": "Gemeinschaftseinkommen angefordert",
@@ -59,9 +59,9 @@
5959
"claimsSubmit": "Anträge einreichen",
6060
"closeGathering": "Versammlung schliessen",
6161
"communities": "Gemeinschaften",
62-
"communityChoose": "Wähle eine Community:",
63-
"communityDoChoose": "Community auswählen",
64-
"communityNotSelected": "Keine Community ausgewählt, klicke auf das Icon",
62+
"communityChoose": "Wähle eine Gemeinschaft:",
63+
"communityDoChoose": "Gemeinschaft auswählen",
64+
"communityNotSelected": "Keine Gemeinschaft ausgewählt, klicke auf das Icon",
6565
"confirmPin": "Bitte PIN bestätigen",
6666
"confirmThePayment": "3. Bestätige die Zahlung",
6767
"contactAddress": "Addresse",
@@ -199,14 +199,22 @@
199199
"pinHint": "Du wirst diese PIN benötigen um Transaktionen zu tätigen oder neue Konten hinzufügen.",
200200
"pinInfo": "PIN muss mindestens 4 Ziffern enthalten. Bei PIN-Verlust ist der Account nicht wiederherstellbar, ausser man hat ein Backup auf der Profilseite gemacht.",
201201
"pinSecure": "Sichere dein Konto mit einem PIN.",
202-
"pleaseCommunityChoose": "Bitte wähle eine Community",
202+
"pleaseCommunityChoose": "Bitte wähle eine Gemeinschaft",
203203
"pleaseConfirmYourNewPin": "Bestätige neue PIN",
204204
"preview": "Vorschau",
205205
"print": "Drucken",
206206
"proposal": "Vorschlag",
207207
"proposalAye": "Aye",
208208
"proposalNay": "Nay",
209209
"proposalNew": "Neuer Vorschlag",
210+
"proposalExplainerAddLocation": "Dieser Vorschlag schlägt einen neuen Treffpunkt für deine Gemeinschaft vor. Achte darauf, dass er mindestens 100 Meter entfernt und nicht weiter als 1 Kilometer von bestehenden Treffpunkten liegt.",
211+
"proposalExplainerRemoveLocation": "Dieser Vorschlag schlägt vor, einen bestehenden Treffpunkt deiner Gemeinschaft zu entfernen.",
212+
"proposalExplainerUpdateDemurrage": "Dieser Vorschlag legt eine neue monatliche Demurrage für die Lokalwährung fest.",
213+
"proposalExplainerUpdateNominalIncome": "Dieser Vorschlag bestimmt ein neues Grundeinkommen pro Versammlungszyklus für deine Gemeinschaft.",
214+
"proposalExplainerSetInactivityTimeout": "Dieser Vorschlag setzt eine neue globale Inaktivitätsfrist fest. Falls eine Gemeinschaft über die vorgeschriebene Anzahl an VersammlungsZyklen keine Treffen abhält, wird sie gelöscht.",
215+
"proposalExplainerPetition": "Dieser Vorschlag dient als Petition – entweder global oder innerhalb deiner Gemeinschaft. Er hat keine direkte Wirkung auf der Blockchain, signalisiert jedoch ein Anliegen, auf das die Gemeinschaft reagieren kann.",
216+
"proposalExplainerSpendNative": "Dieser Vorschlag schlägt vor, KSM aus der Gemeinschaftsreserve für einen Begünstigten auszugeben, entweder durch eine globale oder Gemeinschaftsabstimmung. Diese Mittel können zur Belohnung von Beiträgen oder zur Unterstützung von Gemeinschaftsprojekten verwendet werden.",
217+
"proposalExplainerIssueSwapNativeOption": "Dieser Vorschlag erlaubt es einem Begünstigten, Lokalwährung zu einem festgelegten Wechselkurs gegen KSM einzutauschen, bis zu einem festgelegten KSM-Limit. Der Begünstigte könnte ein lokales Unternehmen sein, das Lokalwährung akzeptiert und möglicherweise einen Überschuss angesammelt hat.",
210218
"proposalType": "Vorschlagstyp",
211219
"proposalTypeAddLocation": "Standort hinzufügen",
212220
"proposalTypeRemoveLocation": "Standort entfernen",
@@ -223,7 +231,7 @@
223231
"proposalFieldLongitude": "Längengrad",
224232
"proposalFieldDemurragePerMonth": "Demurrage (% / Monat)",
225233
"proposalFieldNominalIncome": "Grundeinkommen",
226-
"proposalFieldInactivityTimeoutCycles": "Inaktivitätszeitlimit (Meetup Cycles)",
234+
"proposalFieldInactivityTimeoutCycles": "Inaktivitätszeitlimit (Versammlungszyklen)",
227235
"proposalFieldPetitionText": "Petitionstext",
228236
"proposalFieldAmount": "Betrag",
229237
"proposalFieldBeneficiary": "Begünstigter",
@@ -362,7 +370,7 @@
362370
"yourBalanceFor": "Dein Kontostand, {accountName}",
363371
"incomingConfirmed": "Empfang von {amount} {cidSymbol} für {accountName} bestätigt",
364372
"voucherDifferentNetworkAndCommunity": "Der Gutschein ist für ein anderes Netzwerk. Willst du zu {network} und {community} wechseln? Du kannst das Netzwerk zurückändern under Profil > Developer mode.",
365-
"voucherDifferentCommunity": "Der Gutschein ist für eine andere Community. Willst du zu {community} wechseln?",
373+
"voucherDifferentCommunity": "Der Gutschein ist für eine andere Gemeinschaft. Willst du zu {community} wechseln?",
366374
"doYouWantToRedeemThisVoucher": "Willst du diesen Gutschein für {accountName} einlösen?",
367375
"claimsSubmitN": "{count} Anträge einreichen",
368376
"claimsScanned": "Du hast {amount} Anträge gescannt",
@@ -490,7 +498,7 @@
490498
}
491499
}
492500
},
493-
"proposalSpendNative": "{cid} Kasse soll {amount} KSM an {beneficiary} senden",
501+
"proposalSpendNative": "{cid} Die Gemeinschaftsreserve soll {amount} KSM an {beneficiary} senden",
494502
"@proposalSpendNative": {
495503
"placeholders": {
496504
"cid": {

app/lib/l10n/arb/app_en.arb

+11-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"claimsScannedDecodeFailed": "Could not decode scanned claim. The other party needs to update the App.",
5858
"claimsScannedNew": "Scanned new claim",
5959
"claimsSubmit": "Submit claims",
60-
"closeGathering": "Close meetup",
60+
"closeGathering": "Close gathering",
6161
"communities": "Communities",
6262
"communityChoose": "Choose community:",
6363
"communityDoChoose": "Choose community",
@@ -153,7 +153,7 @@
153153
"loading": "Loading...",
154154
"meetingPoint": "Meeting Point",
155155
"meetupClaimantEqualToSelf": "Error: Claimant is equal to self. Claim is not stored.",
156-
"meetupClaimantInvalid": "This claimant is not part of the meetup. Claim is not stored.",
156+
"meetupClaimantInvalid": "This claimant is not part of the gathering. Claim is not stored.",
157157
"meetupLocation": "Gathering location",
158158
"meetupIndex": "Gathering Number: {index}",
159159
"meetupIndexPopupExplanation": "Use the gathering number to find your real gathering location. The community leader is responsible in your community for specifying the gathering locations. The real location could be slightly different from the one displayed here.",
@@ -207,6 +207,14 @@
207207
"proposalAye": "Aye",
208208
"proposalNay": "Nay",
209209
"proposalNew": "New Proposal",
210+
"proposalExplainerAddLocation": "This proposal suggests a new gathering location for your community. Make sure it’s at least 100m away and no more than 1km from existing locations.",
211+
"proposalExplainerRemoveLocation": "This proposal suggests to remove an existing gathering location for your community.",
212+
"proposalExplainerUpdateDemurrage": "This proposal suggest a new monthly demurrage for your community token.",
213+
"proposalExplainerUpdateNominalIncome": "This proposal suggests a new nominal income in the gathering cycles for your community.",
214+
"proposalExplainerSetInactivityTimeout": "This proposal suggests a new global inactivity timeout. If a community has not been performing gatherings for the suggested number of gathering cycles, the community will be deleted.",
215+
"proposalExplainerPetition": "This proposal serves as a petition, either globally or within your community. While it has no direct on-chain effect, it signals intent, allowing the community to recognize and act upon it.",
216+
"proposalExplainerSpendNative": "This proposal suggests spending KSM for a beneficiary from the community treasury, either through a global or community vote. These funds can reward community contributions or support community initiatives.",
217+
"proposalExplainerIssueSwapNativeOption": "This proposal allows the beneficiary to exchange community tokens for KSM at a defined rate, up to a set KSM limit. The beneficiary might be a local business that accepts community tokens and may accumulate a surplus.",
210218
"proposalType": "Proposal Type",
211219
"proposalTypeAddLocation": "Add location",
212220
"proposalTypeRemoveLocation": "Remove location",
@@ -223,7 +231,7 @@
223231
"proposalFieldLongitude": "Longitude",
224232
"proposalFieldDemurragePerMonth": "Demurrage (% / month)",
225233
"proposalFieldNominalIncome": "Nominal Income",
226-
"proposalFieldInactivityTimeoutCycles": "Inactivity Timeout (meetup cycles)",
234+
"proposalFieldInactivityTimeoutCycles": "Inactivity Timeout (gathering cycles)",
227235
"proposalFieldPetitionText": "Petition Text",
228236
"proposalFieldAmount": "Amount",
229237
"proposalFieldBeneficiary": "Beneficiary",

app/lib/l10n/arb/app_fr.arb

+8
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@
207207
"proposalAye": "Aye",
208208
"proposalNay": "Nay",
209209
"proposalNew": "Nouvelle Proposition",
210+
"proposalExplainerAddLocation": "Cette proposition suggère un nouveau lieu de rencontre pour votre communauté. Assurez-vous qu'il soit situé à au moins 100 mètres et à pas plus de 1 kilomètre des lieux de rencontre existants.",
211+
"proposalExplainerRemoveLocation": "Cette proposition suggère de supprimer un lieu de rencontre existant pour votre communauté.",
212+
"proposalExplainerUpdateDemurrage": "Cette proposition suggère un nouveau taux de démurrage mensuel pour le jeton de votre communauté.",
213+
"proposalExplainerUpdateNominalIncome": "Cette proposition suggère un nouveau revenu nominal dans les cycles de rencontre pour votre communauté.",
214+
"proposalExplainerSetInactivityTimeout": "Cette proposition suggère un nouveau délai global d'inactivité. Si une communauté n'organise pas de rencontres pendant le nombre de cycles suggéré, elle sera supprimée.",
215+
"proposalExplainerPetition": "Cette proposition sert de pétition, soit au niveau global, soit au sein de votre communauté. Bien qu'elle n'ait pas d'effet direct sur la blockchain, elle signale une intention permettant à la communauté de la reconnaître et d'y répondre.",
216+
"proposalExplainerSpendNative": "Cette proposition suggère de dépenser des KSM pour un bénéficiaire provenant du trésor de la communauté, soit par un vote global, soit par un vote de la communauté. Ces fonds peuvent récompenser les contributions à la communauté ou soutenir des initiatives communautaires.",
217+
"proposalExplainerIssueSwapNativeOption": "Cette proposition permet au bénéficiaire d'échanger des jetons communautaires contre des KSM à un taux défini, jusqu'à une limite de KSM. Le bénéficiaire pourrait être une entreprise locale acceptant les jetons communautaires et accumulant un surplus.",
210218
"proposalType": "Type de proposition",
211219
"proposalTypeAddLocation": "Ajouter un lieu",
212220
"proposalTypeRemoveLocation": "Retrancher un lieu",

app/lib/l10n/arb/app_ru.arb

+8
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@
207207
"proposalAye": "Aye",
208208
"proposalNay": "Nay",
209209
"proposalNew": "новое предложение",
210+
"proposalExplainerAddLocation": "Это предложение предлагает новое место встречи для вашего сообщества. Убедитесь, что оно находится не менее чем в 100 метрах и не более чем в 1 километре от существующих мест встреч.",
211+
"proposalExplainerRemoveLocation": "Это предложение предлагает удалить существующее место встречи для вашего сообщества.",
212+
"proposalExplainerUpdateDemurrage": "Это предложение предлагает новый ежемесячный демерредж для токена сообщества.",
213+
"proposalExplainerUpdateNominalIncome": "Это предложение предлагает новый номинальный доход в циклах встреч для вашего сообщества.",
214+
"proposalExplainerSetInactivityTimeout": "Это предложение предлагает новый глобальный тайм-аут неактивности. Если сообщество не проводит встречи в течение предложенного количества циклов, оно будет удалено.",
215+
"proposalExplainerPetition": "Это предложение служит петицией, либо на глобальном уровне, либо в вашем сообществе. Хотя оно не имеет прямого влияния на блокчейн, оно выражает намерение, позволяя сообществу его распознать и отреагировать.",
216+
"proposalExplainerSpendNative": "Это предложение предлагает потратить KSM для получателя из казны сообщества, либо через глобальное, либо через голосование внутри сообщества. Эти средства могут быть использованы для вознаграждения вкладов в сообщество или поддержки инициатив сообщества.",
217+
"proposalExplainerIssueSwapNativeOption": "Это предложение позволяет бенефициару обменивать токены сообщества на KSM по установленному курсу, вплоть до определенного лимита KSM. Бенефициаром может быть местный бизнес, принимающий токены сообщества и накапливающий их в избытке.",
210218
"proposalType": "Тип предложения",
211219
"proposalTypeAddLocation": "Добавить местоположение",
212220
"proposalTypeRemoveLocation": "Удалить местоположение",

app/lib/l10n/arb/app_sw.arb

+8
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@
207207
"proposalAye": "Aye",
208208
"proposalNay": "Nay",
209209
"proposalNew": "Mapendekezo mapya",
210+
"proposalExplainerAddLocation": "Pendekezo hili linapendekeza eneo jipya la mkutano kwa jamii yako. Hakikisha kuwa liko angalau mita 100 kutoka kwa maeneo ya mikutano yaliyopo, na si zaidi ya kilomita 1.",
211+
"proposalExplainerRemoveLocation": "Pendekezo hili linapendekeza kuondoa eneo la mikutano lililopo kwa jamii yako.",
212+
"proposalExplainerUpdateDemurrage": "Pendekezo hili linapendekeza kiwango kipya cha demuraji ya kila mwezi kwa tokeni ya jamii yako.",
213+
"proposalExplainerUpdateNominalIncome": "Pendekezo hili linapendekeza mapato mapya ya kawaida katika mizunguko ya mikutano kwa jamii yako.",
214+
"proposalExplainerSetInactivityTimeout": "Pendekezo hili linapendekeza muda mpya wa kimataifa wa kutokufanya kazi. Ikiwa jamii haitafanya mikutano kwa idadi iliyopendekezwa ya mizunguko, itafutwa.",
215+
"proposalExplainerPetition": "Pendekezo hili linatumika kama ombi, iwe kimataifa au ndani ya jamii yako. Ingawa halina athari ya moja kwa moja kwenye mnyororo wa vizuizi, linaonyesha nia, kuruhusu jamii kuitambua na kuchukua hatua.",
216+
"proposalExplainerSpendNative": "Pendekezo hili linapendekeza kutumia KSM kwa faida ya mfaidi kutoka hazina ya jamii, ama kupitia kura za kimataifa au za jamii. Fedha hizi zinaweza kutumika kureward michango ya jamii au kusaidia mipango ya jamii.",
217+
"proposalExplainerIssueSwapNativeOption": "Pendekezo hili linamruhusu mnufaika kubadilisha tokeni za jamii kwa KSM kwa kiwango kilichowekwa, hadi kikomo cha KSM kilichowekwa. Mnufaika anaweza kuwa biashara ya ndani inayokubali tokeni za jamii na inaweza kuwa imekusanya ziada.",
210218
"proposalType": "Aina ya pendekezo",
211219
"proposalTypeAddLocation": "Ongeza eneo",
212220
"proposalTypeRemoveLocation": "Ondoa eneo",

app/lib/page-encointer/democracy/proposal_page/propose_page.dart

+45
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ import 'package:encointer_wallet/service/tx/lib/src/submit_to_inner.dart';
1010
import 'package:encointer_wallet/service/tx/lib/tx.dart';
1111
import 'package:encointer_wallet/store/account/types/account_data.dart';
1212
import 'package:encointer_wallet/store/app.dart';
13+
import 'package:encointer_wallet/theme/custom/typography/typography_theme.dart';
1314
import 'package:ew_primitives/ew_primitives.dart';
1415
import 'package:flutter/material.dart';
1516
import 'package:encointer_wallet/l10n/l10.dart';
1617
import 'package:flutter/services.dart';
18+
import 'package:iconsax/iconsax.dart';
1719
import 'package:provider/provider.dart';
1820

1921
import 'package:ew_polkadart/ew_polkadart.dart'
@@ -167,6 +169,8 @@ class _ProposePageState extends State<ProposePage> {
167169

168170
// Dynamic Fields Based on Selected Proposal Action
169171
_buildDynamicFields(context),
172+
const SizedBox(height: 10),
173+
_getProposalExplainer(context),
170174

171175
// Submit Button
172176
const Spacer(),
@@ -194,6 +198,47 @@ class _ProposePageState extends State<ProposePage> {
194198
);
195199
}
196200

201+
/// Dynamically generates form fields based on selected proposal type
202+
Widget _getProposalExplainer(BuildContext context) {
203+
final theme = context.textTheme.bodyMedium;
204+
return Card(
205+
child: Padding(
206+
padding: const EdgeInsets.all(8),
207+
child: Column(
208+
children: [
209+
const Padding(
210+
padding: EdgeInsets.all(4),
211+
child: Icon(Iconsax.info_circle),
212+
),
213+
Text(_explainerText(), style: theme),
214+
],
215+
),
216+
),
217+
);
218+
}
219+
220+
String _explainerText() {
221+
final l10n = context.l10n;
222+
switch (selectedAction) {
223+
case ProposalActionIdentifier.addLocation:
224+
return l10n.proposalExplainerAddLocation;
225+
case ProposalActionIdentifier.removeLocation:
226+
return l10n.proposalExplainerRemoveLocation;
227+
case ProposalActionIdentifier.updateDemurrage:
228+
return l10n.proposalExplainerUpdateDemurrage;
229+
case ProposalActionIdentifier.updateNominalIncome:
230+
return l10n.proposalExplainerUpdateNominalIncome;
231+
case ProposalActionIdentifier.setInactivityTimeout:
232+
return l10n.proposalExplainerSetInactivityTimeout;
233+
case ProposalActionIdentifier.petition:
234+
return l10n.proposalExplainerPetition;
235+
case ProposalActionIdentifier.spendNative:
236+
return l10n.proposalExplainerSpendNative;
237+
case ProposalActionIdentifier.issueSwapNativeOption:
238+
return l10n.proposalExplainerIssueSwapNativeOption;
239+
}
240+
}
241+
197242
/// Dynamically generates form fields based on selected proposal type
198243
Widget _buildDynamicFields(BuildContext context) {
199244
switch (selectedAction) {

app/lib/page-encointer/democracy/widgets/update_proposal_button.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class _UpdateProposalButtonState extends State<UpdateProposalButton> {
8787
store.account.getKeyringAccount(store.account.currentAccountPubKey!),
8888
widget.proposalId,
8989
txPaymentAsset: store.encointer.getTxPaymentAsset(store.encointer.chosenCid),
90-
onError: (error) => Log.p('[updateProposal] error updating the proposal: ${error}'),
90+
onError: (error) => Log.p('[updateProposal] error updating the proposal: $error'),
9191
);
9292

9393
setState(() {});

0 commit comments

Comments
 (0)