~do-core/do/fix-the-shitstorm

« back to all changes in this revision

Viewing changes to PingFM/src/PingFMClient.cs

  • Committer: Christopher James Halse Rogers
  • Date: 2009-06-22 04:05:16 UTC
  • Revision ID: raof@ubuntu.com-20090622040516-d7fi9w4m3n580i8w
Fix translations for plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
using System.Collections.Generic;
22
22
using System.Text.RegularExpressions;
23
23
 
24
 
using Mono.Unix;
 
24
using Mono.Addins;
25
25
 
26
26
using Do.Platform;
27
27
using Do.Universe;
32
32
{       
33
33
        public class PingFMClient
34
34
        {
35
 
                readonly string ErrorInMethod = Catalog.GetString ("An error has occurred in {0}");
36
 
                readonly string PostSuccessTitle = Catalog.GetString ("Message posted");
37
 
                readonly string PostErrorTitle = Catalog.GetString ("Message posting failed");
38
 
                readonly string PostErrorMessage = Catalog.GetString ("Cannot connect to the Ping.FM API server, or the server responds with an error.");
39
 
                readonly string SinglePostSuccess = Catalog.GetString ("Your {0} message has been successfully posted to {1}");
40
 
                readonly string MultiPostSuccess = Catalog.GetString ("Your message has been successfully posted to all {0} services");
 
35
                readonly string ErrorInMethod = AddinManager.CurrentLocalizer.GetString ("An error has occurred in {0}");
 
36
                readonly string PostSuccessTitle = AddinManager.CurrentLocalizer.GetString ("Message posted");
 
37
                readonly string PostErrorTitle = AddinManager.CurrentLocalizer.GetString ("Message posting failed");
 
38
                readonly string PostErrorMessage = AddinManager.CurrentLocalizer.GetString ("Cannot connect to the Ping.FM API server, or the server responds with an error.");
 
39
                readonly string SinglePostSuccess = AddinManager.CurrentLocalizer.GetString ("Your {0} message has been successfully posted to {1}");
 
40
                readonly string MultiPostSuccess = AddinManager.CurrentLocalizer.GetString ("Your message has been successfully posted to all {0} services");
41
41
                
42
42
                PingFMApi pingfm;
43
43
                List<PingFMServiceItem> services;
64
64
                        }
65
65
                        
66
66
                        services.Clear ();                      
67
 
                        services.Add (new PingFMServiceItem (Catalog.GetString ("Microblog"), "pingfm", "microblog", "http://ping.fm"));
68
 
                        services.Add (new PingFMServiceItem (Catalog.GetString ("Status"), "pingfm", "status", "http://ping.fm"));
 
67
                        services.Add (new PingFMServiceItem (AddinManager.CurrentLocalizer.GetString ("Microblog"), "pingfm", "microblog", "http://ping.fm"));
 
68
                        services.Add (new PingFMServiceItem (AddinManager.CurrentLocalizer.GetString ("Status"), "pingfm", "status", "http://ping.fm"));
69
69
                        
70
70
                        // If a service has method "microblog" and/or "status", include it in the service_items list
71
71
                        // when both methods are available, use "microblog", because to an individual service
79
79
                                        }
80
80
                                }
81
81
                        } else {
82
 
                                Log.Error (ErrorInMethod, "UpdateServices", Catalog.GetString ("Error occurred in service response"));
 
82
                                Log.Error (ErrorInMethod, "UpdateServices", AddinManager.CurrentLocalizer.GetString ("Error occurred in service response"));
83
83
                        }
84
84
                }
85
85