transync 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34601981f1aed44be61c45090e3c7568a4f64768
4
- data.tar.gz: 257f29d8a4f7e8a4bfce328a38c0ada09bbcae4d
3
+ metadata.gz: 53afd1b65e808cfce2e81eec433f2503ecc48e50
4
+ data.tar.gz: f82b54ece69a6a9517e1926cca8b960325e99f31
5
5
  SHA512:
6
- metadata.gz: 031fdec0240aa2a3a45e8b9808444715d533d82e0b586c94a0a201fffbfe83a7dfaf5fe39015dee18a29a7805bef9a7d0b67863b19bc2523bdd1732fdb30b303
7
- data.tar.gz: d803d0a53df7ef47f4d724d9aef9ad2d2a50f27e72f6bce259be67cf2fce289422323622f0c49679529308a908203f0c58aca6ca5031c682a2a95f63a809967e
6
+ metadata.gz: adde07a797914699e9de74366856e41daff5cd4569c533aa6af8c1ecb95067e62f2e63f5f53b3bb405c85ba3f1117cf5bf30998672ec6014bcfb67781d3e186c
7
+ data.tar.gz: d124defa8261d27de9f511354fbe9f364233900acd74b5b18022a9eebdfb932deded157856f95bac16a553042c2d76e1d40a7e76e433d82e85109349c6dd7173
data/README.md CHANGED
@@ -9,19 +9,20 @@ For example see `transync.SAMPLE.yml`.
9
9
 
10
10
  ## Assumptions
11
11
 
12
- You have xliff files in one directory, named like: common.en.xliff where common is name of the file and also google doc
13
- spreadsheet tab. en is language and you have google doc with structure where first row is key, language 1, language 2
12
+ You have xliff files in one directory (I suggest `app/Resources/translations`), named like: `common.en.xliff` where `common`
13
+ is name of the file and also GDoc `spreadsheet tab`. `en` is language and you have GDoc with structure where
14
+ first row is `key`, `language 1`, `language 2`, ...
14
15
 
15
16
  ## How does it work?
16
17
 
17
18
  Updating GDoc from our xliff files. It won't delete any key, it will only add new or change existing ones. Same
18
- for direction from Gdoc to xliff.
19
+ for direction from GDoc to xliff.
19
20
 
20
21
  ### Process
21
22
 
22
23
  - Create new Google Doc Spreadsheet
23
24
  - Copy it's `key` from URL to `transync.yml`
24
- - Set all the languages and `xliff` you want to sync in `transync.yml` (look at `transync.SAMPLE.yml`)
25
+ - Set all the languages and `xliff` files (without language) you want to sync in `transync.yml` (look at `transync.SAMPLE.yml`)
25
26
  - set `XLIFF_FILES_PATH` to set path where are your `xliff` files. In project do it with relative path so others can use it
26
27
  - set `MISSING_TRANSLATION_TEXT` to set what text should go to `target` element for translation
27
28
  - run these commands respectively
@@ -30,24 +31,26 @@ for direction from Gdoc to xliff.
30
31
 
31
32
  ```
32
33
  transync test # test if all keys are set for all the languages. Also tests if everything in sync with GDoc
33
- transync update # will test and add all the missing keys that are not presented for a particular language
34
- transync init # will sync all translations with Google spreadsheet. You need to run update command first, to ensure no keys are missing
34
+ transync update # will test and add all the missing keys that are not presented for a particular language in XLIFF files
35
+ transync init # will write all translations from XLIFF to GDoc spreadsheet. You need to run update command first, to ensure no keys are missing
35
36
 
36
- # After init was made you have these two to sync between gdoc and xliff
37
+ # After init was made you have these two to sync modes between Gdoc and XLIFF
37
38
  transync x2g
38
39
  transync g2x
39
40
  ```
40
41
 
41
42
  ### Gem development
42
43
 
44
+ #### Running tests
43
45
  ```
44
46
  ruby g2x_spec.rb
45
47
  ruby x2g_spec.rb
48
+ ruby update_spec.rb
46
49
  ```
47
50
 
48
51
  ## TODO
49
52
 
50
53
  - use ruby's 2.0 named parameters (more clear method calls)
51
- - better tests (move out network dependency -> maybe try VCR)
54
+ - better tests (move out network dependency -> maybe try VCR, run all tests with RAKE)
52
55
  - add to travis / code climate
53
56
  - don't allow empty keys?
@@ -27,9 +27,9 @@ module Transync
27
27
  trans_sync = TranslationSync.new(PATH, 'test', file)
28
28
 
29
29
  if trans_sync.diff(language).keys.length == 0
30
- puts "\u{2713} '#{file}' is in sync for '#{language}' language with GDoc.".colorize(:green)
30
+ puts "\u{2713} '#{file}.#{language}' XLIFF is in sync with GDoc.".colorize(:green)
31
31
  else
32
- puts "\u{2717} '#{file}' is NOT in sync for '#{language}' language with GDoc. See diff!".colorize(:red)
32
+ puts "\u{2717} '#{file}.#{language}' XLIFF is NOT in sync with GDoc. See diff!".colorize(:red)
33
33
  end
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module Transync
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zigomir