Skip to content

Commit

Permalink
chore: fix residual typos found by codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Sep 14, 2023
1 parent a80fd92 commit 5a84916
Show file tree
Hide file tree
Showing 31 changed files with 51 additions and 51 deletions.
12 changes: 6 additions & 6 deletions doc/communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## First login and sync

When user logs in to the bridge for the first time, immediatelly starts the first sync.
When user logs in to the bridge for the first time, immediately starts the first sync.
First sync downloads all headers of all e-mails and creates database to have proper UIDs
and indexes for IMAP. See [database](database.md) for more information.

By default, whenever it's possible, sync downloads only all e-mails maiblox which already
have list of labels so we can construct all mailboxes (inbox, sent, trash, custom folders
and lables) without need to download each e-mail headers many times.
and labels) without need to download each e-mail headers many times.

Note that we need to download also bodies to calculate size of the e-mail and set proper
content type (clients uses content type for guess if e-mail contains attachment)--but only
Expand All @@ -22,7 +22,7 @@ client right after adding account.

When account is added to client, client start the sync. This sync will ask Bridge app
for all headers (done quickly) and then starts to download all bodies and attachment.
Unfortunatelly for some e-mail more than once if the same e-mail is in more mailboxes
Unfortunately for some e-mail more than once if the same e-mail is in more mailboxes
(e.g. inbox and all mail)--there is no way to tell over IMAP it's the same message.

After successful login of client to IMAP, Bridge starts event loop. That periodicly ask
Expand All @@ -37,7 +37,7 @@ sequenceDiagram
Note right of B: Set up PM account<br/>by user
loop First sync
B ->> S: Fetch body and attachements
B ->> S: Fetch body and attachments
Note right of B: Build local database<br/>(e-mail UIDs)
end
Expand All @@ -58,8 +58,8 @@ sequenceDiagram
C ->> B: IMAP SELECT directory
C ->> B: IMAP SEARCH e-mails UIDs
C ->> B: IMAP FETCH of e-mail UID
B ->> S: Fetch body and attachements
Note right of B: Decrypt message<br/>and attachement
B ->> S: Fetch body and attachments
Note right of B: Decrypt message<br/>and attachment
B ->> C: IMAP response
end
```
Expand Down
6 changes: 3 additions & 3 deletions doc/updates.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Update mechanism of Bridge

There are mulitple options how to change version of application:
There are multiple options how to change version of application:
* Automatic in-app update
* Manual in-app update
* Manual install

In-app update ends with restarting bridge into new version. Automatic in-app
update is downloading, verifying and installing the new version immediatelly
update is downloading, verifying and installing the new version immediately
without user confirmation. For manual in-app update user needs to confirm first.
Update is done from special update file published on website.

Expand All @@ -25,7 +25,7 @@ The bridge is installed and executed differently for given OS:

* macOS app does not use launcher
* No launcher, only one executable
* In-App udpate replaces the bridge files in installation path directly
* In-App update replaces the bridge files in installation path directly


```mermaid
Expand Down
2 changes: 1 addition & 1 deletion internal/bridge/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func newSMTPServer(bridge *Bridge, tlsConfig *tls.Config, logSMTP bool) *smtp.Se
smtpServer.MaxLineLength = 1 << 16
smtpServer.ErrorLog = logging.NewSMTPLogger()

// go-smtp suppors SASL PLAIN but not LOGIN. We need to add LOGIN support ourselves.
// go-smtp supports SASL PLAIN but not LOGIN. We need to add LOGIN support ourselves.
smtpServer.EnableAuth(sasl.Login, func(conn *smtp.Conn) sasl.Server {
return sasl.NewLoginServer(func(username, password string) error {
return conn.Session().AuthPlain(username, password)
Expand Down
2 changes: 1 addition & 1 deletion internal/bridge/sync_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/stretchr/testify/require"
)

// Disabled due to flakyness.
// Disabled due to flakiness.
func _TestBridge_SyncExistsWithErrorWhenTooManyFilesAreOpen(t *testing.T) { //nolint:unused
var rlimitCurrent syscall.Rlimit

Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/bridge-gui/bridge-gui-tester/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ CREATE_SUBDIRS = YES
# level increment doubles the number of directories, resulting in 4096
# directories at level 8 which is the default and also the maximum value. The
# sub-directories are organized in 2 levels, the first level always has a fixed
# numer of 16 directories.
# number of 16 directories.
# Minimum value: 0, maximum value: 8, default value: 8.
# This tag requires that the tag CREATE_SUBDIRS is set to YES.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Status GRPCMetadataProcessor::Process(AuthMetadataProcessor::InputMetadata const
AuthMetadataProcessor::OutputMetadata *, AuthMetadataProcessor::OutputMetadata *) {
try {
AuthMetadataProcessor::InputMetadata::const_iterator pathIt = auth_metadata.find(":path");
QString const callName = (pathIt == auth_metadata.end()) ? ("unkown gRPC call") : QString::fromLocal8Bit(pathIt->second);
QString const callName = (pathIt == auth_metadata.end()) ? ("Unknown gRPC call") : QString::fromLocal8Bit(pathIt->second);

AuthMetadataProcessor::InputMetadata::size_type const count = auth_metadata.count(grpcMetadataServerTokenKey);
if (count == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ void GRPCQtProxy::setClientPlatform(QString const &clientPlatform) {
//****************************************************************************************************************************************************
/// \param[in] imapPort The IMAP port.
/// \param[in] smtpPort The SMTP port.
/// \param[in] useSSLForIMAP The IMAP connexion mode.
/// \param[in] useSSLForSMTP The IMAP connexion mode.
/// \param[in] useSSLForIMAP The IMAP connection mode.
/// \param[in] useSSLForSMTP The IMAP connection mode.
//****************************************************************************************************************************************************
void GRPCQtProxy::setMailServerSettings(qint32 imapPort, qint32 smtpPort, bool useSSLForIMAP, bool userSSLForSMTP) {
emit setMailServerSettingsReceived(imapPort, smtpPort, useSSLForIMAP, userSSLForSMTP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class GRPCService : public grpc::Bridge::Service {

private: // data member
mutable QMutex eventStreamMutex_; ///< Mutex used to access eventQueue_, isStreaming_ and shouldStopStreaming_;
QList<bridgepp::SPStreamEvent> eventQueue_; ///< The event queue. Acces protected by eventStreamMutex_;
QList<bridgepp::SPStreamEvent> eventQueue_; ///< The event queue. Access protected by eventStreamMutex_;
bool isStreaming_; ///< Is the gRPC stream running. Access protected by eventStreamMutex_;
bool eventStreamShouldStop_; ///< Should the stream be stopped? Access protected by eventStreamMutex
QString loginUsername_; ///< The username used for the current login procedure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ qint32 SettingsTab::smtpPort() {
//****************************************************************************************************************************************************
/// \param[in] imapPort The IMAP port.
/// \param[in] smtpPort The SMTP port.
/// \param[in] useSSLForIMAP The IMAP connexion mode.
/// \param[in] useSSLForSMTP The IMAP connexion mode.
/// \param[in] useSSLForIMAP The IMAP connection mode.
/// \param[in] useSSLForSMTP The IMAP connection mode.
//****************************************************************************************************************************************************
void SettingsTab::setMailServerSettings(qint32 imapPort, qint32 smtpPort, bool useSSLForIMAP, bool useSSLForSMTP) {
ui_.spinPortIMAP->setValue(imapPort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
</size>
</property>
<property name="title">
<string>TLS Certficates</string>
<string>TLS Certificates</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void UsersTab::onSendUserBadEvent() {
int const index = this->selectedIndex();

if (!user) {
app().log().error(QString("%1 failed. Unkown user.").arg(__FUNCTION__));
app().log().error(QString("%1 failed. Unknown user.").arg(__FUNCTION__));
return;
}

Expand All @@ -167,7 +167,7 @@ void UsersTab::onSendUsedBytesChangedEvent() {
int const index = this->selectedIndex();

if (!user) {
app().log().error(QString("%1 failed. Unkown user.").arg(__FUNCTION__));
app().log().error(QString("%1 failed. Unknown user.").arg(__FUNCTION__));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<item row="3" column="0">
<widget class="QLabel" name="labelAddresses">
<property name="text">
<string>Adresses</string>
<string>Addresses</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/bridge-gui/bridge-gui/QMLBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Q_OBJECT
void showSettings(QString const &reason); ///< Show the settings page.
void selectUser(QString const &userID, bool forceShowWindow, QString const &reason); ///< Select the user and display its account details (or login screen).

// invokable methods can be called from QML. They generally return a value, which slots cannot do.
// invocable methods can be called from QML. They generally return a value, which slots cannot do.
Q_INVOKABLE static QString buildYear(); ///< Return the application build year.
Q_INVOKABLE QPoint getCursorPos() const; ///< Retrieve the cursor position.
Q_INVOKABLE bool isPortFree(int port) const; ///< Check if a given network port is available.
Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/bridge-gui/bridge-gui/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ BRIDGE_BUILD_ENV= ${BRIDGE_BUILD_ENV:-"dev"}
git submodule update --init --recursive ${VCPKG_ROOT}
check_exit "Failed to initialize vcpkg as a submodule."

echo submodule udpated
echo submodule updated

VCPKG_EXE="${VCPKG_ROOT}/vcpkg"
VCPKG_BOOTSTRAP="${VCPKG_ROOT}/bootstrap-vcpkg.sh"
Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/bridge-gui/bridgepp/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ CREATE_SUBDIRS = YES
# level increment doubles the number of directories, resulting in 4096
# directories at level 8 which is the default and also the maximum value. The
# sub-directories are organized in 2 levels, the first level always has a fixed
# numer of 16 directories.
# number of 16 directories.
# Minimum value: 0, maximum value: 8, default value: 8.
# This tag requires that the tag CREATE_SUBDIRS is set to YES.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ void FocusGRPCClient::removeServiceConfigFile(QString const &configDir) {


//****************************************************************************************************************************************************
/// \param[in] timeoutMs The timeout for the connexion.
/// \param[in] timeoutMs The timeout for the connection.
/// \param[in] port The gRPC server port.
/// \param[out] outError if not null and the function returns false.
/// \return true iff the connexion was successfully established.
/// \return true iff the connection was successfully established.
//****************************************************************************************************************************************************
bool FocusGRPCClient::connectToServer(qint64 timeoutMs, quint16 port, QString *outError) {
try {
Expand All @@ -97,7 +97,7 @@ bool FocusGRPCClient::connectToServer(qint64 timeoutMs, quint16 port, QString *o
}

if (channel_->GetState(true) != GRPC_CHANNEL_READY) {
throw Exception("Connexion check with focus service failed.");
throw Exception("Connection check with focus service failed.");
}

log_.debug(QString("Successfully connected to focus gRPC service."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void GRPCClient::removeServiceConfigFile(QString const &configDir) {
//****************************************************************************************************************************************************
/// \param[in] sessionID The sessionID.
/// \param[in] timeoutMs The timeout in milliseconds
/// \param[in] serverProcess An optional server process to monitor. If the process it, no need and retry, as connexion cannot be established. Ignored if null.
/// \param[in] serverProcess An optional server process to monitor. If the process it, no need and retry, as connection cannot be established. Ignored if null.
/// \return The service config.
//****************************************************************************************************************************************************
GRPCConfig GRPCClient::waitAndRetrieveServiceConfig(QString const & sessionID, QString const &configDir, qint64 timeoutMs,
Expand Down Expand Up @@ -118,7 +118,7 @@ void GRPCClient::setLog(Log *log) {
//****************************************************************************************************************************************************
/// \param[in] sessionID The sessionID.
/// \param[in] configDir The configuration directory
/// \param[in] serverProcess An optional server process to monitor. If the process it, no need and retry, as connexion cannot be established. Ignored if null.
/// \param[in] serverProcess An optional server process to monitor. If the process it, no need and retry, as connection cannot be established. Ignored if null.
/// \return true iff the connection was successful.
//****************************************************************************************************************************************************
void GRPCClient::connectToServer(QString const &sessionID, QString const &configDir, GRPCConfig const &config, ProcessMonitor *serverProcess) {
Expand Down Expand Up @@ -150,7 +150,7 @@ void GRPCClient::connectToServer(QString const &sessionID, QString const &config
int i = 0;
while (true) {
if (serverProcess && serverProcess->getStatus().ended) {
throw Exception("Bridge application ended before gRPC connexion could be established.", QString(), __FUNCTION__,
throw Exception("Bridge application ended before gRPC connection could be established.", QString(), __FUNCTION__,
tailOfLatestBridgeLog(sessionID));
}

Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/grpc/service_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ func (s *Service) Login2FA(_ context.Context, login *LoginRequest) (*emptypb.Emp
defer async.HandlePanic(s.panicHandler)

if s.auth.UID == "" || s.authClient == nil {
s.log.Errorf("Login 2FA: authethication incomplete %s %p", s.auth.UID, s.authClient)
s.log.Errorf("Login 2FA: authentication incomplete %s %p", s.auth.UID, s.authClient)
_ = s.SendEvent(NewLoginError(LoginErrorType_TFA_ABORT, "Missing authentication, try again."))
s.loginClean()
return
Expand Down
2 changes: 1 addition & 1 deletion internal/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
//
// The Zendesk limit for an attachment is 50MB and this is what will
// be allowed via the API. However, if that fails for some reason, the
// fallback is sending the report via email, which has a limit of 10mb
// fallback is sending the report via email, which has a limit of 10 MB
// total or 7MB per file.
DefaultMaxLogFileSize = 5 * 1024 * 1024
)
Expand Down
2 changes: 1 addition & 1 deletion internal/user/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (user *User) syncMessages(
case syncLimits.MaxSyncMemory == 2*Gigabyte:
// Increasing the max download capacity has very little effect on sync speed. We could increase the download
// memory but the user would see less sync notifications. A smaller value here leads to more frequent
// updates. Additionally, most of ot sync time is spent in the message building.
// updates. Additionally, most of sync time is spent in the message building.
syncMaxDownloadRequestMem = syncLimits.MaxDownloadRequestMem
// Currently limited so that if a user has multiple accounts active it also doesn't cause excessive memory usage.
syncMaxMessageBuildingMem = syncLimits.MaxMessageBuildingMem
Expand Down
2 changes: 1 addition & 1 deletion pkg/cpc/cpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

var ErrInvalidReplyType = errors.New("reply type does not match")

// Utilities to implement Chanel Procedure Calls. Similar in concept to RPC, but with between go-routines.
// Utilities to implement Channel Procedure Calls. Similar in concept to RPC, but with between go-routines.

// Request contains the data for a request as well as the means to reply to a request.
type Request struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/keychain/helper_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (h *macOSHelper) Get(secretURL string) (string, string, error) {

results, err := keychain.QueryItem(query)
if err != nil {
l.WithError(err).Error("Querry item failed")
l.WithError(err).Error("Query item failed")
return "", "", parseError(err)
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/mime/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ func EncodeHeader(s string) string {
return mime.QEncoding.Encode("utf-8", s)
}

// DecodeCharset decodes the orginal using content type parameters.
// DecodeCharset decodes the original using content type parameters.
// If the charset parameter is missing it checks that the content is valid utf8.
// If it isn't, it checks if it's embedded in the html/xml.
// If it isn't, it falls back to windows-1252.
// It then reencodes it as utf-8.
// It then re-encodes it as utf-8.
func DecodeCharset(original []byte, contentType string) ([]byte, error) {
// If the contentType itself is specified, use that.
if contentType != "" {
Expand Down Expand Up @@ -240,7 +240,7 @@ func DecodeCharset(original []byte, contentType string) ([]byte, error) {
logrus.WithField("encoding", name).Warn("Determined encoding but was not certain")
}

// Reencode as UTF-8.
// Re-encode as UTF-8.
decoded, err := encoding.NewDecoder().Bytes(original)
if err != nil {
return original, errors.Wrap(err, "failed to decode as windows-1252")
Expand Down
2 changes: 1 addition & 1 deletion pkg/mime/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ func TestEncodeReader(t *testing.T) {
}

if bytes.Equal(decoded, expected) {
// fmt.Println("Succesfull decoding of ", val.params, ":", string(decoded))
// fmt.Println("Successful decoding of ", val.params, ":", string(decoded))
} else {
t.Error("Wrong encoding of ", val.charset, ".Expected\n", expected, "\nbut have\n", decoded)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/tar/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/sirupsen/logrus"
)

// maxFileSize limit tre single file size after decopression is not larger than 1GB.
// maxFileSize limit the single file size after decopression is not larger than 1GB.
const maxFileSize = int64(1 * 1024 * 1024 * 1024) // 1 GB

// ErrFileTooLarge returned when decompressed file is too large.
Expand Down
4 changes: 2 additions & 2 deletions release-notes/bridge_early.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
- Improved Sentry reporting

### Fixed
- Ensure messageID is properly removed from DB when it is no logner present on the API
- Ensure messageID is properly removed from DB when it is no longer present on the API


## v2.1.0
Expand Down Expand Up @@ -372,7 +372,7 @@ New local cache
- Added IMAP requests to the logs for easier debugging

### Fixed
- NoGUI bulid
- NoGUI build
- Background of GUI welcome message
- Incorrect total mailbox size displayed in Apple Mail

Expand Down
4 changes: 2 additions & 2 deletions release-notes/bridge_stable.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
- Improved Sentry reporting

### Fixed
- Ensure messageID is properly removed from DB when it is no logner present on the API
- Ensure messageID is properly removed from DB when it is no longer present on the API


## v2.1.0
Expand Down Expand Up @@ -251,7 +251,7 @@ Other
- Fixed GUI freeze while switching to early update channel
- Fixed Bridge autostart
- Improved signing of update packages
- NoGUI bulid
- NoGUI build
- Background of GUI welcome message
- Incorrect total mailbox size displayed in Apple Mail

Expand Down
2 changes: 1 addition & 1 deletion utils/QTBUG-88600/README.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This is version of libqcocoa obtained from original Qt 5.13.0 source available at https://github.com/qt/qtbase with patch from cocoa.patch applyed.
This is version of libqcocoa obtained from original Qt 5.13.0 source available at https://github.com/qt/qtbase with patch from cocoa.patch applied.

Please refer to https://bugreports.qt.io/browse/QTBUG-88600 for patch origin and https://doc.qt.io/qt-5/macos-building.html for instructions how to build Qt from source.
Loading

0 comments on commit 5a84916

Please sign in to comment.