-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/219 clarify filter names #320
base: develop
Are you sure you want to change the base?
Changes from all commits
81090bc
ec98986
be65a9c
946e81b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -133,4 +133,18 @@ public function test_term_translations() { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
public function test_canonical_content_fallback() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$this->assertSame( 'en_US', get_locale() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$en = $this->factory->post->create_and_get(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// In normal operation, the create_empty_translations method is called on an immediate single cron job | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$GLOBALS['bbl_jobs']->create_empty_translations($en->ID); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$fr = bbl_get_post_in_lang( $en->ID, 'fr_FR', true ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// @FIXME: These tests fail due to the interaction of Babble_Post_Public::get_post_in_lang and Babble_Jobs::create_empty_translations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$this->assertSame( $en->post_title, $fr->post_title ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @simonwheatley looking through the code, this test seems to be expecting the title to default to the default post, however what I understand, there is only logic in place to fallback to the default lang if a post in that language does not exist. In this case, we do have a translated post in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @joehoyle Originally fallback content was envisaged as more granular than that within a single post, so title, content, and excerpt can all fallback independently of each other: Lines 545 to 571 in 3d211c8
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$this->assertSame( $en->post_content, $fr->post_content ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need changing to the following when #312 is merged:
Babble::get( 'jobs' )->create_empty_translations( $en->ID );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!