/// ------------------------------------------------------------------------------------
        private void MigrateExperimentalTranscriptions()
        {
            var oldfilepath = _projectPathPrefix + "ExperimentalTranscriptions.xml";

            if (!File.Exists(oldfilepath))
            {
                return;
            }

            var newfilepath = TranscriptionChanges.GetFileForProject(_projectPathPrefix);

            var error = TransformFile(oldfilepath, "SIL.Pa.Model.Migration.UpdateExperimentalTranscriptionFile.xslt");

            if (error == null)
            {
                // The old file has been transformed, now give it a new name since
                // experimental transcriptions are now called transcription changes.
                if (File.Exists(oldfilepath) && !File.Exists(newfilepath))
                {
                    File.Move(oldfilepath, newfilepath);
                }

                return;
            }

            try
            {
                File.Delete(oldfilepath);
            }
            catch { }

            throw error;
        }
Exemple #2
0
        public void TestSetup()
        {
            m_exTransList = new TranscriptionChanges();

            _prj.TranscriptionChanges.Clear();
            _prj.TranscriptionChanges.AddRange(m_exTransList);
            _prj.AmbiguousSequences.Clear();
            //App.IPASymbolCache.UndefinedCharacters = new UndefinedPhoneticCharactersInfoList();
            _prj.PhoneticParser.LogUndefinedCharactersWhenParsing = false;
        }