zci 0.3.1 → 0.4.0

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
  SHA1:
3
- metadata.gz: 74c68016fb98385348c5b0a2b9fc52bdd58dfa66
4
- data.tar.gz: 115756f78c28fddda64e0063acafcaaf040d774c
3
+ metadata.gz: 1e2e47535e24607540dbaa78957a6ded07ef5ada
4
+ data.tar.gz: db9355627bb752f968873332dfe7b440833b369a
5
5
  SHA512:
6
- metadata.gz: 51f091f825c13e88e02b77a04ee7597a315a04b6220141b0abd90462fecfeaecff0663bbdb05532a6bc99dad0852195b8b49eb69d64751ea59292b437497fe93
7
- data.tar.gz: a7550fc239f3f23f5f04baf628329f57c6aa1eac74030acdac520173522004d802ade77f2771cf793e9a00d45a9d9433e0b71958225a7ab05dd04735aeef8d3d
6
+ metadata.gz: fb79ce8ae9b1261a806dae5d8b59e8ce4ba5cf7f9616ba6eedcbf022eec2b7fee4f3aa02267fd2a112ef31fc97f55b73a0c7e76bf52f4a890510804d78c33e28
7
+ data.tar.gz: a85f5b013af3b1cbda039cf701e5aef5470e2b296daf5c8bc5d5ec9a91fef74f7a5f3f0aee649ad605539385e59921d9368921a14ed70570f628d54e4b95343b
@@ -23,12 +23,12 @@ command :'export:translations' do |c|
23
23
  zendesk_locales = @zendesk.locales.select { |locale| locale.locale == language }
24
24
  end
25
25
 
26
- @cli_config['categories'].each do |category|
26
+ @cli_config['categories'].each do |category_section|
27
27
  zendesk_locales.select { |locale| !locale.default? }.each do |locale|
28
- if lang = category['translations'].detect { |tr| tr['zendesk_locale'].casecmp(locale.locale) == 0 }
29
- category_xml_files = Dir["#{resources_dir}/#{lang['crowdin_language_code']}/#{category['zendesk_category']}/category_*.xml"]
30
- section_xml_files = Dir["#{resources_dir}/#{lang['crowdin_language_code']}/#{category['zendesk_category']}/section_*.xml"]
31
- article_xml_files = Dir["#{resources_dir}/#{lang['crowdin_language_code']}/#{category['zendesk_category']}/article_*.xml"]
28
+ if lang = category_section['translations'].detect { |tr| tr['zendesk_locale'].casecmp(locale.locale) == 0 }
29
+ category_xml_files = Dir["#{resources_dir}/#{lang['crowdin_language_code']}/#{category_section['zendesk_category']}/category_*.xml"]
30
+ section_xml_files = Dir["#{resources_dir}/#{lang['crowdin_language_code']}/#{category_section['zendesk_category']}/section_*.xml"]
31
+ article_xml_files = Dir["#{resources_dir}/#{lang['crowdin_language_code']}/#{category_section['zendesk_category']}/article_*.xml"]
32
32
 
33
33
  all_categories = []
34
34
  all_sections = []
@@ -37,22 +37,22 @@ command :'export:translations' do |c|
37
37
  # Read categories from XML files
38
38
  category_xml_files.each do |file|
39
39
  category_xml_file = File.read(file)
40
- category = parse_category_xml(category_xml_file)
41
- all_categories << category
40
+ category_xml = parse_category_xml(category_xml_file)
41
+ all_categories << category_xml
42
42
  end
43
43
 
44
44
  # Read sections from XML files
45
45
  section_xml_files.each do |file|
46
46
  section_xml_file = File.read(file)
47
- section = parse_section_xml(section_xml_file)
48
- all_sections << section
47
+ section_xml = parse_section_xml(section_xml_file)
48
+ all_sections << section_xml
49
49
  end
50
50
 
51
51
  # Read articles from XML filse
52
52
  article_xml_files.each do |file|
53
53
  article_xml_file = File.read(file)
54
- article = parse_article_xml(article_xml_file)
55
- all_articles << article
54
+ article_xml = parse_article_xml(article_xml_file)
55
+ all_articles << article_xml
56
56
  end
57
57
 
58
58
  ### Categories
@@ -1,3 +1,3 @@
1
1
  module ZCI
2
- VERSION = '0.3.1'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Maminov