Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#29487 closed defect (bug) (fixed)

wp_install_language_form(): Default language should reflect $wp_local_package

Reported by: tenpura Owned by: nacin
Priority: normal Milestone: 4.0
Component: I18N Version: 4.0
Severity: normal Keywords: has-patch commit dev-reviewed
Cc: Focuses:

Description

In the language chooser on install, English (United States) is always selected as default. The default should reflect $wp_local_package when it's set for better UX.

Attachments (3)

29487.diff​ (1.5 KB ) - added by tenpura 12 years ago.
29487.2.diff​ (1.0 KB ) - added by nacin 12 years ago.
29487.3.diff​ (3.3 KB ) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (20)

@tenpura
12 years ago

#1 @tenpura
12 years ago

  • Keywords has-patch added

#2 follow-up: @SergeyBiryukov
12 years ago

I wonder if we could just remove this unnecessary step for localized builds, see the ​discussion on Polyglots.

#3 in reply to: ↑ 2 @tenpura
12 years ago

Replying to SergeyBiryukov:

I wonder if we could just remove this unnecessary step for localized builds, see the ​discussion on Polyglots.

Is it easy to do for 4.0?

This ticket was mentioned in IRC in #wordpress-dev by ocean90. ​View the logs.


12 years ago

#5 @pavelevap
12 years ago

SergeyBiryukov: Exactly, why selecting language for localized package? And when it is removed from localized packages then why English users should select their language? For them it is also not necessary? But I am probably missing something, because I do not believe that new feature (language installation page) is UX regression and not needed step for 99 % users. Maybe localized packages are not used during installation, but only small language packs? I am not sure how it really works...

@nacin
12 years ago

#6 @nacin
12 years ago

  • Keywords commit added
  • Milestone Awaiting Review → 4.0

The original plan was for the localized package to be the #1 suggestion. Given we didn't quite get to everything we wanted to do, I'm fine with skipping the step entirely for localized packages for 4.0.

29487.2.diff​

#7 @ocean90
12 years ago

  • Keywords dev-reviewed added

29487.2.diff​ tested and looks good.

#8 @tenpura
12 years ago

If a wp-config.php already exists, it won't skip the language chooser. Probably additional $step = 1; is needed?

In install.php:

if ( ! empty( $_REQUEST['language'] ) ) {
	$langugage = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
	} elseif ( isset( $GLOBALS['wp_local_package'] ) ) { 
		$language = $GLOBALS['wp_local_package'];
		$step = 1;
}

#9 @nacin
12 years ago

It's actually much more mundane than that. The variable is spelled $langugage throughout install.php for some reason.

The welcome string got broken — it isn't echoing. Patch also fixes this.

@nacin
12 years ago

#10 @tenpura
12 years ago

attachment:29487.3.diff​ works as expected this time.

#11 @ocean90
12 years ago

Sorry for the typo!

29487.3.diff​ looks good.

Last edited 12 years ago by ocean90 (previous) (diff)

#12 follow-up: @pavelevap
12 years ago

Now I tried to install latest RC3 version and "Čeština" is not available in dropdown? I have set $wp_local_package, WPLANG and all language files. What is going on? There are probably only languages with 100 % translated, but I have localized package.

#13 in reply to: ↑ 12 @ocean90
12 years ago

Replying to pavelevap:

Yes, it has to be at 100% to be available via the language chooser. With 29487.3.diff we will skip the screen for localized packages.

Version 0, edited 12 years ago by ocean90 (next)

#14 follow-ups: @pavelevap
12 years ago

I thought that it should preselect language on second place? Strange... So even if I have the whole localized package, it is not possible to install it in this language...

Sorry, never used IRC, I am not familiar with it, but I will try to find any tool and connect...

#15 in reply to: ↑ 14 @SergeyBiryukov
12 years ago

Replying to pavelevap:

So even if I have the whole localized package, it is not possible to install it in this language...

I think once 29487.3.diff​ is committed, you should be able to create a localized Czech package as usual, and it will just skip language selection and use Czech language files, as expected.

#16 in reply to: ↑ 14 @ocean90
12 years ago

Replying to pavelevap:

Sorry, never used IRC, I am not familiar with it, but I will try to find any tool and connect...

See ​http://make.wordpress.org/core/handbook/communication/.

#17 @nacin
12 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In 29705:

i18n: Skip language chooser for localized packages.

Also fixes the install.php welcome string, which was not bring printed.

fixes #29487.

Note: See TracTickets for help on using tickets.