Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
CCK fields and options are translated using i18n_cck submodule of the suite i18n, we need to migrate those respecting the language settings. It may be that options are done in a another patch.
Proposed resolution
Patch
Review
Commit
Remaining tasks
Add translations to test fixture
Write a test
Write a patch to migrate field labels and options.
Comment | File | Size | Author |
---|---|---|---|
#33 | interdiff-30-33.patch | 656 bytes | quietone |
#33 | 2959410-33.patch | 16.02 KB | quietone |
#30 | interdiff.txt | 750 bytes | quietone |
#30 | 2959410-30.patch | 16 KB | quietone |
#28 | 2959410-28.patch | 15.24 KB | jofitz |
Comments
Comment #2
quietone CreditAttribution: quietone at Acro Commerce commentedmaking progress but not ready to post anything
Comment #3
quietone CreditAttribution: quietone as a volunteer commentedThis migrates field label and description translation. The i18n_strings table includes rows for options as well. I've not checked to see if they can be done in the same migration.
Comment #4
quietone CreditAttribution: quietone as a volunteer commentedNeed to look at the option translations and determine if they must be done in a separate migration or included here.
Comment #5
quietone CreditAttribution: quietone as a volunteer commentedAs I suspected the options need to be migrated separately. Retitling and found a few things to change.
copy paste error
Another copy paste error
This can be reverted
Comment #6
quietone CreditAttribution: quietone as a volunteer commentedComment #7
quietone CreditAttribution: quietone as a volunteer commentedFixed the items in #5
Comment #8
mikeryanComment #9
mikeryanThe label should be more specific, like "Field label and description translation".
s/that/with/ ?
Probably out of scope here, but why are most (but not all) "French" translations in English?
test_planet
Comment #10
quietone CreditAttribution: quietone as a volunteer commented1. Fixed.
2. To test the migration continues with somewhat broken data. Added comment.
3. Because I am mono-lingual and I created the translations at different times for different issues. One on occasion I had a friend visiting who spoke French and he was able to translate a couple of items. The translations are either in the non English language and it is obvious or it is in English with a prefix of the two character language code for the language it should be written in.
4. Fixed
Comment #11
mikeryanLooks good, thanks!
Comment #13
mikeryanRetesting.
Comment #15
MixologicTestbot Snafu.
Comment #16
quietone CreditAttribution: quietone as a volunteer commentedThis too need the files moves to different directories. It is the migration that should be in content_translation, the rest in fields.
Comment #17
quietone CreditAttribution: quietone as a volunteer commentedThat was supposed to be NW
Comment #18
quietone CreditAttribution: quietone as a volunteer commentedMoved the source plugin, the source plugin test and the migration test to the field module.
Modified MigrateUpgradeReviewPageTest to enable config_translation. Then put 'i18ncck' into the list of what will be upgraded but also had to add 'i18nprofile' which wasn't in that list before because config_translation was not enabled.
Comment #19
quietone CreditAttribution: quietone as a volunteer commentedTesting with Postgres and sqlite just to be safe since #2886609: Migrate translations for D6 i18n taxonomy 'localized' terms failed on Postgres.
Comment #20
masipila CreditAttribution: masipila as a volunteer commentedThis was a big interdiff so cross checked it against what @quietone explained in #18.
The changes in the interdiff are:
1. class FieldLabelDescriptionTranslation has moved from config_translation to field
2. class MigrateFieldInstanceLabelDescriptionTest has moved from config_translation to field
3. class FieldInstanceLabelDescriptionTranslationTest has moved from config_translation to field
-- These 3 things are exactly as @quietone wrote in #18 and this change makes sense to me.
4. Finally, at the very end of the interdiff, MigrateUpgrade6ReviewPageTest has the changes @quietone listed in #18 (config_translation enabled, 'i18ncck' and 'i18nprofile' are now in the list of what will be upgraded) which also is OK.
Conclusion: All changes since the last RTBC make sense and there are no open items since the last RTBC.
All tests with MySQL, SQLite and PostgreSQL are green. RTBC.
Cheers,
Markus
Comment #22
masipila CreditAttribution: masipila as a volunteer commentedNeeds re-roll
Comment #23
quietone CreditAttribution: quietone as a volunteer commentedReroll.
Comment #24
quietone CreditAttribution: quietone as a volunteer commentedReroll passes tests for all dbs so ready for review
Comment #25
heddnDiff stats the same here between #18 and #23. Back to RTBC.
Comment #28
jofitz CreditAttribution: jofitz at ComputerMinds commentedPatch from #23 no longer applies. Re-rolled.
Comment #30
quietone CreditAttribution: quietone as a volunteer commentedi18ncck is now available for MigrateUpgrade6Test, so move it from MissingPaths to AvailablePaths.
Comment #31
quietone CreditAttribution: quietone as a volunteer commentedAdded tests for PostgreSQL and SQLite.
Comment #32
masipila CreditAttribution: masipila as a volunteer commentedThanks for the re-roll Jo Fitzgerald!
@quietone, I think we need to add the 'Multilingual' migration tag to this, right?
Markus
Comment #33
quietone CreditAttribution: quietone as a volunteer commentedOh! Yes, it does. Thx masipila!
Comment #35
quietone CreditAttribution: quietone as a volunteer commentedI named the interdiff wrong (again) so the fail above is a fail on an interdiff. The tests are really passing.
Comment #36
masipila CreditAttribution: masipila as a volunteer commentedThis was RTBC in #25. Changes since that are
1. i18ncck is now available for MigrateUpgrade6Test, so move it from MissingPaths to AvailablePaths
2. Multilingual tag was added.
All tests are green so back to RTBC.
Markus
Comment #37
masipila CreditAttribution: masipila as a volunteer commentedComment #40
catchCommitted/pushed to 8.7.x and cherry-picked to 8.6.x. Thanks!