docs: fix various typos and misspellings (#2955)

This commit is contained in:
Antoine Cœur 2022-04-21 22:28:38 +08:00 committed by GitHub
parent 0eb1857c6c
commit bdac708762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 91 additions and 92 deletions

View File

@ -12,7 +12,7 @@ New people usually start volunteering because they have an itch they want to scr
If not, there are three labels in the issues tracker that can help:
- [`help wanted`](https://github.com/transmission/transmission/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) indicates that the issue is stuck and needs an outside developer. This is usually because some domain expertese is needed, e.g. for a specific platform or external API.
- [`help wanted`](https://github.com/transmission/transmission/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) indicates that the issue is stuck and needs an outside developer. This is usually because some domain expertise is needed, e.g. for a specific platform or external API.
- [`good first issue`](https://github.com/transmission/transmission/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) is a `pr-welcome` issue that is probably on the easier side to code.
- [`pr welcome`](https://github.com/transmission/transmission/issues?q=is%3Aissue+is%3Aopen+label%3A%22pr+welcome%22) is for features that have been requested and which that the project doesn't have resources to implement, but would consider adding if a good PR was submitted.

View File

@ -1406,7 +1406,7 @@
* Fix 1.40 "lazy bitfield" error
* Fix 1.40 "jumpy upload speed" bug
* Fix handshake peer_id error
* Corrrectly handle Windows-style newlines in Bluetack blocklists
* Correctly handle Windows-style newlines in Bluetack blocklists
* More accurate bandwidth measurement
* File selection & priority was reset when editing a torrent's tracker list
* Fix autoconf/automake build warnings

View File

@ -166,7 +166,7 @@ bool dtr_daemon(dtr_callbacks const* cb, void* cb_arg, bool foreground, int* exi
#else
/* this is loosely based off of glibc's daemon() implementation
* http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=misc/daemon.c */
* https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=misc/daemon.c */
switch (fork())
{

View File

@ -15,7 +15,7 @@ If this does not happen, you can add Transmission to Leopard's firewall manually
1. Make sure the pull down menu is set to "Allow incoming connections".
### On Mac OS X 10.4 and older
1. Open Transmission, go to Preferences >> Network and and note down the number for the port. Then quit Transmission.
1. Open Transmission, go to Preferences >> Network and note down the number for the port. Then quit Transmission.
1. Open System Prefs >> Sharing >> Firewall. Click "New." In the "Port Name" pop-up menu, select Other, and fill in the settings as follows:
* TCP Port Number(s): the port you chose in step 1 - (default is 51413).
* Description: Transmission

View File

@ -604,7 +604,7 @@
### Transmission 2.21 (2011/02/08) ###
[http://trac.transmissionbt.com/query?milestone#2.21&group#component&order#severity All tickets closed by this release]
#### All Platforms ####
* Fix compile error in the the 2.20 tarball
* Fix compile error in the 2.20 tarball
#### GTK+ ####
* Several updated translations
#### Qt ####

View File

@ -90,7 +90,7 @@ Protocols w/o unique stream properties may use a constant.
IA = initial payload data from A
may be 0-sized if you want to wait for the encryption negotation.
may be 0-sized if you want to wait for the encryption negotiation.
Peer A may buffer up to 65535 bytes before or during the DH handshake to append
it to the 3rd step. IA is considered as atomic and thus an implementation may
@ -116,7 +116,7 @@ ENCRYPT() is RC4, that uses one of the following keys to send data:
The first 1024 bytes of the RC4 output are discarded.
consecutive calls to ENCRYPT() by one side continue the encryption
stream (no reinitialization, no keychange). They are only used to distinguish
semantically seperate content.
semantically separate content.
ENCRYPT2() is the negotiated crypto method.
@ -148,7 +148,7 @@ A will be able to resynchronize on ENCRYPT(VC)
##### Optional early termination conditions
(should verified before the indicated step is started).
If a fail-fast behavior is prefered the following conditions can be used to
If a fail-fast behavior is preferred, the following conditions can be used to
disconnect the peer immediately. If less recognizable patterns are preferred
a peer may wait and disconnect at a later point. If any of these conditions
are met the handshake can be considered as invalid.

View File

@ -31,7 +31,7 @@ will not be present. Exchanges messages should be sent approximately
once every minute when peers have been added or dropped.
If peers have not been added or dropped, uTorrent does not send
the periodic PEX message. If uTorrent 1.8.1 recieves an "empty"
the periodic PEX message. If uTorrent 1.8.1 receives an "empty"
pex message from Transmission 1.40, it appears to interpret this
as an invalid message and disconnect from Transmission.

View File

@ -600,7 +600,7 @@ void Application::Impl::on_activate()
/* GApplication emits an 'activate' signal when bootstrapping the primary.
* Ordinarily we handle that by presenting the main window, but if the user
* user started Transmission minimized, ignore that initial signal... */
* started Transmission minimized, ignore that initial signal... */
if (is_iconified_ && activation_count_ == 1)
{
return;

View File

@ -1158,7 +1158,7 @@ static void on_announce_done(tr_announce_response const* response, void* vdata)
if (!isStopped && std::empty(tier->announce_events))
{
/* the queue is empty, so enqueue a perodic update */
/* the queue is empty, so enqueue a periodic update */
int const i = tier->announceIntervalSec;
tr_logAddTraceTier(tier, fmt::format("Sending periodic reannounce in {} seconds", i));
tier_announce_event_push(tier, TR_ANNOUNCE_EVENT_NONE, now + i);

View File

@ -37,7 +37,7 @@ enum TrackerEventType
struct tr_pex;
/** @brief Notification object to tell listeners about announce or scrape occurences */
/** @brief Notification object to tell listeners about announce or scrape occurrences */
struct tr_tracker_event
{
/* what type of event this is */

View File

@ -22,7 +22,7 @@ namespace
[[nodiscard]] constexpr size_t getBytesNeeded(size_t bit_count) noexcept
{
/* NB: If can gurantee bit_count <= SIZE_MAX - 8 then faster logic
/* NB: If can guarantee bit_count <= SIZE_MAX - 8 then faster logic
is ((bit_count + 7) >> 3). */
return (bit_count >> 3) + ((bit_count & 7) != 0 ? 1 : 0);
}

View File

@ -57,7 +57,7 @@ public:
// "raw" here is in BEP0003 format: "The first byte of the bitfield
// corresponds to indices 0 - 7 from high bit to low bit, respectively.
// The next one 8-15, etc. Spare bits at the end are set to zero.
// The next one 8-15, etc. Spare bits at the end are set to zero."
void setRaw(uint8_t const* bits, size_t byte_count);
[[nodiscard]] std::vector<uint8_t> raw() const;

View File

@ -205,7 +205,7 @@ bool tr_blocklistFileHasAddress(tr_blocklistFile* b, tr_address const* addr)
/*
* P2P plaintext format: "comment:x.x.x.x-y.y.y.y"
* http://wiki.phoenixlabs.org/wiki/P2P_Format
* http://en.wikipedia.org/wiki/PeerGuardian#P2P_plaintext_format
* https://en.wikipedia.org/wiki/PeerGuardian#P2P_plaintext_format
*/
static bool parseLine1(std::string_view line, struct tr_ipv4_range* range)
{

View File

@ -66,7 +66,7 @@ char const* ccrypto_error_to_str(CCCryptorStatus error_code)
return "Illegal parameter value";
case kCCBufferTooSmall:
return "Insufficent buffer provided for specified operation";
return "Insufficient buffer provided for specified operation";
case kCCMemoryFailure:
return "Memory allocation failure";

View File

@ -793,7 +793,7 @@ static ReadState readCryptoProvide(tr_handshake* handshake, struct evbuffer* inb
evbuffer_drain(inbuf, SHA_DIGEST_LENGTH);
/* This next piece is HASH('req2', SKEY) xor HASH('req3', S) ...
* we can get the first half of that (the obufscatedTorrentHash)
* we can get the first half of that (the obfuscatedTorrentHash)
* by building the latter and xor'ing it with what the peer sent us */
tr_logAddTraceHand(handshake, "reading obfuscated torrent hash...");
auto req2 = tr_sha1_digest_t{};

View File

@ -1165,7 +1165,7 @@ void jsonsl_jpr_match_state_cleanup(jsonsl_t jsn)
/**
* This function should be called exactly once on each element...
* This should also be called in recursive order, since we rely
* on the parent having been initalized for a match.
* on the parent having been initialized for a match.
*
* Since the parent is checked for a match as well, we maintain a 'serial' counter.
* Whenever we traverse an element, we expect the serial to be the same as a global

View File

@ -421,7 +421,7 @@ struct jsonsl_state_st {
*/
/**
* This is called when a stack change ocurs.
* This is called when a stack change occurs.
*
* @param jsn The lexer
* @param action The type of action, this can be PUSH or POP
@ -707,7 +707,7 @@ void jsonsl_dump_global_metrics(void);
*
*
* JPR (as we'll refer to it within the source) can be used by splitting
* the components into mutliple sections, and incrementally 'track' each
* the components into multiple sections, and incrementally 'track' each
* component. When JSONSL delivers a 'pop' callback for a string, or a 'push'
* callback for an object, we will check to see whether the index matching
* the component corresponding to the current level contains a match
@ -842,7 +842,7 @@ jsonsl_jpr_match_t jsonsl_jpr_match(jsonsl_jpr_t jpr,
* assumes that there is a clear distinction between array indices and
* object keys. In this case, the jsonsl_path_component_st::ptype should
* be set to @ref JSONSL_PATH_NUMERIC for an array index (the
* jsonsl_path_comonent_st::is_arridx field will be removed in a future
* jsonsl_path_component_st::is_arridx field will be removed in a future
* version).
*
* @param jpr The path
@ -961,7 +961,7 @@ const char *jsonsl_strmatchtype(jsonsl_jpr_match_t match);
* @param oflags If not null, and a \uXXXX escape expands to a non-ascii byte,
* then this variable will have the SPECIALf_NONASCII flag on.
*
* @param err A pointer to an error variable. If an error ocurrs, it will be
* @param err A pointer to an error variable. If an error occurs, it will be
* set in this variable
* @param errat If not null and an error occurs, this will be set to point
* to the position within the string at which the offending character was

View File

@ -584,7 +584,7 @@ REFERENCES_RELATION = YES
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
# link to the source code. Otherwise they will link to the documentstion.
# link to the source code. Otherwise they will link to the documentation.
REFERENCES_LINK_SOURCE = YES

View File

@ -1236,7 +1236,7 @@ static int tr_peerIoTryRead(tr_peerIo* io, size_t howmuch)
switch (io->socket.type)
{
case TR_PEER_SOCKET_TYPE_UTP:
/* UTP_RBDrained notifies libutp that your read buffer is emtpy.
/* UTP_RBDrained notifies libutp that your read buffer is empty.
* It opens up the congestion window by sending an ACK (soonish)
* if one was not going to be sent. */
if (evbuffer_get_length(io->inbuf.get()) == 0)

View File

@ -1488,7 +1488,7 @@ void tr_peerMgrOnTorrentGotMetainfo(tr_torrent* tor)
tr_peerUpdateProgress(tor, peers[i]);
}
/* update the bittorrent peers' willingnes... */
/* update the bittorrent peers' willingness... */
for (int i = 0; i < peerCount; ++i)
{
auto* msgs = static_cast<tr_peerMsgs*>(peers[i]);

View File

@ -2352,7 +2352,7 @@ static void tellPeerWhatWeHave(tr_peerMsgsImpl* msgs)
/* some peers give us error messages if we send
more than this many peers in a single pex message
http://wiki.theory.org/BitTorrentPeerExchangeConventions */
https://wiki.theory.org/BitTorrentPeerExchangeConventions */
static auto constexpr MaxPexAdded = int{ 50 };
static auto constexpr MaxPexDropped = int{ 50 };

View File

@ -505,7 +505,7 @@ static void saveProgress(tr_variant* dict, tr_torrent const* tor)
}
/*
* Transmisison has iterated through a few strategies here, so the
* Transmission has iterated through a few strategies here, so the
* code has some added complexity to support older approaches.
*
* Current approach: 'progress' is a dict with two entries:
@ -888,7 +888,7 @@ static auto setFromCtor(tr_torrent* tor, tr_resume::fields_t fields, tr_ctor con
return ret;
}
static auto useManditoryFields(tr_torrent* tor, tr_resume::fields_t fields, tr_ctor const* ctor)
static auto useMandatoryFields(tr_torrent* tor, tr_resume::fields_t fields, tr_ctor const* ctor)
{
return setFromCtor(tor, fields, ctor, TR_FORCE);
}
@ -907,7 +907,7 @@ fields_t load(tr_torrent* tor, fields_t fields_to_load, tr_ctor const* ctor, boo
auto ret = fields_t{};
ret |= useManditoryFields(tor, fields_to_load, ctor);
ret |= useMandatoryFields(tor, fields_to_load, ctor);
fields_to_load &= ~ret;
ret |= loadFromFile(tor, fields_to_load, did_rename_to_hash_only_name);
fields_to_load &= ~ret;

View File

@ -55,8 +55,8 @@ using namespace std::literals;
/* session-id is used to make cross-site request forgery attacks difficult.
* Don't disable this feature unless you really know what you're doing!
* http://en.wikipedia.org/wiki/Cross-site_request_forgery
* http://shiflett.org/articles/cross-site-request-forgeries
* https://en.wikipedia.org/wiki/Cross-site_request_forgery
* https://shiflett.org/articles/cross-site-request-forgeries
* http://www.webappsec.org/lists/websecurity/archive/2008-04/msg00037.html */
#define REQUIRE_SESSION_ID

View File

@ -1355,7 +1355,7 @@ static char const* torrentRenamePath(
static void onPortTested(tr_web::FetchResponse const& web_response)
{
auto const& [status, body, did_connect, did_tmieout, user_data] = web_response;
auto const& [status, body, did_connect, did_timeout, user_data] = web_response;
auto* data = static_cast<struct tr_rpc_idle_data*>(user_data);
if (status != 200)

View File

@ -18,7 +18,7 @@ struct tr_variant;
using tr_rpc_response_func = void (*)(tr_session* session, tr_variant* response, void* user_data);
/* http://www.json.org/ */
/* https://www.json.org/ */
void tr_rpc_request_exec_json(
tr_session* session,
tr_variant const* request,

View File

@ -14,7 +14,7 @@
#include <iterator> // std::back_inserter
#include <list>
#include <memory>
#include <numeric> // std::acumulate()
#include <numeric> // std::accumulate()
#include <string>
#include <string_view>
#include <tuple>

View File

@ -85,7 +85,7 @@ bool isJunkFile(std::string_view filename)
auto const base = tr_sys_path_basename(filename);
#ifdef __APPLE__
// check for resource forks. <http://support.apple.com/kb/TA20578>
// check for resource forks. <http://web.archive.org/web/20101010051608/http://support.apple.com/kb/TA20578>
if (tr_strvStartsWith(base, "._"sv))
{
return true;

View File

@ -253,7 +253,7 @@ std::string_view tr_torrent_metainfo::parseFiles(tr_torrent_metainfo& setme, tr_
// path - A list of UTF-8 encoded strings corresponding to subdirectory
// names, the last of which is the actual file name (a zero length list
// is an error case).
// In the multifile case, the name key is the name of a directory.
// In the multifile case, the name key is the name of a directory."
else if (tr_variantDictFindList(info_dict, TR_KEY_files, &files_entry))
{
auto buf = std::string{};

View File

@ -112,7 +112,7 @@ static void bootstrap_from_name(char const* name, tr_port port, int af)
if (int const rc = getaddrinfo(name, std::data(port_str), &hints, &info); rc != 0)
{
tr_logAddWarn(fmt::format(
_("Couldn't look up '{addresss}:{port}': {error} ({error_code})"),
_("Couldn't look up '{address}:{port}': {error} ({error_code})"),
fmt::arg("address", name),
fmt::arg("port", port),
fmt::arg("error", gai_strerror(rc)),

View File

@ -465,7 +465,7 @@ bool tr_lpdSendAnnounce(tr_torrent const* t)
* @brief Process incoming unsolicited messages and add the peer to the announced
* torrent if all checks are passed.
*
* @param[in,out] peer Adress information of the peer to add
* @param[in,out] peer Address information of the peer to add
* @param[in] msg The announcement message to consider
* @return Returns 0 if any input parameter or the announce was invalid, 1 if the peer
* was successfully added, -1 if not; a non-null return value indicates a side-effect to

View File

@ -14,7 +14,7 @@
* memory only if its string gets too big. Its main use case is building
* temporary strings in stack memory.
*
* It is a convenience wrapper arouund `fmt::basic_memory_buffer`.
* It is a convenience wrapper around `fmt::basic_memory_buffer`.
*/
template<typename Char, size_t N>
class tr_strbuf

View File

@ -966,10 +966,10 @@ enum
};
/**
* @brief Tell transmsision where to find this torrent's local data.
* @brief Tell transmission where to find this torrent's local data.
*
* if move_from_previous_location is `true', the torrent's incompleteDir
* will be clobberred s.t. additional files being added will be saved
* will be clobbered s.t. additional files being added will be saved
* to the torrent's downloadDir.
*/
void tr_torrentSetLocation(
@ -1309,7 +1309,7 @@ enum tr_tracker_state
* waiting for enough time to pass to satisfy the tracker's interval */
TR_TRACKER_WAITING = 1,
/* it's time to (announce,scrape) this torrent, and we're waiting on a
* a free slot to open up in the announce manager */
* free slot to open up in the announce manager */
TR_TRACKER_QUEUED = 2,
/* we're (announcing,scraping) this torrent right now */
TR_TRACKER_ACTIVE = 3
@ -1489,9 +1489,9 @@ enum tr_stat_errtype
{
/* everything's fine */
TR_STAT_OK = 0,
/* when we anounced to the tracker, we got a warning in the response */
/* when we announced to the tracker, we got a warning in the response */
TR_STAT_TRACKER_WARNING = 1,
/* when we anounced to the tracker, we got an error in the response */
/* when we announced to the tracker, we got an error in the response */
TR_STAT_TRACKER_ERROR = 2,
/* local trouble, such as disk full or permissions error */
TR_STAT_LOCAL_ERROR = 3

View File

@ -1065,7 +1065,7 @@ uint64_t tr_htonll(uint64_t x)
#else
/* fallback code by bdonlan at http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
/* fallback code by bdonlan at https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
union
{
uint32_t lx[2];
@ -1086,7 +1086,7 @@ uint64_t tr_ntohll(uint64_t x)
#else
/* fallback code by bdonlan at http://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
/* fallback code by bdonlan at https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
union
{
uint32_t lx[2];

View File

@ -69,7 +69,7 @@ struct tr_error;
/**
* @brief Rich Salz's classic implementation of shell-style pattern matching for ?, \, [], and * characters.
* @return 1 if the pattern matches, 0 if it doesn't, or -1 if an error occured
* @return 1 if the pattern matches, 0 if it doesn't, or -1 if an error occurred
*/
[[nodiscard]] bool tr_wildmat(std::string_view text, std::string_view pattern);
@ -382,7 +382,7 @@ std::string& tr_strvUtf8Clean(std::string_view cleanme, std::string& setme);
/**
* @param ratio the ratio to convert to a string
* @param infinity the string represntation of "infinity"
* @param infinity the string representation of "infinity"
*/
[[nodiscard]] std::string tr_strratio(double ratio, char const* infinity);

View File

@ -57,7 +57,7 @@ public:
// Tag used by tr_web::Mediator to limit some transfers' bandwidth
std::optional<int> speed_limit_tag;
// Optionaly set the underlying sockets' send/receive buffers' size.
// Optionally set the underlying sockets' send/receive buffers' size.
// Can be used to conserve resources for scrapes and announces, where
// the payload is known to be small.
std::optional<int> sndbuf;
@ -76,7 +76,7 @@ public:
void fetch(FetchOptions&& options);
// Notify tr_web that it's going to be destroyed sooon.
// Notify tr_web that it's going to be destroyed soon.
// New fetch() tasks will be rejected, but already-running tasks
// are left alone so that they can finish.
void closeSoon();

View File

@ -17,7 +17,7 @@ typedef NS_ENUM(unsigned int, blocklistDownloadState) { //
@property(nonatomic) BlocklistDownloaderViewController* viewController;
@property(nonatomic, class, readonly) BOOL isRunning;
+ (BlocklistDownloader*)downloader; //starts download if not already occuring
+ (BlocklistDownloader*)downloader; //starts download if not already occurring
- (void)cancelDownload;

View File

@ -172,7 +172,7 @@ typedef NS_ENUM(unsigned int, addType) { //
- (void)setWindowMinMaxToCurrent;
@property(nonatomic, readonly) CGFloat minWindowContentSizeAllowed;
- (void)updateForExpandCollape;
- (void)updateForExpandCollapse;
- (void)showMainWindow:(id)sender;

View File

@ -182,9 +182,9 @@ static void removeKeRangerRansomware()
lsofTask.standardInput = [NSPipe pipe];
lsofTask.standardError = lsofTask.standardOutput;
[lsofTask launch];
NSData* lsofOuputData = [[lsofTask.standardOutput fileHandleForReading] readDataToEndOfFile];
NSData* lsofOutputData = [[lsofTask.standardOutput fileHandleForReading] readDataToEndOfFile];
[lsofTask waitUntilExit];
NSString* lsofOutput = [[NSString alloc] initWithData:lsofOuputData encoding:NSUTF8StringEncoding];
NSString* lsofOutput = [[NSString alloc] initWithData:lsofOutputData encoding:NSUTF8StringEncoding];
for (NSString* line in [lsofOutput componentsSeparatedByString:@"\n"])
{
if (![line hasPrefix:@"p"])
@ -739,7 +739,7 @@ static void removeKeRangerRansomware()
[nc addObserver:self selector:@selector(updateForAutoSize) name:@"AutoSizeSettingChange" object:nil];
[nc addObserver:self selector:@selector(updateForExpandCollape) name:@"OutlineExpandCollapse" object:nil];
[nc addObserver:self selector:@selector(updateForExpandCollapse) name:@"OutlineExpandCollapse" object:nil];
[nc addObserver:self.fWindow selector:@selector(makeKeyWindow) name:@"MakeWindowKey" object:nil];
@ -5309,7 +5309,7 @@ static void removeKeRangerRansomware()
return contentMinHeight;
}
- (void)updateForExpandCollape
- (void)updateForExpandCollapse
{
[self setWindowSizeToFit];
[self setBottomCountText:YES];

View File

@ -11,7 +11,7 @@
#import "FileListNode.h"
#import "NSStringAdditions.h"
#define PADDING_HORIZONAL 2.0
#define PADDING_HORIZONTAL 2.0
#define IMAGE_FOLDER_SIZE 16.0
#define IMAGE_ICON_SIZE 32.0
#define PADDING_BETWEEN_IMAGE_AND_TITLE 4.0
@ -73,7 +73,7 @@
{
NSRect result = bounds;
result.origin.x += PADDING_HORIZONAL;
result.origin.x += PADDING_HORIZONTAL;
CGFloat const IMAGE_SIZE = ((FileListNode*)self.objectValue).isFolder ? IMAGE_FOLDER_SIZE : IMAGE_ICON_SIZE;
result.origin.y += (result.size.height - IMAGE_SIZE) * 0.5;
@ -155,13 +155,13 @@
NSRect result;
if (!((FileListNode*)self.objectValue).isFolder)
{
result.origin.x = NSMinX(bounds) + PADDING_HORIZONAL + IMAGE_ICON_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
result.origin.x = NSMinX(bounds) + PADDING_HORIZONTAL + IMAGE_ICON_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
result.origin.y = NSMinY(bounds) + PADDING_ABOVE_TITLE_FILE;
result.size.width = NSMaxX(bounds) - NSMinX(result);
}
else
{
result.origin.x = NSMinX(bounds) + PADDING_HORIZONAL + IMAGE_FOLDER_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
result.origin.x = NSMinX(bounds) + PADDING_HORIZONTAL + IMAGE_FOLDER_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
result.origin.y = NSMidY(bounds) - titleSize.height * 0.5;
result.size.width = MIN(titleSize.width, NSMaxX(bounds) - NSMinX(result));
}

View File

@ -177,7 +177,7 @@
- (CGFloat)tableView:(NSTableView*)tableView heightOfRow:(NSInteger)row
{
//check for NSDictionay instead of TrackerNode because of display issue when adding a row
//check for NSDictionary instead of TrackerNode because of display issue when adding a row
if ([self.fTrackers[row] isKindOfClass:[NSDictionary class]])
{
return TRACKER_GROUP_SEPARATOR_HEIGHT;

View File

@ -47,7 +47,7 @@
NSString* fullString = [fileSizeFormatter stringFromByteCount:fullSize];
//figure out the magniture of the two, since we can't rely on comparing the units because of localization and pluralization issues (for example, "1 byte of 2 bytes")
//figure out the magnitude of the two, since we can't rely on comparing the units because of localization and pluralization issues (for example, "1 byte of 2 bytes")
BOOL partialUnitsSame;
if (partialSize == 0)
{
@ -132,13 +132,12 @@
{
NSMutableArray* components = [NSMutableArray array];
NSCharacterSet* includededCharSet = separators.invertedSet;
NSCharacterSet* includedCharSet = separators.invertedSet;
NSUInteger index = 0;
NSUInteger const fullLength = self.length;
do
{
NSUInteger const start = [self rangeOfCharacterFromSet:includededCharSet options:0
range:NSMakeRange(index, fullLength - index)]
NSUInteger const start = [self rangeOfCharacterFromSet:includedCharSet options:0 range:NSMakeRange(index, fullLength - index)]
.location;
if (start == NSNotFound)
{

View File

@ -106,8 +106,8 @@ enum
int8_t* pieces = NULL;
float* piecesPercent = NULL;
BOOL const showAvailablity = [NSUserDefaults.standardUserDefaults boolForKey:@"PiecesViewShowAvailability"];
if (showAvailablity)
BOOL const showAvailability = [NSUserDefaults.standardUserDefaults boolForKey:@"PiecesViewShowAvailability"];
if (showAvailability)
{
pieces = (int8_t*)tr_malloc(self.fNumPieces * sizeof(int8_t));
[self.torrent getAvailability:pieces size:self.fNumPieces];
@ -129,7 +129,7 @@ enum
{
NSColor* pieceColor = nil;
if (showAvailablity ? pieces[index] == -1 : piecesPercent[index] == 1.0)
if (showAvailability ? pieces[index] == -1 : piecesPercent[index] == 1.0)
{
if (first || self.fPieces[index] != PIECE_FINISHED)
{
@ -145,7 +145,7 @@ enum
}
}
}
else if (showAvailablity ? pieces[index] == 0 : piecesPercent[index] == 0.0)
else if (showAvailability ? pieces[index] == 0 : piecesPercent[index] == 0.0)
{
if (first || self.fPieces[index] != PIECE_NONE)
{
@ -153,7 +153,7 @@ enum
self.fPieces[index] = PIECE_NONE;
}
}
else if (showAvailablity && pieces[index] >= HIGH_PEERS)
else if (showAvailability && pieces[index] >= HIGH_PEERS)
{
if (first || self.fPieces[index] != PIECE_HIGH_PEERS)
{
@ -164,8 +164,8 @@ enum
else
{
//always redraw "mixed"
CGFloat percent = showAvailablity ? (CGFloat)pieces[index] / HIGH_PEERS : piecesPercent[index];
NSColor* fullColor = showAvailablity ? self.fGreenAvailabilityColor : self.fBluePieceColor;
CGFloat percent = showAvailability ? (CGFloat)pieces[index] / HIGH_PEERS : piecesPercent[index];
NSColor* fullColor = showAvailability ? self.fGreenAvailabilityColor : self.fBluePieceColor;
pieceColor = [NSColor.whiteColor blendedColorWithFraction:percent ofColor:fullColor];
self.fPieces[index] = PIECE_SOME;
}

View File

@ -1361,8 +1361,8 @@
BOOL const useIncomplete = tr_sessionIsIncompleteDirEnabled(self.fHandle);
[self.fDefaults setBool:useIncomplete forKey:@"UseIncompleteDownloadFolder"];
BOOL const usePartialFileRanaming = tr_sessionIsIncompleteFileNamingEnabled(self.fHandle);
[self.fDefaults setBool:usePartialFileRanaming forKey:@"RenamePartialFiles"];
BOOL const usePartialFileRenaming = tr_sessionIsIncompleteFileNamingEnabled(self.fHandle);
[self.fDefaults setBool:usePartialFileRenaming forKey:@"RenamePartialFiles"];
//utp
BOOL const utp = tr_sessionIsUTPEnabled(self.fHandle);

View File

@ -8,8 +8,8 @@
#import "TrackerCell.h"
#import "TrackerNode.h"
#define PADDING_HORIZONAL 3.0
#define PADDING_STATUS_HORIZONAL 3.0
#define PADDING_HORIZONTAL 3.0
#define PADDING_STATUS_HORIZONTAL 3.0
#define ICON_SIZE 16.0
#define PADDING_BETWEEN_ICON_AND_NAME 4.0
#define PADDING_ABOVE_ICON 1.0
@ -261,17 +261,17 @@ NSMutableSet* fTrackerIconLoading;
- (NSRect)imageRectForBounds:(NSRect)bounds
{
return NSMakeRect(NSMinX(bounds) + PADDING_HORIZONAL, NSMinY(bounds) + PADDING_ABOVE_ICON, ICON_SIZE, ICON_SIZE);
return NSMakeRect(NSMinX(bounds) + PADDING_HORIZONTAL, NSMinY(bounds) + PADDING_ABOVE_ICON, ICON_SIZE, ICON_SIZE);
}
- (NSRect)rectForNameWithString:(NSAttributedString*)string inBounds:(NSRect)bounds
{
NSRect result;
result.origin.x = NSMinX(bounds) + PADDING_HORIZONAL + ICON_SIZE + PADDING_BETWEEN_ICON_AND_NAME;
result.origin.x = NSMinX(bounds) + PADDING_HORIZONTAL + ICON_SIZE + PADDING_BETWEEN_ICON_AND_NAME;
result.origin.y = NSMinY(bounds) + PADDING_ABOVE_NAME;
result.size.height = [string size].height;
result.size.width = NSMaxX(bounds) - NSMinX(result) - PADDING_HORIZONAL;
result.size.width = NSMaxX(bounds) - NSMinX(result) - PADDING_HORIZONTAL;
return result;
}
@ -279,7 +279,7 @@ NSMutableSet* fTrackerIconLoading;
- (NSRect)rectForCountWithString:(NSAttributedString*)string withAboveRect:(NSRect)aboveRect inBounds:(NSRect)bounds
{
return NSMakeRect(
NSMaxX(bounds) - PADDING_HORIZONAL - COUNT_WIDTH,
NSMaxX(bounds) - PADDING_HORIZONTAL - COUNT_WIDTH,
NSMaxY(aboveRect) + PADDING_BETWEEN_LINES,
COUNT_WIDTH,
[string size].height);
@ -300,7 +300,7 @@ NSMutableSet* fTrackerIconLoading;
inBounds:(NSRect)bounds
{
NSRect result;
result.origin.x = NSMinX(bounds) + PADDING_STATUS_HORIZONAL;
result.origin.x = NSMinX(bounds) + PADDING_STATUS_HORIZONTAL;
result.origin.y = NSMaxY(aboveRect) + PADDING_BETWEEN_LINES;
result.size.height = [string size].height;

View File

@ -58,7 +58,7 @@
<div class="question">How do I use it?</div>
<div class="answer-thumbnail"><img alt="adding a torrent" src="../gfx/open.png"/></div>
<div class="answer-text">
<p>Download your file's associated 'torrent file' (extension .torrent). These are commonly found at <a href="http://en.wikipedia.org/wiki/BitTorrent_tracker">'tracker' websites</a>.</p>
<p>Download your file's associated 'torrent file' (extension .torrent). These are commonly found at <a href="https://en.wikipedia.org/wiki/BitTorrent_tracker">'tracker' websites</a>.</p>
<p>Once you have the torrent file, drag it into Transmission - downloading should start immediately.</p>
<p>You can pause and resume transfers at any time, so long as the files remain in your download folder.</p>
<p>It is good etiquette to share or 'seed' the file for a while (ie leave it uploading) once your download is complete.</p>

View File

@ -17,7 +17,7 @@
<h1>What is the 'Micro Transport Protocol'? </h1>
</div>
<p><a href="http://en.wikipedia.org/wiki/Micro_Transport_Protocol">The Micro Transport Protocol (µTP)</a> is a protocol designed to reduce latency and network congestion. Transfers are automatically slowed down when they are interfering with other applications. This feature is compatible with all other µTP-compatible clients.</p>
<p><a href="https://en.wikipedia.org/wiki/Micro_Transport_Protocol">The Micro Transport Protocol (µTP)</a> is a protocol designed to reduce latency and network congestion. Transfers are automatically slowed down when they are interfering with other applications. This feature is compatible with all other µTP-compatible clients.</p>
<div class="pagetitle">
<h1>Why do I see a red dot and 'Port is closed'? </h1>

View File

@ -18,11 +18,11 @@
<div class="pagetitle">
<h1>What is 'peer exchange'? </h1>
</div>
<p><a href="http://en.wikipedia.org/wiki/Peer_exchange">Peer Exchange (PEX)</a> is a method of discovering new peers via other peers, rather than the tracker. It allows Transmission to attach to the swarm much quicker. PEX is automatically disabled for privately tracked torrents. The feature is compatible with both Vuze and µTorrent peers.</p>
<p><a href="https://en.wikipedia.org/wiki/Peer_exchange">Peer Exchange (PEX)</a> is a method of discovering new peers via other peers, rather than the tracker. It allows Transmission to attach to the swarm much quicker. PEX is automatically disabled for privately tracked torrents. The feature is compatible with both Vuze and µTorrent peers.</p>
<div class="pagetitle">
<h1>What is the 'distributed hash table'? </h1>
</div>
<p>The <a href="http://en.wikipedia.org/wiki/Distributed_hash_table">Distributed Hash Table (DHT)</a> allows peers to be obtained without connecting to the tracker. This allows transfers to continue even if trackers are unreachable. It is another way that Transmission can attach to the swarm quicker. DHT is automatically disabled for privately tracked torrents.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Distributed_hash_table">Distributed Hash Table (DHT)</a> allows peers to be obtained without connecting to the tracker. This allows transfers to continue even if trackers are unreachable. It is another way that Transmission can attach to the swarm quicker. DHT is automatically disabled for privately tracked torrents.</p>
<div class="pagetitle">
<h1>What is encryption? </h1>
</div>

View File

@ -1516,7 +1516,7 @@ msgstr[1] "Démarré %d fois"
#: ../gtk/StatsDialog.cc:99
msgid "Reset your statistics?"
msgstr "Réinitaliser vos statistiques à zéro?"
msgstr "Réinitialiser vos statistiques à zéro?"
#: ../gtk/StatsDialog.cc:101 ../gtk/StatsDialog.cc:138
msgid "_Reset"

View File

@ -52,7 +52,7 @@ class MainWindow : public QMainWindow
TR_DISABLE_COPY_MOVE(MainWindow)
public:
MainWindow(Session&, Prefs&, TorrentModel&, bool minized);
MainWindow(Session&, Prefs&, TorrentModel&, bool minimized);
QSystemTrayIcon& trayIcon()
{

View File

@ -411,7 +411,7 @@
<item row="1" column="0">
<widget class="QLabel" name="queueStalledMinutesLabel">
<property name="text">
<string extracomment="Please keep this phrase as short as possible, it's curently the longest and influences dialog width">Download is i&amp;nactive if data sharing stopped:</string>
<string extracomment="Please keep this phrase as short as possible, it's currently the longest and influences dialog width">Download is i&amp;nactive if data sharing stopped:</string>
</property>
<property name="buddy">
<cstring>queueStalledMinutesSpin</cstring>

View File

@ -187,7 +187,7 @@ TEST(Crypto, sha1FromString)
EXPECT_FALSE(tr_sha1_from_string("a94a8fe5ccb19ba61c4cz873d391e987982fbbd3"sv));
EXPECT_FALSE(tr_sha1_from_string("a94a8fe5ccb19 61c4c0873d391e987982fbbd3"sv));
// lowecase hex
// lowercase hex
auto const baseline = "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"sv;
auto const lc = tr_sha1_from_string(baseline);
EXPECT_TRUE(lc);

View File

@ -101,7 +101,7 @@ TEST_F(PeerMgrActiveRequestsTest, peersAreRemoved)
EXPECT_EQ(0U, requests.count(peer));
EXPECT_EQ(0U, requests.size());
// try removing requests for that block agian (should remove nothing)
// try removing requests for that block again (should remove nothing)
EXPECT_EQ(std::vector<tr_peer*>{}, requests.remove(block));
}

View File

@ -286,10 +286,10 @@ TEST_F(UtilsTest, trStrlcpy)
destination.fill(initial_char);
auto responce = tr_strlcpy(&destination, c_string, 98);
auto response = tr_strlcpy(&destination, c_string, 98);
// Check response length
ASSERT_EQ(responce, length);
ASSERT_EQ(response, length);
// Check what was copied
for (unsigned i = 0U; i < 97U; ++i)