The d7_dump fixture needs at least one translated node for #2669964: Migrate Drupal 7 core node translations to Drupal 8. This is enough for one issue because working with the dumps is prone to unexpected problems. And it will allow the discussion of the logic of migrating D7 translations to continue without interruption.
The D7 dump already has a language installed, Icelandic. I added a translation of an existing node and created a patch. The resulting patch is 1.2M in size, the same size of the fixture. I was put off by the size and didn't run any tests on that. Any ideas on improving that are welcome.
Comment | File | Size | Author |
---|---|---|---|
#22 | interdiff.txt | 746 bytes | quietone |
#22 | d7_dump_2785241-22.patch | 9.81 KB | quietone |
#20 | interdiff.txt | 1.09 KB | quietone |
#20 | d7_dump_2785241-20.patch | 10.3 KB | quietone |
#17 | d7_dump_2785241-17.patch | 11.16 KB | quietone |
Comments
Comment #2
Gábor HojtsyDo you have the patch that you can share so we can take a look at what changed? Its hard to provide ideas without seeing what you have.
Comment #3
quietone CreditAttribution: quietone as a volunteer commentedGot over my initial shock and started again. This one is much smaller and I suspect that I ran an update on the previous attempt and that might be the reason for the size.
Comment #5
quietone CreditAttribution: quietone as a volunteer commentedThe three failures are from tests that limit the node migrations to the test_content_type. But the translated node is of the type article. So, two choices. One, add 'd7_node:article' to those tests which should fix the tests. And two, change the fixture to have a translation of the existing test_content_type node. Right now I prefer the later, after all it is the test_content_type and also it has additional fields. But it is late, and I'll look at this tomorrow.
Comment #6
quietone CreditAttribution: quietone as a volunteer commentedMade the patch and removed changes not needed, like changes to variables and items in actions and aggregator, login times etc. Probably could remove more?
Are there any more changes needed?
Comment #8
quietone CreditAttribution: quietone as a volunteer commentedThe path of using the test_content_type required too many changes. I'd prefer to keep it simple. So back to having the translated node be of type article.
Comment #9
Gábor HojtsyThere is a whole bunch of unrelated changes like this with version numbers. We should not do this, we don't need this for translations.
There are a whole bunch of new contrib modules added here, those should not be added either.
Comment #10
Gábor HojtsyRemoving those extra things would I think shave off two thirds of the patch if not more.
Comment #11
quietone CreditAttribution: quietone as a volunteer commented@Gábor Hojtsy. thanks for spotting those! I was just shutting down when I got your IRC msg. I did mean to mention that it will still need some cleanup and that it is too late and I'm too bleary eyed to do more. Seems I was too tired to even write that.
Busy day tomorrow, so maybe on the weekend....
Comment #12
quietone CreditAttribution: quietone as a volunteer commentedSeems I do have some time since the errands this morning all went smoothly. This time, more aggressive at removing unnecessary changes in the dump.
Comment #14
quietone CreditAttribution: quietone as a volunteer commentedComment #17
quietone CreditAttribution: quietone as a volunteer commentedthx to phenaproxima for pointing out the error in the test output that I missed 3x!
Comment #18
quietone CreditAttribution: quietone as a volunteer commentedRight, that is better.
For review check that
Comment #19
Gábor HojtsyLooks good other than:
These locale strings are definitely not needed.
Why is this needed?
Also i18n blog settings seems to be moved around which is also not needed right?
Comment #20
quietone CreditAttribution: quietone as a volunteer commentedThx, those are removed.
Comment #22
quietone CreditAttribution: quietone as a volunteer commentedHmm, sorry that was sloppy. (But the baby is changed and not fretting anymore).
Anyway, for the points in #19.
1. Removed
2. Doesn't seem to be needed. Removed
i18n blog settings put back where it was. That can be addressed the next time the dump is updated.
Comment #23
Gábor HojtsyLooks good to me. Tests are updated accordingly. Will make good use of this in #2669964: Migrate Drupal 7 core node translations to Drupal 8 :)
Comment #24
alexpottCommitted and pushed 437ebf7 to 8.3.x and 5115c5b to 8.2.x and c5ce862 to 8.1.x. Thanks!
Comment #28
Gábor HojtsyYay, thanks!
Comment #29
klausiThe change here to menu_override_parent_selector in drupal7.php does not make sense for other tests, see #2794699: MigrateMenuSettingsTest.php is not in the correct location.
Discovered while running Drupal core phpunit tests on Travis CI https://travis-ci.org/klausi/drupal/jobs/157292466