Beispiel #1
0
        public void ExtractLocalizableItems(ExtractOptions options)
        {
            if (CanOverwriteDirectory(options.DestinationDirectory))
            {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();

                Console.WriteLine("\nGet original localization files");
                var originalExtractPath = GetOriginalLocalizationFiles(options);

                Console.WriteLine("\nGet actual localization files");
                var actualExtractPath = GetActualLocalizationFiles(options);

                var sourceDir = options.ActualSourceDirectory;
                var destDir   = Path.Combine(options.DestinationDirectory, Routes.DiffExtractDirectory);

                var validator = new ValidateLocalizableExtractor(originalExtractPath, actualExtractPath);
                var extractor = new LocalizableItemsExtractor(sourceDir, destDir, validator, cultures);

                Console.WriteLine("\nExtract vsix");
                extractor.ExtractVsix();

                Console.WriteLine("Extract project templates");
                extractor.ExtractProjectTemplates();

                Console.WriteLine("Extract item templates");
                extractor.ExtractItemTemplates();

                Console.WriteLine("Extract command templates");
                extractor.ExtractCommandTemplates();

                Console.WriteLine("Extract template pages");
                extractor.ExtractTemplatePages();

                Console.WriteLine("Extract template features");
                extractor.ExtractTemplateFeatures();

                Console.WriteLine("Extract template services");
                extractor.ExtractTemplateServices();

                Console.WriteLine("Extract template testings");
                extractor.ExtractTemplateTesting();

                Console.WriteLine("Extract project types");
                extractor.ExtractWtsProjectTypes();

                Console.WriteLine("Extract project frameworks");
                extractor.ExtractWtsFrameworks();

                Console.WriteLine("Extract resources");
                extractor.ExtractResourceFiles();

                Console.WriteLine("End");
                stopwatch.Stop();
                TimeSpan ts = stopwatch.Elapsed;
                Console.WriteLine(string.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10));
            }
        }
Beispiel #2
0
        public void ExtractLocalizableItems(ExtractOptions options)
        {
            if (CanOverwriteDirectory(options.DestinationDirectory))
            {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();

                var validator = new ValidateLocalizableExtractor(options);
                var extractor = new LocalizableItemsExtractor(options.SourceDirectory, options.DestinationDirectory, cultures, validator);

                Console.WriteLine("\nExtract vsix");
                extractor.ExtractVsix();

                Console.WriteLine("Extract project templates");
                extractor.ExtractProjectTemplates();

                Console.WriteLine("Extract command templates");
                extractor.ExtractCommandTemplates();

                Console.WriteLine("Extract template pages");
                extractor.ExtractTemplatePages();

                Console.WriteLine("Extract template features");
                extractor.ExtractTemplateFeatures();

                Console.WriteLine("Extract project types");
                extractor.ExtractWtsProjectTypes();

                Console.WriteLine("Extract project frameworks");
                extractor.ExtractWtsFrameworks();

                Console.WriteLine("Extract resources");
                extractor.ExtractResourceFiles();

                Console.WriteLine("End");
                stopwatch.Stop();
                TimeSpan ts = stopwatch.Elapsed;
                Console.WriteLine(string.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10));
            }
        }