WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 months ago

#1952 closed defect (fixed)

Restore locale suggestion banner on support forums

Reported by: SergeyBiryukov Owned by: tellyworth
Milestone: Q1 Priority: normal
Component: Support Forums Keywords: needs-patch
Cc:

Description (last modified by SergeyBiryukov)

After the upgrade to bbPress 2.x, the WordPress support forums are also available in %s banner on https://wordpress.org/support/ is gone. It should be restored.

Attachments (1)

1952.diff (1.8 KB) - added by dufresnesteven 4 months ago.
This adds the placeholder div and the css that is on the homepage.

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
4 years ago

  • Description modified (diff)

This ticket was mentioned in Slack in #forums by sergey. View the logs.


4 years ago

This ticket was mentioned in Slack in #forums by sergey. View the logs.


3 years ago

#4 @obenland
2 years ago

  • Keywords needs-patch added

This ticket was mentioned in Slack in #forums by clorith. View the logs.


2 years ago

#6 @tellyworth
18 months ago

  • Milestone set to Q1

This ticket was mentioned in Slack in #meta by sergey. View the logs.


5 months ago

#8 @dufresnesteven
4 months ago

I don't have access to provide a patch but here is the research:

/support is missing the following:


Wrapper
<div id="lang-guess-wrap"></div>


Init code

(function($){
	$.ajax({
		url : '/lang-guess/lang-guess-ajax.php?uri=%2F',
		dataType: 'html'
	}).done(function(data) {
		if ( ! data ) return;
		$(document).ready( function() {
			$('#lang-guess-wrap').html(data);
		});
	});
})(jQuery);



Styles
To make it match the homepage.

#lang-guess {
	width: inherit;
	max-width: inherit;
	margin: 0;
	border: inherit;
	font: inherit;
	padding: .5rem;
	background: #C7E8CA;
	text-align: center;
	font-size: .8rem;
	-moz-border-radius: inherit;
	-khtml-border-radius: inherit;
	-webkit-border-radius: inherit;
	border-radius: inherit
}

#lang-guess a {
	text-decoration: underline
}

#9 @dd32
4 months ago

In r15839-dotorg I've updated the lang-guess files to use $locale.wordpress.org/support/ rather than $locale.forums.wordpress.org so I think the endpoint should now return correct data for forums.

eg:

$ curl 'https://wordpress.org/lang-guess/lang-guess-ajax.php?uri=/support/' -H 'accept-language: ru-RU'
<div id="lang-guess">Форумы поддержки WordPress доступны и на вашем языке: <a href='https://ru.wordpress.org/support/'>Русский</a>.</div>

$ curl 'https://wordpress.org/lang-guess/lang-guess-ajax.php?uri=/support/' -H 'accept-language: en-GB'
// No output. No en-GB forums.

@dufresnesteven
4 months ago

This adds the placeholder div and the css that is on the homepage.

#10 @tellyworth
4 months ago

  • Owner set to tellyworth
  • Resolution set to fixed
  • Status changed from new to closed

In 9609:

Support theme: restore the locale suggestion banner.

Props dufresnesteven, dd32.
Fixes #1952.

Note: See TracTickets for help on using tickets.