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

Commit e1b96d7

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into cleanUpAboutVsDescription
2 parents 889b56e + aaaf60d commit e1b96d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+899
-680
lines changed

css/obBase.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6400,3 +6400,22 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
64006400
#ov1 .TODO.TODO.TODO.TODO.TODO {
64016401
display: none; /* hide in production */
64026402
}
6403+
6404+
6405+
.peersList {
6406+
margin-top: 10px;
6407+
padding-right: 30px;
6408+
display: block;
6409+
color: #9999A0;
6410+
max-height: 200px;
6411+
overflow: auto;
6412+
}
6413+
6414+
.peersList>ul{
6415+
list-style-type: none;
6416+
padding-left: 0;
6417+
}
6418+
6419+
.peersList>ul>li {
6420+
padding-bottom: 5px;
6421+
}

js/App.js

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var ipcRenderer = require('electron').ipcRenderer,
44
$ = require('jquery'),
55
Socket = require('./utils/Socket'),
6+
btcConvert = require('bitcoin-convert'),
67
_app;
78

89

@@ -125,11 +126,43 @@ App.prototype.setUnreadChatMessageCount = function(count) {
125126
}
126127
};
127128

128-
App.prototype.intlNumFormat = function(numberToFormat, maxDigits){
129-
maxDigits = maxDigits || 8; //default to show down to the satoshi (.00000001)
129+
App.prototype.intlNumFormat = function(numberToFormat, maxDigits = 8) {
130130
return new Intl.NumberFormat(window.lang, {maximumFractionDigits: maxDigits}).format(numberToFormat);
131131
};
132132

133+
App.prototype.getBitcoinUnit = function() {
134+
if (!this._bitcoinUnit) {
135+
this._bitcoinUnit = localStorage.getItem('BitcoinUnit') || 'BTC';
136+
}
137+
return this._bitcoinUnit;
138+
};
139+
140+
App.prototype.setBitcoinUnit = function(unit) {
141+
this._bitcoinUnit = unit;
142+
localStorage.setItem('BitcoinUnit', unit);
143+
};
144+
145+
/**
146+
* Format a bitcoin amount in the user's locale.
147+
*
148+
* @param {Number} amount - Bitcoin (BTC) amount.
149+
* @param {Number} [maxDigits=8] - Maximum number of fraction digits to display.
150+
* @returns {String} localised amount ending with ' BTC' or the default bitcoin unit.
151+
*
152+
* @see intlNumFormat
153+
*/
154+
App.prototype.formatBitcoin = function(amount, maxDigits) {
155+
let unit = this.getBitcoinUnit();
156+
if (unit === 'mBTC') {
157+
maxDigits = 2;
158+
} else if (unit !== 'BTC') {
159+
maxDigits = 0;
160+
}
161+
amount = btcConvert(amount, 'BTC', unit);
162+
return this.intlNumFormat(amount, maxDigits)
163+
+ ' ' + unit;
164+
};
165+
133166
App.getApp = function() {
134167
if (!_app) {
135168
throw new Error('The app instance was never instantiated and is therefore not available.');

js/languages/cs.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"Close": "Zavřít",
1919
"Yes": "Ano",
2020
"No": "Ne",
21-
"of": "z",
21+
"pageXofY": "%{currentPage} of %{totalPages}",
2222
"New": "Nový",
2323
"Retry": "Opakovat",
2424
"HighlightToStyle": "Highlight text to style",
@@ -46,6 +46,7 @@
4646
"RemoveModerator": "Odebrat jako Moderátor",
4747
"About": "Informace",
4848
"Version": "Verze %{version}",
49+
"ServerVersion": "Server Version %{serverVersion}",
4950
"NoDescriptionAdded": "Nebyl přidán žádný popis",
5051
"NoListings": "Žádné položky",
5152
"CoverPhoto": "Úvodní fotka",
@@ -259,7 +260,7 @@
259260
"UploadAvatar": "Vybrat Avatar",
260261
"NewAvatar": "Zvolit nový Avatar",
261262
"NewCoverImage": "Select New Cover Image",
262-
"CheckExchanges": "Contacting vendors's node and updating exchange rates if applicable...",
263+
"CheckExchanges": "Contacting vendor's node and updating exchange rates if applicable...",
263264
"Transactions": "Transakce",
264265
"Purchases": "Nákupy",
265266
"Sales": "Prodeje",
@@ -544,7 +545,8 @@
544545
"badSMTPAuthentication": "The username/password combination used failed.",
545546
"goodSMTPAuthentication": "You have successfully connected to the SMTP server.",
546547
"tagIsTooLongHeadline": "The tag is too long",
547-
"tagIsTooLongBody": "Tags cannot be more than %{smart_count} character long. |||| Tags cannot be more than %{smart_count} characters long."
548+
"tagIsTooLongBody": "Tags cannot be more than %{smart_count} character long. |||| Tags cannot be more than %{smart_count} characters long.",
549+
"retryingConnection": "The connection to your node was lost. Retrying connection attempt %{attempt} of %{total}."
548550
},
549551
"pageConnectingMessages": {
550552
"listingConnect": "Connecting to listing ${listing}",
@@ -725,6 +727,8 @@
725727
},
726728
"langChangeRestartTitle": "Restart needed for language change",
727729
"langChangeRestartMessage": "In order for your language change to fully take effect, you must restart the app.",
730+
"restartNow": "Restart Now",
731+
"restartLater": "Restart Later",
728732
"countries": {
729733
"AFGHANISTAN": "Afghanistan",
730734
"ALAND_ISLANDS": "Aland Islands",

js/languages/da.json

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"Close": "Luk",
1919
"Yes": "Ja",
2020
"No": "Nej",
21-
"of": "af",
21+
"pageXofY": "%{currentPage} af %{totalPages}",
2222
"New": "Ny",
2323
"Retry": "Prøv igen",
2424
"HighlightToStyle": "Markér tekst for at formattere",
@@ -46,6 +46,7 @@
4646
"RemoveModerator": "Fjern som moderator",
4747
"About": "Om",
4848
"Version": "Version %{version}",
49+
"ServerVersion": "Serverversion %{serverVersion}",
4950
"NoDescriptionAdded": "Ingen beskrivelse tilføjet",
5051
"NoListings": "Ingen listninger",
5152
"CoverPhoto": "Coverbillede",
@@ -119,18 +120,18 @@
119120
"CountryOfOrigin": "Oprindelsesland:",
120121
"CanBeShippedTo": "Kan sendes til dig i:",
121122
"NoShippableAddress": "Ingen af dine gemte adresser er i et land, som denne listing kan sendes til.",
122-
"NoSavedAddresses": "You don't have any saved addresses yet.",
123+
"NoSavedAddresses": "Du har endnu ingen gemte adresser.",
123124
"Addresses": "Adresser",
124125
"Files": "Filer",
125126
"NewAddress": "Ny adresse",
126127
"CurrentAddress": "Aktuelle adresser",
127-
"DefaultAddress": "Default Address",
128+
"DefaultAddress": "Standardadresse",
128129
"ReturnsPolicy": "Returpolitik",
129130
"Tags": "Tags",
130131
"Keywords": "Nøgleord",
131-
"MaxQuantityDisplay": "Up to %{quantity} are available per purchase.",
132-
"MaxQuantityDisplayShort": "Max of %{quantity}",
133-
"NoQuantityDisplay": "This listing is not currently available for purchase.",
132+
"MaxQuantityDisplay": "Op til %{quantity} er tilgængelige pr. køb.",
133+
"MaxQuantityDisplayShort": "Maksimalt %{quantity}",
134+
"NoQuantityDisplay": "Denne listning er i øjeblikket ikke til salg.",
134135
"ShipsFrom": "Afsendes fra",
135136
"ShipsFrom2": "Afsendes fra %{country}",
136137
"ShipsTo": "Sendes til",
@@ -163,11 +164,11 @@
163164
"ShipToCity": "By",
164165
"ShipToState": "Stat/Provins/Region",
165166
"ShipToPostalCode": "Postnummer",
166-
"ShipToOther": "Contact Information",
167-
"ShipToOtherPlaceholder": "Alternate method(s) the seller can use to contact you, like email",
168-
"ShipToOtherPlaceholderShort": "Alternate contact method",
167+
"ShipToOther": "Kontaktinformation",
168+
"ShipToOtherPlaceholder": "Alternative metoder, hvorpå sælgeren kan kontakte dig; fx email",
169+
"ShipToOtherPlaceholderShort": "Alternative kontaktmetoder",
169170
"ShipToCountry": "Land",
170-
"Required": "Required",
171+
"Required": "Påkrævet",
171172
"EnableNotifications": "Aktivér notifikationer",
172173
"SSLOn": "SSL aktiveret",
173174
"SSLOff": "SSL deaktiveret",
@@ -191,14 +192,14 @@
191192
"Price": "Pris",
192193
"Type": "Type",
193194
"Condition": "Stand",
194-
"MaxQuantity": "Max Quantity",
195-
"MaxQuantityPlaceholder": "The Maximum Per Purchase (0 to 999998)",
196-
"MaxQuantityHelp": "If the maximum is zero, this listing will be visible but will not be purchasable.",
195+
"MaxQuantity": "Maksantal",
196+
"MaxQuantityPlaceholder": "Maksimalt pr. køb (0 til 999998)",
197+
"MaxQuantityHelp": "Hvis maksimum er nul, vil denne listning være synlig, men den kan ikke købes.",
197198
"NSFW": "Indhold, der er stødende eller for voksne",
198-
"Pinned": "Pinned",
199-
"PinnedHelp": "Pinned listings will be shown in your store before unpinned listings.",
200-
"Hidden": "Hidden",
201-
"HiddenHelp": "Only you can see the hidden listings in your store. The listing page can still be viewed via its guid.",
199+
"Pinned": "Fastgjorte",
200+
"PinnedHelp": "Fastgjorte listninger vil vises i din butik før ikke fastgjorte listninger.",
201+
"Hidden": "Skjult",
202+
"HiddenHelp": "Kun du kan se de skjulte listninger i din butik. Siden med listninger kan stadig ses via dens guid.",
202203
"Social": "Social",
203204
"Theme": "Tema",
204205
"Listing": "Listning",
@@ -259,7 +260,7 @@
259260
"UploadAvatar": "Vælg avatar",
260261
"NewAvatar": "Vælg ny avatar",
261262
"NewCoverImage": "Vælg nyt coverbillede",
262-
"CheckExchanges": "Kontakter sælgerens knude og opdaterer vekselkurser hvis relevant",
263+
"CheckExchanges": "Kontakter sælgers knude og opdaterer valutakurser hvis muligt",
263264
"Transactions": "Transaktioner",
264265
"Purchases": "Køb",
265266
"Sales": "Salg",
@@ -518,7 +519,7 @@
518519
"saveError": "Data kunne ikke gemmes.",
519520
"getError": "Data kunne ikke modtages.",
520521
"missingError": "Nogle felter mangler eller er ukorrekte.",
521-
"missingErrorList": "Some fields are missing or incorrect. \n\n%{errorList}",
522+
"missingErrorList": "Nogle felter mangler eller er ukorrekte.\n\n%{errorList}",
522523
"serverError": "Et ukorrekt svar blev modtaget fra serveren.",
523524
"userError": "Information om dette ID blev ikke fundet",
524525
"userNotFoundError": "Denne persons information er ikke tilgængelig. Vedkommende kan være gået offline.",
@@ -544,7 +545,8 @@
544545
"badSMTPAuthentication": "Kombinationen af brugernavn og adgangskode mislykkedes.",
545546
"goodSMTPAuthentication": "Du er forbundet til SMTP-serveren uden problemer.",
546547
"tagIsTooLongHeadline": "Dette tag er for langt",
547-
"tagIsTooLongBody": "Tags kan ikke være mere end %{maxTagChars} tegn lange. |||| Tags kan ikke være mere end %{maxTagChars} tegn lange."
548+
"tagIsTooLongBody": "Tags kan ikke være mere end %{maxTagChars} tegn lange. |||| Tags kan ikke være mere end %{maxTagChars} tegn lange.",
549+
"retryingConnection": "Forbindelsen til din knude blev afbrudt. Prøver at forbinde igen %{attempt} af %{total} gange."
548550
},
549551
"pageConnectingMessages": {
550552
"listingConnect": "Forbinder til listning ${listing}",
@@ -725,6 +727,8 @@
725727
},
726728
"langChangeRestartTitle": "Genstart nødvendig for sprogændring",
727729
"langChangeRestartMessage": "For at din sprogændring træder fuldt ud i kraft, skal du genstarte app'en.",
730+
"restartNow": "Genstart nu",
731+
"restartLater": "Genstart senere",
728732
"countries": {
729733
"AFGHANISTAN": "Afghanistan",
730734
"ALAND_ISLANDS": "Ålandsøerne",

0 commit comments

Comments
 (0)