Closed (fixed)
Project:
Localization update
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2016 at 12:45 UTC
Updated:
16 Dec 2016 at 17:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Stevel commentedFirst attempt to fix some of the bugs.
Tests failing without patch:
Update translations using cron: 58 passes, 2 fails, 0 exceptions, and 24 debug messages
Update translations: 168 passes, 12 fails, 1 exception, and 52 debug messages (test aborted due to exception)
Tests still failing with patch:
Update translations: 616 passes, 14 fails, 0 exceptions, and 246 debug messages
Comment #3
Stevel commentedUnassignign myself for now
Comment #4
sutharsan commentedSuper that you are working on this!
Comment #5
Stevel commentedSome strings that are used in the test are imported from l.d.o when the 'de' language is enabled, overwriting the non-customized strings.
Proposed solution: switch to using strings that are not used in modules enabled for the test or in drupal core
Comment #6
Stevel commentedSome more progress. This patch adds a context 'l10n_update test' to all strings used for the test, so they don't interfere with existing strings.
Status with new patch:
Update translations: 624 passes, 2 fails, 0 exceptions, and 244 debug messages
The remaining fails are caused by a non-matching line
One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed., I think because the translations from Drupal core are also downloaded.A possible solution would perhaps be to switch to using a language not present on l.d.o instead of german for the tests.
Comment #7
Stevel commentedSwitching the test languages to custom languages makes the
One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed.line return 0 translations for both add, update and remove. I commented out these tests adding an @TODO.The languages used are prefixed with 'x-' (private use language codes according to RFC4646). The filenames of the po files have been changed accordingly. This removes the need of context for the test strings, since they are not translated in drupal.org
This patch should make the tests go green!
Comment #8
Stevel commentedHmm, apparently I forgot to run the other tests with the last patch, still causing some errors. Here's a new one.
Comment #9
sutharsan commentedI understand the rational behind using 'x-de', but the test should not go out at all. That makes the testbot dependent on external environment. I remember did something to prevent this in a more general way, but can't remember how. I expect this to be present in the D8 core test for Local module.
Comment #10
Stevel commentedThat makes sense, indeed. I added drupal to the list of disabled projects, which should prevent checking on ftp.drupal.org.
This removes the need to use a non-existing language, making the patch significantly smaller. Still, I didn't really work out the counts of the added/updated/removed translations.
Comment #11
Stevel commentedThis should also fix some issues when running tests with a git-based release.
Comment #13
sutharsan commentedGreat work!
All test pass locally. At last, let's make this module test-covered.