alphalang 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/alphalang +1 -1
- data/lib/alpha.rb +1 -0
- data/lib/lang_creator.rb +7 -6
- data/lib/locales/de +1 -0
- data/lib/locales/default +1 -0
- data/lib/locales/en +1 -0
- data/lib/locales/locale_template +1 -0
- data/lib/locales/sv +1 -0
- data/lib/nodes/scopemanager.rb +4 -0
- metadata +1 -5
- data/lib/locale_defaulter.rb~ +0 -0
- data/lib/locale_deleter.rb~ +0 -0
- data/lib/locale_lister.rb~ +0 -0
- data/lib/nodes/scopemanager.rb~ +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9d0971b25f1f629686a4ca72899a014ab9dd0934b3021e1509faa46870e79fc
|
4
|
+
data.tar.gz: 7ff3c836669793b4b58deea30bd8e8c485ca7ce9465ab3ac6ef490b8a7508d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a44e1156d6e59488c1891af9eaa3d9a304ddd812b54ad44656762d169d84a2c1df057a8030654aea52c791037dfc1620a551b0e72b4f8882b20ea8d9c45edc2
|
7
|
+
data.tar.gz: 1459484c62af5206acf1d9e657f25fae40cc8adfbb36838c59e1a37434034be283bdb48fbe4efb820eb0c6cb779e2a933925d4cbcc35796769df56e0bcce5f20
|
data/bin/alphalang
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'optparse'
|
3
3
|
require File.expand_path('../lib/alpha', __dir__)
|
4
|
-
ALPHA_VER = '0.1.
|
4
|
+
ALPHA_VER = '0.1.5'.freeze
|
5
5
|
ABORT_ANSWERS = [' ', '', 'none', 'abort'].freeze # something here? Some cases empty means yes tho..
|
6
6
|
LOCALES_PATH = File.join(__dir__, '../lib/locales')
|
7
7
|
PROTECTED_LOCALES = ['.', '..', 'locale_template', 'default', 'default.old', 'en', 'sv', 'de'].freeze
|
data/lib/alpha.rb
CHANGED
data/lib/lang_creator.rb
CHANGED
@@ -35,22 +35,23 @@ def prompt_user(file)
|
|
35
35
|
|
36
36
|
counter = 0
|
37
37
|
File.open(file, 'a') do |f|
|
38
|
+
f.puts ';;.*$ ;;.*$'
|
38
39
|
locale_template.each do |line|
|
39
40
|
counter += 1
|
40
|
-
break if counter ==
|
41
|
+
break if counter == 15
|
41
42
|
|
42
|
-
if counter <
|
43
|
+
if counter > 1 && counter < 10
|
43
44
|
translation = read_translation(line.chomp)
|
44
45
|
f.puts "#{line.chomp} #{translation}"
|
45
46
|
end
|
46
|
-
if counter ==
|
47
|
+
if counter == 10
|
47
48
|
translation = read_translation_true_false(line.chomp)
|
48
49
|
f.puts "#{line.chomp} #{translation}"
|
49
50
|
end
|
50
|
-
if counter ==
|
51
|
+
if counter == 11
|
51
52
|
f.puts "#{line.chomp} (==|<=|>=)"
|
52
53
|
end
|
53
|
-
if counter >
|
54
|
+
if counter > 11
|
54
55
|
translation = read_translation_not_and_or(line.chomp)
|
55
56
|
f.puts "#{line.chomp} #{translation}"
|
56
57
|
end
|
@@ -90,6 +91,6 @@ def create_locale_file()
|
|
90
91
|
puts "Locale is saved as #{new_locale_name} in #{LOCALES_PATH}"
|
91
92
|
else
|
92
93
|
puts 'Translation removed'
|
93
|
-
File.delete(
|
94
|
+
File.delete(new_locale_file_path)
|
94
95
|
end
|
95
96
|
end
|
data/lib/locales/de
CHANGED
data/lib/locales/default
CHANGED
data/lib/locales/en
CHANGED
data/lib/locales/locale_template
CHANGED
data/lib/locales/sv
CHANGED
data/lib/nodes/scopemanager.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alphalang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mattias
|
@@ -62,11 +62,8 @@ files:
|
|
62
62
|
- lib/alpha.rb
|
63
63
|
- lib/lang_creator.rb
|
64
64
|
- lib/locale_defaulter.rb
|
65
|
-
- lib/locale_defaulter.rb~
|
66
65
|
- lib/locale_deleter.rb
|
67
|
-
- lib/locale_deleter.rb~
|
68
66
|
- lib/locale_lister.rb
|
69
|
-
- lib/locale_lister.rb~
|
70
67
|
- lib/locales/de
|
71
68
|
- lib/locales/default
|
72
69
|
- lib/locales/en
|
@@ -74,7 +71,6 @@ files:
|
|
74
71
|
- lib/locales/sv
|
75
72
|
- lib/nodes/basenodes.rb
|
76
73
|
- lib/nodes/scopemanager.rb
|
77
|
-
- lib/nodes/scopemanager.rb~
|
78
74
|
- lib/nodes/stmtnodes.rb
|
79
75
|
- lib/rdparse.rb
|
80
76
|
- lib/rdparse_quiet.rb
|
data/lib/locale_defaulter.rb~
DELETED
File without changes
|
data/lib/locale_deleter.rb~
DELETED
File without changes
|
data/lib/locale_lister.rb~
DELETED
File without changes
|
data/lib/nodes/scopemanager.rb~
DELETED
File without changes
|