mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
Fix typos
This commit is contained in:
parent
31ae13fe28
commit
ee02fa131d
7 changed files with 16 additions and 14 deletions
|
@ -28,12 +28,12 @@ describe('Local Autocompleter', () => {
|
|||
});
|
||||
|
||||
describe('instantiation', () => {
|
||||
it('should be constructable with compatible data', () => {
|
||||
it('should be constructible with compatible data', () => {
|
||||
const result = new LocalAutocompleter(mockData);
|
||||
expect(result).toBeInstanceOf(LocalAutocompleter);
|
||||
});
|
||||
|
||||
it('should NOT be constructable with incompatible data', () => {
|
||||
it('should NOT be constructible with incompatible data', () => {
|
||||
const versionDataOffset = 12;
|
||||
const mockIncompatibleDataArray = new Array(versionDataOffset).fill(0);
|
||||
// Set data version to 1
|
||||
|
@ -45,6 +45,8 @@ describe('Local Autocompleter', () => {
|
|||
});
|
||||
|
||||
describe('topK', () => {
|
||||
const termStem = ['f', 'o'].join('');
|
||||
|
||||
let localAc: LocalAutocompleter;
|
||||
|
||||
beforeAll(() => {
|
||||
|
@ -66,7 +68,7 @@ describe('Local Autocompleter', () => {
|
|||
});
|
||||
|
||||
it('should return suggestions sorted by image count', () => {
|
||||
const result = localAc.topK('fo', defaultK);
|
||||
const result = localAc.topK(termStem, defaultK);
|
||||
expect(result).toEqual([
|
||||
expect.objectContaining({ name: 'forest', imageCount: 3 }),
|
||||
expect.objectContaining({ name: 'fog', imageCount: 1 }),
|
||||
|
@ -82,13 +84,13 @@ describe('Local Autocompleter', () => {
|
|||
});
|
||||
|
||||
it('should return only the required number of suggestions', () => {
|
||||
const result = localAc.topK('fo', 1);
|
||||
const result = localAc.topK(termStem, 1);
|
||||
expect(result).toEqual([expect.objectContaining({ name: 'forest', imageCount: 3 })]);
|
||||
});
|
||||
|
||||
it('should NOT return suggestions associated with hidden tags', () => {
|
||||
window.booru.hiddenTagList = [1];
|
||||
const result = localAc.topK('fo', defaultK);
|
||||
const result = localAc.topK(termStem, defaultK);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ defmodule Philomena.Tags do
|
|||
|> where(tag_id: ^tag.id)
|
||||
|> Repo.delete_all()
|
||||
|
||||
# Update other assocations
|
||||
# Update other associations
|
||||
ArtistLink
|
||||
|> where(tag_id: ^tag.id)
|
||||
|> Repo.update_all(set: [tag_id: target_tag.id])
|
||||
|
|
|
@ -88,7 +88,7 @@ defmodule Philomena.Users.UserNotifier do
|
|||
|
||||
Your account has been automatically locked due to too many attempts to sign in.
|
||||
|
||||
You can unlock your account by visting the URL below:
|
||||
You can unlock your account by visiting the URL below:
|
||||
|
||||
#{url}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ defmodule PhilomenaWeb.Admin.SiteNoticeController do
|
|||
case SiteNotices.update_site_notice(conn.assigns.site_notice, site_notice_params) do
|
||||
{:ok, _site_notice} ->
|
||||
conn
|
||||
|> put_flash(:info, "Succesfully updated site notice.")
|
||||
|> put_flash(:info, "Successfully updated site notice.")
|
||||
|> redirect(to: ~p"/admin/site_notices")
|
||||
|
||||
{:error, changeset} ->
|
||||
|
@ -56,7 +56,7 @@ defmodule PhilomenaWeb.Admin.SiteNoticeController do
|
|||
{:ok, _site_notice} = SiteNotices.delete_site_notice(conn.assigns.site_notice)
|
||||
|
||||
conn
|
||||
|> put_flash(:info, "Sucessfully deleted site notice.")
|
||||
|> put_flash(:info, "Successfully deleted site notice.")
|
||||
|> redirect(to: ~p"/admin/site_notices")
|
||||
end
|
||||
|
||||
|
|
|
@ -59,5 +59,5 @@ h1 = @conversation.title
|
|||
p You've managed to send over 1,000 messages in this conversation!
|
||||
p We'd like to ask you to make a new conversation. Don't worry, this one won't go anywhere if you need to refer back to it.
|
||||
p
|
||||
=> link "Click here", to: ~p"/conversations/new?#{[receipient: other.name]}"
|
||||
=> link "Click here", to: ~p"/conversations/new?#{[recipient: other.name]}"
|
||||
' to make a new conversation with this user.
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
.fieldlabel
|
||||
strong You probably do not want to check this unless you know what you are doing - it cannot be changed later
|
||||
| . Pulic filters can be shared with other users and used by them; if you make changes to a filter, it will update all users of that filter.
|
||||
| . Public filters can be shared with other users and used by them; if you make changes to a filter, it will update all users of that filter.
|
||||
|
||||
- input_value(f, :public) == true ->
|
||||
.fieldlabel
|
||||
|
|
|
@ -29,10 +29,10 @@ p.fieldlabel
|
|||
= select @f, :vote_method, ["-": "", "Single option": :single, "Multiple options": :multiple], class: "input"
|
||||
= error_tag @f, :vote_method
|
||||
|
||||
= inputs_for @f, :options, fn fo ->
|
||||
= inputs_for @f, :options, fn opt ->
|
||||
.field.js-poll-option.field--inline.flex--no-wrap.flex--centered
|
||||
= text_input fo, :label, class: "input flex__grow js-option-label", placeholder: "Option"
|
||||
= error_tag fo, :label
|
||||
= text_input opt, :label, class: "input flex__grow js-option-label", placeholder: "Option"
|
||||
= error_tag opt, :label
|
||||
|
||||
label.input--separate-left.flex__fixed.flex--centered
|
||||
a.js-option-remove href="#"
|
||||
|
|
Loading…
Reference in a new issue