kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2009-07-17 12:04 am

[dw-free] S2.pm hardcodes "en", instead of using the user's language

[commit: http://hg.dwscoalition.org/dw-free/rev/50aa26b65ec0]

http://bugs.dwscoalition.org/show_bug.cgi?id=1325

Use the remote user's language, or if not set, the site's default language.

Patch by [personal profile] afuna.

Files modified:
  • cgi-bin/LJ/S2.pm
--------------------------------------------------------------------------------
diff -r b8d88b12b7fc -r 50aa26b65ec0 cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm	Thu Jul 16 00:33:42 2009 -0500
+++ b/cgi-bin/LJ/S2.pm	Thu Jul 16 19:04:02 2009 -0500
@@ -69,7 +69,7 @@ sub make_journal
         return;
     }
 
-    my $lang = 'en';
+    my $lang = $remote && $remote->prop( "browselang" );
     LJ::run_hook('set_s2bml_lang', $ctx, \$lang);
 
     # note that's it's very important to pass LJ::Lang::get_text here explicitly
--------------------------------------------------------------------------------