Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r18544: LJSUP-7759 (Native sharing)

Committer: ailyin
LJSUP-7759 (Native sharing)
U   trunk/bin/upgrading/en.dat
U   trunk/cgi-bin/LJ/Share.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2011-03-14 11:41:25 UTC (rev 18543)
+++ trunk/bin/upgrading/en.dat	2011-03-15 03:11:11 UTC (rev 18544)
@@ -4518,6 +4518,26 @@
 
 sharing.popup.close=Close
 
+sharing.service.livejournal=LiveJournal
+
+sharing.service.facebook=Facebook
+
+sharing.service.twitter=Twitter
+
+sharing.service.vkontakte=Vkontakte
+
+sharing.service.moimir=Moi mir
+
+sharing.service.stumbleupon=StumbleUpon
+
+sharing.service.digg=Digg
+
+sharing.service.email=E-mail
+
+sharing.service.tumblr=Tumblr
+
+sharing.service.odnoklassniki=Odnoklassniki
+
 sms.journalnewcomment.edit_reply_your_comment=[[user]] edited a reply to your comment
 
 sms.journalnewcomment.edit_reply_a_comment=[[user]] edited a reply to a comment

Modified: trunk/cgi-bin/LJ/Share.pm
===================================================================
--- trunk/cgi-bin/LJ/Share.pm	2011-03-14 11:41:25 UTC (rev 18543)
+++ trunk/cgi-bin/LJ/Share.pm	2011-03-15 03:11:11 UTC (rev 18544)
@@ -12,47 +12,41 @@
 
     my $services = {
         'livejournal' => {
-			'title' => 'LiveJournal',
             'bindLink' => $LJ::SITEROOT . '/update.bml?repost={url}'
-		},
-		'facebook' => {
-			'title' => 'Facebook',
+        },
+        'facebook' => {
             'bindLink' => 'http://www.facebook.com/sharer.php?u={url}'
-		},
-		'twitter' => {
-			'title' => 'Twitter',
+        },
+        'twitter' => {
             'bindLink' => 'http://twitter.com/share?url={url}&text={title}'
-		},
-		'vkontakte' => {
-			'title' => 'Vkontakte',
+        },
+        'vkontakte' => {
             'bindLink' => 'http://vkontakte.ru/share.php?url={url}'
-		},
-		'moimir' => {
-			'title' => 'Moi Mir',
+        },
+        'moimir' => {
             'bindLink' => 'http://connect.mail.ru/share?url={url}'
-		},
-		'stumbleupon' => {
-			'title' => 'Stumbleupon',
+        },
+        'stumbleupon' => {
             'bindLink' => 'http://www.stumbleupon.com/submit?url={url}'
-		},
-		'digg' => {
-			'title' => 'Digg',
+        },
+        'digg' => {
             'bindLink' => 'http://digg.com/submit?url={url}'
-		},
-		'email' => {
-			'title' => 'E-mail',
+        },
+        'email' => {
             'bindLink' => 'http://api.addthis.com/oexchange/0.8/forward/email/offer?username=internal&url={url}'
-		},
-		'tumblr' => {
-			'title' => 'Tumblr',
+        },
+        'tumblr' => {
             'bindLink' => 'http://www.tumblr.com/share?v=3&u={url}'
-		},
-		'odnoklassniki' => {
-			'title' => 'Odnoklassniki',
+        },
+        'odnoklassniki' => {
             'bindLink' => 'http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl={url}'
-		}
+        }
     };
 
+    while ( my ( $name, $service ) = each %$services ) {
+        $service->{'title'} ||= LJ::Lang::ml("sharing.service.$name");
+    }
+
     my $params = {
         'services' => $services,
         'links' => [ sort keys %$services ],

Tags: andy, dat, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments