Problem/Motivation

Current proposal is to fix the following 29 words, related to migrate translations. Some of the words refer to to D6 modules names, or database column names. Tests with non-English language words have been changed to use English words.
-aimez
-cette
-cnfi
-cochez
-faible
-gato
-heke
-huhuu
-ingoa
-j'aime
-leftjoin
-localizable
-ltlanguage
-maailma
-mlids
-moyenne
-nodereference
-objectindex
-overwritable
-redirections
-sivun
-tnid
-tsid
-userreference
-

vous

Steps to reproduce

Proposed resolution

Remaining tasks

Review
Commit
Smile

CommentFileSizeAuthor
#71 3209249-71.patch66.98 KBquietone
#71 diff-68-71.txt1.25 KBquietone
#68 3209249-68.patch67.38 KBquietone
#68 diff-66-68.txt3.57 KBquietone
#66 3209249-66.patch67.86 KBquietone
#66 interdiff-65-66.txt2.61 KBquietone
#65 3209249-65.patch67.88 KBquietone
#65 interdiff-56-65.txt2.04 KBquietone
#60 3209249-nr-bot.txt85 bytesneeds-review-queue-bot
#56 3209249-56.patch67.88 KBquietone
#56 interdiff-55-56.txt11.73 KBquietone
#55 3209249-55.patch70.84 KBsmustgrave
#55 interdiff-53-55.txt2.01 KBsmustgrave
#53 3209249-53.patch72.2 KBsmustgrave
#53 diff-50-53.txt11.72 KBsmustgrave
#50 3209249-50.patch76.91 KBsmustgrave
#49 3209249-nr-bot.txt85 bytesneeds-review-queue-bot
#48 3209249-48.patch76.91 KBsmustgrave
#48 interdiff-44-48.txt344 bytessmustgrave
#47 3209249-nr-bot.txt46.64 KBneeds-review-queue-bot
#46 3209249-46.patch2.23 MBsmustgrave
#46 interdiff-44-46.txt2.15 MBsmustgrave
#44 3209249-44.patch77.43 KBsmustgrave
#44 diff-42-44.txt2.91 KBsmustgrave
#42 3209249-42.patch77.42 KBsmustgrave
#42 interdiff-38-42.txt646 bytessmustgrave
#38 3209249-38.patch77.4 KBsmustgrave
#38 interdiff-36-38.txt5.27 KBsmustgrave
#36 3209249-36.patch80.52 KBsmustgrave
#36 interdiff-34-36.txt1.35 KBsmustgrave
#34 3209249-34.patch82.66 KBsmustgrave
#34 diff-28-34.txt5.75 KBsmustgrave
#28 reroll_diff_3209249_25-28.txt3.9 KBankithashetty
#28 3209249-28.patch83.28 KBankithashetty
#25 3209249-25.patch83.27 KBquietone
#25 interdiff-22-25.txt1.55 KBquietone
#22 3209249-22.patch83.27 KBquietone
#22 diff-15-22.txt22.09 KBquietone
#18 3209249-15.patch87.4 KBquietone
#18 diff-14-15.txt2.06 KBquietone
#17 3209249-14.patch87.68 KBquietone
#17 diff-14-17.txt10.47 KBquietone
#14 3209249-14.patch87.68 KBquietone
#14 interdiff-11-14.txt5.61 KBquietone
#11 3209249-11.patch83.34 KBquietone
#11 interdiff-5-11.txt79.23 KBquietone
#8 interdiff_5_8.txt894 byteskapilv
#8 3209249-8.patch102.86 KBkapilv
#5 3209249-5.patch102.85 KBquietone
#5 interdiff-4-5.txt7.13 KBquietone
#4 3209249-4.patch95.48 KBquietone
#4 interdiff-3-4.txt2.63 KBquietone
#3 3209249-3.patch96.71 KBquietone
#3 interdiff-2-3.txt42.21 KBquietone
#2 3209249-2.patch57.47 KBquietone

Issue fork drupal-3209249

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

quietone’s picture

StatusFileSize
new57.47 KB

Not ready to test this. I thinking of doing the fixed for migrate.api.php.

quietone’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new42.21 KB
new96.71 KB

Adding changes for all the translation related files.

quietone’s picture

StatusFileSize
new2.63 KB
new95.48 KB

Fix line length in 2 yml files and remove changes to highwater. I made a start on high water but then stopped and switched to fixing the translation related spelling and I thought those changes were removed. I will look at highwater next.

quietone’s picture

StatusFileSize
new7.13 KB
new102.85 KB

According to MerriamWebster 'high-water' is an adjective and 'high water' a noun. I have attempted to make those changes. There are two files where 'Highwater' is ignored to allow for \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::aboveHighwater.

quietone’s picture

Issue summary: View changes

There are still more migrate related words but I think this patch is already big enough.

Ready for review.

quietone’s picture

+++ b/core/modules/migrate_drupal/migrations/state/migrate_drupal.migrate_drupal.yml
@@ -1,7 +1,7 @@
+# cspell:ignore blogapi calendarsignup ctools datepicker ddblock entityreference filefield imageapi imagefield imagemagick multiupload nodereference userreference

Split to two lines.

There are a lot of changes in here so the wee change above can be done after this is reviewed.

kapilv’s picture

StatusFileSize
new102.86 KB
new894 bytes

Addressed #7.

longwave’s picture

Status: Needs review » Needs work

The cspell:ignore prefix needs to appear at the start of each line after wrapping.

longwave’s picture

  1. +++ b/core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php
    @@ -2,6 +2,8 @@
    +// cspell:ignore objectid objectindex
    

    I wonder if these should just remain in the dictionary, as we have to exclude them a lot of times.

  2. +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php
    @@ -4,7 +4,7 @@
    +// cspell:ignore optionwidgets selectlist objectid objectindex
    

    So far we have conventionally put ignore lists in alphabetical order.

  3. +++ b/core/modules/migrate/src/Event/MigrateEvents.php
    @@ -167,10 +169,10 @@ final class MigrateEvents {
    -   * logged by the idmap. The event listener method
    +   * logged by the ID map. The event listener method
        * receives a \Drupal\migrate\Event\MigrateIdMapMessageEvent instance.
    

    Wrapping here is a bit weird, maybe we should fix while we are here?

  4. +++ b/core/modules/migrate/src/Event/MigrateEvents.php
    @@ -179,6 +181,6 @@ final class MigrateEvents {
    -  const IDMAP_MESSAGE = 'migrate.idmap_message';
    +  const IDMAP_MESSAGE = 'migrate.id_map_message';
    

    Is this safe to change? Can we assume users will always refer to the constant and not the actual string?

Also regarding

There are two files where 'Highwater' is ignored to allow for \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::aboveHighwater.

Can we be sneaky here and rename the method to ::aboveHighWater? It is backward compatible as method names are not case sensitive in PHP.

quietone’s picture

Title: Fix spelling for more migrate related words » Fix spelling for migrate translation related words
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new79.23 KB
new83.34 KB

I have re scoped this to be only about migrate related translation. It just makes a nice grouping. The word list has been changed and I think I have split everything out correctly.

#10.1 I see your point I just don't know if 'a lot of times' should be a criteria for spelling. On the other hand 'langcode' is used is 2,026 files so maybe there is merit in the idea. For the case here, objectid and opbjectindex are not a spelling mistake, they are technical words and that supports your view that they stay in the dictionary. On the other hand, we already have ignores in for other technical and Drupal words such as zettabytes and nodeapi. Where does one draw the line? For myself, I would love to explore the topic, perhaps in the Meta.

For now, since the work is done can we leave it?

#10.2 Hopefully everything in order now.
#10.3 and 4. I'm going to move this to another issue.

quietone’s picture

I think I will add localizable to this as well.

spokje’s picture

Can I be the grumpy old man that points out that we're putting a lot of effort in, but we don't (as far as I'm aware) have something to prevent the next user that comes along, to simply re-add words like nodereference?

With Coding Standards we make sure we have sniffs in Coder in place, is there something similar for cspell? Would this at all be possible?

</grumpyOldManMode>

quietone’s picture

Title: Fix spelling for migrate translation related words » Fix spelling for 39 migrate translation related words
Issue summary: View changes
StatusFileSize
new5.61 KB
new87.68 KB

@Spokje The files in patches are spell checked by the testbot so no new misspelled words can creep into the code. The only ones that can will those in dictionary.txt or are explicitly ignored with a cspell:ignore line. The first is being handled by removing words from dictionary.txt and the latter will be caught during patch review.

This add a few more words. I considered rewording comments to remove localizable but did not do that because the text is a direct copy of code from the Drupal 6/7 codebase.

spokje’s picture

@quietone: Thanks for clearing that up :)

longwave’s picture

I propose an alternative method of dealing with a number of these misspelled words that begin with "n" due to them being prefixed with "i18n" in #3210694: Ignore i18n-prefixed words in spellcheck

quietone’s picture

Title: Fix spelling for 39 migrate translation related words » Fix spelling for 31 migrate translation related words
Issue summary: View changes
StatusFileSize
new10.47 KB
new87.68 KB
quietone’s picture

StatusFileSize
new2.06 KB
new87.4 KB

Silly me, didn't update dictionary.txt.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

longwave’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
quietone’s picture

Title: Fix spelling for 31 migrate translation related words » Fix spelling for 29 migrate translation related words
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new22.09 KB
new83.27 KB

Rerolled and ran spellcheck on core.

vikashsoni’s picture

#22 Patch applied successfully
After patch spelling related issue has been fixed
Thanks for the patch

spokje’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

error: patch failed: core/misc/cspell/dictionary.txt:249
I'm sorry I found this one too late to RTBC, looks like it needs Yet Another Reroll.

quietone’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.55 KB
new83.27 KB

Rerolled.

spokje’s picture

Status: Needs review » Reviewed & tested by the community

LGTM

quietone’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Sigh, this has been failing since Jan 12

ankithashetty’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new83.28 KB
new3.9 KB

Rerolled the patch in #25, thanks!

longwave’s picture

+++ b/core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php
@@ -11,7 +11,7 @@
+ * Creates a key value collection for migrated node translation re-directions.

I am not sure this is correct. While "redirections" isn't a dictionary word I don't think replacing it with just "re-directions" helps - to me this is now harder to read than before.

We could either keep "redirections" in the dictionary or replace this with just "redirects" or something like "mappings" which makes sense in this context.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue tags: +cspell error

Adding tag for the cspell spelling error issues.

smustgrave’s picture

Status: Needs review » Needs work

For a 10.1 patch

Also to address feedback in #29.

Please try to address the feedback before rerolling.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new5.75 KB
new82.66 KB

Had trouble with the interdiff so uploaded a diff.
Addressed #29 by using "mapping" as I agree that made more sense.
Rerolled for 10.1

longwave’s picture

Status: Needs review » Needs work

Following #3210694: Ignore i18n-prefixed words in spellcheck we should not need cspell:ignore for nblocks, nprofile, nstrings, ntaxonomy, etc?

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new1.35 KB
new80.52 KB

Removed those cspell lines

longwave’s picture

Status: Needs review » Needs work

Still several instances of ncck, nmenu, nstrings, ntaxonomy that should be able to be removed.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new5.27 KB
new77.4 KB

Thanks removed more of those instances.

Status: Needs review » Needs work

The last submitted patch, 38: 3209249-38.patch, failed testing. View results

smustgrave’s picture

Status: Needs work » Needs review

Seems to be a random failure.

quietone’s picture

Status: Needs review » Needs work
smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new646 bytes
new77.42 KB

Rerolled

quietone’s picture

Status: Needs review » Needs work

No longer applies

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new2.91 KB
new77.43 KB

Rerolled

quietone’s picture

Status: Needs review » Needs work

I started to review this.

I compared the word list in the patch to the the word list in the issue summary and they don't match. I applied the patch and searched for non-migration related files that are changed. They are 9

     1     core/lib/Drupal/Core/Menu/MenuTreeStorage.php
     2     core/misc/cspell/dictionary.txt
     3     core/modules/book/src/BookManagerInterface.php
     4     core/modules/book/src/BookManager.php
     5     core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
     6     core/modules/menu_ui/tests/src/Functional/MenuUiTest.php
     7     core/modules/node/tests/src/Functional/Views/NodeFieldTokensTest.php
     8     core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
     9     core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
    10     core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php

I then looked at those changes, with the following comments.

  1. mlid, plid are a Drupalisms used in D8+ and not specific to migrate so we should remove that from the list.
  2. chien chiens is used in a Translation test, so that should be removed from the list.
  3. tnid is used in #7 and #8. Is that old code from D7?
smustgrave’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new2.15 MB
new2.23 MB

Removed mlid and plid from IS
Removed chien chiens
And yes tnid seems to be specific to D7

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new46.64 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new344 bytes
new76.91 KB

#46 was the wrong patch.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new85 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new76.91 KB

error: patch failed: core/misc/cspell/dictionary.txt:974
error: core/misc/cspell/dictionary.txt: patch does not apply

Was an issue with word "vous"

quietone’s picture

Status: Needs review » Needs work
  • +++ b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php
    @@ -12,6 +12,8 @@
    +// cspell:ignore mlid
    

    From #45 mlid is a Drupalism. We should keep the word in the dictionary. And that means removing all the ignore lines. :-(

  • +++ b/core/misc/cspell/dictionary.txt
    @@ -885,7 +863,6 @@ pjpeg
    -plid
    

    Same here.

  • +++ b/core/misc/cspell/dictionary.txt
    @@ -1265,7 +1240,6 @@ titlealert
    -tnid
    
    +++ b/core/modules/node/tests/src/Functional/Views/NodeFieldTokensTest.php
    @@ -43,7 +43,6 @@ public function testViewsTokenReplacement() {
    -      'tnid' => 0,
    
    +++ b/core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php
    @@ -8,6 +8,8 @@
    +// cspell:ignore tnid
    

    The first test is removing tnid and the second is adding an ignore line. They should do the same thing. What needs to happen is to remove the lines with 'tnid' from the test. I am almost tempted to say that changing these two tests should be in a separate issue. However, I think it is pretty easy to show that tnid is not used in D8+.

    +++ b/core/misc/cspell/dictionary.txt
    @@ -183,8 +181,6 @@ checkboxified
    -chien
    -chiens
    

    Per #45 these are used in a non migration translation test and should not be changed.

    Sorry that my comment in #45 was not clear.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new11.72 KB
new72.2 KB

Attempted to address #51

longwave’s picture

Status: Needs review » Needs work
+++ b/core/modules/content_translation/migrations/d6_menu_links_translation.yml
@@ -1,3 +1,4 @@
+# cspell:ignore mlid

If we're keeping mlid in the dictionary we do not need any ignore lines for it. Same with plid.

Not sure what we should do about tnid - this was a Drupalism in D6/D7 ("translated node ID") but it is not used in D8+.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new2.01 KB
new70.84 KB

Addressed #54

quietone’s picture

StatusFileSize
new11.73 KB
new67.88 KB

I should just be reviewing this but I have made changes for plid.

There were still ignore lines for plid so I have removed those. That means that mlid and plid are in the dictionary because there are still instances in core that are not migrate that are using those. That leaves tnid, which has two instances in core outside of migrate and those two are being removed because tnid is not used in Drupal 8+. Those two seems to be left over when moving to Drupal 8.

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Removed
-chien
-chiens
From the issue summary.

Searching the rest I see they have been removed successfully from the dictionary.txt file.

longwave’s picture

  1. +++ b/core/misc/cspell/dictionary.txt
    @@ -980,7 +958,6 @@ rebuilder
    -redirections
    

    I know I mentioned this before but I'm not convinced that "redirections" should be disallowed; we use "redirection" as a noun so pluralising it is OK? I don't think "re-directions" is better; it passes the spellcheck but doesn't have the same meaning, to me.

  2. +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php
    @@ -5,6 +5,7 @@
    +// cspell:ignore localizable
     /**
    

    Missing blank line between cspell comment and docblock.

  3. +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
    @@ -7,8 +7,8 @@
    +// cspell:ignore entityreference filefield imagefield nodereference
    +// cspell:ignore optionwidgets userreference
     /**
    

    Same.

I would have fixed the latter two on commit but I'm still not sure about the first.

longwave’s picture

Status: Reviewed & tested by the community » Needs review
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new85 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

bharath-kondeti made their first commit to this issue’s fork.

bharath-kondeti’s picture

Status: Needs work » Needs review

Addressed 2 and 3 points from #58 and raised an MR with the changes.

bharath-kondeti’s picture

Status: Needs review » Needs work

Moving back to NW as Point 1 from #58 still needs to addressed.

quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new2.04 KB
new67.88 KB

I came here to get this back to NR.
I see it has been converted to an MR, which is not necessary here. This was already RTBC and only minor changes are needed. I also see that there is no diff or anything to show that the MR is correct. Therefor I made an diff between the MR and the patch in #56 and found it was introducing an error. It was adding tsid back to the dictionary.

I am now rerolling this based on #56. This is a re-roll only.

quietone’s picture

StatusFileSize
new2.61 KB
new67.86 KB

Now to address #58 and #29.

1. Changed to 'redirects'
2,3 Done.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @quietone for cleaning that up.

quietone’s picture

Issue tags: +Needs followup
StatusFileSize
new3.57 KB
new67.38 KB

Rerolled and re-built the dictionary. When rebuilding the dictionary it added 'please', which we don't want. So, I have removed that from the dictionary in this patch. A followup is needed to investigate the 'please' in COPYRIGHT.txt.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
quietone’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.25 KB
new66.98 KB

Simple reroll. The only changes were to dictionary.txt, which I rebuild as well.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Reroll looks good. Hopefully can commit this one soon.

  • lauriii committed 418ce000 on 11.x
    Issue #3209249 by quietone, smustgrave, bharath-kondeti, ankithashetty,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @quietone and @smustgrave! Committed 418ce00 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.