Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 5a389e3

Browse files
authored
Merge pull request #1697 from OpenBazaar/textAndMiscFixes
Text and misc fixes
2 parents 1ee5283 + 984964a commit 5a389e3

21 files changed

+294
-188
lines changed

css/obBase.css

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -654,27 +654,60 @@ h6, .h6 {
654654
}
655655

656656
.flexRow .flexCol-11,
657-
.flexRow .flexCol-11 { flex-basis: 91.66666666666666%; }
657+
.flexRow .flexCol-11 {
658+
flex-basis: 91.66666666666666%;
659+
max-width: 91.66666666666666%;
660+
}
658661

659-
.flexRow .flexCol-10 { flex-basis: 83.33333333333334%; }
662+
.flexRow .flexCol-10 {
663+
flex-basis: 83.33333333333334%;
664+
max-width: 83.33333333333334%;
665+
}
660666

661-
.flexRow .flexCol-9 { flex-basis: 75%; }
667+
.flexRow .flexCol-9 {
668+
flex-basis: 75%;
669+
max-width: 75%;
670+
}
662671

663-
.flexRow .flexCol-8 { flex-basis: 66.66666666666666%; }
672+
.flexRow .flexCol-8 {
673+
flex-basis: 66.66666666666666%;
674+
max-width: 66.66666666666666%;
675+
}
664676

665-
.flexRow .flexCol-7 { flex-basis: 58.333333333333336%; }
677+
.flexRow .flexCol-7 {
678+
flex-basis: 58.333333333333336%;
679+
max-width: 58.333333333333336%;
680+
}
666681

667-
.flexRow .flexCol-6 { flex-basis: 50%; }
682+
.flexRow .flexCol-6 {
683+
flex-basis: 50%;
684+
max-width: 50%;
685+
}
668686

669-
.flexRow .flexCol-5 { flex-basis: 41.66666666666667%; }
687+
.flexRow .flexCol-5 {
688+
flex-basis: 41.66666666666667%;
689+
max-width: 41.66666666666667%;
690+
}
670691

671-
.flexRow .flexCol-4 { flex-basis: 33.33333333333333%; }
692+
.flexRow .flexCol-4 {
693+
flex-basis: 33.33333333333333%;
694+
max-width: 33.33333333333333%;
695+
}
672696

673-
.flexRow .flexCol-3 { flex-basis: 25%; }
697+
.flexRow .flexCol-3 {
698+
flex-basis: 25%;
699+
max-width: 25%;
700+
}
674701

675-
.flexRow .flexCol-2 { flex-basis: 16.666666666666664%;; }
702+
.flexRow .flexCol-2 {
703+
flex-basis: 16.666666666666664%;
704+
max-width: 16.666666666666664%;
705+
}
676706

677-
.flexRow .flexCol-1 { flex-basis: 8.333333333333332%; }
707+
.flexRow .flexCol-1 {
708+
flex-basis: 8.333333333333332%;
709+
max-width: 8.333333333333332%;
710+
}
678711

679712
.flexExpand {
680713
/* use to make only one item in a flex row expand */
@@ -2541,7 +2574,7 @@ div.chatSearchOut .chatSearchIcon {
25412574
display: inline-block;
25422575
font-weight: 500;
25432576
letter-spacing: 0.2px;
2544-
word-break: break-all;
2577+
word-break: break-word;
25452578
}
25462579

25472580
#inputConversationMessage {
@@ -3157,7 +3190,7 @@ input[type="number"].fieldItem.fieldItem-withButton {
31573190
border: 2px solid transparent;
31583191
color: #fff;
31593192
overflow: auto; /* use customThemeScrollbar to add a scrolbar */
3160-
word-break: break-all; /* prevent urls from making the text area grow */
3193+
word-break: break-word; /* prevent urls from making the text area grow */
31613194
}
31623195

31633196
.fieldItem-textarea:focus {
@@ -4242,6 +4275,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
42424275
42434276
.tooltip.tooltip-box.tooltip-boxUp:hover:after {
42444277
bottom: 120%;
4278+
top: auto;
42454279
}
42464280
42474281
.btn-notifications.tooltip:hover:after{

js/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ App.prototype.setUnreadChatMessageCount = function(count) {
125125
};
126126

127127
App.prototype.intlNumFormat = function(numberToFormat, maxDigits){
128+
maxDigits = maxDigits || 8; //default to show down to the satoshi (.00000001)
128129
return new Intl.NumberFormat(window.lang, {maximumFractionDigits: maxDigits}).format(numberToFormat);
129130
};
130131

js/languages/en-US.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"ShipsFrom": "Ships From",
147147
"ShipsFrom2": "Ships From %{country}",
148148
"ShipsTo": "Ships To",
149+
"ShipsTo2": "Ships To %{country}",
149150
"AddShipToRegion": "Shipping Region",
150151
"AddShipToRegionNote": "Adds All Nations in a Region",
151152
"SelectRegion": "Add an Optional Region",
@@ -223,6 +224,7 @@
223224
"International": "International",
224225
"Time": "Time",
225226
"Free": "Free",
227+
"FreeShipping": "Free Shipping",
226228
"Category": "Category",
227229
"ProcessingTime": "Processing Time",
228230
"SelectPhotos": "Select photos",
@@ -281,7 +283,7 @@
281283
"NewAvatar": "Select New Avatar",
282284
"NewCoverImage": "Select New Cover Image",
283285
"Loading": "Loading...",
284-
"CheckExchanges": "Contacting seller's node and updating exchange rates if applicable...",
286+
"CheckExchanges": "Contacting vendors's node and updating exchange rates if applicable...",
285287
"Transactions": "Transactions",
286288
"Purchases": "Purchases",
287289
"Sales": "Sales",
@@ -367,7 +369,7 @@
367369
},
368370
"moderatorSettings": {
369371
"DisputeResolution": "Dispute Resolution",
370-
"ServiceFee": "Service fee",
372+
"ServiceFee": "Dispute fee",
371373
"ServiceFeeNote": "Min: 0%, Max: 25%"
372374
},
373375
"BecomeModerator": "Become a Moderator",
@@ -412,9 +414,9 @@
412414
"OrderDetails": "Order Details",
413415
"ViewOnBlockchain": "View Details",
414416
"BuyerPayout": "Buyer Payout:",
415-
"SellerPayout": "Seller Payout:",
417+
"SellerPayout": "Vendor Payout:",
416418
"BuyerAmount": "Buyer Amount:",
417-
"SellerAmount": "Seller Amount:",
419+
"SellerAmount": "Vendor Amount:",
418420
"YouEarn": "You Earn:",
419421
"YourBitcoinPaymentAddress": "Your Bitcoin Payment Address:",
420422
"searchByOrder": "Search by order id or item name",
@@ -492,7 +494,7 @@
492494
"PayPurchase": "Pay for this Purchase",
493495
"CompleteOrder": "Complete Order",
494496
"CompleteOrderResend": "Resend Order Completion",
495-
"CompleteOrderResendTooltip": "If the seller has not yet received the order completion, this button will resend it. This may take several seconds to complete.",
497+
"CompleteOrderResendTooltip": "If the vendor has not yet received the order completion, this button will resend it. This may take several seconds to complete.",
496498
"LeaveReview": "Leave Review",
497499
"MarkAsShipped": "Mark as Shipped",
498500
"RateThisTransaction": "Rate this Transaction",
@@ -510,7 +512,7 @@
510512
"ModerationFee": "Moderation Fee:",
511513
"DisputeTransaction": "Start a Dispute",
512514
"DisputeTransactionResend": "Resend Start of Dispute",
513-
"DisputeTransactionResendTooltip": "If the other party did not receive your dispute, click this button to send it to them again.",
515+
"DisputeTransactionResendTooltip": "If the other party did not receive your dispute, click this button to send a new dispute message.",
514516
"sendMessagePlaceholder": "Enter message...",
515517
"DisputeInstructions": "To file a dispute for this transaction, type the reason for the dispute below, and check the Start a Dispute box. This will include the moderator in your conversation until the dispute is resolved. The moderator will make the final decision as to whether any funds are returned to you, and how much. The moderator's fee will be paid out of the funds you have already sent.",
516518
"SendMessage": "Send",
@@ -520,7 +522,7 @@
520522
"TotalInTransaction": "Transaction:",
521523
"StartDisputeFlag": "Dispute Started",
522524
"CloseDisputeFlag": "Dispute Ended",
523-
"PayoutOnlyBuyer": "Closing this dispute will return all of the funds to the buyer, minus the Moderator fee, because the seller has not yet given their bitcoin payout address.",
525+
"PayoutOnlyBuyer": "Closing this dispute will return all of the funds to the buyer, minus the Moderator fee, because the vendor has not yet given their bitcoin payout address.",
524526
"UpdatingOrder": "Updating your transaction",
525527
"UpdateComplete": "Your transaction update is complete",
526528
"UpdateFailed": "Your transaction update did not complete. Open the transaction and try again",
@@ -551,7 +553,7 @@
551553
"pageUnavailable": "This page is currently unavailable.",
552554
"badHandle": "The handle you entered does not have a valid OpenBazaar ID.",
553555
"serverDown": "The server has been shut down",
554-
"unableToLoadImages": "We were unable to load your image(s).",
556+
"unableToLoadImages": "We were unable to load your image. |||| We were unable to load your images.",
555557
"tooManyPhotosTitle": "Too many photos",
556558
"tooManyPhotosBody": "Some or all of your photos were prevented from being uploaded because you would exceeded the maximum allowable amount.",
557559
"badJSON": "The JSON data returned from the server was malformed",
@@ -1022,6 +1024,11 @@
10221024
"ZAMBIA": "Zambia",
10231025
"ZIMBABWE": "Zimbabwe"
10241026
},
1027+
"chosenJS": {
1028+
"noResultsText": "No results match",
1029+
"placeHolderTextSingle": "Select an option",
1030+
"placeHolderTextMultiple": "Select some options"
1031+
},
10251032
"currencies": {
10261033
"AED": "UAE Dirham",
10271034
"AFN": "Afghani",

js/templates/buyAddresses.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<div class="fontWeight500 textOpacity1 textSize14px marginTop25 minWidth120 js-buyWizardAddressSelected ">
2727
<% if(address.country == ob.vendor_offer.listing.shipping.shipping_origin){ %>
2828
<% if(ob.vendor_offer.listing.shipping.free){ %>
29-
<%= polyglot.t('Free') %>
29+
<%= polyglot.t('FreeShipping') %>
3030
<% } else { %>
3131
<%= ob.displayDomesticShipping %>
3232
<% if(ob.userCurrencyCode != 'BTC'){ %>
@@ -35,7 +35,7 @@
3535
<% } %>
3636
<% } else { %>
3737
<% if(ob.vendor_offer.listing.shipping.free){ %>
38-
<%= polyglot.t('Free') %>
38+
<%= polyglot.t('FreeShipping') %>
3939
<% } else { %>
4040
<%= ob.displayInternationalShipping %>
4141
<% if(ob.userCurrencyCode != 'BTC'){ %>

js/templates/buyDetails.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<% } %>
2222
</div>
2323
</div>
24-
<div class="pad10left txt-unleaded">
24+
<div class="pad10left">
2525
<div class="marginTop12 marginBottom4 fontSize13 noOverflow"><strong><%= ob.vendor_offer.listing.item.title %></strong></div>
2626
<div class="noOverflow fontSize13 txt-fade"><%= polyglot.t('transactions.Vendor2') %> <% if(ob.page.profile.handle){ %><%= ob.page.profile.handle %><% } else { %><%= ob.page.profile.guid %><% } %></div>
2727
</div>
@@ -113,7 +113,7 @@
113113
<% } %>
114114
</div>
115115
</div>
116-
<div class="pad10left txt-unleaded">
116+
<div class="pad10left">
117117
<div class="marginTop6 marginBottom4 fontSize13 noOverflow marginBottom4">
118118
<%= polyglot.t('Moderator2') %>
119119
<% if(ob.selectedModerator.blockchain_id){ %>
@@ -134,7 +134,7 @@
134134
<% } %>
135135
</div>
136136
</div>
137-
<div class="pad10left txt-unleaded">
137+
<div class="pad10left">
138138
<div class="marginTop6 marginBottom4 fontSize13 noOverflow"><%= polyglot.t('buyFlow.DirectPayment') %> <%= ob.handle %></div>
139139
<div class="textOpacity75 lineHeight15">
140140
(<%= polyglot.t('buyFlow.directPaymentDisclaimer') %>)

js/templates/buyWizard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ <h2 class="margin0 marginTop80"><%= polyglot.t('buyFlow.HaveWallet') %></h2>
324324
<% if(moderator.handle){ %><%= moderator.handle %><% } else { %><%= moderator.guid %><% } %>
325325
</div>
326326
</div>
327-
<div class="floatRight textOpacity75"><%= ob.intlNumFormat(moderator.numFee) %></div>
327+
<div class="floatRight textOpacity75"><%= ob.intlNumFormat(moderator.numFee) %>%</div>
328328
</div>
329329
</div>
330330
</div>

js/templates/chatMessage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="chatConversationMessageLine <% if(ob.message_type == "ORDER" || ob.message_type == "DISPUTE_OPEN" || ob.message_type == "dispute_open") { %>padding2015 borderBottom1 custCol-border<% } %>">
66
<div class="flexRow">
77
<div class="chatConversationMessageTimestamp paddingLeft2 <% if (ob.outgoing) { %>width100 alignRight<% } %>">
8-
<div><%= ob.moment(new Date(ob.timestamp * 1000)).format('MMM D, h:mm A') %></div>
8+
<div><%= ob.moment(new Date(ob.timestamp * 1000)).locale(window.lang).format('MMM D, h:mm A') %></div>
99
</div>
1010
</div>
1111
<div class="flexRow noFlexWrap marginTop4">

js/templates/item.html

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -188,30 +188,26 @@ <h4><%= polyglot.t('CanBeShippedTo') %></h4>
188188
<% if(ob.vendor_offer.listing.shipping.shipping_regions.length || ob.vendor_offer.listing.policy.returns || ob.vendor_offer.listing.policy.terms_conditions) { %>
189189
<div class="flexCol-6">
190190
<div class="rowItem fontSize16 padding30 lineHeight24 fontWeight400">
191-
<% if(ob.displayShippingOrigin){ %>
192-
<h3><%= polyglot.t('ShipsFrom2', {country: ob.displayShippingOrigin}) %></h3>
193-
<h3><% if(ob.worldwide){print(polyglot.t('Worldwide'));}else{print(polyglot.t('Local'));} %></h3>
191+
<h3><% if(ob.worldwide){print(polyglot.t('Worldwide'));}else{print(polyglot.t('Local'));} %></h3>
192+
<div>
193+
<% if(ob.userCurrencyCode != "BTC"){ %>
194+
<%= polyglot.t('Shipping2') %> <%= ob.displayDomesticShipping %> (<%= ob.intlNumFormat(ob.domesticShippingBTC, 8) %> BTC)
195+
<% } else { %>
196+
<%= polyglot.t('Shipping2') %> <%= ob.intlNumFormat(ob.domesticShippingBTC, 8) %> BTC
197+
<% } %>
198+
</div>
199+
<p><%= polyglot.t('transactions.EstimatedDelivery') %> <%= ob.vendor_offer.listing.shipping.est_delivery.domestic %></p>
200+
<% if(!ob.worldwide && ob.internationalShippingBTC){ %>
201+
<hr/>
202+
<h3><%= polyglot.t('International') %></h3>
194203
<div>
195204
<% if(ob.userCurrencyCode != "BTC"){ %>
196-
<%= polyglot.t('Shipping2') %> <%= ob.displayDomesticShipping %> (<%= ob.intlNumFormat(ob.domesticShippingBTC, 8) %> BTC)
205+
<%= polyglot.t('Shipping2') %> <%= ob.displayInternationalShipping %> (<%= ob.intlNumFormat(ob.internationalShippingBTC, 8) %> BTC)
197206
<% } else { %>
198-
<%= polyglot.t('Shipping2') %> <%= ob.intlNumFormat(ob.domesticShippingBTC, 8) %> BTC
207+
<%= polyglot.t('Shipping2') %> <%= ob.intlNumFormat(ob.internationalShippingBTC, 8) %> BTC
199208
<% } %>
200209
</div>
201-
<p><%= polyglot.t('transactions.EstimatedDelivery') %> <%= ob.vendor_offer.listing.shipping.est_delivery.domestic %></p>
202-
<% if(ob.internationalShippingBTC){ %>
203-
<hr/>
204-
<h3><%= polyglot.t('International') %></h3>
205-
<div>
206-
<% if(ob.userCurrencyCode != "BTC"){ %>
207-
<%= polyglot.t('Shipping2') %> <%= ob.displayInternationalShipping %> (<%= ob.intlNumFormat(ob.internationalShippingBTC, 8) %> BTC)
208-
<% } else { %>
209-
<%= polyglot.t('Shipping2') %> <%= ob.intlNumFormat(ob.internationalShippingBTC, 8) %> BTC
210-
<% } %>
211-
</div>
212-
<p><%= polyglot.t('transactions.EstimatedDelivery') %> <%= ob.vendor_offer.listing.shipping.est_delivery.international %></p>
213-
<% } %>
214-
<hr/>
210+
<p><%= polyglot.t('transactions.EstimatedDelivery') %> <%= ob.vendor_offer.listing.shipping.est_delivery.international %></p>
215211
<% } %>
216212
<% if(ob.vendor_offer.listing.policy.returns) { %>
217213
<h3><%= polyglot.t('ReturnsPolicy') %></h3>
@@ -225,7 +221,12 @@ <h3><%= polyglot.t('TermsAndConditions') %></h3>
225221
</div>
226222
<div class="flexCol-6">
227223
<div class="rowItem fontSize16 padding30 lineHeight24 fontWeight400">
228-
<% if (ob.shippingRegionsDisplay.length) { %>
224+
<% if(ob.displayShippingOrigin){ %>
225+
<h3><%= polyglot.t('ShipsFrom2', {country: ob.displayShippingOrigin}) %></h3>
226+
<% } %>
227+
<% if (ob.shippingRegionsDisplay.length == 1){ %>
228+
<h3><%= polyglot.t('ShipsTo2', {country: ob.shippingRegionsDisplay[0]}) %></h3>
229+
<% } else if (ob.shippingRegionsDisplay.length) { %>
229230
<h3><%= polyglot.t('ShipsTo') %></h3>
230231
<% _.each(ob.shippingRegionsDisplay, function(data, i) { %>
231232
<div class="row5">

js/templates/itemEdit.html

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,22 @@ <h5><%= polyglot.t('Listing') %></h5>
8888
</div>
8989
</div>
9090
</div>
91-
<div class="flexRow custCol-border js-inputParent">
91+
<div class="flexRow custCol-border js-inputParent zIndex1">
9292
<div class="flexCol-3 borderRight custCol-border">
9393
<div class="fieldItem">
9494
<label for="priceLocal">
9595
<%= polyglot.t('Price') %> (<%= ob.userCurrencyCode %>)
9696
</label>
97-
<div class="underline note rowTop5">
98-
<a href="#settings" class="tooltip tooltip-box" data-tooltip="<%= polyglot.t('ChangeCurrencyHelp') %>"><%= polyglot.t('ChangeCurrency') %></a>
97+
<div class="underline rowTop5">
98+
<a href="#settings" class="tooltip tooltip-box" data-tooltip="<%= polyglot.t('ChangeCurrencyHelp') %>">
99+
<span class="note">
100+
<%= polyglot.t('ChangeCurrency') %>
101+
</span>
102+
</a>
99103
</div>
100104
</div>
101105
</div>
102-
<div class="flexCol-5">
106+
<div class="flexCol-4">
103107
<input type="number" step="any" name="price" id="inputPrice" class="hide" />
104108
<input type="text" name="currency_code" id="inputCurrencyCode" class="hide" />
105109
<input type="number" name="priceLocal" step="any" class="fieldItem js-priceLocal custCol-text" id="priceLocal" value="<%= ob.price %>" required
@@ -110,8 +114,15 @@ <h5><%= polyglot.t('Listing') %></h5>
110114
<% } %>
111115
>
112116
</div>
113-
<div class="flexCol-4">
114-
<span class="fieldItem txt-placeholder"><%= polyglot.t('MinimumIs', { amount: ob.userCurrencyCode == "BTC" ? ob.intlNumFormat(0.0002, 4) : ob.intlNumFormat(window.currentBitcoin * 0.0002, 4) }) %> <span class="ion-help-circled fontSize12 tooltip" data-tooltip="<%= polyglot.t('MinimumPrice') %>"></span></span>
117+
<div class="flexCol-5">
118+
<span class="fieldItem pull-right">
119+
<span class="tooltip" data-tooltip="<%= polyglot.t('MinimumPrice') %>">
120+
<span class="txt-placeholder">
121+
<%= polyglot.t('MinimumIs', { amount: ob.userCurrencyCode == "BTC" ? ob.intlNumFormat(0.0002, 4) : ob.intlNumFormat(window.currentBitcoin * 0.0002, 4) }) %>
122+
<span class="ion-help-circled fontSize12"></span>
123+
</span>
124+
</span>
125+
</span>
115126
</div>
116127
</div>
117128
<div class="flexRow custCol-border js-shippingRow">

0 commit comments

Comments
 (0)