twine 1.1 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8667f50ad7147b8b7edac0d82ce542c2ecc973604c8334e878513b6acaa9a14
4
- data.tar.gz: 1ceb2b2b18dea8a3585bd91a1b427b30ebd9c888817dcf7140b3d211cd9e157c
3
+ metadata.gz: 2f4d5f35555d309af477e468d170c086657eafb79659040f23d9a3803c0b59f2
4
+ data.tar.gz: 6d6858513e345694beb1c031b5a1753a45d31e1038023794a7315b7953df90bd
5
5
  SHA512:
6
- metadata.gz: a961953ec7b74510c10e17114b84c227bac43117a869ba4254d7410a16ea9413e4133a2c9f099c3d67922fd6e1632d841f366e79d28687e61f73861721dea43a
7
- data.tar.gz: 954b69b0d6e0fadec38cf145e0e1772eb1fde0259337b45ffac172d41b6f6c031b33373c768cfbb48ad3e9cfb1565dc9e91db8e825023421fdc30098439a4d86
6
+ metadata.gz: ae57c2695b90b0c641b10c54f851543870bf4d2025197c634a5ad7bb0405befa7c29b2b5dff0430e5d6015e8346c202e036298032fb4d2b65fd95d267a797e16
7
+ data.tar.gz: a71413208993949abca200308296790e8f3a163430b7aa1d8381f2961437e2049480086521835f2c8920b5eb95a03cfc1736063d81f1bd6df570da9472231679
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Continuous Integration by CircleCI](https://circleci.com/gh/scelis/twine.svg?style=shield)](https://circleci.com/gh/scelis/twine)
4
4
 
5
- Twine is a command line tool for managing your strings and their translations. These are all stored in a master text file and then Twine uses this file to import and export localization files in a variety of types, including iOS and Mac OS X `.strings` files, Android `.xml` files, gettext `.po` files, and [jquery-localize][jquerylocalize] `.json` files. This allows individuals and companies to easily share translations across multiple projects, as well as export localization files in any format the user wants.
5
+ Twine is a command line tool for managing your strings and their translations. These are all stored in a single text file and then Twine uses this file to import and export localization files in a variety of types, including iOS and Mac OS X `.strings` files, Android `.xml` files, gettext `.po` files, and [jquery-localize][jquerylocalize] `.json` files. This allows individuals and companies to easily share translations across multiple projects, as well as export localization files in any format the user wants.
6
6
 
7
7
  ## Install
8
8
 
@@ -212,7 +212,7 @@ apply plugin: 'com.github.jruby-gradle.base'
212
212
 
213
213
  dependencies {
214
214
  /* NOTE: Set your prefered version of twine here. */
215
- jrubyExec 'rubygems:twine:1.0.3'
215
+ jrubyExec 'rubygems:twine:1.1'
216
216
  }
217
217
 
218
218
  task generateLocalizations (type: JRubyExec) {
@@ -65,6 +65,7 @@ module Twine
65
65
  document.root.children.each do |child|
66
66
  if child.is_a? REXML::Comment
67
67
  content = child.string.strip
68
+ content.gsub!(/[\s]+/, ' ')
68
69
  comment = content if content.length > 0 and not content.start_with?("SECTION:")
69
70
  elsif child.is_a? REXML::Element
70
71
  next unless child.name == 'string'
@@ -1,3 +1,3 @@
1
1
  module Twine
2
- VERSION = '1.1'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -167,6 +167,24 @@ class TestAndroidFormatter < FormatterTest
167
167
  assert_equal 'This is\n a string', @empty_twine_file.definitions_by_key["foo"].translations['en']
168
168
  end
169
169
 
170
+ def test_read_multiline_comment
171
+ content = <<-EOCONTENT
172
+ <?xml version="1.0" encoding="utf-8"?>
173
+ <resources>
174
+ <!-- multiline
175
+ comment -->
176
+ <string name="foo">This is
177
+ a string</string>
178
+ </resources>
179
+ EOCONTENT
180
+
181
+ io = StringIO.new(content)
182
+
183
+ @formatter.read io, 'en'
184
+
185
+ assert_equal 'multiline comment', @empty_twine_file.definitions_by_key["foo"].comment
186
+ end
187
+
170
188
  def test_read_html_tags
171
189
  content = <<-EOCONTENT
172
190
  <?xml version="1.0" encoding="utf-8"?>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twine
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2021-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip