Anonymous avatar Anonymous committed e40c60c

Applied patch from Christian Heger for issue #9 - fix for localization.

Comments (0)

Files changed (2)

NET 4.0/Source/Rejuicer/Rejuicer/Engine/RejuicerEngine.cs

 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
 using System.Linq;
 using System.Text;
 
             if (mode == Mode.Compact)
             {
-                if (type == ResourceType.Css)
+                var culture = Thread.CurrentThread.CurrentCulture;
+
+                try
                 {
-                    // Perform compaction on files
-                    combined = Yahoo.Yui.Compressor.CssCompressor.Compress(combined);
+                    Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
+
+                    if (type == ResourceType.Css)
+                    {
+                        // Perform compaction on files
+                        combined = Yahoo.Yui.Compressor.CssCompressor.Compress(combined);
+                    }
+                    else
+                    {
+                        combined = Yahoo.Yui.Compressor.JavaScriptCompressor.Compress(combined);
+                    }
                 }
-                else
+                finally
                 {
-                    combined = Yahoo.Yui.Compressor.JavaScriptCompressor.Compress(combined);
+                    Thread.CurrentThread.CurrentCulture = culture;
                 }
             }
 

NET 4.0/Source/Rejuicer/Rejuicer/Rejuicer.csproj

   </ItemGroup>
   <ItemGroup>
     <None Include="packages.config" />
-    <None Include="Rejuicer.nuspec" />
     <Compile Include="Engine\RejuicerHandler.cs" />
-    <None Include="web.config.transform" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.