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

Fix typos #839

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Fix typos #839

wants to merge 5 commits into from

Conversation

szepeviktor
Copy link
Contributor

@szepeviktor szepeviktor commented Jan 3, 2025

Description of the Change

Introduce https://github.com/crate-ci/typos to ClassifAI.

@szepeviktor szepeviktor requested review from jeffpaul, dkotter and a team as code owners January 3, 2025 21:32
@szepeviktor szepeviktor changed the title Typos Fix typos Jan 3, 2025

[default]
extend-ignore-re = [
"\\bTung Du\\b",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not variable_names go here.

"\\bTung Du\\b",
]

[default.extend-words]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are parts of variable names.

# Typos
"weather" = "whether"

[default.extend-identifiers]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Complete variable names.

"Wordpress" = "WordPress"
"Woocommerce" = "WooCommerce"
"get_post_stati" = "get_post_stati"
"Automattic" = "Automattic"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means: DO NOT CORRECT

@jeffpaul jeffpaul requested review from iamdharmesh and removed request for a team, dkotter and jeffpaul January 3, 2025 21:37
@jeffpaul jeffpaul added this to the 3.3.0 milestone Jan 3, 2025
@@ -458,7 +458,7 @@ public function render_meta_box( \WP_Post $post ) {
</label>
</p>

<div class="classifai-clasify-post-wrapper" style="display: none;">
<div class="classifai-classify-post-wrapper" style="display: none;">
Copy link
Collaborator

Choose a reason for hiding this comment

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

While this is a typo, because this is used as a class name, we'll need to decide if we want to leave this as-is, as others may be relying on this class for styling purposes and updating this will break things for them. Not overly concerned but something for us to consider

@@ -870,7 +870,7 @@ input.classifai-button {
}

// Start: Classify Post Modal
.classify-post-componenet {
.classify-post-component {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In doing a quick search to see if the classify-post-componenet class was used elsewhere (and thus may need updated) it doesn't appear so. Seems all other places use the proper class name. What this means though is this style has not been applying so we'll need to do some QA here to ensure this style doesn't cause any problems

@@ -513,7 +513,7 @@ document.addEventListener( 'DOMContentLoaded', function () {
if ( classifaiNLUCheckbox ) {
classifaiNLUCheckbox.addEventListener( 'change', function () {
const classifyButton = document.querySelector(
'.classifai-clasify-post-wrapper'
'.classifai-classify-post-wrapper'
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we decide we don't want to change this class name (mentioned in another comment) we'll want to revert this change as well

@@ -158,7 +158,7 @@ const TaxonomyControls = ( { onChange, query } ) => {
// Append newTerm to taxoInfo.terms.
const terms = {
...taxoInfo.terms,
entitites: [
entities: [
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like this typo may have caused problems but would be curious to know if that was the case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

typos is a very useful tool. Not every day but the benefits are great on those days.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW tsc from Typescript does perform static analysis on JavaScript too.

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

Successfully merging this pull request may close these issues.

3 participants