chore: fix typos (#4021)

This commit is contained in:
Viktor Szépe 2024-10-21 17:00:56 +02:00 committed by GitHub
parent 084ae6fceb
commit 265d0e1dd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 47 additions and 47 deletions

View File

@ -40,7 +40,7 @@ body:
validations:
required: false
- type: textarea
id: enironment
id: environment
attributes:
label: Environment
value: |

View File

@ -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

View File

@ -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:
discover:

View File

@ -107,7 +107,7 @@ class CheckForUpdatesHandler
/**
* 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
{

View File

@ -37,7 +37,7 @@ class RemoveExtensionTest extends TestCase
}
#[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', [

View File

@ -77,7 +77,7 @@ class RequireExtensionTest extends TestCase
}
#[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', [
@ -95,7 +95,7 @@ class RequireExtensionTest extends TestCase
}
#[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', [

View File

@ -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!

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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 {

View File

@ -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 {
@ -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}`;
@ -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);
@ -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;

View File

@ -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;

View File

@ -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';

View File

@ -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) {

View File

@ -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;
}

View File

@ -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.
*

View File

@ -526,7 +526,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

View File

@ -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.
@ -41,7 +41,7 @@ class Theme implements ExtenderInterface
/**
* 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.

View File

@ -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
{

View File

@ -27,7 +27,7 @@ class FlarumLogTransport extends LogTransport
$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));

View File

@ -55,7 +55,7 @@ class NotificationMailer
}
/**
* 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

View File

@ -32,7 +32,7 @@ class ListWithFulltextSearchTest extends TestCase
// 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],

View File

@ -165,7 +165,7 @@ class ApiSerializerTest extends TestCase
}
#[Test]
public function custom_attributes_can_be_overriden()
public function custom_attributes_can_be_overridden()
{
$this->extend(
(new Extend\ApiResource(UserResource::class))

View File

@ -36,7 +36,7 @@ class SearchDriverTest extends TestCase
// 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]),

View File

@ -37,7 +37,7 @@ class ServiceProviderTest extends TestCase
$this->app();
$this->assertEquals(
'overriden_by_custom_provider_register',
'overridden_by_custom_provider_register',
$this->app->getContainer()->make('flarum.forum.middleware')
);
}
@ -54,7 +54,7 @@ class ServiceProviderTest extends TestCase
$this->app();
$this->assertEquals(
'overriden_by_second_custom_provider_register',
'overridden_by_second_custom_provider_register',
$this->app->getContainer()->make('flarum.forum.middleware')
);
}
@ -72,7 +72,7 @@ class ServiceProviderTest extends TestCase
$this->app();
$this->assertEquals(
'overriden_by_third_custom_provider_boot',
'overridden_by_third_custom_provider_boot',
$this->app->getContainer()->make('flarum.forum.middleware')
);
}
@ -84,7 +84,7 @@ class CustomServiceProvider extends AbstractServiceProvider
{
// 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';
});
}
}
@ -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';
});
}
}
@ -106,7 +106,7 @@ class ThirdCustomProvider extends AbstractServiceProvider
{
// 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';
});
}
}

View File

@ -40,7 +40,7 @@ class ValidatorTest extends TestCase
{
$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);
}
@ -71,7 +71,7 @@ class ValidatorTest extends TestCase
$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);
}
}

View File

@ -47,7 +47,7 @@ parameters:
# This assumes that the phpdoc telling it it's not nullable is correct, that's not the case for internal Laravel typings.
- message: '#^Property [A-z0-9-_:$,\\]+ \([A-z]+\) on left side of \?\? is not nullable\.$#'
# Ignore overriden classes from packages so that it's always easier to keep track of what's being overriden.
# Ignore overridden classes from packages so that it's always easier to keep track of what's being overridden.
- message: '#^Method Flarum\\Api\\Serializer\:\:[A-z0-9_]+\(\) has parameter \$[A-z0-9_]+ with no type specified\.$#'
- message: '#^Method Flarum\\Api\\Endpoint\\[A-z0-9_]+\:\:[A-z0-9_]+\(\) has parameter \$[A-z0-9_]+ with no type specified\.$#'