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

Commit

Permalink
Improve English language of voting launch protocol messages
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Oct 24, 2017
1 parent b34cf90 commit 0a6f41b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions features/voting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ Feature: Voting tab
Scenario: should allow to select delegates by URL
Given I'm logged in as "delegate candidate"
When I go to "/main/voting/vote?votes=standby_27,standby_28,standby_29,nonexisting_22&unvotes=standby_33"
Then I should see text "3 delegate names successfully resolved to add vote to." in "upvotes message" element
And I should see text "1 of delegate names selected for unvote were not voted for:standby_33" in "notVotedYet message" element
And I should see text "1 of entered delegate names could not be resolved:nonexisting_22" in "notFound message" element
Then I should see text "3 delegate names were successfully resolved for voting." in "upvotes message" element
And I should see text "1 of the delegate names selected for unvoting was not currently voted for:standby_33" in "notVotedYet message" element
And I should see text "1 of the provided delegate names could not be resolved:nonexisting_22" in "notFound message" element
And I should see "vote list" element with text:
"""
standby_27
Expand Down
10 changes: 5 additions & 5 deletions src/components/voteUrlProcessor/voteUrlProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ export default class VoteUrlProcessor extends React.Component {

render() {
const errorMessages = {
notFound: this.props.t('{{count}} of entered delegate names could not be resolved:',
notFound: this.props.t('{{count}} of the provided delegate names could not be resolved:',
{ count: this.props.notFound.length }),
alreadyVoted: this.props.t('{{count}} of delegate names selected for vote were already voted for:',
alreadyVoted: this.props.t('{{count}} of the delegate names selected for voting was already voted for for:',
{ count: this.props.alreadyVoted.length }),
notVotedYet: this.props.t('{{count}} of delegate names selected for unvote were not voted for:',
notVotedYet: this.props.t('{{count}} of the delegate names selected for unvoting was not currently voted for:',
{ count: this.props.notVotedYet.length }),
};
const successMessages = {
upvotes: this.props.t('{{count}} delegate names successfully resolved to add vote to.',
upvotes: this.props.t('{{count}} delegate names were successfully resolved for voting.',
{ count: this.props.upvotes.length }),
unvotes: this.props.t('{{count}} delegate names successfully resolved to remove vote from.',
unvotes: this.props.t('{{count}} delegate names were successfully resolved for unvoting.',
{ count: this.props.unvotes.length }),
};
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/voteUrlProcessor/voteUrlProcessor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('VoteUrlProcessor', () => {
urlVoteCount: 1,
});
expect(wrapper.find('.upvotes-message')).to.have.length(1);
expect(wrapper.find('.upvotes-message').text()).to.equal('{{count}} delegate names successfully resolved to add vote to.');
expect(wrapper.find('.upvotes-message').text()).to.equal('{{count}} delegate names were successfully resolved for voting.');
});

it('renders .notFound-message element with a message if props.notFound.length > 0', () => {
Expand All @@ -95,7 +95,7 @@ describe('VoteUrlProcessor', () => {
urlVoteCount: 1,
});
expect(wrapper.find('.notFound-message')).to.have.length(1);
expect(wrapper.find('.notFound-message').text()).to.equal('{{count}} of entered delegate names could not be resolved:delegate_name');
expect(wrapper.find('.notFound-message').text()).to.equal('{{count}} of the provided delegate names could not be resolved:delegate_name');
});
});

20 changes: 10 additions & 10 deletions src/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@
"send": "senden",
"your passphrase will be required for logging in to your account.": "wird deine Passphrase benötigt, damit du auf dein Konto zugreifen kannst.",
"your second passphrase will be required for all transactions sent from this account": "wird deine zweite Passphrase für alle Transaktionen benötigt, die von diesem Konto gesendet werden.",
"{{count}} delegate names successfully resolved to add vote to.": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Wählen.",
"{{count}} delegate names successfully resolved to add vote to._plural": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Wählen.",
"{{count}} delegate names successfully resolved to remove vote from.": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Abwählen.",
"{{count}} delegate names successfully resolved to remove vote from._plural": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Wählen.",
"{{count}} of delegate names selected for unvote were not voted for:": "{{count}} der ausgewählten Delegierten-Namen zum Abwählen sind nicht gewählt:",
"{{count}} of delegate names selected for unvote were not voted for:_plural": "{{count}} der ausgewählten Delegierten-Namen zum Abwählen sind nicht gewählt:",
"{{count}} of delegate names selected for vote were already voted for:": "{{count}} der ausgewählten Delegierten-Namen zum Wählen sind bereits gewählt:",
"{{count}} of delegate names selected for vote were already voted for:_plural": "{{count}} der ausgewählten Delegierten-Namen zum Wählen sind bereits gewählt:",
"{{count}} of entered delegate names could not be resolved:": "{{count}} der eingegebenen Delegierten-Namen konnten nicht gefunden werden:",
"{{count}} of entered delegate names could not be resolved:_plural": "{{count}} der eingegebenen Delegierten-Namen konnten nicht gefunden werden:"
"{{count}} delegate names were successfully resolved for voting.": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Wählen.",
"{{count}} delegate names were successfully resolved for voting._plural": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Wählen.",
"{{count}} delegate names were successfully resolved for unvoting.": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Abwählen.",
"{{count}} delegate names were successfully resolved for unvoting._plural": "{{count}} Delegierten-Namen erfolgreich zusammengefasst zum Wählen.",
"{{count}} of the delegate names selected for unvoting was not currently voted for:": "{{count}} der ausgewählten Delegierten-Namen zum Abwählen sind nicht gewählt:",
"{{count}} of the delegate names selected for unvoting was not currently voted for:_plural": "{{count}} der ausgewählten Delegierten-Namen zum Abwählen sind nicht gewählt:",
"{{count}} of the delegate names selected for voting was already voted for for:": "{{count}} der ausgewählten Delegierten-Namen zum Wählen sind bereits gewählt:",
"{{count}} of the delegate names selected for voting was already voted for for:_plural": "{{count}} der ausgewählten Delegierten-Namen zum Wählen sind bereits gewählt:",
"{{count}} of the provided delegate names could not be resolved:": "{{count}} der eingegebenen Delegierten-Namen konnten nicht gefunden werden:",
"{{count}} of the provided delegate names could not be resolved:_plural": "{{count}} der eingegebenen Delegierten-Namen konnten nicht gefunden werden:"
}
20 changes: 10 additions & 10 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@
"send": "send",
"your passphrase will be required for logging in to your account.": "your passphrase will be required for logging in to your account.",
"your second passphrase will be required for all transactions sent from this account": "your second passphrase will be required for all transactions sent from this account",
"{{count}} delegate names successfully resolved to add vote to.": "{{count}} delegate name successfully resolved to add vote to.",
"{{count}} delegate names successfully resolved to add vote to._plural": "{{count}} delegate names successfully resolved to add vote to.",
"{{count}} delegate names successfully resolved to remove vote from.": "{{count}} delegate name successfully resolved to remove vote from.",
"{{count}} delegate names successfully resolved to remove vote from._plural": "{{count}} delegate names successfully resolved to remove vote from.",
"{{count}} of delegate names selected for unvote were not voted for:": "{{count}} of delegate names selected for unvote were not voted for:",
"{{count}} of delegate names selected for unvote were not voted for:_plural": "{{count}} of delegate names selected for unvote were not voted for:",
"{{count}} of delegate names selected for vote were already voted for:": "{{count}} of delegate names selected for vote were already voted for:",
"{{count}} of delegate names selected for vote were already voted for:_plural": "{{count}} of delegate names selected for vote were already voted for:",
"{{count}} of entered delegate names could not be resolved:": "{{count}} of entered delegate names could not be resolved:",
"{{count}} of entered delegate names could not be resolved:_plural": "{{count}} of entered delegate names could not be resolved:"
"{{count}} delegate names were successfully resolved for voting.": "{{count}} delegate name successfully resolved to add vote to.",
"{{count}} delegate names were successfully resolved for voting._plural": "{{count}} delegate names were successfully resolved for voting.",
"{{count}} delegate names were successfully resolved for unvoting.": "{{count}} delegate name successfully resolved to remove vote from.",
"{{count}} delegate names were successfully resolved for unvoting._plural": "{{count}} delegate names were successfully resolved for unvoting.",
"{{count}} of the delegate names selected for unvoting was not currently voted for:": "{{count}} of the delegate names selected for unvoting was not currently voted for:",
"{{count}} of the delegate names selected for unvoting was not currently voted for:_plural": "{{count}} of the delegate names selected for unvoting were not currently voted for:",
"{{count}} of the delegate names selected for voting was already voted for for:": "{{count}} of the delegate names selected for voting was already voted for for:",
"{{count}} of the delegate names selected for voting was already voted for for:_plural": "{{count}} of the delegate names selected for voting was already voted for for:",
"{{count}} of the provided delegate names could not be resolved:": "{{count}} of the provided delegate names could not be resolved:",
"{{count}} of the provided delegate names could not be resolved:_plural": "{{count}} of the provided delegate names could not be resolved:"
}

0 comments on commit 0a6f41b

Please sign in to comment.