Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos #4021

Merged
merged 6 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ body:
validations:
required: false
- type: textarea
id: enironment
id: environment
attributes:
label: Environment
value: |
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ looks rather complex and messy compared to the full list of changes made for thi
- Pass filter params to getApiDocument (https://github.com/flarum/framework/pull/3037)
- Use author filter instead of gambit to get a user's discussions (https://github.com/flarum/framework/pull/3068)
- [A11Y] Accessibility improvements for the Search component (https://github.com/flarum/framework/pull/3017)
- Add determinsm to extension order resolution (https://github.com/flarum/framework/pull/3076)
- Add determinism to extension order resolution (https://github.com/flarum/framework/pull/3076)
- Add cache control headers to the admin area (https://github.com/flarum/framework/pull/3097)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion extensions/package-manager/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ flarum-extension-manager:
update: Update

minor_update_confirmation:
content: This will also update any other extensions/packages with availabe updates.
content: This will also update any other extensions/packages with available updates.

sections:
control:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function handle(CheckForUpdates $command): array

/**
* Composer can sometimes return text above the JSON.
* This method tries to remove such occurences.
* This method tries to remove such occurrences.
*/
protected function cleanJson(string $composerOutput): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function removing_an_extension_works()
}

#[Test]
public function removing_a_non_existant_extension_fails()
public function removing_a_non_existent_extension_fails()
{
$response = $this->send(
$this->request('DELETE', '/api/extension-manager/extensions/flarum-potato', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function requiring_a_compatible_extension_with_specific_version_works()
}

#[Test]
public function requiring_an_uncompatible_extension_fails()
public function requiring_an_incompatible_extension_fails()
{
$response = $this->send(
$this->request('POST', '/api/extension-manager/extensions', [
Expand All @@ -95,7 +95,7 @@ public function requiring_an_uncompatible_extension_fails()
}

#[Test]
public function requiring_an_uncompatible_extension_with_specific_version_fails()
public function requiring_an_incompatible_extension_with_specific_version_fails()
{
$response = $this->send(
$this->request('POST', '/api/extension-manager/extensions', [
Expand Down
2 changes: 1 addition & 1 deletion extensions/subscriptions/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ flarum-subscriptions:
body: |
{poster_display_name} just posted in a discussion you're following: [{title}]({url}).

You won't recieve any more notifications about this discussion until you're up-to-date.
You won't receive any more notifications about this discussion until you're up-to-date.

##
# REUSED TRANSLATIONS - These keys should not be used directly in code!
Expand Down
2 changes: 1 addition & 1 deletion extensions/tags/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

### Fixed
- UI does not reflect bypass tag requirements permission (https://github.com/flarum/tags/pull/148).
- Occassional errors when deleting flagged posts (https://github.com/flarum/tags/pull/154)
- Occasional errors when deleting flagged posts (https://github.com/flarum/tags/pull/154)
- Tag discussion count doesn't adjust when deleting first/only post of the discussion (https://github.com/flarum/tags/pull/154)

## [1.1.0](https://github.com/flarum/tags/compare/v1.0.3...v1.1.0)
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/common/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default class Application {

caughtInitializationErrors.push(() =>
fireApplicationError(
extractText(app.translator.trans('core.lib.error.extension_initialiation_failed_message', { extension })),
extractText(app.translator.trans('core.lib.error.extension_initialization_failed_message', { extension })),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break all translations.

`${extension} failed to initialize`,
e
)
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/common/ExportRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface IExportRegistry {
add(namespace: string, id: string, object: any): void;

/**
* Add a function to run when object of id "id" is added (or overriden).
* Add a function to run when object of id "id" is added (or overridden).
* If such an object is already registered, the handler will be applied immediately.
*/
onLoad(namespace: string, id: string, handler: Function): void;
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/common/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const w = window as any;
* Proxy app. Common JS is run first, at which point `window.app` is not
* set as this is done by the namespaced JS.
*
* When the corrent value is set, this code would retain the reference to
* When the current value is set, this code would retain the reference to
* the original invalid value.
*
* By using a proxy, we can ensure that our `window.app` value is always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class DefaultResolver<

/**
* When a route change results in a changed key, a full page
* rerender occurs. This method can be overriden in subclasses
* rerender occurs. This method can be overridden in subclasses
* to prevent rerenders on some route changes.
*/
makeKey(): string {
Expand Down
20 changes: 10 additions & 10 deletions framework/core/js/src/common/utils/styleSelectedText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,19 @@ function makePrefix(index: number, unorderedList: boolean): string {
}

function clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] {
let undoResultOpositeList: UndoResult;
let undoResultOppositeList: UndoResult;
let undoResult: UndoResult;
let pristineText;
if (style.orderedList) {
undoResult = undoOrderedListStyle(selectedText);
undoResultOpositeList = undoUnorderedListStyle(undoResult.text);
pristineText = undoResultOpositeList.text;
undoResultOppositeList = undoUnorderedListStyle(undoResult.text);
pristineText = undoResultOppositeList.text;
} else {
undoResult = undoUnorderedListStyle(selectedText);
undoResultOpositeList = undoOrderedListStyle(undoResult.text);
pristineText = undoResultOpositeList.text;
undoResultOppositeList = undoOrderedListStyle(undoResult.text);
pristineText = undoResultOppositeList.text;
}
return [undoResult, undoResultOpositeList, pristineText];
return [undoResult, undoResultOppositeList, pristineText];
}

function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange {
Expand All @@ -316,7 +316,7 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa

// If the user intent was to do an undo, we will stop after this.
// Otherwise, we will still undo to other list type to prevent list stacking
const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText);
const [undoResult, undoResultOppositeList, pristineText] = clearExistingListStyle(style, selectedText);

const prefixedLines = pristineText.split('\n').map((value, index) => {
return `${makePrefix(index, style.unorderedList)}${value}`;
Expand All @@ -326,7 +326,7 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa
return previousValue + makePrefix(currentIndex, style.unorderedList).length;
}, 0);

const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {
const totalPrefixLengthOppositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {
return previousValue + makePrefix(currentIndex, !style.unorderedList).length;
}, 0);

Expand All @@ -348,9 +348,9 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa
selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0);
selectionEnd = selectionStart;
} else {
if (undoResultOpositeList.processed) {
if (undoResultOppositeList.processed) {
selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);
selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList;
selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOppositeList;
} else {
selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);
selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class DiscussionListPane extends Component {

$(document).on('mousemove', hotEdge);

// When coming from another discussion, scroll to the previous postition
// When coming from another discussion, scroll to the previous position
// to prevent the discussion list jumping around.
if (app.previous.matches(DiscussionPage)) {
const top = app.cache.discussionListPaneScrollTop || 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default class PostStreamScrubber extends Component {
heights.after = 100 - heights.before - heights.handle;

// If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS
// If a height change animation is already in progress, don't adjust height unless overriden
// If a height change animation is already in progress, don't adjust height unless overridden
if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return;

const func = options.animate ? 'animate' : 'css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class DiscussionPageResolver<
* Remove optional parts of a discussion's slug to keep the substring
* that bijectively maps to a discussion object. By default this just
* extracts the numerical ID from the slug. If a custom discussion
* slugging driver is used, this may need to be overriden.
* slugging driver is used, this may need to be overridden.
* @param slug
*/
canonicalizeDiscussionSlug(slug: string | undefined) {
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/forum/states/ComposerState.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class ComposerState {
}

/**
* Maxmimum height of the Composer.
* Maximum height of the Composer.
* @returns {number}
*/
maximumHeight() {
Expand Down
4 changes: 2 additions & 2 deletions framework/core/js/src/forum/states/GlobalSearchState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class GlobalSearchState extends SearchState {
// We can't do this in the constructor, as this class is instantiated
// before pages are rendered, and we need app.current.
if (!this.initialValueSet && this.currPageProvidesSearch()) {
this.intializeValue();
this.initializeValue();
}

return super.getValue();
}

protected intializeValue() {
protected initializeValue() {
this.setValue(this.getInitialSearch());
this.initialValueSet = true;
}
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/forum/utils/slidable.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* It relies on the element having children with particular CSS classes.
*
* The function returns a record with a `reset` proeprty. This is a function
* The function returns a record with a `reset` property. This is a function
* which reverts the slider to its original position. This should be called,
* for example, when a controls dropdown is closed.
*
Expand Down
4 changes: 2 additions & 2 deletions framework/core/locale/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ core:

# These translations are used by the Notifications dropdown, a.k.a. "the bell".
notifications:
delete_all_confirm: Are you sure you want to delete all notifications? This action is not reversable
delete_all_confirm: Are you sure you want to delete all notifications? This action is not reversible
delete_all_tooltip: Delete all notifications
discussion_renamed_text: "{username} changed the title"
empty_text: No Notifications
Expand Down Expand Up @@ -734,7 +734,7 @@ core:
circular_dependencies_message: "Circular dependencies detected: {extensions}. Aborting. Please disable one of the extensions and try again."
db_error_message: "Database query failed. This may be caused by an incompatibility between an extension and your database driver."
dependent_extensions_message: "Cannot disable {extension} until the following dependent extensions are disabled: {extensions}"
extension_initialiation_failed_message: "{extension} failed to initialize, check the browser console for further information."
extension_initialization_failed_message: "{extension} failed to initialize, check the browser console for further information."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break all translations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted both.
This is .typos.toml

[files]
extend-exclude = [
    ".git/",
    "**/dist/",
    "**/dist-typings/",
]
ignore-hidden = false

[default]
extend-ignore-re = [
    "\\bStichting Flarum\\b",
    "\\(follow\\|ignor\\)",
    "\\bqueue\\.failer\\b",
    "\\[[0-9a-f]{7}\\]",
]

[default.extend-words]
"encrypter" = "encrypter"
"invokable" = "invokable"
"responsable" = "responsable"

[default.extend-identifiers]
routeDatas = "routeDatas"
2018_09_15_041340_add_users_indicies = "2018_09_15_041340_add_users_indicies"
2018_09_15_041828_add_discussions_indicies = "2018_09_15_041828_add_discussions_indicies"
2018_09_29_060444_replace_emoji_shorcuts_with_unicode = "2018_09_29_060444_replace_emoji_shorcuts_with_unicode"
extension_initialiation_failed_message = "extension_initialiation_failed_message"

generic_message: "Oops! Something went wrong. Please reload the page and try again."
generic_cross_origin_message: "Oops! Something went wrong during a cross-origin request. Please reload the page and try again."
missing_dependencies_message: "Cannot enable {extension} until the following dependencies are enabled: {extensions}"
Expand Down
4 changes: 2 additions & 2 deletions framework/core/src/Extend/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Theme implements ExtenderInterface
/**
* This can be used to override `LESS` files that are imported within the code.
* For example, core's `forum.less` file imports a `forum/DiscussionListItem.less` file.
* The contents of this file can be overriden with this method.
* The contents of this file can be overridden with this method.
*
* @param string $file : Relative path of the file to override, for example: `forum/Hero.less`
* @param string $newFilePath : Absolute path of the new file.
Expand All @@ -41,7 +41,7 @@ public function overrideLessImport(string $file, string $newFilePath, ?string $e
/**
* This method allows overriding LESS file sources.
* For example `forum.less`, `admin.less`, `mixins.less` and `variables.less` are file sources,
* and can therefore be overriden using this method.
* and can therefore be overridden using this method.
*
* @param string $file : Name of the file to override, for example: `admin.less`
* @param string $newFilePath : Absolute path of the new file.
Expand Down
2 changes: 1 addition & 1 deletion framework/core/src/Foundation/ContainerUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ContainerUtil
* @param Container $container
*
* @return callable
* @internal Backwards compatability not guaranteed.
* @internal Backwards compatibility not guaranteed.
*/
public static function wrapCallback(callable|string $callback, Container $container): callable
{
Expand Down
2 changes: 1 addition & 1 deletion framework/core/src/Mail/FlarumLogTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessa
$string = quoted_printable_decode($string);
}

// Overriden to use info, so the log driver works in non-debug mode.
// Overridden to use info, so the log driver works in non-debug mode.
$this->logger->info($string);

return new SentMessage($message, $envelope ?? Envelope::create($message));
Expand Down
2 changes: 1 addition & 1 deletion framework/core/src/Notification/NotificationMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function (Message $message) use ($blueprint, $user) {
}

/**
* Retrives the email views from the blueprint, and enforces that both a
* Retrieves the email views from the blueprint, and enforces that both a
* plain text and HTML view are provided.
*
* @param MailableInterface&BlueprintInterface $blueprint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function setUp(): void

// We need to insert these outside of a transaction, because FULLTEXT indexing,
// which is needed for search, doesn't happen in transactions.
// We clean it up explcitly at the end.
// We clean it up explicitly at the end.
$this->database()->table('discussions')->insert($this->rowsThroughFactory(Discussion::class, [
['id' => 1, 'title' => 'lightsail in title', 'user_id' => 1],
['id' => 2, 'title' => 'lightsail in title too', 'created_at' => Carbon::createFromDate(2020, 01, 01)->toDateTimeString(), 'user_id' => 1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function custom_attributes_prioritize_child_classes()
}

#[Test]
public function custom_attributes_can_be_overriden()
public function custom_attributes_can_be_overridden()
{
$this->extend(
(new Extend\ApiResource(UserResource::class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function prepDb()

// We need to insert these outside of a transaction, because FULLTEXT indexing,
// which is needed for search, doesn't happen in transactions.
// We clean it up explcitly at the end.
// We clean it up explicitly at the end.
$this->database()->table('discussions')->insert([
Discussion::factory()->raw(['id' => 1, 'title' => 'DISCUSSION 1', 'user_id' => 1]),
Discussion::factory()->raw(['id' => 2, 'title' => 'DISCUSSION 2', 'user_id' => 1]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function providers_first_register_order_is_correct()
$this->app();

$this->assertEquals(
'overriden_by_custom_provider_register',
'overridden_by_custom_provider_register',
$this->app->getContainer()->make('flarum.forum.middleware')
);
}
Expand All @@ -54,7 +54,7 @@ public function providers_second_register_order_is_correct()
$this->app();

$this->assertEquals(
'overriden_by_second_custom_provider_register',
'overridden_by_second_custom_provider_register',
$this->app->getContainer()->make('flarum.forum.middleware')
);
}
Expand All @@ -72,7 +72,7 @@ public function providers_boot_order_is_correct()
$this->app();

$this->assertEquals(
'overriden_by_third_custom_provider_boot',
'overridden_by_third_custom_provider_boot',
$this->app->getContainer()->make('flarum.forum.middleware')
);
}
Expand All @@ -84,7 +84,7 @@ public function register()
{
// First we override the singleton here.
$this->app->extend('flarum.forum.middleware', function () {
return 'overriden_by_custom_provider_register';
return 'overridden_by_custom_provider_register';
});
}
}
Expand All @@ -93,9 +93,9 @@ class SecondCustomServiceProvider extends AbstractServiceProvider
{
public function register()
{
// Second we check that the singleton was overriden here.
// Second we check that the singleton was overridden here.
$this->app->extend('flarum.forum.middleware', function ($forumRoutes) {
return 'overriden_by_second_custom_provider_register';
return 'overridden_by_second_custom_provider_register';
});
}
}
Expand All @@ -106,7 +106,7 @@ public function boot()
{
// Third we override one last time here, to make sure this is the final result.
$this->app->extend('flarum.forum.middleware', function ($forumRoutes) {
return 'overriden_by_third_custom_provider_boot';
return 'overridden_by_third_custom_provider_boot';
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function custom_validation_rule_does_not_exist_by_default()
{
$this->app()->getContainer()->make(CustomUserValidator::class)->assertValid(['password' => 'simplePassword']);

// If we have gotten this far, no validation exception has been thrown, so the test is succesful.
// If we have gotten this far, no validation exception has been thrown, so the test is successful.
$this->assertTrue(true);
}

Expand Down Expand Up @@ -71,7 +71,7 @@ public function custom_validation_rule_doesnt_affect_other_validators()

$this->app()->getContainer()->make(CustomValidator::class)->assertValid(['password' => 'simplePassword']);

// If we have gotten this far, no validation exception has been thrown, so the test is succesful.
// If we have gotten this far, no validation exception has been thrown, so the test is successful.
$this->assertTrue(true);
}
}
Expand Down
Loading