Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Only displays partners if translated#6528

Merged
itsjoekent merged 3 commits intoDoSomethingArchive:devfrom
itsjoekent-archive:6488
May 31, 2016
Merged

Only displays partners if translated#6528
itsjoekent merged 3 commits intoDoSomethingArchive:devfrom
itsjoekent-archive:6488

Conversation

@itsjoekent
Copy link
Contributor

@itsjoekent itsjoekent commented May 31, 2016

What's this PR do?

  • Does not display "Partners" in the info bar if the partner term has not been translated
  • Minor fix to global get lang logic

How should this be reviewed?

First visit a campaign page that has a partner term set.
screen shot 2016-05-31 at 1 34 14 pm

Then translate this campaign, but NOT the partner term. Does it show in the info bar still?
screen shot 2016-05-31 at 1 34 32 pm

Also because I changed the global get lang function, make sure the site routing still seems ok.

Relevant tickets

Fixes #6379

$request_path = explode('/', request_path());
if (!empty($request_path[0])) {

// If the string is longer than a country code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this case for?

Copy link
Contributor Author

@itsjoekent itsjoekent May 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

campaigns -- but if the default language was Spanish/Mexico, this would be voluntario

basically,

/campaigns/something = global
/us/campaigns/something = not global

in the first case the [0] is the campaigns, and this new line of code catches that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be able to follow the way we determine language in other places instead of updating this

@itsjoekent
Copy link
Contributor Author

@angaither seems to work with the way you suggested, removed the global change and also updated the default param to be en-global

@angaither
Copy link
Contributor

👍

@itsjoekent itsjoekent merged commit 950ac5f into DoSomethingArchive:dev May 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

If partner term translation does not exist hide "In partnership with"

2 participants