Ejemplo n.º 1
0
        public override XliffElement ToXliff(IdCounter idCounter)
        {
            var id         = "g" + (idCounter.GetNextGroupId());
            var xliffGroup = new Group(id)
            {
                Name     = this.Name,
                Metadata = Attributes.ToXliffMetadata()
            };

            foreach (var container in Containers)
            {
                var xliffContainer = container.ToXliff(idCounter) as TranslationContainer;
                xliffGroup.Containers.Add(xliffContainer);
            }
            return(xliffGroup);
        }
Ejemplo n.º 2
0
        public override TranslationContainer ToXliff(IdCounter counter)
        {
            var id         = "g" + (counter.GetNextGroupId());
            var xliffGroup = new Group(id)
            {
                Name = this.Name
            };

            if (this.Attributes.Count > 0)
            {
                xliffGroup.Metadata = this.Attributes.ToXliffMetadata();
            }

            foreach (var container in Containers)
            {
                var xliffContainer = container.ToXliff(counter);
                xliffGroup.Containers.Add(xliffContainer);
            }
            return(xliffGroup);
        }