transync 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/transync/version.rb +1 -1
- data/lib/transync/xliff_trans/xliff_trans_reader.rb +5 -2
- data/settings.SAMPLE.yml +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 826e00df7c16d49a77a3ba40b53df4dae4932b53
|
4
|
+
data.tar.gz: 3e7e2a8e1d46072b263450ececeadcd29ca29f05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45d1d05c2d8e1384138a8fb883514dbdcc96bcd9c8fd507e05381b5b15c28f5141ca615fad9f62b49d3dff713dcbd8d3c2e27458f80241678df857dad364b457
|
7
|
+
data.tar.gz: dab75e76add54fb2b670446a6f0a1db2895215eeab08db0e36801d1ff9a2b0fb05b7ca78950d3b46f035e063849246c87bdc5c80b809232dd2b127e389552346
|
data/README.md
CHANGED
@@ -11,8 +11,9 @@ For example see `settings.SAMPLE.yml`.
|
|
11
11
|
|
12
12
|
- Create new Google Doc Spreadsheet
|
13
13
|
- Copy it's `key` from URL to `settings.yml`
|
14
|
-
- Set all the languages and `xliff` you want to sync in `settings.yml` (look at `settings.SAMPLE.yml`)
|
15
|
-
- set `XLIFF_FILES_PATH` to set path where are your `xliff` files. In project do it with relative path so others can use it
|
14
|
+
- Set all the languages and `xliff` you want to sync in `settings.yml` (look at `settings.SAMPLE.yml`)
|
15
|
+
- set `XLIFF_FILES_PATH` to set path where are your `xliff` files. In project do it with relative path so others can use it
|
16
|
+
- set `MISSING_TRANSLATION_TEXT` to set what text should go to `target` element for translation
|
16
17
|
- run these commands respectively
|
17
18
|
|
18
19
|
### Running order
|
data/lib/transync/version.rb
CHANGED
@@ -33,7 +33,7 @@ class XliffTransReader
|
|
33
33
|
# will go through each and find if any xliff is missing keys for translations
|
34
34
|
def valid?(create = false)
|
35
35
|
missing = 0
|
36
|
-
|
36
|
+
missing_translation_text = GdocTrans::CONFIG['MISSING_TRANSLATION_TEXT'] || '#MISSING-TRANS#'
|
37
37
|
all_translations_for_language = {language: nil, translations: []}
|
38
38
|
|
39
39
|
self.get_translations[:translations].each do |x_trans|
|
@@ -51,7 +51,10 @@ class XliffTransReader
|
|
51
51
|
return false unless create
|
52
52
|
|
53
53
|
p "#{missing + 1}. #{file}.#{key_lang} was missing translation for key '#{x_trans[:key]}'."
|
54
|
-
all_translations_for_language[:translations] << {
|
54
|
+
all_translations_for_language[:translations] << {
|
55
|
+
key: x_trans[:key],
|
56
|
+
value: "#{missing_translation_text} - #{x_trans[:key]}"
|
57
|
+
}
|
55
58
|
missing += 1
|
56
59
|
else
|
57
60
|
all_translations_for_language[:translations] << xliff_lang_value
|
data/settings.SAMPLE.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zigomir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google_drive
|