Comments

miro_dietiker’s picture

Issue tags: +test candidate

Tagging as test candidate.

Related to
#1177640: Add own explicit base url to send reliably

berdir’s picture

Status: Active » Needs review
StatusFileSize
new11.33 KB

Ok, attaching a first patch.

- Added tests for creating and sending newsletters in different languages.
- Not perfect yet, but e.g. makes sure that categories are translated, the correct node is used and that url rewriting works.
- Fixed a few bugs related to this and also unifies the user/language context handling in the source class.

Status: Needs review » Needs work

The last submitted patch, fix_and_test_multilanguage_newsletters.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new11.79 KB

Fixed those notices. Although it's strange that getLanguage() returns an empty string, should be the default language instead. Will need to have a look at that.

Note that the new tests are currently not executed by the testbot because they're in the SimplenewsI18nTestCase class, which needs i18n but the testbot currently doesn't support soft/test dependencies. The problem is that, although content translation works without i18n, taxonomy translation doesn't.

berdir’s picture

Status: Needs review » Active

Commited.

It might not be perfect yet, but it's quite an improvement, fixes the existing i18n tests, adds new ones and also fixes an unrelated bug (including test coverage for that one).

Keeping open to investigate the getLanguage() behavior.

miro_dietiker’s picture

Pushing...

  • Berdir committed 8532865 on 8.x-1.x
    Issue #1374926 by Berdir: Fixed active language handling when building...