Giter Club home page Giter Club logo

xliffle's People

Contributors

coma2nd avatar sr189 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xliffle's Issues

Empty elements may be improved on output

Hello sr189,

I've noted that if you pass an empty string as for example value of "target", i.e.: xliff_file.string('1', 'foo', ''), the element produced for this trans-unit will be <target></target> instead of just <target/>. This of course isn't a big deal but on a big document, it will save storage space.

Note elements work differently than documented

Hi,

First off, thanks for the gem.

I found that Note elements work differently than documented. I.e.

string.note('This is localization comment', priority: 2)
# => <note priority=\"{:priority=&gt;2}\">This is localization comment</note>

string.note('This is localization comment', 2)
# => <note priority=\"2\">This is localization comment</note>

I would expect:

string.note('This is localization comment', priority: 2)
# => <note priority=\"2\">This is localization comment</note>

On another note it would be nice if the priority attribute could be avoided somehow (perhaps even by default).

id vs. resname

I'm new to XLIFF, however it seems that the standard for identifying strings is to use the id key as such:

<trans-unit id="my_object">

So I'm curious why xliffle uses the key resname for the identifier and adds a custom id?

I'm using xliffle gem for exporting from Ruby.
I'm using the xliffer gem to read XLIFF files (created by xliffle) in Ruby, however it doesn't look for the resname key, only the id key.

Wrong number of arguments for Initialize.

Looks like there is an issue when creating new Xliffle.file objects regarding the number of arguments.

In file.rb def initialize(original, source_locale, target_locale) now only accepts 3 args.
Though in creator.rb, the initialize call is still providing 4:

file = Xliffle::File.new(file_id, original, source_locale, target_locale)

ArgumentError (wrong number of arguments (4 for 3)):
/Users/micliz/.bundler/ruby/1.9.1/xliffle-daf998e3c7f8/lib/xliffle/file.rb:5:in initialize' /Users/micliz/.bundler/ruby/1.9.1/xliffle-daf998e3c7f8/lib/xliffle/creator.rb:13:innew'
/Users/micliz/.bundler/ruby/1.9.1/xliffle-daf998e3c7f8/lib/xliffle/creator.rb:13:in `file'

Are you able to verify this issue?

Thanks.

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.