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

chore: fix typos #4021

merged 6 commits into from
Oct 21, 2024

Conversation

szepeviktor
Copy link
Contributor

Changes proposed in this pull request:

Found few misspellings.

Reviewers should focus on:

Please be gentle with me. I am not a Flarum user.

https://github.com/crate-ci/typos

@szepeviktor szepeviktor requested a review from a team as a code owner September 20, 2024 18:44
Copy link
Member

@SychO9 SychO9 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

But please undo any changes made to migration files, as that'll break existing flarum installations.

@szepeviktor
Copy link
Contributor Author

Okay. Reverting ...

Copy link
Member

@luceos luceos left a comment

Choose a reason for hiding this comment

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

I think we should prevent locale strings as they will break all language packs.

In addition, although it makes sense to run a typo package once to create this PR. I'd rather see something like this be made part of our pipeline with the proper folders configured to check.

Opinions?

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

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

@DavideIadeluca
Copy link
Contributor

DavideIadeluca commented Oct 13, 2024

@luceos I stumbled across https://github.com/codespell-project/actions-codespell which also allows making it part of the pipeline like you were mentioning.

Check out https://github.com/codespell-project/codespell/blob/main/README.rst how it works and see it in action at https://github.com/glowingblue/flarum-framework-2.x/actions/runs/11314056207/job/31463551626. Definitely needs some fine-tuning, though.

Opinions on adopting such a workflow?

@szepeviktor
Copy link
Contributor Author

Typos is a superior product. Also has a built-in GHA action.
Please consider using it. Configuration above!
https://github.com/crate-ci/typos

@SychO9
Copy link
Member

SychO9 commented Oct 21, 2024

Imo, the pipeline is already intense as it is, with frontend typings and format checking, + backend tests for various environements. I'd rather see a typo PR before every release, then more failures or auto commits just for typos.

# Conflicts:
#	framework/core/js/src/forum/states/ComposerState.tsx
@SychO9 SychO9 changed the title Fix typos chore: fix typos Oct 21, 2024
@SychO9 SychO9 added this to the 2.0 milestone Oct 21, 2024
@SychO9 SychO9 merged commit 265d0e1 into flarum:2.x Oct 21, 2024
18 checks passed
@szepeviktor
Copy link
Contributor Author

Glad to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants