Recent Topics

1 Sep 29, 2005 03:45    

Hi,

Thanks for the great software!
I'm using version 0.9.1 and found a bug when I tried importing my entries from MovableType. Those entries were all in Japanese, so I selected "Japanese(JP)" from Default locale drop-down. But entries were imported in en-US, which is the default locale of this installation.

Source of the problem is simple: admin/import-mt.php is not using default_locale parameter from the form, always using global $default_locale.

Here's a possible fix:

--- import-mt.php	(revision 40)
+++ import-mt.php	(working copy)
@@ -231,6 +231,7 @@
 	param( 'simulate', 'integer', 0 );
 	param( 'default_password', 'string', 'changeme' );
 	param( 'default_password2', 'string', 'changeme' );
+	param( 'post_locale', 'string', $Settings->get( 'default_locale' ) );
 
 	if( $default_password != $default_password2 )
 	{
@@ -429,7 +430,7 @@
 		<fieldset><legend>Post/Entry defaults</legend>
 			<?php
 			form_checkbox( 'default_convert_breaks', $default_convert_breaks, 'Convert-Breaks default', 'will be used for posts with empty CONVERT BREAKS or "__default__"' );
-			form_select( 'default_locale', $Settings->get('default_locale'), 'locale_options', T_('Default locale'), 'Locale for posts.' );
+			form_select( 'post_locale', $Settings->get('default_locale'), 'locale_options', T_('Default locale'), 'Locale for posts.' );
 			form_checkbox( 'convert_html_tags', $convert_html_tags, 'Convert ugly HTML', 'this will lowercase all html tags and add a XHTML compliant closing tag to &lt;br&gt;, &lt;img&gt;, &lt;hr&gt; (you\'ll get notes)' );
 
 			if( $mode != 'easy' )
@@ -787,8 +788,6 @@
 			{
 				debug_dump($line);
 
-				$post_locale = $default_locale;
-
 				if( !preg_match("/^(.*?):(.*)/", $line, $token) )
 				{
 					$message .= "<li class=\"notes\">Unknown meta-data: [$line] (ignoring)</li>";

Cheers, Kenji

2 Oct 04, 2005 01:38

Thanks Kenji!

It is fixed in CVS.


Form is loading...