Coder Social home page Coder Social logo

xlifflib's Introduction

Hi there ๐Ÿ‘‹

xlifflib's People

Contributors

kevinjump avatar simonech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

xlifflib's Issues

Reduce duplication in the code that moves content from unit and groups (and back)

Across the library, there are many points where content is moved from a unit to a group and other way around.
This moves its metadata and segments from one to the other.
There are small differences between all the instances of the code, but better to find a common way of dealing with those, and refactor to just on method instead of 4 or more

Make Property and PropertyGroup inheriting from same base class

Reason is that when extracting content from 3rd party systems extractors might return both a property or a propertygroup depending on how the content is structured.
This also requires changing Document to have a list of PropertyContainers instead of a separate list of properties and propertygroups.

Uncaught error when target element is blank .

If you import a XLIFF document with an empty target e.g.

<target></target>

Then the .FromXliff function fails as Target.Text is null or empty (so Target.Text[0] as PlainText).

PR on it's way - just wanted issue number for branch

Find a better way to pass target language

At the moment target language is passed as parameter to the extraction, but the extraction is not doing anything with the target language.
Maybe something else should add the the target language to the Xliff document.

Add tests for metadata support

Check that metadata are added to nested properties
Check that CDataSplitter copies metadata to parent group when splitting units

Add custom Exception classes

Add some custom extensions for when import/export is not possible due to validation errors or pre-conditions (like when the code expects just one unit or one segment and for some reasons there are more)

Simplify Export/Merger to just work with Bundle

It would have been cool to have it work with random sources, but for the moment better to simplify and keep it focused to work with just the Bundle.

Also, remove the logic from within the Model

Attributes of block elements is not retained when imported back

After the implementation of issue #42 introduced support of block elements, now it is possible to send tables and other html elements to translation.
Anyway, if a block element contains an attribute (a style or class), it is not included in the XLIFF and thus not imported back.

Refactor To/From Xliff tests in individual classes

Instead of adding all import and export tests in two classes, put the tests for extracting and merging from Xliff to Bundle and back into the individual elements (Document, PropertyGroup, Property).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.