Skip to content

Commit caa27f3

Browse files
authored
Merge pull request #699 from yatish27/fix_typos
Fix typos
2 parents 17e723a + 6c90323 commit caa27f3

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

cmd/campaigns.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ func handleGetCampaignViewAnalytics(c echo.Context) error {
684684
return c.JSON(http.StatusOK, okResp{out})
685685
}
686686

687-
// sendTestMessage takes a campaign and a subsriber and sends out a sample campaign message.
687+
// sendTestMessage takes a campaign and a subscriber and sends out a sample campaign message.
688688
func sendTestMessage(sub models.Subscriber, camp *models.Campaign, app *App) error {
689689
if err := camp.CompileTemplate(app.manager.TemplateFuncs(camp)); err != nil {
690690
app.log.Printf("error compiling template: %v", err)

cmd/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func handleImportSubscribers(c echo.Context) error {
2222
return echo.NewHTTPError(http.StatusBadRequest, app.i18n.T("import.alreadyRunning"))
2323
}
2424

25-
// Unmarsal the JSON params.
25+
// Unmarshal the JSON params.
2626
var opt subimporter.SessionOpt
2727
if err := json.Unmarshal([]byte(c.FormValue("params")), &opt); err != nil {
2828
return echo.NewHTTPError(http.StatusBadRequest,
@@ -95,7 +95,7 @@ func handleImportSubscribers(c echo.Context) error {
9595
// keeping the global import state (failed / successful) etc. across
9696
// multiple files becomes complex. Instead, it's just easier for the
9797
// end user to concat multiple CSVs (if there are multiple in the first)
98-
// place and uploada as one in the first place.
98+
// place and upload as one in the first place.
9999
dir, files, err := impSess.ExtractZIP(out.Name(), 1)
100100
if err != nil {
101101
return echo.NewHTTPError(http.StatusInternalServerError,

cmd/init.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func initFlags() {
104104
f.StringSlice("config", []string{"config.toml"},
105105
"path to one or more config files (will be merged in order)")
106106
f.Bool("install", false, "setup database (first time)")
107-
f.Bool("idempotent", false, "make --install run only if the databse isn't already setup")
107+
f.Bool("idempotent", false, "make --install run only if the database isn't already setup")
108108
f.Bool("upgrade", false, "upgrade database to the current version")
109109
f.Bool("version", false, "show current version of the build")
110110
f.Bool("new-config", false, "generate sample config file")
@@ -129,13 +129,13 @@ func initConfigFiles(files []string, ko *koanf.Koanf) {
129129
if os.IsNotExist(err) {
130130
lo.Fatal("config file not found. If there isn't one yet, run --new-config to generate one.")
131131
}
132-
lo.Fatalf("error loadng config from file: %v.", err)
132+
lo.Fatalf("error loading config from file: %v.", err)
133133
}
134134
}
135135
}
136136

137137
// initFileSystem initializes the stuffbin FileSystem to provide
138-
// access to bunded static assets to the app.
138+
// access to bundled static assets to the app.
139139
func initFS(appDir, frontendDir, staticDir, i18nDir string) stuffbin.FileSystem {
140140
var (
141141
// stuffbin real_path:virtual_alias paths to map local assets on disk
@@ -429,7 +429,7 @@ func initSMTPMessenger(m *manager.Manager) messenger.Messenger {
429429
lo.Fatalf("no SMTP servers found in config")
430430
}
431431

432-
// Load the config for multipme SMTP servers.
432+
// Load the config for multiple SMTP servers.
433433
for _, item := range items {
434434
if !item.Bool("enabled") {
435435
continue

cmd/settings.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func handleUpdateSettings(c echo.Context) error {
167167
has = true
168168
}
169169

170-
// Assign a UUID. The frontend only sends a password when the user explictly
170+
// Assign a UUID. The frontend only sends a password when the user explicitly
171171
// changes the password. In other cases, the existing password in the DB
172172
// is copied while updating the settings and the UUID is used to match
173173
// the incoming array of SMTP blocks with the array in the DB.
@@ -191,7 +191,7 @@ func handleUpdateSettings(c echo.Context) error {
191191

192192
// Bounce boxes.
193193
for i, s := range set.BounceBoxes {
194-
// Assign a UUID. The frontend only sends a password when the user explictly
194+
// Assign a UUID. The frontend only sends a password when the user explicitly
195195
// changes the password. In other cases, the existing password in the DB
196196
// is copied while updating the settings and the UUID is used to match
197197
// the incoming array of blocks with the array in the DB.
@@ -316,7 +316,7 @@ func getSettings(app *App) (settings, error) {
316316
"name", "{globals.terms.settings}", "error", pqErrMsg(err)))
317317
}
318318

319-
// Unmarshall the settings and filter out sensitive fields.
319+
// Unmarshal the settings and filter out sensitive fields.
320320
if err := json.Unmarshal([]byte(b), &out); err != nil {
321321
return out, echo.NewHTTPError(http.StatusInternalServerError,
322322
app.i18n.Ts("settings.errorEncoding", "error", err.Error()))

frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The project uses a global `vuex` state to centrally store the responses to prett
1818

1919
There is a global state `loading` (eg: loading.campaigns, loading.lists) that indicates whether an API call for that particular "model" is running. This can be used anywhere in the project to show loading spinners for instance. All the API definitions are in `api/index.js`. It also describes how each API call sets the global `loading` status alongside storing the API responses.
2020

21-
*IMPORTANT*: All JSON field names in GET API responses are automatically camel-cased when they're pulled for the sake of consistentcy in the frontend code and for complying with the linter spec in the project (Vue/AirBnB schema). For example, `content_type` becomes `contentType`. When sending responses to the backend, however, they should be snake-cased manually. This is overridden for certain calls such as `/api/config` and `/api/settings` using the `preserveCase: true` param in `api/index.js`.
21+
*IMPORTANT*: All JSON field names in GET API responses are automatically camel-cased when they're pulled for the sake of consistency in the frontend code and for complying with the linter spec in the project (Vue/AirBnB schema). For example, `content_type` becomes `contentType`. When sending responses to the backend, however, they should be snake-cased manually. This is overridden for certain calls such as `/api/config` and `/api/settings` using the `preserveCase: true` param in `api/index.js`.
2222

2323

2424
## Icon pack

frontend/src/components/ListSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default {
9393
computed: {
9494
// Return the list of unselected lists.
9595
filteredLists() {
96-
// Get a map of IDs of the user subsciptions. eg: {1: true, 2: true};
96+
// Get a map of IDs of the user subscriptions. eg: {1: true, 2: true};
9797
const subIDs = this.selectedItems.reduce((obj, item) => ({ ...obj, [item.id]: true }), {});
9898
9999
// Filter lists from the global lists whose IDs are not in the user's

frontend/src/views/Campaigns.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export default Vue.extend({
350350
},
351351
352352
// Stats returns the campaign object with stats (sent, toSend etc.)
353-
// if there's live stats availabe for running campaigns. Otherwise,
353+
// if there's live stats available for running campaigns. Otherwise,
354354
// it returns the incoming campaign object that has the static stats
355355
// values.
356356
getCampaignStats(c) {

frontend/src/views/Import.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export default Vue.extend({
247247
);
248248
},
249249
250-
// Returns true if an import has finished (failed or sucessful).
250+
// Returns true if an import has finished (failed or successful).
251251
isDone() {
252252
if (this.status.status === 'finished'
253253
|| this.status.status === 'stopped'

internal/subimporter/importer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type Importer struct {
6060
sync.RWMutex
6161
}
6262

63-
// Options represents inport options.
63+
// Options represents import options.
6464
type Options struct {
6565
UpsertStmt *sql.Stmt
6666
BlocklistStmt *sql.Stmt
@@ -90,7 +90,7 @@ type SessionOpt struct {
9090
ListIDs []int `json:"lists"`
9191
}
9292

93-
// Status reporesents statistics from an ongoing import session.
93+
// Status represents statistics from an ongoing import session.
9494
type Status struct {
9595
Name string `json:"name"`
9696
Total int `json:"total"`

0 commit comments

Comments
 (0)