Beispiel #1
0
        public XliffResourceImporter(string projectLocale, string baseDirectory)
        {
            this.projectLocale = projectLocale;
            this.baseDirectory = baseDirectory;

            resourcesPerFile      = new Dictionary <string, Dictionary <string, StringResource> >();
            xliffDocumentProvider = new XliffDocumentProvider(baseDirectory);

            removeMultipleSpaces = new Regex(@"\s{2,}");
        }
Beispiel #2
0
        public XliffResourceExporter(string baseDirectory, string projectLocale, IReadOnlyCollection <string> localesToExport, ICollection <StringResource> resourceStrings, Action <string> fileSavedSuccessfulAction, Action <XliffFileError> fileSaveErrorAction)
        {
            this.baseDirectory             = baseDirectory;
            this.projectLocale             = projectLocale;
            this.localesToExport           = localesToExport;
            this.resourceStrings           = resourceStrings;
            this.fileSavedSuccessfulAction = fileSavedSuccessfulAction;
            this.fileErrorAction           = fileSaveErrorAction;

            xliffDocumentProvider = new XliffDocumentProvider(baseDirectory);
        }