From 16469ceb26a0c49e2d7cdc8c49427774dcaf5075 Mon Sep 17 00:00:00 2001 From: arbinada Date: Mon, 2 Jul 2012 06:52:39 +0000 Subject: [PATCH] Clear references before update the template git-svn-id: https://svn.code.sf.net/p/gettextnet/code@19 cfd95cc2-f724-4227-9a96-9a83de4730d4 --- GNU.Gettext/GNU.Gettext.Msgfmt/Program.cs | 2 +- GNU.Gettext/GNU.Gettext.Xgettext/ExtractorCsharp.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/GNU.Gettext/GNU.Gettext.Msgfmt/Program.cs b/GNU.Gettext/GNU.Gettext.Msgfmt/Program.cs index 7a1f258..a61997e 100755 --- a/GNU.Gettext/GNU.Gettext.Msgfmt/Program.cs +++ b/GNU.Gettext/GNU.Gettext.Msgfmt/Program.cs @@ -122,7 +122,7 @@ namespace GNU.Gettext.Msgfmt options.Mode = Mode.SateliteAssembly; options.Verbose = false; - options.CompilerName = "mcs"; + options.CompilerName = Path.DirectorySeparatorChar == '/' ? "mcs" : "csc"; options.ShowUsage = false; options.DebugMode = false; diff --git a/GNU.Gettext/GNU.Gettext.Xgettext/ExtractorCsharp.cs b/GNU.Gettext/GNU.Gettext.Xgettext/ExtractorCsharp.cs index 9196263..98896fe 100644 --- a/GNU.Gettext/GNU.Gettext.Xgettext/ExtractorCsharp.cs +++ b/GNU.Gettext/GNU.Gettext.Xgettext/ExtractorCsharp.cs @@ -44,7 +44,11 @@ namespace GNU.Gettext.Xgettext this.Options = options; this.Catalog = new Catalog(); if (!Options.Overwrite && File.Exists(Options.OutFile)) + { Catalog.Load(Options.OutFile); + foreach(CatalogEntry entry in Catalog) + entry.ClearReferences(); + } else { Catalog.Project = "PACKAGE VERSION";