gettext-setup 0.13 → 0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tasks/gettext.rake +5 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0f7e467d79154886b797367c614a87937e5b811
4
- data.tar.gz: e9388332a6ccb61ab6b6df0e848283dff8a4cd1e
3
+ metadata.gz: 03cd28bb5a6371fc32063c218596addf1b771c90
4
+ data.tar.gz: 680222ce8e86d7628d5973587f6bb4d676b6c52b
5
5
  SHA512:
6
- metadata.gz: e114576c5e3610e93f06a17fb63701154ca7677590d24773970bf3e5f7ab50e892a500a2f5fd7d454334e82bde60d312c1aa925c5e4475a2de69e9a97e80481d
7
- data.tar.gz: c86d5fff6ada432f699afa9ad8fbeaf87f7d5b57c602c7271abb50c05702d285bf808b442b61c878db75959b558de244900e83a5645d19bec045da6ad2f8e563
6
+ metadata.gz: 42b46074e3e0fcbf6f096d7cfe1eb9639b2e9db026215b8cc20e829385e1048bf05cbd50da4773068b384c6ccdc9b8497633597579c8426ea1d4d6a6fcaeee76
7
+ data.tar.gz: 0be845a329661b5ed185def9de670e4ad1c3b511acf9466a200c153e085e39d535c907d848ba81e204a2780e239122fd0e7ef25893677617e6e28778d73dd0d6
@@ -62,12 +62,13 @@ namespace :gettext do
62
62
  old_pot = pot_file_path + ".old"
63
63
  File.rename(pot_file_path, old_pot)
64
64
  generate_new_pot
65
- if system("msgcmp --use-untranslated '#{old_pot}' '#{pot_file_path}'")
66
- puts "No string changes detected, keeping old POT file"
67
- File.rename(old_pot, pot_file_path)
68
- else
65
+ stdout, stderr, status = Open3.capture3("msgcmp --use-untranslated '#{old_pot}' '#{pot_file_path}'")
66
+ if status == 1 || /this message is not used/.match(stderr)
69
67
  File.delete(old_pot)
70
68
  puts "String changes detected, replacing with updated POT file"
69
+ else
70
+ puts "No string changes detected, keeping old POT file"
71
+ File.rename(old_pot, pot_file_path)
71
72
  end
72
73
  end
73
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext-setup
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.13'
4
+ version: '0.14'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement