Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* configure.in, Monsoon/Defines.cs, Monsoon/Defines.cs.in: Generate

  Defines.cs for prefix path required for gettext initialization.
* Monsoon/Main.cs: Initialize gettext with locales in application
  directory and a fallback to system locales.
* Monsoon/UnhandledExceptionDialog.cs, Monsoon/CreateTorrentDialog.cs,
  Monsoon/PeerTreeView.cs, Monsoon/PiecesTreeView.cs,
  Monsoon/FileTreeView.cs, Monsoon/RssManager/RssManagerDialog.cs,
  Monsoon/EditColumnsDialog.cs, Monsoon/TorrentTreeView.cs: Wrap
  messages with gettext calls.
* Monsoon/AboutDialog.cs: Fixed whitespace.

  Use Defines.ApplicatioName instead of hardcoded string.

  Added myself to authors.
* Monsoon/Monsoon.mdp: Synced project file.
* intltool-merge.in: Added missing file for I18N.
* po/de.po: Updated german translation.
* po/POTFILES.in: Added all source files that contain message strings.

svn path=/trunk/monsoon/; revision=99952
  • Loading branch information...
commit e7858018fe2d913b5abba0bfe095022579d1f68e 1 parent b6d827f
@meebey meebey authored
View
8 ChangeLog
@@ -1,3 +1,11 @@
+2008-04-06 Mirco Bauer <meebey@meebey.net>
+
+ * configure.in: Generate Defines.cs for prefix path required for gettext
+ initialization.
+ * intltool-merge.in: Added missing file for I18N.
+ * po/de.po: Updated german translation.
+ * po/POTFILES.in: Added all source files that contain message strings.
+
2008-04-05 Mario Sopena <mario.sopena@gmail.com>
* po/es.po, configure.in: Added spanish translation
View
14 Monsoon/AboutDialog.cs
@@ -3,21 +3,21 @@
namespace Monsoon
{
-
-
public class AboutDialog : Gtk.AboutDialog
{
-
public AboutDialog() : base()
{
- Name = "Monsoon";
- Authors = new String[]{"Alan McGovern (Library)",
- "Jared Hendry (Interface)"};
+ Name = Defines.ApplicationName;
+ Authors = new String[] {
+ "Alan McGovern (Library)",
+ "Jared Hendry (Interface)",
+ "Mirco Bauer (I18N integration)"
+ };
Version = Defines.Version;
this.TranslatorCredits = string.Format("{1}{0}{2}{0}{3}", Environment.NewLine,
_("French - Olivier Dufour"),
- _("German - Mirco Bauer"),
+ _("German - Mirco Bauer <meebey@meebey.net>"),
_("Spanish - Mario Sopena"));
this.WrapLicense = true;
License = @"Copyright (C) 2006-2008 Alan McGovern, Jared Hendry
View
17 Monsoon/ChangeLog
@@ -1,3 +1,20 @@
+2008-04-06 Mirco Bauer <meebey@meebey.net>
+
+ * Defines.cs, Defines.cs.in: Generate Defines.cs for prefix path required
+ for gettext initialization.
+ * Main.cs: Initialize gettext with locales in application directory and a
+ fallback to system locales.
+ * UnhandledExceptionDialog.cs, CreateTorrentDialog.cs, PeerTreeView.cs,
+ PiecesTreeView.cs, FileTreeView.cs, RssManager/RssManagerDialog.cs,
+ EditColumnsDialog.cs, TorrentTreeView.cs: Wrap messages with gettext
+ calls.
+ * AboutDialog.cs: Fixed whitespace.
+
+ Use Defines.ApplicatioName instead of hardcoded string.
+
+ Added myself to authors.
+ * Monsoon.mdp: Synced project file.
+
2008-04-06 Jared Hendry <hendry.jared@gmail.com>
* MainWindow.cs: Move serialization out to Xml*Controllers
View
10 Monsoon/CreateTorrentDialog.cs
@@ -90,7 +90,7 @@ private void BuildTrackerWidgets()
trackerTreeView.Model = trackerListStore;
TreeViewColumn trackerColumn = new TreeViewColumn ();
- trackerColumn.Title = "Trackers";
+ trackerColumn.Title = _("Trackers");
CellRendererText trackerTextCell = new CellRendererText ();
trackerColumn.PackStart(trackerTextCell, true);
@@ -200,7 +200,7 @@ private void createTorrent()
creator.Announces[0].Add(s);
creator.Comment = Comment;
- creator.CreatedBy = "Monsoon";
+ creator.CreatedBy = Defines.ApplicationName;
creator.Path = SavePath;
@@ -260,6 +260,10 @@ protected virtual void OnFolderRadioButtonToggled (object sender, System.EventAr
protected virtual void OnFileRadioButtonToggled (object sender, System.EventArgs e)
{
}
-
+
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
79 Monsoon/Defines.cs
@@ -1,79 +0,0 @@
-// Defines.cs created with MonoDevelop
-// User: buchan at 01:23 03/28/2008
-//
-// To change standard headers go to Edit->Preferences->Coding->Standard Headers
-//
-
-using System;
-using System.IO;
-
-namespace Monsoon
-{
- public class Defines
- {
- private static string BaseDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
- private static string AppSettingsPath = Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "monsoon");
-
- public static string ApplicationName
- {
- get { return "Monsoon"; }
- }
-
- public static string LogFile
- {
- get { return Path.Combine(AppSettingsPath, "monsoon.log"); }
- }
-
- public static string ConfigDirectory
- {
- get { return AppSettingsPath; }
- }
-
- public static string IconPath
- {
- get { return Path.Combine(BaseDirectory, "icons"); }
- }
-
- public static string SerializedTorrentSettings
- {
- get { return Path.Combine (AppSettingsPath, "torrents.xml"); }
- }
-
- public static string SerializedFastResume
- {
- get { return Path.Combine (AppSettingsPath, "fastresume.benc"); }
- }
-
- public static string SerializedLabels
- {
- get { return Path.Combine(AppSettingsPath, "labels.xml"); }
- }
-
- public static string SerializedRssFeeds
- {
- get { return Path.Combine (AppSettingsPath, "rssfeeds.xml"); }
- }
-
- public static string SerializedRssHistroy
- {
- get { return Path.Combine (AppSettingsPath, "rsshistory.xml"); }
- }
-
- public static string SerializedRssFilters
- {
- get { return Path.Combine (AppSettingsPath, "rssfilters.xml"); }
- }
-
- public static string TorrentFolder
- {
- get { return Path.Combine(AppSettingsPath, "torrents"); }
- }
-
- static Defines()
- {
- string[] parts = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString().Split('.');
- Version = parts[0] + '.' + parts[1];
- }
- public static readonly string Version;
- }
-}
View
106 Monsoon/Defines.cs.in
@@ -0,0 +1,106 @@
+// Defines.cs created with MonoDevelop
+// User: buchan at 01:23 03/28/2008
+//
+// To change standard headers go to Edit->Preferences->Coding->Standard Headers
+//
+
+using System;
+using System.IO;
+
+namespace Monsoon
+{
+ public class Defines
+ {
+ private static string applicationDirectory;
+ private static string applicationDataDirectory;
+ private static string version;
+
+ public static string InstallPrefix {
+ get {
+ return "@PREFIX@";
+ }
+ }
+
+ public static string ApplicationName
+ {
+ get { return "Monsoon"; }
+ }
+
+ public static string LogFile
+ {
+ get { return Path.Combine(ApplicationDataDirectory, "monsoon.log"); }
+ }
+
+ public static string ConfigDirectory
+ {
+ get { return ApplicationDataDirectory; }
+ }
+
+ public static string IconPath
+ {
+ get { return Path.Combine(ApplicationDirectory, "icons"); }
+ }
+
+ public static string SerializedTorrentSettings
+ {
+ get { return Path.Combine (ApplicationDataDirectory, "torrents.xml"); }
+ }
+
+ public static string SerializedFastResume
+ {
+ get { return Path.Combine (ApplicationDataDirectory, "fastresume.benc"); }
+ }
+
+ public static string SerializedLabels
+ {
+ get { return Path.Combine(ApplicationDataDirectory, "labels.xml"); }
+ }
+
+ public static string SerializedRssFeeds
+ {
+ get { return Path.Combine (ApplicationDataDirectory, "rssfeeds.xml"); }
+ }
+
+ public static string SerializedRssHistroy
+ {
+ get { return Path.Combine (ApplicationDataDirectory, "rsshistory.xml"); }
+ }
+
+ public static string SerializedRssFilters
+ {
+ get { return Path.Combine (ApplicationDataDirectory, "rssfilters.xml"); }
+ }
+
+ public static string TorrentFolder
+ {
+ get { return Path.Combine(ApplicationDataDirectory, "torrents"); }
+ }
+
+ public static string ApplicationDirectory {
+ get {
+ return applicationDirectory;
+ }
+ }
+
+ public static string ApplicationDataDirectory {
+ get {
+ return applicationDataDirectory;
+ }
+ }
+
+ public static string Version {
+ get {
+ return version;
+ }
+ }
+
+ static Defines()
+ {
+ applicationDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
+ applicationDataDirectory = Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "monsoon");
+
+ Version ver = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
+ version = String.Format("{0}.{1}", ver.Major, ver.Minor);
+ }
+ }
+}
View
6 Monsoon/EditColumnsDialog.cs
@@ -19,7 +19,7 @@ public EditColumnsDialog(TorrentTreeView torrentTreeView)
this.torrentTreeView = torrentTreeView;
- Title = "Edit columns";
+ Title = _("Edit columns");
Modal = true;
nameVisibleCheckButton.Active = torrentTreeView.nameColumn.Visible;
@@ -88,5 +88,9 @@ private void OnSizeVisibleToggled(object sender, EventArgs args)
torrentTreeView.sizeColumn.Visible = sizeVisibleCheckButton.Active;
}
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
9 Monsoon/FileTreeView.cs
@@ -97,8 +97,8 @@ private void BuildColumns ()
filenameColumn.Resizable = true;
priorityColumn.Title = "";
- filenameColumn.Title = "Filename";
- progressColumn.Title = "Progress";
+ filenameColumn.Title = _("Filename");
+ progressColumn.Title = _("Progress");
Gtk.CellRendererPixbuf priorityCell = new CellRendererPixbuf ();
Gtk.CellRendererText filenameCell = new CellRendererText ();
@@ -225,5 +225,10 @@ private void RenderProgress (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, G
(cell as Gtk.CellRendererProgress).Value = 0;
(cell as Gtk.CellRendererProgress).Value = (int)torrentFile.BitField.PercentComplete;
}
+
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
9 Monsoon/Main.cs
@@ -31,6 +31,7 @@
using System;
using System.IO;
using System.Text;
+using System.Reflection;
using System.Runtime.InteropServices;
using Gtk;
@@ -95,7 +96,13 @@ public MainClass(string [] args)
GLib.Thread.Init();
}
- Mono.Unix.Catalog.Init("monsoon", "locale");
+ string localeDir = Path.Combine(Defines.ApplicationDirectory, "locale");
+ if (!Directory.Exists(localeDir)) {
+ localeDir = Path.Combine(Defines.InstallPrefix, "share");
+ localeDir = Path.Combine(localeDir, "locale");
+ }
+ Mono.Unix.Catalog.Init("monsoon", localeDir);
+ logger.Debug("Using locale data from: {0}", localeDir);
Console.WriteLine(_("Starting Monsoon"));
Application.Init("monsoon", ref args);
View
7 Monsoon/Monsoon.mdp
@@ -63,12 +63,9 @@
<File name="gtk-gui/Monsoon.EditColumnsDialog.cs" subtype="Code" buildaction="Compile" />
<File name="gtk-gui/Monsoon.CreateTorrentProgressDialog.cs" subtype="Code" buildaction="Compile" />
<File name="Menus/SpeedLimitMenu.cs" subtype="Code" buildaction="Compile" />
- <File name="Defines.cs" subtype="Code" buildaction="Compile" />
+ <File name="Defines.cs.in" subtype="Code" buildaction="Compile" />
<File name="monsoon.desktop" subtype="Code" buildaction="FileCopy" DeployService.TargetDirectoryId="Linux.DesktopApplications" />
<File name="Monsoon.exe.config" subtype="Code" buildaction="FileCopy" />
- <File name="TorrentSettingsModel.cs" subtype="Code" buildaction="Compile" />
- <File name="TorrentSettingsController.cs" subtype="Code" buildaction="Compile" />
- <File name="TorrentFileSettingsController.cs" subtype="Code" buildaction="Compile" />
<File name="TorrentFileSettingsModel.cs" subtype="Code" buildaction="Compile" />
<File name="Menus/SpeedMenuItem.cs" subtype="Code" buildaction="Compile" />
<File name="Settings/GconfSettingsStorage.cs" subtype="Code" buildaction="Compile" />
@@ -123,4 +120,4 @@
<AsmRefVar Name="REFERENCES" />
<ProjectRefVar Name="REFERENCES" />
</MonoDevelop.Autotools.MakefileInfo>
-</Project>
+</Project>
View
17 Monsoon/PeerTreeView.cs
@@ -61,12 +61,12 @@ private void buildColumns()
seedingColumn = new TreeViewColumn();
interestedColumn = new TreeViewColumn();
- addressColumn.Title = "IP Address";
- clientColumn.Title = "Client";
- downColumn.Title = "DL Speed";
- upColumn.Title = "UP Speed";
- seedingColumn.Title = "Seeding";
- interestedColumn.Title = "Interested";
+ addressColumn.Title = _("IP Address");
+ clientColumn.Title = _("Client");
+ downColumn.Title = _("DL Speed");
+ upColumn.Title = _("UP Speed");
+ seedingColumn.Title = _("Seeding");
+ interestedColumn.Title = _("Interested");
addressColumn.Expand = true;
clientColumn.Expand = true;
@@ -149,6 +149,9 @@ private void RenderInterested (Gtk.TreeViewColumn column, Gtk.CellRenderer cell,
(cell as Gtk.CellRendererToggle).Active = peer.AmInterested;
}
-
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
15 Monsoon/PiecesTreeView.cs
@@ -29,11 +29,12 @@ public PiecesTreeView()
blockColumn = new TreeViewColumn();
//completedColumn = new TreeViewColumn();
- numberColumn.Title = "#";
- sizeColumn.Title = "Size";
- numBlocksColumn.Title = "# of Blocks";
- blockColumn.Title = "Blocks";
- //completedColumn.Title = "Completed";
+ // I18N: number of / amount
+ numberColumn.Title = _("#");
+ sizeColumn.Title = _("Size");
+ numBlocksColumn.Title = _("# of Blocks");
+ blockColumn.Title = _("Blocks");
+ //completedColumn.Title = _("Completed");
Gtk.CellRendererText numberCell = new Gtk.CellRendererText();
Gtk.CellRendererText sizeCell = new Gtk.CellRendererText();
@@ -93,5 +94,9 @@ private void RenderCompleted (Gtk.TreeViewColumn column, Gtk.CellRenderer cell,
(cell as Gtk.CellRendererText).Text = (blockEvent.Piece.TotalReceived / blockEvent.Block.RequestLength).ToString("0.00");
}
*/
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
11 Monsoon/RssManager/RssManagerDialog.cs
@@ -138,7 +138,7 @@ private void BuildFilterPage()
filterFeedCombobox.Model = filterFeedListStore;
filterFeedCombobox.SetActiveIter(allIter);
- filterColumn.Title = "Filter";
+ filterColumn.Title = _("Filter");
Gtk.CellRendererText filterCell = new Gtk.CellRendererText ();
filterColumn.PackStart (filterCell, true);
filterColumn.SetCellDataFunc (filterCell, new Gtk.TreeCellDataFunc (RenderFilter));
@@ -185,7 +185,7 @@ private void BuildTorrentPage()
TreeViewColumn itemColumn = new TreeViewColumn();
Gtk.CellRendererText itemCell = new Gtk.CellRendererText ();
- itemColumn.Title = "Item";
+ itemColumn.Title = _("Item");
itemColumn.PackStart (itemCell, true);
itemColumn.SetCellDataFunc (itemCell, new Gtk.TreeCellDataFunc (RenderItem));
@@ -290,7 +290,7 @@ private void BuildHistoryPage()
TreeViewColumn itemColumn = new TreeViewColumn();
Gtk.CellRendererText itemCell = new Gtk.CellRendererText ();
- itemColumn.Title = "Item";
+ itemColumn.Title = _("Item");
itemColumn.PackStart (itemCell, true);
itemColumn.SetCellDataFunc (itemCell, new Gtk.TreeCellDataFunc (RenderItem));
@@ -481,5 +481,10 @@ protected virtual void OnFeedComboboxChanged (object sender, System.EventArgs e)
{
feedfilter.Refilter();
}
+
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
23 Monsoon/TorrentTreeView.cs
@@ -146,15 +146,15 @@ private void buildColumns()
ratioColumn = new TreeViewColumn();
sizeColumn = new TreeViewColumn();
- nameColumn.Title = "Name";
- statusColumn.Title = "Status";
- doneColumn.Title = "Done";
- seedsColumn.Title = "Seeds";
- peersColumn.Title = "Peers";
- downSpeedColumn.Title = "DL Speed";
- upSpeedColumn.Title = "UP Speed";
- ratioColumn.Title = "Ratio";
- sizeColumn.Title = "Size";
+ nameColumn.Title = _("Name");
+ statusColumn.Title = _("Status");
+ doneColumn.Title = _("Done");
+ seedsColumn.Title = _("Seeds");
+ peersColumn.Title = _("Peers");
+ downSpeedColumn.Title = _("DL Speed");
+ upSpeedColumn.Title = _("UP Speed");
+ ratioColumn.Title = _("Ratio");
+ sizeColumn.Title = _("Size");
nameColumn.Resizable = true;
statusColumn.Resizable = true;
@@ -341,5 +341,10 @@ private void RenderTorrentSize (Gtk.TreeViewColumn column, Gtk.CellRenderer cell
(cell as Gtk.CellRendererText).Text = ByteConverter.ConvertSize (torrent.Torrent.Size);
}
+
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
8 Monsoon/UnhandledExceptionDialog.cs
@@ -22,11 +22,17 @@ public UnhandledExceptionDialog(Exception e)
exceptionImage.IconName = Stock.DialogError;
exceptionImage.IconSize = 6;
- exceptionLabel.Text = "An unhandled exception has been encountered:\n" + e.Message;
+ exceptionLabel.Text = String.Format(_("An unhandled exception has been encountered:\n{0}"),
+ e.Message);
TextBuffer buffer;
buffer = exceptionTextView.Buffer;
buffer.Text = e.ToString() + e.StackTrace;
}
+
+ private static string _(string s)
+ {
+ return Mono.Unix.Catalog.GetString(s);
+ }
}
}
View
1  Monsoon/gtk-gui/Monsoon.CreateTorrentDialog.cs
@@ -135,7 +135,6 @@ public partial class CreateTorrentDialog {
this.fileRadioButton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Single File"));
this.fileRadioButton.CanFocus = true;
this.fileRadioButton.Name = "fileRadioButton";
- this.fileRadioButton.Active = true;
this.fileRadioButton.DrawIndicator = true;
this.fileRadioButton.UseUnderline = true;
this.fileRadioButton.Group = new GLib.SList(System.IntPtr.Zero);
View
1  Monsoon/gtk-gui/gui.stetic
@@ -2516,7 +2516,6 @@
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Single File</property>
- <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
View
1  configure.in
@@ -68,5 +68,6 @@ Monsoon/monsoon
AC_OUTPUT([
Monsoon/AssemblyInfo.cs
+Monsoon/Defines.cs
po/Makefile.in
])
View
1,506 intltool-merge.in
@@ -0,0 +1,1506 @@
+#!@INTLTOOL_PERL@ -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+
+#
+# The Intltool Message Merger
+#
+# Copyright (C) 2000, 2003 Free Software Foundation.
+# Copyright (C) 2000, 2001 Eazel, Inc
+#
+# Intltool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# version 2 published by the Free Software Foundation.
+#
+# Intltool 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, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# Authors: Maciej Stachowiak <mjs@noisehavoc.org>
+# Kenneth Christiansen <kenneth@gnu.org>
+# Darin Adler <darin@bentspoon.com>
+#
+# Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
+#
+
+## Release information
+my $PROGRAM = "intltool-merge";
+my $PACKAGE = "intltool";
+my $VERSION = "0.37.1";
+
+## Loaded modules
+use strict;
+use Getopt::Long;
+use Text::Wrap;
+use File::Basename;
+
+my $must_end_tag = -1;
+my $last_depth = -1;
+my $translation_depth = -1;
+my @tag_stack = ();
+my @entered_tag = ();
+my @translation_strings = ();
+my $leading_space = "";
+
+## Scalars used by the option stuff
+my $HELP_ARG = 0;
+my $VERSION_ARG = 0;
+my $BA_STYLE_ARG = 0;
+my $XML_STYLE_ARG = 0;
+my $KEYS_STYLE_ARG = 0;
+my $DESKTOP_STYLE_ARG = 0;
+my $SCHEMAS_STYLE_ARG = 0;
+my $RFC822DEB_STYLE_ARG = 0;
+my $QUOTED_STYLE_ARG = 0;
+my $QUOTEDXML_STYLE_ARG = 0;
+my $QUIET_ARG = 0;
+my $PASS_THROUGH_ARG = 0;
+my $UTF8_ARG = 0;
+my $MULTIPLE_OUTPUT = 0;
+my $cache_file;
+
+## Handle options
+GetOptions
+(
+ "help" => \$HELP_ARG,
+ "version" => \$VERSION_ARG,
+ "quiet|q" => \$QUIET_ARG,
+ "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
+ "ba-style|b" => \$BA_STYLE_ARG,
+ "xml-style|x" => \$XML_STYLE_ARG,
+ "keys-style|k" => \$KEYS_STYLE_ARG,
+ "desktop-style|d" => \$DESKTOP_STYLE_ARG,
+ "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
+ "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
+ "quoted-style" => \$QUOTED_STYLE_ARG,
+ "quotedxml-style" => \$QUOTEDXML_STYLE_ARG,
+ "pass-through|p" => \$PASS_THROUGH_ARG,
+ "utf8|u" => \$UTF8_ARG,
+ "multiple-output|m" => \$MULTIPLE_OUTPUT,
+ "cache|c=s" => \$cache_file
+ ) or &error;
+
+my $PO_DIR;
+my $FILE;
+my $OUTFILE;
+
+my %po_files_by_lang = ();
+my %translations = ();
+my $iconv = $ENV{"ICONV"} || "iconv";
+my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
+
+sub isProgramInPath
+{
+ my ($file) = @_;
+ # If either a file exists, or when run it returns 0 exit status
+ return 1 if ((-x $file) or (system("$file -l >$devnull") == 0));
+ return 0;
+}
+
+if (! isProgramInPath ("$iconv"))
+{
+ print STDERR " *** iconv is not found on this system!\n".
+ " *** Without it, intltool-merge can not convert encodings.\n";
+ exit;
+}
+
+# Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+# XML quoted string contents
+my $q = "[^\\\"]*";
+
+## Check for options.
+
+if ($VERSION_ARG)
+{
+ &print_version;
+}
+elsif ($HELP_ARG)
+{
+ &print_help;
+}
+elsif ($BA_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &ba_merge_translations;
+ &finalize;
+}
+elsif ($XML_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &xml_merge_output;
+ &finalize;
+}
+elsif ($KEYS_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &keys_merge_translations;
+ &finalize;
+}
+elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &desktop_merge_translations;
+ &finalize;
+}
+elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &schemas_merge_translations;
+ &finalize;
+}
+elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
+{
+ &preparation;
+ &print_message;
+ &rfc822deb_merge_translations;
+ &finalize;
+}
+elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &quoted_merge_translations($QUOTEDXML_STYLE_ARG);
+ &finalize;
+}
+else
+{
+ &print_help;
+}
+
+exit;
+
+## Sub for printing release information
+sub print_version
+{
+ print <<_EOF_;
+${PROGRAM} (${PACKAGE}) ${VERSION}
+Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
+
+Copyright (C) 2000-2003 Free Software Foundation, Inc.
+Copyright (C) 2000-2001 Eazel, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+ exit;
+}
+
+## Sub for printing usage information
+sub print_help
+{
+ print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
+Generates an output file that includes some localized attributes from an
+untranslated source file.
+
+Mandatory options: (exactly one must be specified)
+ -b, --ba-style includes translations in the bonobo-activation style
+ -d, --desktop-style includes translations in the desktop style
+ -k, --keys-style includes translations in the keys style
+ -s, --schemas-style includes translations in the schemas style
+ -r, --rfc822deb-style includes translations in the RFC822 style
+ --quoted-style includes translations in the quoted string style
+ --quotedxml-style includes translations in the quoted xml string style
+ -x, --xml-style includes translations in the standard xml style
+
+Other options:
+ -u, --utf8 convert all strings to UTF-8 before merging
+ (default for everything except RFC822 style)
+ -p, --pass-through deprecated, does nothing and issues a warning
+ -m, --multiple-output output one localized file per locale, instead of
+ a single file containing all localized elements
+ -c, --cache=FILE specify cache file name
+ (usually \$top_builddir/po/.intltool-merge-cache)
+ -q, --quiet suppress most messages
+ --help display this help and exit
+ --version output version information and exit
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+ exit;
+}
+
+
+## Sub for printing error messages
+sub print_error
+{
+ print STDERR "Try `${PROGRAM} --help' for more information.\n";
+ exit;
+}
+
+
+sub print_message
+{
+ print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
+}
+
+
+sub preparation
+{
+ $PO_DIR = $ARGV[0];
+ $FILE = $ARGV[1];
+ $OUTFILE = $ARGV[2];
+
+ &gather_po_files;
+ &get_translation_database;
+}
+
+# General-purpose code for looking up translations in .po files
+
+sub po_file2lang
+{
+ my ($tmp) = @_;
+ $tmp =~ s/^.*\/(.*)\.po$/$1/;
+ return $tmp;
+}
+
+sub gather_po_files
+{
+ if (my $linguas = $ENV{"LINGUAS"})
+ {
+ for my $lang (split / /, $linguas) {
+ my $po_file = $PO_DIR . "/" . $lang . ".po";
+ if (-e $po_file) {
+ $po_files_by_lang{$lang} = $po_file;
+ }
+ }
+ }
+ else
+ {
+ if (open LINGUAS_FILE, "$PO_DIR/LINGUAS")
+ {
+ while (<LINGUAS_FILE>)
+ {
+ next if /^#/;
+
+ for my $lang (split)
+ {
+ chomp ($lang);
+ my $po_file = $PO_DIR . "/" . $lang . ".po";
+ if (-e $po_file) {
+ $po_files_by_lang{$lang} = $po_file;
+ }
+ }
+ }
+
+ close LINGUAS_FILE;
+ }
+ else
+ {
+ for my $po_file (glob "$PO_DIR/*.po") {
+ $po_files_by_lang{po_file2lang($po_file)} = $po_file;
+ }
+ }
+ }
+}
+
+sub get_local_charset
+{
+ my ($encoding) = @_;
+ my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
+
+ # seek character encoding aliases in charset.alias (glib)
+
+ if (open CHARSET_ALIAS, $alias_file)
+ {
+ while (<CHARSET_ALIAS>)
+ {
+ next if /^\#/;
+ return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
+ }
+
+ close CHARSET_ALIAS;
+ }
+
+ # if not found, return input string
+
+ return $encoding;
+}
+
+sub get_po_encoding
+{
+ my ($in_po_file) = @_;
+ my $encoding = "";
+
+ open IN_PO_FILE, $in_po_file or die;
+ while (<IN_PO_FILE>)
+ {
+ ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
+ if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
+ {
+ $encoding = $1;
+ last;
+ }
+ }
+ close IN_PO_FILE;
+
+ if (!$encoding)
+ {
+ print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
+ $encoding = "ISO-8859-1";
+ }
+
+ system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull");
+ if ($?) {
+ $encoding = get_local_charset($encoding);
+ }
+
+ return $encoding
+}
+
+sub utf8_sanity_check
+{
+ print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG;
+ $UTF8_ARG = 1;
+}
+
+sub get_translation_database
+{
+ if ($cache_file) {
+ &get_cached_translation_database;
+ } else {
+ &create_translation_database;
+ }
+}
+
+sub get_newest_po_age
+{
+ my $newest_age;
+
+ foreach my $file (values %po_files_by_lang)
+ {
+ my $file_age = -M $file;
+ $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
+ }
+
+ $newest_age = 0 if !$newest_age;
+
+ return $newest_age;
+}
+
+sub create_cache
+{
+ print "Generating and caching the translation database\n" unless $QUIET_ARG;
+
+ &create_translation_database;
+
+ open CACHE, ">$cache_file" || die;
+ print CACHE join "\x01", %translations;
+ close CACHE;
+}
+
+sub load_cache
+{
+ print "Found cached translation database\n" unless $QUIET_ARG;
+
+ my $contents;
+ open CACHE, "<$cache_file" || die;
+ {
+ local $/;
+ $contents = <CACHE>;
+ }
+ close CACHE;
+ %translations = split "\x01", $contents;
+}
+
+sub get_cached_translation_database
+{
+ my $cache_file_age = -M $cache_file;
+ if (defined $cache_file_age)
+ {
+ if ($cache_file_age <= &get_newest_po_age)
+ {
+ &load_cache;
+ return;
+ }
+ print "Found too-old cached translation database\n" unless $QUIET_ARG;
+ }
+
+ &create_cache;
+}
+
+sub create_translation_database
+{
+ for my $lang (keys %po_files_by_lang)
+ {
+ my $po_file = $po_files_by_lang{$lang};
+
+ if ($UTF8_ARG)
+ {
+ my $encoding = get_po_encoding ($po_file);
+
+ if (lc $encoding eq "utf-8")
+ {
+ open PO_FILE, "<$po_file";
+ }
+ else
+ {
+ print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
+
+ open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
+ }
+ }
+ else
+ {
+ open PO_FILE, "<$po_file";
+ }
+
+ my $nextfuzzy = 0;
+ my $inmsgid = 0;
+ my $inmsgstr = 0;
+ my $msgid = "";
+ my $msgstr = "";
+
+ while (<PO_FILE>)
+ {
+ $nextfuzzy = 1 if /^#, fuzzy/;
+
+ if (/^msgid "((\\.|[^\\]+)*)"/ )
+ {
+ $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+ $msgid = "";
+ $msgstr = "";
+
+ if ($nextfuzzy) {
+ $inmsgid = 0;
+ } else {
+ $msgid = unescape_po_string($1);
+ $inmsgid = 1;
+ }
+ $inmsgstr = 0;
+ $nextfuzzy = 0;
+ }
+
+ if (/^msgstr "((\\.|[^\\]+)*)"/)
+ {
+ $msgstr = unescape_po_string($1);
+ $inmsgstr = 1;
+ $inmsgid = 0;
+ }
+
+ if (/^"((\\.|[^\\]+)*)"/)
+ {
+ $msgid .= unescape_po_string($1) if $inmsgid;
+ $msgstr .= unescape_po_string($1) if $inmsgstr;
+ }
+ }
+ $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+ }
+}
+
+sub finalize
+{
+}
+
+sub unescape_one_sequence
+{
+ my ($sequence) = @_;
+
+ return "\\" if $sequence eq "\\\\";
+ return "\"" if $sequence eq "\\\"";
+ return "\n" if $sequence eq "\\n";
+ return "\r" if $sequence eq "\\r";
+ return "\t" if $sequence eq "\\t";
+ return "\b" if $sequence eq "\\b";
+ return "\f" if $sequence eq "\\f";
+ return "\a" if $sequence eq "\\a";
+ return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7)
+
+ return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/);
+ return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/);
+
+ # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489
+
+ return $sequence;
+}
+
+sub unescape_po_string
+{
+ my ($string) = @_;
+
+ $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg;
+
+ return $string;
+}
+
+sub entity_decode
+{
+ local ($_) = @_;
+
+ s/&apos;/'/g; # '
+ s/&quot;/"/g; # "
+ s/&lt;/</g;
+ s/&gt;/>/g;
+ s/&amp;/&/g;
+
+ return $_;
+}
+
+# entity_encode: (string)
+#
+# Encode the given string to XML format (encode '<' etc).
+
+sub entity_encode
+{
+ my ($pre_encoded) = @_;
+
+ my @list_of_chars = unpack ('C*', $pre_encoded);
+
+ # with UTF-8 we only encode minimalistic
+ return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
+}
+
+sub entity_encode_int_minimalist
+{
+ return "&quot;" if $_ == 34;
+ return "&amp;" if $_ == 38;
+ return "&apos;" if $_ == 39;
+ return "&lt;" if $_ == 60;
+ return "&gt;" if $_ == 62;
+ return chr $_;
+}
+
+sub entity_encoded_translation
+{
+ my ($lang, $string) = @_;
+
+ my $translation = $translations{$lang, $string};
+ return $string if !$translation;
+ return entity_encode ($translation);
+}
+
+## XML (bonobo-activation specific) merge code
+
+sub ba_merge_translations
+{
+ my $source;
+
+ {
+ local $/; # slurp mode
+ open INPUT, "<$FILE" or die "can't open $FILE: $!";
+ $source = <INPUT>;
+ close INPUT;
+ }
+
+ open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
+ # Binmode so that selftest works ok if using a native Win32 Perl...
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
+ {
+ print OUTPUT $1;
+
+ my $node = $2 . "\n";
+
+ my @strings = ();
+ $_ = $node;
+ while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
+ push @strings, entity_decode($3);
+ }
+ print OUTPUT;
+
+ my %langs;
+ for my $string (@strings)
+ {
+ for my $lang (keys %po_files_by_lang)
+ {
+ $langs{$lang} = 1 if $translations{$lang, $string};
+ }
+ }
+
+ for my $lang (sort keys %langs)
+ {
+ $_ = $node;
+ s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
+ s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
+ print OUTPUT;
+ }
+ }
+
+ print OUTPUT $source;
+
+ close OUTPUT;
+}
+
+
+## XML (non-bonobo-activation) merge code
+
+
+# Process tag attributes
+# Only parameter is a HASH containing attributes -> values mapping
+sub getAttributeString
+{
+ my $sub = shift;
+ my $do_translate = shift || 0;
+ my $language = shift || "";
+ my $result = "";
+ my $translate = shift;
+ foreach my $e (reverse(sort(keys %{ $sub }))) {
+ my $key = $e;
+ my $string = $sub->{$e};
+ my $quote = '"';
+
+ $string =~ s/^[\s]+//;
+ $string =~ s/[\s]+$//;
+
+ if ($string =~ /^'.*'$/)
+ {
+ $quote = "'";
+ }
+ $string =~ s/^['"]//g;
+ $string =~ s/['"]$//g;
+
+ if ($do_translate && $key =~ /^_/) {
+ $key =~ s|^_||g;
+ if ($language) {
+ # Handle translation
+ my $decode_string = entity_decode($string);
+ my $translation = $translations{$language, $decode_string};
+ if ($translation) {
+ $translation = entity_encode($translation);
+ $string = $translation;
+ }
+ $$translate = 2;
+ } else {
+ $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate
+ }
+ }
+
+ $result .= " $key=$quote$string$quote";
+ }
+ return $result;
+}
+
+# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree
+sub getXMLstring
+{
+ my $ref = shift;
+ my $spacepreserve = shift || 0;
+ my @list = @{ $ref };
+ my $result = "";
+
+ my $count = scalar(@list);
+ my $attrs = $list[0];
+ my $index = 1;
+
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+ $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+
+ while ($index < $count) {
+ my $type = $list[$index];
+ my $content = $list[$index+1];
+ if (! $type ) {
+ # We've got CDATA
+ if ($content) {
+ # lets strip the whitespace here, and *ONLY* here
+ $content =~ s/\s+/ /gs if (!$spacepreserve);
+ $result .= $content;
+ }
+ } elsif ( "$type" ne "1" ) {
+ # We've got another element
+ $result .= "<$type";
+ $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
+ if ($content) {
+ my $subresult = getXMLstring($content, $spacepreserve);
+ if ($subresult) {
+ $result .= ">".$subresult . "</$type>";
+ } else {
+ $result .= "/>";
+ }
+ } else {
+ $result .= "/>";
+ }
+ }
+ $index += 2;
+ }
+ return $result;
+}
+
+# Translate list of nodes if necessary
+sub translate_subnodes
+{
+ my $fh = shift;
+ my $content = shift;
+ my $language = shift || "";
+ my $singlelang = shift || 0;
+ my $spacepreserve = shift || 0;
+
+ my @nodes = @{ $content };
+
+ my $count = scalar(@nodes);
+ my $index = 0;
+ while ($index < $count) {
+ my $type = $nodes[$index];
+ my $rest = $nodes[$index+1];
+ if ($singlelang) {
+ my $oldMO = $MULTIPLE_OUTPUT;
+ $MULTIPLE_OUTPUT = 1;
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ $MULTIPLE_OUTPUT = $oldMO;
+ } else {
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ }
+ $index += 2;
+ }
+}
+
+sub isWellFormedXmlFragment
+{
+ my $ret = eval 'require XML::Parser';
+ if(!$ret) {
+ die "You must have XML::Parser installed to run $0\n\n";
+ }
+
+ my $fragment = shift;
+ return 0 if (!$fragment);
+
+ $fragment = "<root>$fragment</root>";
+ my $xp = new XML::Parser(Style => 'Tree');
+ my $tree = 0;
+ eval { $tree = $xp->parse($fragment); };
+ return $tree;
+}
+
+sub traverse
+{
+ my $fh = shift;
+ my $nodename = shift;
+ my $content = shift;
+ my $language = shift || "";
+ my $spacepreserve = shift || 0;
+
+ if (!$nodename) {
+ if ($content =~ /^[\s]*$/) {
+ $leading_space .= $content;
+ }
+ print $fh $content;
+ } else {
+ # element
+ my @all = @{ $content };
+ my $attrs = shift @all;
+ my $translate = 0;
+ my $outattr = getAttributeString($attrs, 1, $language, \$translate);
+
+ if ($nodename =~ /^_/) {
+ $translate = 1;
+ $nodename =~ s/^_//;
+ }
+ my $lookup = '';
+
+ $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+ print $fh "<$nodename", $outattr;
+ if ($translate) {
+ $lookup = getXMLstring($content, $spacepreserve);
+ if (!$spacepreserve) {
+ $lookup =~ s/^\s+//s;
+ $lookup =~ s/\s+$//s;
+ }
+
+ if ($lookup || $translate == 2) {
+ my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup});
+ if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) {
+ $translation = $lookup if (!$translation);
+ print $fh " xml:lang=\"", $language, "\"" if $language;
+ print $fh ">";
+ if ($translate == 2) {
+ translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+ } else {
+ print $fh $translation;
+ }
+ print $fh "</$nodename>";
+
+ return; # this means there will be no same translation with xml:lang="$language"...
+ # if we want them both, just remove this "return"
+ } else {
+ print $fh ">";
+ if ($translate == 2) {
+ translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+ } else {
+ print $fh $lookup;
+ }
+ print $fh "</$nodename>";
+ }
+ } else {
+ print $fh "/>";
+ }
+
+ for my $lang (sort keys %po_files_by_lang) {
+ if ($MULTIPLE_OUTPUT && $lang ne "$language") {
+ next;
+ }
+ if ($lang) {
+ # Handle translation
+ #
+ my $translate = 0;
+ my $localattrs = getAttributeString($attrs, 1, $lang, \$translate);
+ my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup});
+ if ($translate && !$translation) {
+ $translation = $lookup;
+ }
+
+ if ($translation || $translate) {
+ print $fh "\n";
+ $leading_space =~ s/.*\n//g;
+ print $fh $leading_space;
+ print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">";
+ if ($translate == 2) {
+ translate_subnodes($fh, \@all, $lang, 1, $spacepreserve);
+ } else {
+ print $fh $translation;
+ }
+ print $fh "</$nodename>";
+ }
+ }
+ }
+
+ } else {
+ my $count = scalar(@all);
+ if ($count > 0) {
+ print $fh ">";
+ my $index = 0;
+ while ($index < $count) {
+ my $type = $all[$index];
+ my $rest = $all[$index+1];
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ $index += 2;
+ }
+ print $fh "</$nodename>";
+ } else {
+ print $fh "/>";
+ }
+ }
+ }
+}
+
+sub intltool_tree_comment
+{
+ my $expat = shift;
+ my $data = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ push @$clist, 1 => $data;
+}
+
+sub intltool_tree_cdatastart
+{
+ my $expat = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ push @$clist, 0 => $expat->original_string();
+}
+
+sub intltool_tree_cdataend
+{
+ my $expat = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ $clist->[$pos] .= $expat->original_string();
+}
+
+sub intltool_tree_char
+{
+ my $expat = shift;
+ my $text = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ # Use original_string so that we retain escaped entities
+ # in CDATA sections.
+ #
+ if ($pos > 0 and $clist->[$pos - 1] eq '0') {
+ $clist->[$pos] .= $expat->original_string();
+ } else {
+ push @$clist, 0 => $expat->original_string();
+ }
+}
+
+sub intltool_tree_start
+{
+ my $expat = shift;
+ my $tag = shift;
+ my @origlist = ();
+
+ # Use original_string so that we retain escaped entities
+ # in attribute values. We must convert the string to an
+ # @origlist array to conform to the structure of the Tree
+ # Style.
+ #
+ my @original_array = split /\x/, $expat->original_string();
+ my $source = $expat->original_string();
+
+ # Remove leading tag.
+ #
+ $source =~ s|^\s*<\s*(\S+)||s;
+
+ # Grab attribute key/value pairs and push onto @origlist array.
+ #
+ while ($source)
+ {
+ if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
+ {
+ $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
+ push @origlist, $1;
+ push @origlist, '"' . $2 . '"';
+ }
+ elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
+ {
+ $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
+ push @origlist, $1;
+ push @origlist, "'" . $2 . "'";
+ }
+ else
+ {
+ last;
+ }
+ }
+
+ my $ol = [ { @origlist } ];
+
+ push @{ $expat->{Lists} }, $expat->{Curlist};
+ push @{ $expat->{Curlist} }, $tag => $ol;
+ $expat->{Curlist} = $ol;
+}
+
+sub readXml
+{
+ my $filename = shift || return;
+ if(!-f $filename) {
+ die "ERROR Cannot find filename: $filename\n";
+ }
+
+ my $ret = eval 'require XML::Parser';
+ if(!$ret) {
+ die "You must have XML::Parser installed to run $0\n\n";
+ }
+ my $xp = new XML::Parser(Style => 'Tree');
+ $xp->setHandlers(Char => \&intltool_tree_char);
+ $xp->setHandlers(Start => \&intltool_tree_start);
+ $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
+ $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
+ my $tree = $xp->parsefile($filename);
+
+# <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
+# would be:
+# [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{},
+# 0, "Howdy", ref, [{}]], 0, "do" ] ]
+
+ return $tree;
+}
+
+sub print_header
+{
+ my $infile = shift;
+ my $fh = shift;
+ my $source;
+
+ if(!-f $infile) {
+ die "ERROR Cannot find filename: $infile\n";
+ }
+
+ print $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
+ {
+ local $/;
+ open DOCINPUT, "<${FILE}" or die;
+ $source = <DOCINPUT>;
+ close DOCINPUT;
+ }
+ if ($source =~ /(<!DOCTYPE.*\[.*\]\s*>)/s)
+ {
+ print $fh "$1\n";
+ }
+ elsif ($source =~ /(<!DOCTYPE[^>]*>)/s)
+ {
+ print $fh "$1\n";
+ }
+}
+
+sub parseTree
+{
+ my $fh = shift;
+ my $ref = shift;
+ my $language = shift || "";
+
+ my $name = shift @{ $ref };
+ my $cont = shift @{ $ref };
+
+ while (!$name || "$name" eq "1") {
+ $name = shift @{ $ref };
+ $cont = shift @{ $ref };
+ }
+
+ my $spacepreserve = 0;
+ my $attrs = @{$cont}[0];
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+ traverse($fh, $name, $cont, $language, $spacepreserve);
+}
+
+sub xml_merge_output
+{
+ my $source;
+
+ if ($MULTIPLE_OUTPUT) {
+ for my $lang (sort keys %po_files_by_lang) {
+ if ( ! -d $lang ) {
+ mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+ }
+ open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ my $tree = readXml($FILE);
+ print_header($FILE, \*OUTPUT);
+ parseTree(\*OUTPUT, $tree, $lang);
+ close OUTPUT;
+ print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
+ }
+ if ( ! -d "C" ) {
+ mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n";
+ }
+ open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ my $tree = readXml($FILE);
+ print_header($FILE, \*OUTPUT);
+ parseTree(\*OUTPUT, $tree);
+ close OUTPUT;
+ print "CREATED C/$OUTFILE\n" unless $QUIET_ARG;
+ } else {
+ open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ my $tree = readXml($FILE);
+ print_header($FILE, \*OUTPUT);
+ parseTree(\*OUTPUT, $tree);
+ close OUTPUT;
+ print "CREATED $OUTFILE\n" unless $QUIET_ARG;
+ }
+}
+
+sub keys_merge_translation
+{
+ my ($lang) = @_;
+
+ if ( ! -d $lang && $MULTIPLE_OUTPUT)
+ {
+ mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+ }
+
+ open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n";
+ open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while (<INPUT>)
+ {
+ if (s/^(\s*)_(\w+=(.*))/$1$2/)
+ {
+ my $string = $3;
+
+ if (!$MULTIPLE_OUTPUT)
+ {
+ print OUTPUT;
+
+ my $non_translated_line = $_;
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $translation = $translations{$lang, $string};
+ next if !$translation;
+
+ $_ = $non_translated_line;
+ s/(\w+)=.*/[$lang]$1=$translation/;
+ print OUTPUT;
+ }
+ }
+ else
+ {
+ my $non_translated_line = $_;
+ my $translation = $translations{$lang, $string};
+ $translation = $string if !$translation;
+
+ $_ = $non_translated_line;
+ s/(\w+)=.*/$1=$translation/;
+ print OUTPUT;
+ }
+ }
+ else
+ {
+ print OUTPUT;
+ }
+ }
+
+ close OUTPUT;
+ close INPUT;
+
+ print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
+}
+
+sub keys_merge_translations
+{
+ if ($MULTIPLE_OUTPUT)
+ {
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ keys_merge_translation ($lang);
+ }
+ keys_merge_translation ("C");
+ }
+ else
+ {
+ keys_merge_translation (".");
+ }
+}
+
+sub desktop_merge_translations
+{
+ open INPUT, "<${FILE}" or die;
+ open OUTPUT, ">${OUTFILE}" or die;
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while (<INPUT>)
+ {
+ if (s/^(\s*)_(\w+=(.*))/$1$2/)
+ {
+ my $string = $3;
+
+ print OUTPUT;
+
+ my $non_translated_line = $_;
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $translation = $translations{$lang, $string};
+ next if !$translation;
+
+ $_ = $non_translated_line;
+ s/(\w+)=.*/${1}[$lang]=$translation/;
+ print OUTPUT;
+ }
+ }
+ else
+ {
+ print OUTPUT;
+ }
+ }
+
+ close OUTPUT;
+ close INPUT;
+}
+
+sub schemas_merge_translations
+{
+ my $source;
+
+ {
+ local $/; # slurp mode
+ open INPUT, "<$FILE" or die "can't open $FILE: $!";
+ $source = <INPUT>;
+ close INPUT;
+ }
+
+ open OUTPUT, ">$OUTFILE" or die;
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ # FIXME: support attribute translations
+
+ # Empty nodes never need translation, so unmark all of them.
+ # For example, <_foo/> is just replaced by <foo/>.
+ $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
+
+ while ($source =~ s/
+ (.*?)
+ (\s+)(<locale\ name="C">(\s*)
+ (<default>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/default>)?(\s*)
+ (<short>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/short>)?(\s*)
+ (<long>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/long>)?(\s*)
+ <\/locale>)
+ //sx)
+ {
+ print OUTPUT $1;
+
+ my $locale_start_spaces = $2 ? $2 : '';
+ my $default_spaces = $4 ? $4 : '';
+ my $short_spaces = $7 ? $7 : '';
+ my $long_spaces = $10 ? $10 : '';
+ my $locale_end_spaces = $13 ? $13 : '';
+ my $c_default_block = $3 ? $3 : '';
+ my $default_string = $6 ? $6 : '';
+ my $short_string = $9 ? $9 : '';
+ my $long_string = $12 ? $12 : '';
+
+ print OUTPUT "$locale_start_spaces$c_default_block";
+
+ $default_string =~ s/\s+/ /g;
+ $default_string = entity_decode($default_string);
+ $short_string =~ s/\s+/ /g;
+ $short_string = entity_decode($short_string);
+ $long_string =~ s/\s+/ /g;
+ $long_string = entity_decode($long_string);
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $default_translation = $translations{$lang, $default_string};
+ my $short_translation = $translations{$lang, $short_string};
+ my $long_translation = $translations{$lang, $long_string};
+
+ next if (!$default_translation && !$short_translation &&
+ !$long_translation);
+
+ print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
+
+ print OUTPUT "$default_spaces";
+
+ if ($default_translation)
+ {
+ $default_translation = entity_encode($default_translation);
+ print OUTPUT "<default>$default_translation</default>";
+ }
+
+ print OUTPUT "$short_spaces";
+
+ if ($short_translation)
+ {
+ $short_translation = entity_encode($short_translation);
+ print OUTPUT "<short>$short_translation</short>";
+ }
+
+ print OUTPUT "$long_spaces";
+
+ if ($long_translation)
+ {
+ $long_translation = entity_encode($long_translation);
+ print OUTPUT "<long>$long_translation</long>";
+ }
+
+ print OUTPUT "$locale_end_spaces</locale>";
+ }
+ }
+
+ print OUTPUT $source;
+
+ close OUTPUT;
+}
+
+sub rfc822deb_merge_translations
+{
+ my %encodings = ();
+ for my $lang (keys %po_files_by_lang) {
+ $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang}));
+ }
+
+ my $source;
+
+ $Text::Wrap::huge = 'overflow';
+ $Text::Wrap::break = qr/\n|\s(?=\S)/;
+
+ {
+ local $/; # slurp mode
+ open INPUT, "<$FILE" or die "can't open $FILE: $!";
+ $source = <INPUT>;
+ close INPUT;
+ }
+
+ open OUTPUT, ">${OUTFILE}" or die;
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg)
+ {
+ my $sep = $1;
+ my $non_translated_line = $3.$4;
+ my $string = $5;
+ my $underscore = length($2);
+ next if $underscore eq 0 && $non_translated_line =~ /^#/;
+ # Remove [] dummy strings
+ my $stripped = $string;
+ $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2;
+ $stripped =~ s/\[\s[^\[\]]*\]$//;
+ $non_translated_line .= $stripped;
+
+ print OUTPUT $sep.$non_translated_line;
+
+ if ($underscore)
+ {
+ my @str_list = rfc822deb_split($underscore, $string);
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $is_translated = 1;
+ my $str_translated = '';
+ my $first = 1;
+
+ for my $str (@str_list)
+ {
+ my $translation = $translations{$lang, $str};
+
+ if (!$translation)
+ {
+ $is_translated = 0;
+ last;
+ }
+
+ # $translation may also contain [] dummy
+ # strings, mostly to indicate an empty string
+ $translation =~ s/\[\s[^\[\]]*\]$//;
+
+ if ($first)
+ {
+ if ($underscore eq 2)
+ {
+ $str_translated .= $translation;
+ }
+ else
+ {
+ $str_translated .=
+ Text::Tabs::expand($translation) .
+ "\n";
+ }
+ }
+ else
+ {
+ if ($underscore eq 2)
+ {
+ $str_translated .= ', ' . $translation;
+ }
+ else
+ {
+ $str_translated .= Text::Tabs::expand(
+ Text::Wrap::wrap(' ', ' ', $translation)) .
+ "\n .\n";
+ }
+ }
+ $first = 0;
+
+ # To fix some problems with Text::Wrap::wrap
+ $str_translated =~ s/(\n )+\n/\n .\n/g;
+ }
+ next unless $is_translated;
+
+ $str_translated =~ s/\n \.\n$//;
+ $str_translated =~ s/\s+$//;
+
+ $_ = $non_translated_line;
+ s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s;
+ print OUTPUT;
+ }
+ }
+ }
+ print OUTPUT "\n";
+
+ close OUTPUT;
+ close INPUT;
+}
+
+sub rfc822deb_split
+{
+ # Debian defines a special way to deal with rfc822-style files:
+ # when a value contain newlines, it consists of
+ # 1. a short form (first line)
+ # 2. a long description, all lines begin with a space,
+ # and paragraphs are separated by a single dot on a line
+ # This routine returns an array of all paragraphs, and reformat
+ # them.
+ # When first argument is 2, the string is a comma separated list of
+ # values.
+ my $type = shift;
+ my $text = shift;
+ $text =~ s/^[ \t]//mg;
+ return (split(/, */, $text, 0)) if $type ne 1;
+ return ($text) if $text !~ /\n/;
+
+ $text =~ s/([^\n]*)\n//;
+ my @list = ($1);
+ my $str = '';
+
+ for my $line (split (/\n/, $text))
+ {
+ chomp $line;
+ if ($line =~ /^\.\s*$/)
+ {
+ # New paragraph
+ $str =~ s/\s*$//;
+ push(@list, $str);
+ $str = '';
+ }
+ elsif ($line =~ /^\s/)
+ {
+ # Line which must not be reformatted
+ $str .= "\n" if length ($str) && $str !~ /\n$/;
+ $line =~ s/\s+$//;
+ $str .= $line."\n";
+ }
+ else
+ {
+ # Continuation line, remove newline
+ $str .= " " if length ($str) && $str !~ /\n$/;
+ $str .= $line;
+ }
+ }
+
+ $str =~ s/\s*$//;
+ push(@list, $str) if length ($str);
+
+ return @list;
+}
+
+sub quoted_translation
+{
+ my ($xml_mode, $lang, $string) = @_;
+
+ $string = entity_decode($string) if $xml_mode;
+ $string =~ s/\\\"/\"/g;
+
+ my $translation = $translations{$lang, $string};
+ $translation = $string if !$translation;
+ $translation = entity_encode($translation) if $xml_mode;
+ $translation =~ s/\"/\\\"/g;
+ return $translation
+}
+
+sub quoted_merge_translations
+{
+ my ($xml_mode) = @_;
+
+ if (!$MULTIPLE_OUTPUT) {
+ print "Quoted only supports Multiple Output.\n";
+ exit(1);
+ }
+
+ for my $lang (sort keys %po_files_by_lang) {
+ if ( ! -d $lang ) {
+ mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+ }
+ open INPUT, "<${FILE}" or die;
+ open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ while (<INPUT>)
+ {
+ s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($xml_mode, $lang, $1) . "\""/ge;
+ print OUTPUT;
+ }
+ close OUTPUT;
+ close INPUT;
+ }
+}
View
17 po/POTFILES.in
@@ -1,4 +1,21 @@
[encoding: UTF-8]
+Monsoon/AboutDialog.cs
+Monsoon/CreateTorrentDialog.cs
+Monsoon/EditColumnsDialog.cs
+Monsoon/FileTreeView.cs
Monsoon/Main.cs
Monsoon/MainWindow.cs
+Monsoon/PeerTreeView.cs
+Monsoon/PiecesTreeView.cs
+Monsoon/RssManager/RssManagerDialog.cs
+Monsoon/TorrentTreeView.cs
+Monsoon/UnhandledExceptionDialog.cs
+Monsoon/gtk-gui/MainWindow.cs
Monsoon/gtk-gui/Monsoon.MainWindow.cs
+Monsoon/gtk-gui/Monsoon.CreateTorrentProgressDialog.cs
+Monsoon/gtk-gui/Monsoon.EditColumnsDialog.cs
+Monsoon/gtk-gui/Monsoon.MainWindow.cs
+Monsoon/gtk-gui/Monsoon.CreateTorrentDialog.cs
+Monsoon/gtk-gui/Monsoon.PreferencesDialog.cs
+Monsoon/gtk-gui/Monsoon.UnhandledExceptionDialog.cs
+Monsoon/gtk-gui/Monsoon.RssManagerDialog.cs
View
516 po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.11\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-04-04 00:49+0200\n"
+"POT-Creation-Date: 2008-04-06 13:36+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Mirco Bauer <meebey@meebey.net>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,265 +16,581 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../Monsoon/Main.cs:92
+#: ../Monsoon/Main.cs:106
msgid "Starting Monsoon"
msgstr "Starte Monsoon"
#. PR_SET_NAME
-#: ../Monsoon/Main.cs:117
+#: ../Monsoon/Main.cs:131
msgid "Error setting process name: "
msgstr "Fehler beim setzen des Prozessnamens: "
-#: ../Monsoon/MainWindow.cs:261 ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:236
+#: ../Monsoon/MainWindow.cs:262 ../Monsoon/gtk-gui/MainWindow.cs:245
+#: ../Monsoon/gtk-gui/MainWindow.cs:246
+#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:236
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:237
msgid "Quit"
msgstr "Beenden"
-#: ../Monsoon/MainWindow.cs:268
+#: ../Monsoon/MainWindow.cs:269
msgid "Stop All"
msgstr "Alle Anhalten"
-#: ../Monsoon/MainWindow.cs:275
+#: ../Monsoon/MainWindow.cs:276
msgid "Start All"
msgstr "Alle Starten"
-#. torrentTreeView.Model = torrentFilter;
-#. ArrayList allList = new ArrayList ();
-#. foreach(TorrentManager manager in torrents.Keys){
-#. allList.Add (manager);
-#. }
-#: ../Monsoon/MainWindow.cs:449 ../Monsoon/MainWindow.cs:778
+#: ../Monsoon/MainWindow.cs:475 ../Monsoon/MainWindow.cs:817
msgid "All"
msgstr "Alle"
-#: ../Monsoon/MainWindow.cs:450
+#: ../Monsoon/MainWindow.cs:476
+#: ../Monsoon/gtk-gui/Monsoon.CreateTorrentDialog.cs:265
+#: ../Monsoon/gtk-gui/Monsoon.PreferencesDialog.cs:722
msgid "Remove"
msgstr "Entfernen"
-#: ../Monsoon/MainWindow.cs:451 ../Monsoon/MainWindow.cs:778
+#: ../Monsoon/MainWindow.cs:477 ../Monsoon/MainWindow.cs:817
msgid "Downloading"
msgstr "Lade herunter"
-#: ../Monsoon/MainWindow.cs:452 ../Monsoon/MainWindow.cs:778
+#: ../Monsoon/MainWindow.cs:478 ../Monsoon/MainWindow.cs:817
msgid "Seeding"
msgstr "Biete an"
-#: ../Monsoon/MainWindow.cs:906
+#: ../Monsoon/MainWindow.cs:921
msgid "Open torrent(s)"
msgstr "Öffne Torrent"
-#: ../Monsoon/MainWindow.cs:908
+#: ../Monsoon/MainWindow.cs:923
msgid "Torrent files"
msgstr "Torrent-Dateien"
-#: ../Monsoon/MainWindow.cs:911
+#: ../Monsoon/MainWindow.cs:926
msgid "All files"
msgstr "Alle Dateien"
-#: ../Monsoon/MainWindow.cs:1179
+#: ../Monsoon/MainWindow.cs:1192
msgid "Pause"
msgstr "Pause"
-#: ../Monsoon/MainWindow.cs:1184 ../Monsoon/MainWindow.cs:1190
+#: ../Monsoon/MainWindow.cs:1197 ../Monsoon/MainWindow.cs:1203
msgid "Start"
msgstr "Start"
-#: ../Monsoon/MainWindow.cs:1304
-msgid "Remove torrent and delete data?"
-msgstr "Torrent entfernen und Daten löschen?"
+#: ../Monsoon/MainWindow.cs:1280
+msgid "Are you sure you want to remove the torrent?"
+msgstr "Möchten sie wirklich den Torrent entfernen?"
-#: ../Monsoon/MainWindow.cs:1305
+#: ../Monsoon/MainWindow.cs:1281
+msgid "Remove torrent"
+msgstr "Torrent entfernen"
+
+#: ../Monsoon/MainWindow.cs:1336
+msgid "Remove torrent and delete all data?"
+msgstr "Torrent entfernen und alle Daten löschen?"
+
+#: ../Monsoon/MainWindow.cs:1337
msgid "Delete torrent"
-msgstr "Torrent Löschen"
+msgstr "Torrent löschen"
+#: ../Monsoon/gtk-gui/MainWindow.cs:230 ../Monsoon/gtk-gui/MainWindow.cs:231
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:221
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:222
msgid "File"
msgstr "Datei"
+#: ../Monsoon/gtk-gui/MainWindow.cs:233 ../Monsoon/gtk-gui/MainWindow.cs:234
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:224
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:225
msgid "Edit"
msgstr "Bearbeiten"
+#: ../Monsoon/gtk-gui/MainWindow.cs:236 ../Monsoon/gtk-gui/MainWindow.cs:237
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:227
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:228
msgid "View"
msgstr "Ansicht"
+#: ../Monsoon/gtk-gui/MainWindow.cs:239 ../Monsoon/gtk-gui/MainWindow.cs:240
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:230
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:231
msgid "Help"
msgstr "Hilfe"
+#: ../Monsoon/gtk-gui/MainWindow.cs:242 ../Monsoon/gtk-gui/MainWindow.cs:243
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:233
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:234
msgid "_About"
msgstr "_Über"
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:250
-msgid "Edit Columns"
-msgstr "Spalten Bearbeiten"
+#: ../Monsoon/gtk-gui/MainWindow.cs:248 ../Monsoon/gtk-gui/MainWindow.cs:249
+msgid "_Preferences"
+msgstr "_Einstellungen"
+#: ../Monsoon/gtk-gui/MainWindow.cs:269 ../Monsoon/gtk-gui/MainWindow.cs:270
#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:251
msgid "Columns"
msgstr "Spalten"
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:253
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:254
-msgid "Show Labels"
-msgstr "Zeige Beschriftungen"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:256
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:257
-msgid "Show Detailed Info"
-msgstr "Zeige detailierte Info"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:259
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:260
-msgid "_Open Torrent"
-msgstr "_Öffne Torrent"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:264
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:265
-msgid "_New Torrent"
-msgstr "_Neuer Torrent"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:267
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:268
-msgid "Druid Debug"
-msgstr "Assistent Debug"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:271
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:272
-msgid "Plugins"
-msgstr "Reinstecks"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:277
-msgid "Monsoon"
-msgstr "Monsoon"
-
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:352
-msgid "Status: "
-msgstr "Status: "
+#: ../Monsoon/gtk-gui/MainWindow.cs:275
+msgid "MonoTorrent"
+msgstr "MonoTorrent"
-#: ../Monsoon/gtk-gui/Monsoon.MainWindow.cs:361
-msgid " "
-msgstr ""
+#: ../Monsoon/gtk-gui/MainWindow.cs:355
+msgid "Downloaded: "
+msgstr "Runter geladen:"