sr189 / xliffle Goto Github PK
View Code? Open in Web Editor NEWA gem to build xliff files from translated strings
License: MIT License
A gem to build xliff files from translated strings
License: MIT License
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.
See Xliff specification: http://www.w3.org/International/its/wiki/XLIFF_1.2_Mapping#Localization_Note
Xliffle should be able to parse and write note-tags from and into xliff documents.
A trans-unit element may have multiple note-elements.
The priority-attribute of the note-elements should be supported.
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=>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).
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.
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:in
new'
/Users/micliz/.bundler/ruby/1.9.1/xliffle-daf998e3c7f8/lib/xliffle/creator.rb:13:in `file'
Are you able to verify this issue?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.