[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Please unblock openguides/0.62-3



Contains one translation update and one bugfix:

   * Add Russian debconf translation (closes: 495128)
   * Add Google Analytics-related fixes from upstream SVN, to avoid
     a latent bug caused by using a deprecated remote interface

Full diff attached for reference.

Thanks,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 1019)
+++ debian/changelog	(revision 1101)
@@ -1,3 +1,11 @@
+openguides (0.62-3) unstable; urgency=low
+
+  * Add Russian debconf translation (closes: 495128)
+  * Add Google Analytics-related fixes from upstream SVN, to avoid
+    a latent bug caused by using a deprecated remote interface
+
+ -- Dominic Hargreaves <dom@earth.li>  Sat, 16 Aug 2008 21:17:02 +0100
+
 openguides (0.62-2) unstable; urgency=low
 
   * Add Swedish debconf translation (closes: #487599)
Index: debian/po/ru.po
===================================================================
--- debian/po/ru.po	(revision 0)
+++ debian/po/ru.po	(revision 1101)
@@ -0,0 +1,38 @@
+# translation of ru.po to Russian
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Yuri Kozlov <kozlov.y@gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ru\n"
+"Report-Msgid-Bugs-To: dom@earth.li\n"
+"POT-Creation-Date: 2006-08-28 18:05+0100\n"
+"PO-Revision-Date: 2008-08-14 22:08+0400\n"
+"Last-Translator: Yuri Kozlov <kozlov.y@gmail.com>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Okay to proceed with upgrade?"
+msgstr "Продолжить обновление?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"You are trying to upgrade from a version of OpenGuides that used an old "
+"database schema. The migration is somewhat risky and so it is strongly "
+"recommended that you backup your OpenGuides databases before proceeding."
+msgstr ""
+"Вы пытаетесь обновиться с версии OpenGuides, в которой используется "
+"старая схема базы данных. При таком переходе есть некоторый риск, поэтому "
+"настоятельно рекомендуется создать резервную копию баз данных OpenGuides "
+"перед тем как продолжать."
+
Index: templates/footer.tt
===================================================================
--- templates/footer.tt	(revision 1019)
+++ templates/footer.tt	(revision 1101)
@@ -46,12 +46,14 @@
 </div>
 
   [% IF config.google_analytics_key %]
-    <script src="http://www.google-analytics.com/urchin.js";
-     type="text/javascript">
+    <script type="text/javascript">
+    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."; : "http://www.";);
+    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
     </script>
+
     <script type="text/javascript">
-      _uacct = "[% CGI.escapeHTML( config.google_analytics_key  ) %]";
-      if ( typeof urchinTracker == 'function' ) urchinTracker();
+    var pageTracker = _gat._getTracker("[% config.google_analytics_key %]");
+    pageTracker._trackPageview();
     </script>
   [% END %]
 
Index: t/48_google_analytics.t
===================================================================
--- t/48_google_analytics.t	(revision 1019)
+++ t/48_google_analytics.t	(revision 1101)
@@ -10,7 +10,7 @@
     exit 0;
 }
 
-plan tests => 5;
+plan tests => 9;
 
 my ( $config, $guide, $wiki, $cookie, $output );
 
@@ -34,26 +34,41 @@
                                 id => "Red Lion",
                                 return_output => 1,
                               );
-unlike( $output, qr/urchinTracker/, "Google analytics omitted by default" );
+unlike( $output, qr/ga.js/, "Google analytics omitted by default" );
 
 $config->google_analytics_key( "" );
 $output = $guide->display_node(
                                 id => "Red Lion",
                                 return_output => 1,
                               );
-unlike( $output, qr/urchinTracker/, "...also if analytics key is blank" );
+unlike( $output, qr/ga.js/, "...also if analytics key is blank" );
 
 $config->google_analytics_key( 0 );
 $output = $guide->display_node(
                                 id => "Red Lion",
                                 return_output => 1,
                               );
-unlike( $output, qr/urchinTracker/, "...also if analytics key is zero" );
+unlike( $output, qr/ga.js/, "...also if analytics key is zero" );
 
 $config->google_analytics_key( "ThisIsNotAKey" );
 $output = $guide->display_node(
                                 id => "Red Lion",
                                 return_output => 1,
                               );
-like( $output, qr/urchinTracker/, "does show up if key is provided" );
+like( $output, qr/ga.js/, "does show up if key is provided" );
 like( $output, qr/ThisIsNotAKey/, "...correct key" );
+# Make sure analytics stuff only shows up if we want it to on recent changes
+# recent changes doesnt use CGI. which we dont need anymore but we should test in case we change our mind again.
+
+$config->google_analytics_key( "" );
+$output = $guide->display_recent_changes( return_output => 1 );
+unlike( $output, qr/ga.js/, "...also if analytics key is blank" );
+
+$config->google_analytics_key( 0 );
+$output = $guide->display_recent_changes( return_output => 1 );
+unlike( $output, qr/ga.js/, "...also if analytics key is zero" );
+
+$config->google_analytics_key( "ThisIsNotAKey" );
+$output = $guide->display_recent_changes( return_output => 1 );
+like( $output, qr/ga.js/, "does show up if key is provided" );
+like( $output, qr/ThisIsNotAKey/, "...correct key" );

Reply to: