Problem
- Enabling extra core modules after installation in a no English language throws missing index all over the place.
- Also make sure to run import when adding a new languages
- Also make sure to run the import on module enable for all enabled languages
Reproduce
Install with another language then English, then enable an extra core module. New translation is imported but then locale.bulk.inc throws error trying to processes the missing 'language' element in array(options).
We also prob. need tests coverage for this.
Comment | File | Size | Author |
---|---|---|---|
#13 | i1751326-test-do-not-test.patch | 2.08 KB | attiks |
#8 | i1751326-test.patch | 1.88 KB | attiks |
#1 | language_empty_array_fix.patch | 1.03 KB | steinmb |
Comments
Comment #1
steinmb CreditAttribution: steinmb commentedLet's get rid of those pesky index warnings first.
Comment #2
larowlanComment #3
attiks CreditAttribution: attiks commentedapplies cleanly and works
Comment #4
Gábor HojtsyComment #5
Gábor HojtsyMaybe better title. Also still need tests. Should be as simple as setting the dir to the simpletest translations dir, and then enable a module and see what happens :)
Comment #6
attiks CreditAttribution: attiks commentedComment #7
attiks CreditAttribution: attiks commentedX-post
Comment #8
attiks CreditAttribution: attiks commentedfailing test
Comment #10
YesCT CreditAttribution: YesCT commentedJust some small coding style item. http://drupal.org/node/1354#general
These comments should be sentences.
Like:
// Manually set the code for the language to match the test translation file.
and:
// Set the English name for the langage.
Comment #11
LoMo CreditAttribution: LoMo commentedI was able to replicate the issue and can confirm that the first (passing) patch applies cleanly and does what we need it to. No notices are displayed when enabling additional core modules and the localization import works properly, too.
Comment #12
attiks CreditAttribution: attiks commentedComment #13
attiks CreditAttribution: attiks commentedlatest patch, untestable of the issues in #12
Comment #14
attiks CreditAttribution: attiks commentedPart of this will be fixed by #1658842: Introduce a translations:// stream wrapper to access the .po file directory
Comment #15
Gábor HojtsyTagging for interface translation.
Comment #16
Gábor HojtsyWhat else is left? @penyaskito, @attiks are you still experiencing this?
Comment #17
attiks CreditAttribution: attiks commentedI think #12 still needs to be done, but not even sure if it's still a problem.
Let's try a retest first
Comment #18
attiks CreditAttribution: attiks commented#1: language_empty_array_fix.patch queued for re-testing.
Comment #19
LoMo CreditAttribution: LoMo commentedHi attiks and Gábor,
Looks like the patch no longer applies properly... but also seems that we no longer have the long list of notices when following the "steps to replicate". Currently, I'm also not seeing much in the way of interface translation import happening, either (see #1785250: Undefined index: langcode in locale_translate_batch_import() and translations not imported), but even after making a small change that seems to correct that issue, when enabling another core module, I see UI translation take place (new strings imported), and no list of notices like we had before.
I think this might have been resolved by other fixes(?) I was going to see if I could re-roll the patch, but it really seems that the patch is no longer needed.
Comment #20
attiks CreditAttribution: attiks commentedi think it's save to close this, if the problem appears again, feel free to re-open this. i noticed the problem while working on the translations:// patch, but i didn't saw if last week.
@lomo thanks for testing.
Comment #21
LoMo CreditAttribution: LoMo commentedRight... I agree that it should be closed (at least for now). And thank you for all you are doing, Peter. It was nice seeing you in Munich. :-)
Anyway, while I didn't see lots of notices (earlier symptoms for this issue), I did see things not working at all properly and one notice that hinted why; I didn't see translations getting properly imported till I added the bit in #1785250: Undefined index: langcode in locale_translate_batch_import() and translations not imported. I'm wondering if someone can reproduce the issue I was seeing and verify or improve my patch. It's likely that you could reproduce the issue I observed even if installing in English, then adding another language, changing to it, and activating modules which trigger new string translation imports.
Comment #22
Gábor HojtsyMoving off of the sprint.
Comment #22.0
Gábor HojtsyUpdated issue summary.