Merge branch 'master' of gitorious.org:sparkleshare/sparkleshare

This commit is contained in:
Łukasz Jernaś 2010-07-07 19:40:36 +02:00
commit 375241e424
14 changed files with 1014 additions and 336 deletions

2
README
View file

@ -1,4 +1,4 @@
SparkleShare Version 0.2 Beta 1
SparkleShare Version 0.1
===============================
SparkleShare is a file sharing and collaboration tool inspired by Dropbox.

View file

@ -8,8 +8,6 @@ $(top_srcdir)/SparkleShare/Defines.cs \
SparkleDiff.cs \
SparkleDiffWindow.cs \
RevisionView.cs \
RevisionImage.cs \
LeftRevisionView.cs \
RightRevisionView.cs
RevisionImage.cs
include $(top_srcdir)/build/build.mk

View file

@ -13,8 +13,9 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using Gtk;
using SparkleShare;
using System.Diagnostics;
namespace SparkleShare {
@ -37,9 +38,9 @@ namespace SparkleShare {
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName (FilePath);
process.StartInfo.WorkingDirectory = SparkleDiff.GetGitRoot (file_path);
process.StartInfo.FileName = "git";
process.StartInfo.Arguments = "show " + Revision + ":" + System.IO.Path.GetFileName (FilePath);
process.StartInfo.Arguments = "show " + Revision + ":" + SparkleDiff.GetPathFromGitRoot (FilePath);
process.Start ();
Pixbuf = new Gdk.Pixbuf ((System.IO.Stream) process.StandardOutput.BaseStream);

View file

@ -145,7 +145,47 @@ namespace SparkleShare {
ShowAll ();
}
public Image GetImage ()
{
return Image;
}
}
// Derived class for the image view on the left
public class LeftRevisionView : RevisionView {
public LeftRevisionView (string [] revisions) : base (revisions) {
ComboBox.Active = 1;
if (Direction == Gtk.TextDirection.Ltr)
ScrolledWindow.Placement = CornerType.TopRight;
else
ScrolledWindow.Placement = CornerType.TopLeft;
}
}
// Derived class for the image view on the right
public class RightRevisionView : RevisionView {
public RightRevisionView (string [] revisions) : base (revisions) {
ComboBox.Active = 0;
if (Direction == Gtk.TextDirection.Ltr)
ScrolledWindow.Placement = CornerType.TopLeft;
else
ScrolledWindow.Placement = CornerType.TopRight;
}
}
}

View file

@ -1,36 +0,0 @@
// SparkleShare, an instant update workflow to Git.
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using Gtk;
namespace SparkleShare {
public class RightRevisionView : RevisionView {
public RightRevisionView (string [] revisions) : base (revisions) {
ComboBox.Active = 0;
if (Direction == Gtk.TextDirection.Ltr)
ScrolledWindow.Placement = CornerType.TopLeft;
else
ScrolledWindow.Placement = CornerType.TopRight;
}
}
}

View file

@ -19,6 +19,7 @@ using Mono.Unix;
using System;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
namespace SparkleShare {
@ -31,6 +32,35 @@ namespace SparkleShare {
return Catalog.GetString (s);
}
// Finds out the path relative to the Git root directory
public static string GetPathFromGitRoot (string file_path)
{
string git_root = GetGitRoot (file_path);
return file_path.Substring (git_root.Length + 1);
}
// Finds out the path relative to the Git root directory
public static string GetGitRoot (string file_path)
{
file_path = System.IO.Path.GetDirectoryName (file_path);
while (file_path != null) {
if (Directory.Exists (System.IO.Path.Combine (file_path, ".git")))
return file_path;
file_path = Directory.GetParent (file_path).FullName;
}
return null;
}
public static void Main (string [] args)
{
@ -49,8 +79,9 @@ namespace SparkleShare {
Environment.Exit (0);
}
// Don't allow running as root
UnixUserInfo UnixUserInfo = new UnixUserInfo (UnixEnvironment.UserName);
// Don't allow running as root
if (UnixUserInfo.UserId == 0) {
Console.WriteLine (_("Sorry, you can't run SparkleShare with these permissions."));
Console.WriteLine (_("Things would go utterly wrong."));
@ -58,6 +89,7 @@ namespace SparkleShare {
}
if (args.Length > 0) {
if (args [0].Equals ("--help") || args [0].Equals ("-h")) {
ShowHelp ();
Environment.Exit (0);
@ -68,9 +100,17 @@ namespace SparkleShare {
if (File.Exists (file_path)) {
Gtk.Application.Init ();
string [] revisions = GetRevisionsForFilePath (file_path);
// Quit if the given file doesn't have any history
if (revisions.Length < 2) {
Console.WriteLine ("SparkleDiff: " + file_path + ": File has no history.");
Environment.Exit (-1);
}
SparkleDiffWindow sparkle_diff_window;
sparkle_diff_window = new SparkleDiffWindow (file_path);
sparkle_diff_window = new SparkleDiffWindow (file_path, revisions);
sparkle_diff_window.ShowAll ();
// The main loop
@ -79,7 +119,7 @@ namespace SparkleShare {
} else {
Console.WriteLine ("SparkleDiff: " + file_path + ": No such file or directory.");
Environment.Exit (0);
Environment.Exit (-1);
}
@ -87,6 +127,30 @@ namespace SparkleShare {
}
// Gets a list of all earlier revisions of this file
public static string [] GetRevisionsForFilePath (string file_path)
{
Process process = new Process ();
process.EnableRaisingEvents = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.WorkingDirectory = SparkleDiff.GetGitRoot (file_path);
process.StartInfo.FileName = "git";
process.StartInfo.Arguments = "log --format=\"%H\" " + SparkleDiff.GetPathFromGitRoot (file_path);
process.Start ();
string output = process.StandardOutput.ReadToEnd ();
string [] revisions = Regex.Split (output.Trim (), "\n");
return revisions;
}
// Prints the help output
public static void ShowHelp ()
{

View file

@ -22,7 +22,7 @@ using System.Text.RegularExpressions;
namespace SparkleShare {
// The main window of SparkleDiff
// The main window for SparkleDiff
public class SparkleDiffWindow : Window
{
@ -37,24 +37,20 @@ namespace SparkleShare {
private string [] Revisions;
public SparkleDiffWindow (string file_path) : base ("")
public SparkleDiffWindow (string file_path, string [] revisions) : base ("")
{
string file_name = System.IO.Path.GetFileName (file_path);
Revisions = revisions;
SetSizeRequest (800, 540);
SetPosition (WindowPosition.Center);
BorderWidth = 12;
IconName = "image-x-generic";
DeleteEvent += Quit;
IconName = "image-x-generic";
// TRANSLATORS: The parameter is a filename
Title = String.Format(_("Comparing Revisions of {0}"), file_name);
Revisions = GetRevisionsForFilePath (file_path);
VBox layout_vertical = new VBox (false, 12);
@ -98,41 +94,44 @@ namespace SparkleShare {
ViewLeft.SetImage (new RevisionImage (file_path, Revisions [1]));
ViewRight.SetImage (new RevisionImage (file_path, Revisions [0]));
ViewLeft.ComboBox.Changed += delegate {
RevisionImage revision_image;
revision_image = new RevisionImage (file_path, Revisions [ViewLeft.ComboBox.Active]);
ViewLeft.SetImage (revision_image);
HookUpViews ();
ViewLeft.ScrolledWindow.Hadjustment = ViewRight.ScrolledWindow.Hadjustment;
ViewLeft.ScrolledWindow.Vadjustment = ViewRight.ScrolledWindow.Vadjustment;
ViewLeft.UpdateControls ();
};
ViewRight.ComboBox.Changed += delegate {
RevisionImage revision_image;
revision_image = new RevisionImage (file_path, Revisions [ViewRight.ComboBox.Active]);
ViewRight.SetImage (revision_image);
HookUpViews ();
ViewRight.ScrolledWindow.Hadjustment = ViewLeft.ScrolledWindow.Hadjustment;
ViewRight.ScrolledWindow.Vadjustment = ViewLeft.ScrolledWindow.Vadjustment;
ViewRight.UpdateControls ();
};
layout_horizontal.PackStart (ViewLeft);
layout_horizontal.PackStart (ViewRight);
ViewLeft.ComboBox.Changed += delegate {
RevisionImage revision_image;
revision_image = new RevisionImage (file_path, Revisions [ViewLeft.ComboBox.Active]);
ViewLeft.SetImage (revision_image);
HookUpViews ();
ViewLeft.ScrolledWindow.Hadjustment = ViewRight.ScrolledWindow.Hadjustment;
ViewLeft.ScrolledWindow.Vadjustment = ViewRight.ScrolledWindow.Vadjustment;
ViewLeft.UpdateControls ();
};
ViewRight.ComboBox.Changed += delegate {
RevisionImage revision_image;
revision_image = new RevisionImage (file_path, Revisions [ViewRight.ComboBox.Active]);
ViewRight.SetImage (revision_image);
HookUpViews ();
ViewRight.ScrolledWindow.Hadjustment = ViewLeft.ScrolledWindow.Hadjustment;
ViewRight.ScrolledWindow.Vadjustment = ViewLeft.ScrolledWindow.Vadjustment;
ViewRight.UpdateControls ();
};
ResizeToViews ();
// Order time view according to the user's reading direction
if (Direction == Gtk.TextDirection.Rtl) // See Deejay1? I can do i18n too! :P
layout_horizontal.ReorderChild (ViewLeft, 1);
@ -159,8 +158,27 @@ namespace SparkleShare {
}
private void ResizeToViews ()
{
int new_width = ViewLeft.GetImage ().Pixbuf.Width + ViewRight.GetImage ().Pixbuf.Width + 100;
int new_height = 200;
if (ViewLeft.GetImage ().Pixbuf.Height > ViewRight.GetImage ().Pixbuf.Height)
new_height += ViewLeft.GetImage ().Pixbuf.Height;
else
new_height += ViewRight.GetImage ().Pixbuf.Height;
if (new_width >= Screen.Width || new_height >= Screen.Height)
Maximize ();
else
SetSizeRequest (new_width, new_height);
}
// Hooks up two views so their scrollbars will be kept in sync
private void HookUpViews () {
private void HookUpViews ()
{
ViewLeft.ScrolledWindow.Hadjustment.ValueChanged += SyncViewsHorizontally;
ViewLeft.ScrolledWindow.Vadjustment.ValueChanged += SyncViewsVertically;
@ -171,7 +189,8 @@ namespace SparkleShare {
// Keeps the two image views in sync horizontally
private void SyncViewsHorizontally (object o, EventArgs args) {
private void SyncViewsHorizontally (object o, EventArgs args)
{
Adjustment source_adjustment = (Adjustment) o;
@ -184,7 +203,8 @@ namespace SparkleShare {
// Keeps the two image views in sync vertically
private void SyncViewsVertically (object o, EventArgs args) {
private void SyncViewsVertically (object o, EventArgs args)
{
Adjustment source_adjustment = (Adjustment) o;
@ -196,31 +216,6 @@ namespace SparkleShare {
}
// Gets a list of all earlier revisions of this file
private string [] GetRevisionsForFilePath (string file_path)
{
string file_name = System.IO.Path.GetFileName (file_path);
Process process = new Process ();
process.EnableRaisingEvents = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
// TODO: Nice commit summary and "Current Revision"
process.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName (file_path);
process.StartInfo.FileName = "git";
process.StartInfo.Arguments = "log --format=\"%H\" " + file_name;
process.Start ();
string output = process.StandardOutput.ReadToEnd ();
string [] revisions = Regex.Split (output.Trim (), "\n");
return revisions;
}
// Converts a UNIX timestamp to a more usable time object
public DateTime UnixTimestampToDateTime (int timestamp)
{
@ -230,10 +225,9 @@ namespace SparkleShare {
// Quits the program
private void Quit (object o, EventArgs args) {
private void Quit (object o, EventArgs args)
{
Environment.Exit (0);
}
}

View file

@ -33,6 +33,7 @@ namespace SparkleShare {
return Catalog.GetString (s);
}
// Get's the avatar for a specific email address and size
public static Gdk.Pixbuf GetAvatar (string Email, int Size)
{
@ -89,6 +90,7 @@ namespace SparkleShare {
return BitConverter.ToString (EncodedBytes).ToLower ().Replace ("-", "");
}
// Convert the more human readable sparkle:// url to
// something Git can use
// Example: sparkle://gitorious.org/sparkleshare
@ -136,9 +138,11 @@ namespace SparkleShare {
public static bool ShowDebugInfo = true;
// Show debug info if needed
public static void DebugInfo (string Type, string Message)
{
if (ShowDebugInfo) {
DateTime DateTime = new DateTime ();
string TimeStamp = DateTime.Now.ToString ("HH:mm:ss");
@ -152,6 +156,7 @@ namespace SparkleShare {
// Example: "about 5 hours ago"
public static string ToRelativeDate (DateTime date_time)
{
TimeSpan time_span = new TimeSpan (0);
time_span = DateTime.Now - date_time;
@ -167,19 +172,19 @@ namespace SparkleShare {
time_span.Minutes);
}
if (time_span <= TimeSpan.FromHours(24)) {
if (time_span <= TimeSpan.FromHours (24)) {
return string.Format (Catalog.GetPluralString ("about an hour ago", "about {0} hours ago",
time_span.Hours),
time_span.Hours);
}
if (time_span <= TimeSpan.FromDays(30)) {
if (time_span <= TimeSpan.FromDays (30)) {
return string.Format (Catalog.GetPluralString ("yesterday", "{0} days ago",
time_span.Days),
time_span.Days);
}
if (time_span <= TimeSpan.FromDays(365)) {
if (time_span <= TimeSpan.FromDays (365)) {
return string.Format (Catalog.GetPluralString ("a month ago", "{0} months ago",
(int) time_span.Days / 30),
(int) time_span.Days / 30);
@ -188,10 +193,13 @@ namespace SparkleShare {
return string.Format (Catalog.GetPluralString ("a year ago", "{0} years ago",
(int) time_span.Days / 365),
(int) time_span.Days / 365);
}
// Checks for unicorns
public static void CheckForUnicorns (string s) {
s = s.ToLower ();
if (s.Contains ("unicorn") && (s.Contains (".png") || s.Contains (".jpg"))) {
string title = _("Hold your ponies!");
@ -201,6 +209,7 @@ namespace SparkleShare {
SparkleBubble unicorn_bubble = new SparkleBubble (title, subtext);
unicorn_bubble.Show ();
}
}
}

View file

@ -16,6 +16,7 @@
using Gtk;
using Mono.Unix;
using Mono.Unix.Native;
using SparkleShare;
using System;
using System.Diagnostics;
@ -56,17 +57,27 @@ namespace SparkleShare {
string desktopfile_path = SparkleHelpers.CombineMore (autostart_path, "sparkleshare.desktop");
if (!File.Exists (desktopfile_path)) {
if (!Directory.Exists (autostart_path))
Directory.CreateDirectory (autostart_path);
TextWriter writer = new StreamWriter (desktopfile_path);
writer.WriteLine ("[Desktop Entry]\n" +
"Type=Application\n" +
"Name=SparkleShare\n" +
"Exec=sparkleshare start\n" +
"Icon=folder-sparkleshare\n" +
"Terminal=false\n" +
"X-GNOME-Autostart-enabled=true");
writer.Close ();
// Give the launcher the right permissions so it can be launched by the user
Syscall.chmod (desktopfile_path, FilePermissions.S_IRWXU);
SparkleHelpers.DebugInfo ("Config", "Created '" + desktopfile_path + "'");
}
break;

View file

@ -18,6 +18,7 @@ using Gtk;
using Mono.Unix;
using SparkleShare;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
@ -36,48 +37,48 @@ namespace SparkleShare {
private SparkleRepo SparkleRepo;
private VBox LayoutVertical;
private ScrolledWindow LogScrolledWindow;
private string SelectedEmail;
private ScrolledWindow ScrolledWindow;
public SparkleWindow (SparkleRepo Repo) : base ("")
public SparkleWindow (SparkleRepo sparkle_repo) : base ("")
{
SparkleRepo = Repo;
SelectedEmail = "";
SparkleRepo = sparkle_repo;
SetSizeRequest (640, 480);
SetPosition (WindowPosition.Center);
BorderWidth = 12;
// TRANSLATORS: {0} is a folder name, and {1} is a server address
Title = String.Format(_("{0} on {1}"), SparkleRepo.Name,
SparkleRepo.RemoteOriginUrl.TrimEnd (("/" + SparkleRepo.Name + ".git").ToCharArray ()));
SparkleRepo.RemoteOriginUrl);
IconName = "folder";
LayoutVertical = new VBox (false, 12);
LayoutVertical.PackStart (CreateEventLog (), true, true, 0);
HButtonBox DialogButtons = new HButtonBox ();
DialogButtons.Layout = ButtonBoxStyle.Edge;
DialogButtons.BorderWidth = 0;
HButtonBox dialog_buttons = new HButtonBox ();
dialog_buttons.Layout = ButtonBoxStyle.Edge;
dialog_buttons.BorderWidth = 0;
Button OpenFolderButton = new Button (_("Open Folder"));
OpenFolderButton.Clicked += delegate (object o, EventArgs args) {
Process Process = new Process ();
Process.StartInfo.FileName = "xdg-open";
Process.StartInfo.Arguments =
SparkleHelpers.CombineMore (SparklePaths.SparklePath, SparkleRepo.Name);
Process.Start ();
Button open_folder_button = new Button (_("Open Folder"));
open_folder_button.Clicked += delegate (object o, EventArgs args) {
Process process = new Process ();
process.StartInfo.FileName = "xdg-open";
process.StartInfo.Arguments = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
SparkleRepo.Name);
process.Start ();
Destroy ();
};
Button CloseButton = new Button (Stock.Close);
CloseButton.Clicked += delegate (object o, EventArgs args) {
Button close_button = new Button (Stock.Close);
close_button.Clicked += delegate (object o, EventArgs args) {
Destroy ();
};
DialogButtons.Add (OpenFolderButton);
DialogButtons.Add (CloseButton);
dialog_buttons.Add (open_folder_button);
dialog_buttons.Add (close_button);
LayoutVertical.PackStart (DialogButtons, false, false, 0);
LayoutVertical.PackStart (dialog_buttons, false, false, 0);
Add (LayoutVertical);
@ -87,9 +88,10 @@ namespace SparkleShare {
public void UpdateEventLog ()
{
LayoutVertical.Remove (LogScrolledWindow);
LogScrolledWindow = CreateEventLog ();
LayoutVertical.PackStart (LogScrolledWindow, true, true, 0);
LayoutVertical.Remove (ScrolledWindow);
ScrolledWindow = CreateEventLog ();
LayoutVertical.PackStart (ScrolledWindow, true, true, 0);
LayoutVertical.ReorderChild (ScrolledWindow, 0);
ShowAll ();
}
@ -98,138 +100,186 @@ namespace SparkleShare {
private ScrolledWindow CreateEventLog ()
{
ListStore LogStore = new ListStore (typeof (Gdk.Pixbuf),
typeof (string),
typeof (string),
typeof (string));
Process process = new Process ();
process.EnableRaisingEvents = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.WorkingDirectory = SparkleRepo.LocalPath;
process.StartInfo.FileName = "git";
process.StartInfo.Arguments = "log --format=\"%at☃%an☃%ae☃%s\" -25";
Process Process = new Process ();
Process.EnableRaisingEvents = true;
Process.StartInfo.RedirectStandardOutput = true;
Process.StartInfo.UseShellExecute = false;
Process.StartInfo.FileName = "git";
string output = "";
string Output = "";
process.Start ();
Process.StartInfo.WorkingDirectory = SparkleRepo.LocalPath;
// We're using the snowman here to separate messages :)
Process.StartInfo.Arguments = "log --format=\"%at☃%s☃%an☃%cr☃%ae\" -25";
Process.Start ();
output += "\n" + process.StandardOutput.ReadToEnd ().Trim ();
Output += "\n" + Process.StandardOutput.ReadToEnd ().Trim ();
Output = Output.TrimStart ("\n".ToCharArray ());
string [] Lines = Regex.Split (Output, "\n");
output = output.TrimStart ("\n".ToCharArray ());
string [] lines = Regex.Split (output, "\n");
// Sort by time and get the last 25
Array.Sort (Lines);
Array.Reverse (Lines);
Array.Sort (lines);
Array.Reverse (lines);
TreeIter Iter;
for (int i = 0; i < 25 && i < Lines.Length; i++) {
List <ActivityDay> activity_days = new List <ActivityDay> ();
string Line = Lines [i];
if (Line.Contains (SelectedEmail)) {
for (int i = 0; i < 25 && i < lines.Length; i++) {
string line = lines [i];
// Look for the snowman!
string [] Parts = Regex.Split (Line, "☃");
string [] parts = Regex.Split (line, "☃");
string Message = Parts [1];
string UserName = Parts [2];
string TimeAgo = Parts [3];
string UserEmail = Parts [4];
int unix_timestamp = int.Parse (parts [0]);
string user_name = parts [1];
string user_email = parts [2];
string message = parts [3];
Message = Message.Replace ("/", " → ");
Message = Message.Replace ("\n", " ");
DateTime date_time = UnixTimestampToDateTime (unix_timestamp);
Iter = LogStore.Append ();
message = message.Replace ("/", " → ");
message = message.Replace ("\n", " ");
LogStore.SetValue (Iter, 0, SparkleHelpers.GetAvatar (UserEmail, 24));
LogStore.SetValue (Iter, 1, "<b>" + UserName + "</b>\n" + Message);
// TODO Blend text color with treeview color instead of hardcoding it
LogStore.SetValue (Iter, 2, "<span fgcolor='grey'>" + TimeAgo + "</span> ");
ChangeSet change_set = new ChangeSet (user_name, user_email, message, date_time);
// We're not showing email, it's only
// there for lookup purposes
LogStore.SetValue (Iter, 3, UserEmail);
bool change_set_inserted = false;
foreach (ActivityDay stored_activity_day in activity_days) {
}
if (stored_activity_day.DateTime.Year == change_set.DateTime.Year &&
stored_activity_day.DateTime.Month == change_set.DateTime.Month &&
stored_activity_day.DateTime.Day == change_set.DateTime.Day) {
stored_activity_day.Add (change_set);
change_set_inserted = true;
break;
}
}
if (!change_set_inserted) {
ActivityDay activity_day = new ActivityDay (change_set.DateTime);
activity_day.Add (change_set);
activity_days.Add (activity_day);
}
}
TreeView LogView = new TreeView (LogStore);
LogView.HeadersVisible = false;
LogView.AppendColumn ("", new CellRendererPixbuf (), "pixbuf", 0);
VBox layout_vertical = new VBox (false, 0);
CellRendererText MessageCellRenderer = new CellRendererText ();
TreeViewColumn MessageColumn = new TreeViewColumn ();
MessageColumn.PackStart (MessageCellRenderer, true);
MessageColumn.SetCellDataFunc (MessageCellRenderer, new Gtk.TreeCellDataFunc (RenderMessageRow));
LogView.AppendColumn (MessageColumn);
foreach (ActivityDay activity_day in activity_days) {
CellRendererText TimeAgoCellRenderer = new CellRendererText ();
TreeViewColumn TimeAgoColumn = new TreeViewColumn ();
TimeAgoColumn.PackStart (TimeAgoCellRenderer, true);
TimeAgoColumn.SetCellDataFunc (TimeAgoCellRenderer, new Gtk.TreeCellDataFunc (RenderTimeAgoRow));
TimeAgoCellRenderer.Xalign = 1;
LogView.AppendColumn (TimeAgoColumn);
TreeIter iter = new TreeIter ();
ListStore list_store = new ListStore (typeof (Gdk.Pixbuf),
typeof (string),
typeof (string));
TreeViewColumn [] Columns = LogView.Columns;
foreach (ChangeSet change_set in activity_day) {
Columns [0].MinWidth = 42;
iter = list_store.Append ();
list_store.SetValue (iter, 0, SparkleHelpers.GetAvatar (change_set.UserEmail , 32));
list_store.SetValue (iter, 1, "<b>" + change_set.UserName + "</b>\n" +
"<span fgcolor='#777'>" + change_set.Message + "</span>");
list_store.SetValue (iter, 2, change_set.UserEmail);
Columns [1].Expand = true;
Columns [1].MinWidth = 350;
Columns [2].Expand = true;
Columns [2].MinWidth = 50;
// Get the email address of the selected log message each
// time the cursor changes
LogView.CursorChanged += delegate (object o, EventArgs args) {
TreeModel model;
TreeIter iter;
if (LogView.Selection.GetSelected (out model, out iter)) {
SelectedEmail = (string) model.GetValue (iter, 3);
}
};
// Compose an e-mail when a row is activated
LogView.RowActivated +=
delegate (object o, RowActivatedArgs Args) {
switch (SparklePlatform.Name) {
case "GNOME":
Process.StartInfo.FileName = "xdg-open";
break;
case "OSX":
Process.StartInfo.FileName = "open";
break;
Label date_label = new Label ();
DateTime today = DateTime.Now;
DateTime yesterday = DateTime.Now.AddDays (-1);
if (today.Day == activity_day.DateTime.Day &&
today.Month == activity_day.DateTime.Month &&
today.Year == activity_day.DateTime.Year) {
date_label.Text = "<b>Today</b>";
} else if (yesterday.Day == activity_day.DateTime.Day &&
yesterday.Month == activity_day.DateTime.Month &&
yesterday.Year == activity_day.DateTime.Year) {
date_label.Text = "<b>Yesterday</b>";
} else {
date_label.Text = "<b>" + activity_day.DateTime.ToString ("ddd MMM d, yyyy") + "</b>";
}
Process.StartInfo.Arguments = "mailto:" + SelectedEmail;
Process.Start ();
};
LogScrolledWindow = new ScrolledWindow ();
LogScrolledWindow.AddWithViewport (LogView);
date_label.UseMarkup = true;
date_label.Xalign = 0;
date_label.Xpad = 9;
date_label.Ypad = 9;
return LogScrolledWindow;
layout_vertical.PackStart (date_label, true, true, 0);
IconView icon_view = new IconView (list_store);
icon_view.PixbufColumn = 0;
icon_view.MarkupColumn = 1;
icon_view.Orientation = Orientation.Horizontal;
icon_view.ItemWidth = 550;
icon_view.Spacing = 9;
layout_vertical.PackStart (icon_view);
}
ScrolledWindow = new ScrolledWindow ();
ScrolledWindow.AddWithViewport (layout_vertical);
return ScrolledWindow;
}
// Renders a row with custom markup
private void RenderMessageRow (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
// Converts a UNIX timestamp to a more usable time object
public DateTime UnixTimestampToDateTime (int timestamp)
{
string item = (string) model.GetValue (iter, 1);
(cell as CellRendererText).Markup = item;
DateTime unix_epoch = new DateTime (1970, 1, 1, 0, 0, 0, 0);
return unix_epoch.AddSeconds (timestamp);
}
private void RenderTimeAgoRow (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
}
public class ActivityDay : List <ChangeSet>
{
public DateTime DateTime;
public ActivityDay (DateTime date_time)
{
string item = (string) model.GetValue (iter, 2);
(cell as CellRendererText).Markup = item;
DateTime = date_time;
DateTime = new DateTime (DateTime.Year, DateTime.Month, DateTime.Day);
}
}
public class ChangeSet
{
public string UserName;
public string UserEmail;
public string Message;
public DateTime DateTime;
public ChangeSet (string user_name, string user_email, string message, DateTime date_time)
{
UserName = user_name;
UserEmail = user_email;
Message = message;
DateTime = date_time;
}
}
}

124
po/de.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: SparkleShare 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-02 06:01+0000\n"
"POT-Creation-Date: 2010-07-05 06:00+0000\n"
"PO-Revision-Date: 2010-06-21 16:26+0100\n"
"Last-Translator: Martin Lettner <m.lettner@gmail.com>\n"
"Language-Team: \n"
@ -18,6 +18,63 @@ msgstr ""
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
#: ../SparkleDiff/SparkleDiff.cs:47 ../SparkleShare/SparkleShare.cs:50
msgid "Git wasn't found."
msgstr "Git konnte nicht gefunden werden."
#: ../SparkleDiff/SparkleDiff.cs:48 ../SparkleShare/SparkleShare.cs:51
msgid "You can get Git from http://git-scm.com/."
msgstr "Sie können Git auf http://git-scm.com/ herunterladen."
#: ../SparkleDiff/SparkleDiff.cs:55 ../SparkleShare/SparkleShare.cs:58
msgid "Sorry, you can't run SparkleShare with these permissions."
msgstr "Entschuldigung, SparkleShare kann mit diesen Rechten nicht ausgeführt werden."
#: ../SparkleDiff/SparkleDiff.cs:56 ../SparkleShare/SparkleShare.cs:59
#, fuzzy
msgid "Things would go utterly wrong."
msgstr "Vieles würde nicht richtig funktionieren."
#: ../SparkleDiff/SparkleDiff.cs:93
#, fuzzy
msgid "SparkleDiff Copyright (C) 2010 Hylke Bons"
msgstr "SparkleShare Copyright (C) 2010 Hylke Bons"
#: ../SparkleDiff/SparkleDiff.cs:95 ../SparkleShare/SparkleShare.cs:90
msgid "This program comes with ABSOLUTELY NO WARRANTY."
msgstr "Diese Anwendung wird OHNE IRGENDEINE GARANTIE veröffentlicht."
#: ../SparkleDiff/SparkleDiff.cs:96 ../SparkleShare/SparkleShare.cs:91
msgid "This is free software, and you are welcome to redistribute it "
msgstr "Dies ist freie Software. Sie können es weitergeben und/oder modifizieren"
#: ../SparkleDiff/SparkleDiff.cs:97 ../SparkleShare/SparkleShare.cs:92
msgid "under certain conditions. Please read the GNU GPLv3 for details."
msgstr "unter bestimmten Bedingungen. Bitte lesen Sie dazu die GNU GPLv3 für weitere Details."
#: ../SparkleDiff/SparkleDiff.cs:99
#, fuzzy
msgid "SparkleDiff let's you compare revisions of an image file side by side."
msgstr "SparkleDiff lässt Sie Versionen einer Bilddatei nebeneinander vergleichen."
#: ../SparkleDiff/SparkleDiff.cs:101
#, fuzzy
msgid "Usage: sparklediff [FILE]"
msgstr "Verwendung: sparklediff [Datei]"
#: ../SparkleDiff/SparkleDiff.cs:102
#, fuzzy
msgid "Open an image file to show its revisions"
msgstr "Öffnet eine Bilddatei um ihre Versionen anzuzeigen"
#: ../SparkleDiff/SparkleDiff.cs:104 ../SparkleShare/SparkleShare.cs:99
msgid "Arguments:"
msgstr "Parameter:"
#: ../SparkleDiff/SparkleDiff.cs:105 ../SparkleShare/SparkleShare.cs:101
msgid "\t -h, --help\t\tDisplay this help text."
msgstr "\t -h, --help\t\tDiesen Hilfe-Text nicht anzeigen."
#: ../SparkleShare/SparkleDialog.cs:50
msgid "Address of remote SparkleShare folder:"
msgstr "Adresse des entfernten SparkleShare-Verzeichnis:"
@ -54,12 +111,13 @@ msgid "Successfully synced folder {0}"
msgstr "Verzeichnis »{0}« erfolgreich abgeglichen"
#: ../SparkleShare/SparkleDialog.cs:198
#, fuzzy
msgid "Now make great stuff happen!"
msgstr ""
msgstr "Und jetzt, tu etwas großartiges!"
#. Add a button to open the folder where the changed file is
#: ../SparkleShare/SparkleDialog.cs:200 ../SparkleShare/SparkleRepo.cs:319
#: ../SparkleShare/SparkleWindow.cs:62
#: ../SparkleShare/SparkleWindow.cs:63
msgid "Open Folder"
msgstr "Verzeichnis öffnen"
@ -106,72 +164,45 @@ msgstr[0] "vor einem Jahr"
msgstr[1] "vor {0} Jahren"
#: ../SparkleShare/SparkleHelpers.cs:197
#, fuzzy
msgid "Hold your ponies!"
msgstr ""
msgstr "Immer langsam mit den jungen Pferden!"
#: ../SparkleShare/SparkleHelpers.cs:198
#, fuzzy
msgid ""
"SparkleShare is known to be insanely fast with \n"
"pictures of unicorns. Please make sure your internets\n"
"are upgraded to the latest version to avoid problems."
msgstr ""
"SparkleShare ist bekannt dafür, Bilder von Einhörnern\n"
"\r\n"
"wahnsinnig schnell zu bearbeiten. Bitte stellen Sie sicher,\n"
"\r\n"
"dass Sie die neuest Version des Internets installiert haben,\n"
"\r\n"
"um Probleme zu vermeiden."
#: ../SparkleShare/SparkleShare.cs:50
msgid "Git wasn't found."
msgstr "Git konnte nicht gefunden werden."
#: ../SparkleShare/SparkleShare.cs:51
msgid "You can get Git from http://git-scm.com/."
msgstr "Sie können Git auf http://git-scm.com/ herunterladen."
#: ../SparkleShare/SparkleShare.cs:58
msgid "Sorry, you can't run SparkleShare with these permissions."
msgstr "Entschuldigung, SparkleShare kann mit diesen Rechten nicht ausgeführt werden."
#: ../SparkleShare/SparkleShare.cs:59
msgid "Things will go utterly wrong."
msgstr "Vieles würde nicht richtig funktionieren."
#: ../SparkleShare/SparkleShare.cs:87
#: ../SparkleShare/SparkleShare.cs:88
msgid "SparkleShare Copyright (C) 2010 Hylke Bons"
msgstr "SparkleShare Copyright (C) 2010 Hylke Bons"
#: ../SparkleShare/SparkleShare.cs:89
msgid "This program comes with ABSOLUTELY NO WARRANTY."
msgstr "Diese Anwendung wird OHNE IRGENDEINE GARANTIE veröffentlicht."
#: ../SparkleShare/SparkleShare.cs:90
msgid "This is free software, and you are welcome to redistribute it "
msgstr "Dies ist freie Software. Sie können es weitergeben und/oder modifizieren"
#: ../SparkleShare/SparkleShare.cs:91
msgid "under certain conditions. Please read the GNU GPLv3 for details."
msgstr "unter bestimmten Bedingungen. Bitte lesen Sie dazu die GNU GPLv3 für weitere Details."
#: ../SparkleShare/SparkleShare.cs:93
#: ../SparkleShare/SparkleShare.cs:94
msgid "SparkleShare syncs the ~/SparkleShare folder with remote repositories."
msgstr "SparkleShare gleicht das Verzeichnis ~/SparkleShare mit entfernten Verzeichnissen ab"
#: ../SparkleShare/SparkleShare.cs:95
#: ../SparkleShare/SparkleShare.cs:96
msgid "Usage: sparkleshare [start|stop|restart] [OPTION]..."
msgstr "Verwendung: sparkleshare [start|stop|restart] [OPTION]..."
#: ../SparkleShare/SparkleShare.cs:96
#: ../SparkleShare/SparkleShare.cs:97
msgid "Sync SparkleShare folder with remote repositories."
msgstr "SparkleShare Ordner mit entfernten Repositories abgleichen."
#: ../SparkleShare/SparkleShare.cs:98
msgid "Arguments:"
msgstr "Parameter:"
#: ../SparkleShare/SparkleShare.cs:99
#: ../SparkleShare/SparkleShare.cs:100
msgid "\t -d, --disable-gui\tDon't show the notification icon."
msgstr "\t -d, --disable-gui\tBenachrichtigungs-Symbol nicht anzeigen."
#: ../SparkleShare/SparkleShare.cs:100
msgid "\t -h, --help\t\tDisplay this help text."
msgstr "\t -h, --help\t\tDiesen Hilfe-Text nicht anzeigen."
#: ../SparkleShare/SparkleStatusIcon.cs:69
msgid "Error syncing"
msgstr "Fehler beim Datenabgleich"
@ -212,7 +243,8 @@ msgstr "Sie haben noch keine Verzeichnisse konfiguriert."
msgid "Add a Folder…"
msgstr "Ein Verzeichnis hinzufügen …"
#: ../SparkleShare/SparkleWindow.cs:50
#. TRANSLATORS: {0} is a folder name, and {1} is a server address
#: ../SparkleShare/SparkleWindow.cs:51
#, csharp-format
msgid "{0} on {1}"
msgstr "»{0}« auf {1}"

249
po/fr_FR.po Normal file
View file

@ -0,0 +1,249 @@
# Traduction Française de Sparkleshare
# Copyright (C) 2010
# This file is distributed under the same license as the SPARKLESHARE package.
# Yann HERMANS <chezyann@gmail.com>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: SparkleShare\n"
"Report-Msgid-Bugs-To: Yann HERMANS <chezyann@gmail.com>\n"
"POT-Creation-Date: 2010-07-07 06:00+0000\n"
"PO-Revision-Date: 2010-07-07 16:55+0100\n"
"Last-Translator: Yann HERMANS <chezyann@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr_FR\n"
"Plural-Forms: nplurals=2; plural=(n>1);\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../SparkleDiff/SparkleDiff.cs:75
#: ../SparkleShare/SparkleShare.cs:50
msgid "Git wasn't found."
msgstr "Le logiciel Git n'a pas été détecté."
#: ../SparkleDiff/SparkleDiff.cs:76
#: ../SparkleShare/SparkleShare.cs:51
msgid "You can get Git from http://git-scm.com/."
msgstr "Vous pouvez récupérer Git sur http://git-scm.com/."
#: ../SparkleDiff/SparkleDiff.cs:83
#: ../SparkleShare/SparkleShare.cs:58
msgid "Sorry, you can't run SparkleShare with these permissions."
msgstr "Désolé, vous ne disposez pas des autorisations nécessaires pour lancer SparkleShare."
#: ../SparkleDiff/SparkleDiff.cs:84
#: ../SparkleShare/SparkleShare.cs:59
msgid "Things would go utterly wrong."
msgstr "Il se peut que les choses se passent très mal."
#: ../SparkleDiff/SparkleDiff.cs:156
msgid "SparkleDiff Copyright (C) 2010 Hylke Bons"
msgstr "Copyright (C) SparkleDiff 2010 Hylke Bons"
#: ../SparkleDiff/SparkleDiff.cs:158
#: ../SparkleShare/SparkleShare.cs:90
msgid "This program comes with ABSOLUTELY NO WARRANTY."
msgstr "Ce logiciel est diffusé sans AUCUNE GARANTIE."
#: ../SparkleDiff/SparkleDiff.cs:159
#: ../SparkleShare/SparkleShare.cs:91
msgid "This is free software, and you are welcome to redistribute it "
msgstr "Ce logiciel étant libre, vous pouvez le distribuer librement"
#: ../SparkleDiff/SparkleDiff.cs:160
#: ../SparkleShare/SparkleShare.cs:92
msgid "under certain conditions. Please read the GNU GPLv3 for details."
msgstr "sous certaines conditions. Merci de lire la licence GNU GPLv3 pour de plus amples informations."
#: ../SparkleDiff/SparkleDiff.cs:162
msgid "SparkleDiff let's you compare revisions of an image file side by side."
msgstr "SparkleDiff vous permet de comparer les versions d'un fichier image point par point."
#: ../SparkleDiff/SparkleDiff.cs:164
msgid "Usage: sparklediff [FILE]"
msgstr "Usage: sparklediff [FICHIER]"
#: ../SparkleDiff/SparkleDiff.cs:165
msgid "Open an image file to show its revisions"
msgstr "Ouvrir un fichier image pour en afficher les versions"
#: ../SparkleDiff/SparkleDiff.cs:167
#: ../SparkleShare/SparkleShare.cs:99
msgid "Arguments:"
msgstr "Paramètres:"
#: ../SparkleDiff/SparkleDiff.cs:168
#: ../SparkleShare/SparkleShare.cs:101
msgid "\t -h, --help\t\tDisplay this help text."
msgstr "\t -h, --help\t\tAffiche ce texte d'aide."
#: ../SparkleShare/SparkleDialog.cs:50
msgid "Address of remote SparkleShare folder:"
msgstr "Adresse du dossier distant SparkleShare:"
#: ../SparkleShare/SparkleDialog.cs:81
msgid "Add Folder"
msgstr "Ajouter un dossier"
#: ../SparkleShare/SparkleDialog.cs:126
#, csharp-format
msgid "Syncing folder ‘{0}’"
msgstr "Synchroniser un dossier ‘{0}’"
#: ../SparkleShare/SparkleDialog.cs:127
msgid "SparkleShare will notify you when this is done."
msgstr "SparkleShare vous préviendra lorsque l'opération sera achevée."
#: ../SparkleShare/SparkleDialog.cs:129
msgid "Dismiss"
msgstr "Abandonner"
#: ../SparkleShare/SparkleDialog.cs:157
#, csharp-format
msgid "Something went wrong while syncing ‘{0}’"
msgstr "Une erreur est survenue lors de la synchronisation ‘{0}’"
#: ../SparkleShare/SparkleDialog.cs:167
msgid "Try AgainĶ"
msgstr "RéessayerĶ"
#: ../SparkleShare/SparkleDialog.cs:197
#, csharp-format
msgid "Successfully synced folder ‘{0}’"
msgstr "Le dossier à été synchronisé ‚Äò{0}‚Äô"
#: ../SparkleShare/SparkleDialog.cs:198
msgid "Now make great stuff happen!"
msgstr "Maintenant la magie peut opérer!"
#. Add a button to open the folder where the changed file is
#: ../SparkleShare/SparkleDialog.cs:200
#: ../SparkleShare/SparkleRepo.cs:319
#: ../SparkleShare/SparkleWindow.cs:63
msgid "Open Folder"
msgstr "Ouvrir un dossier"
#: ../SparkleShare/SparkleHelpers.cs:164
#, csharp-format
msgid "a second ago"
msgid_plural "{0} seconds ago"
msgstr[0] "il y a une seconde"
msgstr[1] "il y a {0} secondes"
#: ../SparkleShare/SparkleHelpers.cs:170
#, csharp-format
msgid "a minute ago"
msgid_plural "about {0} minutes ago"
msgstr[0] "il y a une minute"
msgstr[1] "il y a environ {0} minutes"
#: ../SparkleShare/SparkleHelpers.cs:176
#, csharp-format
msgid "about an hour ago"
msgid_plural "about {0} hours ago"
msgstr[0] "il y a environ une heure"
msgstr[1] "il y a environ {0} heures"
#: ../SparkleShare/SparkleHelpers.cs:182
#, csharp-format
msgid "yesterday"
msgid_plural "{0} days ago"
msgstr[0] "hier"
msgstr[1] "il y a {0} jours"
#: ../SparkleShare/SparkleHelpers.cs:188
#, csharp-format
msgid "a month ago"
msgid_plural "{0} months ago"
msgstr[0] "il y a un mois"
msgstr[1] "il y a {0} mois"
#: ../SparkleShare/SparkleHelpers.cs:193
#, csharp-format
msgid "a year ago"
msgid_plural "{0} years ago"
msgstr[0] "il y a un an"
msgstr[1] "il y a {0} années"
#: ../SparkleShare/SparkleHelpers.cs:205
msgid "Hold your ponies!"
msgstr "Du calme!"
#: ../SparkleShare/SparkleHelpers.cs:206
msgid ""
"SparkleShare is known to be insanely fast with \n"
"pictures of unicorns. Please make sure your internets\n"
"are upgraded to the latest version to avoid problems."
msgstr ""
"SparkleShare est réputé pour sa rapidité malseine\n"
"avec les images de licornes. Merci de vérifier que\n"
"votre navigateur est à jour pour éviter tout problème."
#: ../SparkleShare/SparkleShare.cs:88
msgid "SparkleShare Copyright (C) 2010 Hylke Bons"
msgstr "Copyright (C) SparkleShare 2010 Hylke Bons"
#: ../SparkleShare/SparkleShare.cs:94
msgid "SparkleShare syncs the ~/SparkleShare folder with remote repositories."
msgstr "SparkleShare synchronize le dossier ~/SparkleShare avec les dépôts distants."
#: ../SparkleShare/SparkleShare.cs:96
msgid "Usage: sparkleshare [start|stop|restart] [OPTION]..."
msgstr "Usage: sparkleshare [start|stop|restart] [OPTION]..."
#: ../SparkleShare/SparkleShare.cs:97
msgid "Sync SparkleShare folder with remote repositories."
msgstr "Synchronise le dossier SparkleShare avec les dépôts distants."
#: ../SparkleShare/SparkleShare.cs:100
msgid "\t -d, --disable-gui\tDon't show the notification icon."
msgstr "\t -d, --disable-gui\tMasquer l'icone de notification."
#: ../SparkleShare/SparkleStatusIcon.cs:69
msgid "Error syncing"
msgstr "Erreur de synchronisation"
#: ../SparkleShare/SparkleStatusIcon.cs:72
msgid "Everything is up to date"
msgstr "Tout est à jour"
#: ../SparkleShare/SparkleStatusIcon.cs:75
msgid "SyncingĶ"
msgstr "Synchronisation en coursĶ"
#: ../SparkleShare/SparkleStatusIcon.cs:116
msgid "Add a Remote FolderĶ"
msgstr "Ajouter un dossier distantĶ"
#: ../SparkleShare/SparkleStatusIcon.cs:124
msgid "Show Notifications"
msgstr "Montrer les notifications"
#: ../SparkleShare/SparkleStatusIcon.cs:142
msgid "Visit Website"
msgstr "Visiter le site Internet"
#: ../SparkleShare/SparkleStatusIcon.cs:159
msgid "Quit"
msgstr "Quitter"
#: ../SparkleShare/SparkleUI.cs:134
msgid "Welcome to SparkleShare!"
msgstr "Bienvenue sur SparkleShare!"
#: ../SparkleShare/SparkleUI.cs:135
msgid "You don't have any folders set up yet."
msgstr "Vous n'avez encore configuré aucun dossier."
#: ../SparkleShare/SparkleUI.cs:138
msgid "Add a FolderĶ"
msgstr "Ajouter un dossierĶ"
#. TRANSLATORS: {0} is a folder name, and {1} is a server address
#: ../SparkleShare/SparkleWindow.cs:51
#, csharp-format
msgid "‘{0}’ on {1}"
msgstr "‘{0}’ sur {1}"

241
po/pt_BR.po Normal file
View file

@ -0,0 +1,241 @@
# Brazilian Portuguese translation of SparkleShare.
# Copyright (C) Hylke Bons
# This file is distributed under the same license as the SparkleShare package.
# Magnun Leno <magnun.leno@gmail.com>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: SparkleShare\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-06 09:20+0000\n"
"PO-Revision-Date: 2010-07-05 13:01-0300\n"
"Last-Translator: Magnun Leno <magnun.leno@gmail.com>\n"
"Language-Team: Brazilian Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt-BR\n"
"Plural-Forms: nplurals=2; plural=(n>1);\n"
"X-Poedit-Language: Portuguese\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Country: BRAZIL\n"
#: ../SparkleDiff/SparkleDiff.cs:75 ../SparkleShare/SparkleShare.cs:50
msgid "Git wasn't found."
msgstr "Git não foi encontrado."
#: ../SparkleDiff/SparkleDiff.cs:76 ../SparkleShare/SparkleShare.cs:51
msgid "You can get Git from http://git-scm.com/."
msgstr "Você pode obter o Git no site http://git-scm.com/."
#: ../SparkleDiff/SparkleDiff.cs:83 ../SparkleShare/SparkleShare.cs:58
msgid "Sorry, you can't run SparkleShare with these permissions."
msgstr "Descuple, você não pode rodar o SparkleShare sem essas permissões."
#: ../SparkleDiff/SparkleDiff.cs:84 ../SparkleShare/SparkleShare.cs:59
msgid "Things would go utterly wrong."
msgstr "As coisas vão dar completamente errado."
#: ../SparkleDiff/SparkleDiff.cs:156
msgid "SparkleDiff Copyright (C) 2010 Hylke Bons"
msgstr "Direitos Autorais SparkleShare (C) 2010 Hylke Bons"
#: ../SparkleDiff/SparkleDiff.cs:158 ../SparkleShare/SparkleShare.cs:90
msgid "This program comes with ABSOLUTELY NO WARRANTY."
msgstr "Este programa vem com ABSOLUTAMENTE NENHUMA GARANTIA."
#: ../SparkleDiff/SparkleDiff.cs:159 ../SparkleShare/SparkleShare.cs:91
msgid "This is free software, and you are welcome to redistribute it "
msgstr "Este é um software livre, e você é incentivado a distribuí-lo "
#: ../SparkleDiff/SparkleDiff.cs:160 ../SparkleShare/SparkleShare.cs:92
msgid "under certain conditions. Please read the GNU GPLv3 for details."
msgstr "sob certas condições. Por favor leia a licença GNU GPLv3 para mais detalhes."
#: ../SparkleDiff/SparkleDiff.cs:162
msgid "SparkleDiff let's you compare revisions of an image file side by side."
msgstr "O SparkleDiff permite que você compare lado a lado revisões de uma imagem."
#: ../SparkleDiff/SparkleDiff.cs:164
msgid "Usage: sparklediff [FILE]"
msgstr "Utilização: sparklediff [ARQUIVO]"
#: ../SparkleDiff/SparkleDiff.cs:165
msgid "Open an image file to show its revisions"
msgstr "Abre um arquivo de imagem e mostra suas revisões"
#: ../SparkleDiff/SparkleDiff.cs:167 ../SparkleShare/SparkleShare.cs:99
msgid "Arguments:"
msgstr "Argumentos:"
#: ../SparkleDiff/SparkleDiff.cs:168 ../SparkleShare/SparkleShare.cs:101
msgid "\t -h, --help\t\tDisplay this help text."
msgstr "\t -h, --help\t\tMostra esse texto de ajuda."
#: ../SparkleShare/SparkleDialog.cs:50
msgid "Address of remote SparkleShare folder:"
msgstr "Endereço da pasta remota SparkleShare:"
#: ../SparkleShare/SparkleDialog.cs:81
msgid "Add Folder"
msgstr "Adicionar Pasta"
#: ../SparkleShare/SparkleDialog.cs:126
#, csharp-format
msgid "Syncing folder {0}"
msgstr "Sincronizando pasta {0}"
#: ../SparkleShare/SparkleDialog.cs:127
msgid "SparkleShare will notify you when this is done."
msgstr "SparkleShare irá notifica-lo quando houver concluído."
#: ../SparkleShare/SparkleDialog.cs:129
msgid "Dismiss"
msgstr "Fechar"
#: ../SparkleShare/SparkleDialog.cs:157
#, csharp-format
msgid "Something went wrong while syncing {0}"
msgstr "Alguma coisa deu errado enquanto sincronizava {0}"
#: ../SparkleShare/SparkleDialog.cs:167
msgid "Try Again…"
msgstr "Tentar novamente…"
#: ../SparkleShare/SparkleDialog.cs:197
#, csharp-format
msgid "Successfully synced folder {0}"
msgstr "Pasta {0} sincronizada com sucesso"
#: ../SparkleShare/SparkleDialog.cs:198
msgid "Now make great stuff happen!"
msgstr "Agora faça grandes coisas acontecerem!"
#. Add a button to open the folder where the changed file is
#: ../SparkleShare/SparkleDialog.cs:200 ../SparkleShare/SparkleRepo.cs:319
#: ../SparkleShare/SparkleWindow.cs:63
msgid "Open Folder"
msgstr "Abrir Pasta"
#: ../SparkleShare/SparkleHelpers.cs:164
#, csharp-format
msgid "a second ago"
msgid_plural "{0} seconds ago"
msgstr[0] "há um segundo"
msgstr[1] "há {0} segundos"
#: ../SparkleShare/SparkleHelpers.cs:170
#, csharp-format
msgid "a minute ago"
msgid_plural "about {0} minutes ago"
msgstr[0] "há um minuto"
msgstr[1] "há quase {0} minutos"
#: ../SparkleShare/SparkleHelpers.cs:176
#, csharp-format
msgid "about an hour ago"
msgid_plural "about {0} hours ago"
msgstr[0] "há quase uma hora"
msgstr[1] "há quase {0} horas"
#: ../SparkleShare/SparkleHelpers.cs:182
#, csharp-format
msgid "yesterday"
msgid_plural "{0} days ago"
msgstr[0] "ontem"
msgstr[1] "há {0} dias"
#: ../SparkleShare/SparkleHelpers.cs:188
#, csharp-format
msgid "a month ago"
msgid_plural "{0} months ago"
msgstr[0] "há um mês"
msgstr[1] "há {0} meses"
#: ../SparkleShare/SparkleHelpers.cs:193
#, csharp-format
msgid "a year ago"
msgid_plural "{0} years ago"
msgstr[0] "há um ano"
msgstr[1] "há {0} anos"
#: ../SparkleShare/SparkleHelpers.cs:205
msgid "Hold your ponies!"
msgstr "Segure seus pôneis!"
#: ../SparkleShare/SparkleHelpers.cs:206
msgid ""
"SparkleShare is known to be insanely fast with \n"
"pictures of unicorns. Please make sure your internets\n"
"are upgraded to the latest version to avoid problems."
msgstr ""
"SparkleShare é conhecido por ser insanamente rápido com\n"
"imagens de unicórnios. Para evitar problemas, por favor\n"
"verifique se sua internet foi atualizada para a versão\n"
"mais recente."
#: ../SparkleShare/SparkleShare.cs:88
msgid "SparkleShare Copyright (C) 2010 Hylke Bons"
msgstr "Diretos Autorais do SparkleShare (C) 2010 Hylke Bons"
#: ../SparkleShare/SparkleShare.cs:94
msgid "SparkleShare syncs the ~/SparkleShare folder with remote repositories."
msgstr "SparkleShare sincroniza a pasta ~/SparkleShare com repositórios remotos."
#: ../SparkleShare/SparkleShare.cs:96
msgid "Usage: sparkleshare [start|stop|restart] [OPTION]..."
msgstr "Utilização: sparkleshare [start|stop|restart] [OPTION]..."
#: ../SparkleShare/SparkleShare.cs:97
msgid "Sync SparkleShare folder with remote repositories."
msgstr "Sincroniza a pasta SparkleShare com repositórios remotos."
#: ../SparkleShare/SparkleShare.cs:100
msgid "\t -d, --disable-gui\tDon't show the notification icon."
msgstr "\t -d, --disable-gui\tNão mostra o ícone de notificação."
#: ../SparkleShare/SparkleStatusIcon.cs:69
msgid "Error syncing"
msgstr "Erro ao sincronizar"
#: ../SparkleShare/SparkleStatusIcon.cs:72
msgid "Everything is up to date"
msgstr "Tudo está atualizado"
#: ../SparkleShare/SparkleStatusIcon.cs:75
msgid "Syncing…"
msgstr "Sincronizando…"
#: ../SparkleShare/SparkleStatusIcon.cs:116
msgid "Add a Remote Folder…"
msgstr "Adicionar uma Pasta Remota…"
#: ../SparkleShare/SparkleStatusIcon.cs:124
msgid "Show Notifications"
msgstr "Mostrar Notificações"
#: ../SparkleShare/SparkleStatusIcon.cs:142
msgid "Visit Website"
msgstr "Visitar o Website"
#: ../SparkleShare/SparkleStatusIcon.cs:159
msgid "Quit"
msgstr "Sair"
#: ../SparkleShare/SparkleUI.cs:134
msgid "Welcome to SparkleShare!"
msgstr "Bem vindo ao SparkleShare"
#: ../SparkleShare/SparkleUI.cs:135
msgid "You don't have any folders set up yet."
msgstr "Você ainda não possui nenhuma pasta configurada."
#: ../SparkleShare/SparkleUI.cs:138
msgid "Add a Folder…"
msgstr "Adicionar uma Pasta…"
#. TRANSLATORS: {0} is a folder name, and {1} is a server address
#: ../SparkleShare/SparkleWindow.cs:51
#, csharp-format
msgid "{0} on {1}"
msgstr "{0} de {1}"

133
po/sv.po
View file

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-03 08:06+0000\n"
"POT-Creation-Date: 2010-07-06 06:09+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Samuel Thollander <samuel.thollander@gmail.com>\n"
"Language-Team: \n"
@ -14,6 +14,59 @@ msgstr ""
"|| n%100>=20) ? 1 : 2);\n"
"X-Poedit-Language: Swedish\n"
#: ../SparkleDiff/SparkleDiff.cs:74 ../SparkleShare/SparkleShare.cs:50
msgid "Git wasn't found."
msgstr "Git hittades inte."
#: ../SparkleDiff/SparkleDiff.cs:75 ../SparkleShare/SparkleShare.cs:51
msgid "You can get Git from http://git-scm.com/."
msgstr "Du kan skaffa Git från http://git-scm.com/."
#: ../SparkleDiff/SparkleDiff.cs:82 ../SparkleShare/SparkleShare.cs:58
msgid "Sorry, you can't run SparkleShare with these permissions."
msgstr "Ledsen, men du kan inte köra SparkleShare med dessa rättigheter."
#: ../SparkleDiff/SparkleDiff.cs:83 ../SparkleShare/SparkleShare.cs:59
#, fuzzy
msgid "Things would go utterly wrong."
msgstr "Saker och ting kommer gå åt skogen."
#: ../SparkleDiff/SparkleDiff.cs:121
#, fuzzy
msgid "SparkleDiff Copyright (C) 2010 Hylke Bons"
msgstr "SparkleShare Copyright (C) 2010 Hylke Bons"
#: ../SparkleDiff/SparkleDiff.cs:123 ../SparkleShare/SparkleShare.cs:90
msgid "This program comes with ABSOLUTELY NO WARRANTY."
msgstr "Detta program kommer utan några som helst garantier."
#: ../SparkleDiff/SparkleDiff.cs:124 ../SparkleShare/SparkleShare.cs:91
msgid "This is free software, and you are welcome to redistribute it "
msgstr "Detta är fri programvara och du är välkommen att distribuera det "
#: ../SparkleDiff/SparkleDiff.cs:125 ../SparkleShare/SparkleShare.cs:92
msgid "under certain conditions. Please read the GNU GPLv3 for details."
msgstr "under vissa förhållanden. Vänligen läs GNU GPL v3 för detaljer."
#: ../SparkleDiff/SparkleDiff.cs:127
msgid "SparkleDiff let's you compare revisions of an image file side by side."
msgstr "SparkleDiff visar skillnaderna mellan två versioner av samma bild sida vid sida."
#: ../SparkleDiff/SparkleDiff.cs:129
msgid "Usage: sparklediff [FILE]"
msgstr "Användning: sparklediff [FIL]"
#: ../SparkleDiff/SparkleDiff.cs:130
msgid "Open an image file to show its revisions"
msgstr "Öppna en fil för att se dess versioner"
#: ../SparkleDiff/SparkleDiff.cs:132 ../SparkleShare/SparkleShare.cs:99
msgid "Arguments:"
msgstr "Argument:"
#: ../SparkleDiff/SparkleDiff.cs:133 ../SparkleShare/SparkleShare.cs:101
msgid "\t -h, --help\t\tDisplay this help text."
msgstr "\t -h, --help\t\tVisa denna hjälptext."
#: ../SparkleShare/SparkleDialog.cs:50
msgid "Address of remote SparkleShare folder:"
@ -55,59 +108,58 @@ msgid "Now make great stuff happen!"
msgstr "Nu kommer häftiga saker att hända"
#. Add a button to open the folder where the changed file is
#: ../SparkleShare/SparkleDialog.cs:200
#: ../SparkleShare/SparkleRepo.cs:319
#: ../SparkleShare/SparkleWindow.cs:62
#: ../SparkleShare/SparkleDialog.cs:200 ../SparkleShare/SparkleRepo.cs:319
#: ../SparkleShare/SparkleWindow.cs:63
msgid "Open Folder"
msgstr "Öppna mapp"
#: ../SparkleShare/SparkleHelpers.cs:159
#: ../SparkleShare/SparkleHelpers.cs:164
#, csharp-format
msgid "a second ago"
msgid_plural "{0} seconds ago"
msgstr[0] "en sekund sedan"
msgstr[1] "{0} sekunder sedan"
#: ../SparkleShare/SparkleHelpers.cs:165
#: ../SparkleShare/SparkleHelpers.cs:170
#, csharp-format
msgid "a minute ago"
msgid_plural "about {0} minutes ago"
msgstr[0] "en minut sedan"
msgstr[1] "{0} minuter sedan"
#: ../SparkleShare/SparkleHelpers.cs:171
#: ../SparkleShare/SparkleHelpers.cs:176
#, csharp-format
msgid "about an hour ago"
msgid_plural "about {0} hours ago"
msgstr[0] "ungefär en timme sedan"
msgstr[1] "ungefär {0} timmar sedan"
#: ../SparkleShare/SparkleHelpers.cs:177
#: ../SparkleShare/SparkleHelpers.cs:182
#, csharp-format
msgid "yesterday"
msgid_plural "{0} days ago"
msgstr[0] "igår"
msgstr[1] "{0} dagar sedan"
#: ../SparkleShare/SparkleHelpers.cs:183
#: ../SparkleShare/SparkleHelpers.cs:188
#, csharp-format
msgid "a month ago"
msgid_plural "{0} months ago"
msgstr[0] "en månad sedan"
msgstr[1] "{0} månader sedan"
#: ../SparkleShare/SparkleHelpers.cs:188
#: ../SparkleShare/SparkleHelpers.cs:193
#, csharp-format
msgid "a year ago"
msgid_plural "{0} years ago"
msgstr[0] "ett år sedan"
msgstr[1] "{0} år sedan"
#: ../SparkleShare/SparkleHelpers.cs:197
#: ../SparkleShare/SparkleHelpers.cs:205
msgid "Hold your ponies!"
msgstr "Håll in dina ponnyer!"
#: ../SparkleShare/SparkleHelpers.cs:198
#: ../SparkleShare/SparkleHelpers.cs:206
msgid ""
"SparkleShare is known to be insanely fast with \n"
"pictures of unicorns. Please make sure your internets\n"
@ -117,62 +169,26 @@ msgstr ""
"bilder på enhörningar. Vänligen säkerställ att dina internet\n"
"är uppgraderade till den senaste versionen för att slippa problem."
#: ../SparkleShare/SparkleShare.cs:50
msgid "Git wasn't found."
msgstr "Git hittades inte."
#: ../SparkleShare/SparkleShare.cs:51
msgid "You can get Git from http://git-scm.com/."
msgstr "Du kan skaffa Git från http://git-scm.com/."
#: ../SparkleShare/SparkleShare.cs:58
msgid "Sorry, you can't run SparkleShare with these permissions."
msgstr "Ledsen, men du kan inte köra SparkleShare med dessa rättigheter."
#: ../SparkleShare/SparkleShare.cs:59
msgid "Things will go utterly wrong."
msgstr "Saker och ting kommer gå åt skogen."
#: ../SparkleShare/SparkleShare.cs:87
#: ../SparkleShare/SparkleShare.cs:88
msgid "SparkleShare Copyright (C) 2010 Hylke Bons"
msgstr "SparkleShare Copyright (C) 2010 Hylke Bons"
#: ../SparkleShare/SparkleShare.cs:89
msgid "This program comes with ABSOLUTELY NO WARRANTY."
msgstr "Detta program kommer utan några som helst garantier."
#: ../SparkleShare/SparkleShare.cs:90
msgid "This is free software, and you are welcome to redistribute it "
msgstr "Detta är fri programvara och du är välkommen att distribuera det "
#: ../SparkleShare/SparkleShare.cs:91
msgid "under certain conditions. Please read the GNU GPLv3 for details."
msgstr "under vissa förhållanden. Vänligen läs GNU GPL v3 för detaljer."
#: ../SparkleShare/SparkleShare.cs:93
#: ../SparkleShare/SparkleShare.cs:94
msgid "SparkleShare syncs the ~/SparkleShare folder with remote repositories."
msgstr "SparkleShare synkroniserar ~/SparkleShare mappen med fjärrmappar."
#: ../SparkleShare/SparkleShare.cs:95
#: ../SparkleShare/SparkleShare.cs:96
msgid "Usage: sparkleshare [start|stop|restart] [OPTION]..."
msgstr "Användning: sparkleshare [start|stop|restart] [INSTÄLLNING]"
#: ../SparkleShare/SparkleShare.cs:96
#: ../SparkleShare/SparkleShare.cs:97
msgid "Sync SparkleShare folder with remote repositories."
msgstr "Synkronisera SparkleShare mappen med fjärrmappar."
#: ../SparkleShare/SparkleShare.cs:98
msgid "Arguments:"
msgstr "Argument:"
#: ../SparkleShare/SparkleShare.cs:99
#: ../SparkleShare/SparkleShare.cs:100
msgid "\t -d, --disable-gui\tDon't show the notification icon."
msgstr "\t -d, --disable-gui\tVisa inte meddelandeikonen."
#: ../SparkleShare/SparkleShare.cs:100
msgid "\t -h, --help\t\tDisplay this help text."
msgstr "\t -h, --help\t\tVisa denna hjälptext."
#: ../SparkleShare/SparkleStatusIcon.cs:69
msgid "Error syncing"
msgstr "Synkroniseringsfel"
@ -213,8 +229,17 @@ msgstr "Du har inga mappar inställda ännu."
msgid "Add a Folder…"
msgstr "Lägg till en mapp…"
#: ../SparkleShare/SparkleWindow.cs:50
#. TRANSLATORS: {0} is a folder name, and {1} is a server address
#: ../SparkleShare/SparkleWindow.cs:51
#, csharp-format
msgid "{0} on {1}"
msgstr "{0} på {1}"
#~ msgid "Comparing Revisions of {0}"
#~ msgstr "Jämför versioner av {0}"
#~ msgid "Current Revision"
#~ msgstr "Nuvarande revision"
#~ msgid "d MMM\tH:mm"
#~ msgstr "d MMM\tH:mm"