habluhablu 0.2.2 → 0.2.3

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
  SHA256:
3
- metadata.gz: 5c80daead86056b1a6724c537e118ad605f6202d6ac623b8c2835f877b82a07f
4
- data.tar.gz: b415fa528ebadece33e6d308497c507cdb26b64166f4afa4d71eca0a1dedc1c5
3
+ metadata.gz: 176362e18a8aa159746f31972df293f854a9b596cf67404ecf26669d0cb2e458
4
+ data.tar.gz: b519b6b00ba63a4e4bc345e0f865c6116825ac87eb4b29da920a8d63018025b9
5
5
  SHA512:
6
- metadata.gz: c42233df3f6c074b4cc143a078a1c751e355fc0e4e3304d1510417d5434f19a547b0cf42d91e9719f3fd9fe800bc6d39d1e7a319493f99cd9dd628d1679b3ac6
7
- data.tar.gz: 7877869628c0e9bdaf6c328861738b942b4acd2d92b291372714609cc10142fdb8941e2532a655dc865cb0df3c4e2243f22c1d6d84abe6066e761f9a5c6ec183
6
+ metadata.gz: 665658210f5d615d9dd2d83efc9685b548a290de796842ec627b0ff6a4a0859604c2d99a5b39e20bb905003522dd59c402aca1f0ec800e353478172c1677c809
7
+ data.tar.gz: 03bd56cfd7945c44704dbd1df2107a9158391cfd13529415942f6525bdad4faec03b92e6c6e6571986bf345d18a10e704564f3797b2b47e57a7268690e91a0d3
data/.rubocop.yml CHANGED
@@ -41,5 +41,9 @@ Lint/ScriptPermission:
41
41
  - 'bin/console'
42
42
 
43
43
  Metrics/ClassLength:
44
+ Exclude:
45
+ - 'lib/languages/languages.rb'
46
+
47
+ Style/OptionalBooleanParameter:
44
48
  Exclude:
45
49
  - 'lib/languages/languages.rb'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- habluhablu (0.2.2)
4
+ habluhablu (0.2.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/exe/habluhablu CHANGED
@@ -8,14 +8,29 @@ args = {}
8
8
  OptionParser.new do |opts|
9
9
  opts.banner = "Generate files including basic phrases translations (using with I18n gem)"
10
10
 
11
- opts.on("-l", "--language SYMBOL", "The unit of the unnamed, first amount argument")
11
+ opts.on("-l", "--language SYMBOL", "Symbol of the language you want to generate file for (en, es, ...).")
12
+ opts.on("-m", "--multi SYMBOLS", "Symbols of languages you want to generate files for (en es pl ar)")
12
13
  end.parse!(into: args)
13
14
 
14
- Habluhablu.hablu(args[:language])
15
- if File.exist?("config/locales/#{args[:language]}.yml")
16
- puts "..."
17
- sleep 0.5
18
- puts "File for #{args[:language].upcase} language has been generated successfully!"
15
+ if args[:multi].nil?
16
+ Habluhablu.hablu(args[:language])
17
+ if File.exist?("config/locales/#{args[:language]}.yml")
18
+ puts "..."
19
+ sleep 0.5
20
+ puts "Everything was generated successfully!"
21
+ else
22
+ puts "Something went wrong!"
23
+ end
19
24
  else
20
- puts "Something went wrong!"
25
+ languages_array = args[:multi].split("_")
26
+ languages_array.each do |language|
27
+ Habluhablu.hablu(language)
28
+ end
29
+ if File.exist?("config/locales/#{languages_array.last}.yml")
30
+ puts "..."
31
+ sleep 0.5
32
+ puts "Everything was generated successfully!"
33
+ else
34
+ puts "Something went wrong!"
35
+ end
21
36
  end
data/lib/habluhablu.rb CHANGED
@@ -21,7 +21,7 @@ module Habluhablu
21
21
  end
22
22
  end
23
23
 
24
- def self.hablu(language)
24
+ def self.hablu(language, lorem = false)
25
25
  # Check if I18n gem is included
26
26
  # if not, raise the custom error
27
27
  if Dir.exist?("./config/locales").eql?(false)
@@ -35,6 +35,10 @@ module Habluhablu
35
35
  raise WrongSymbolError.new(language)
36
36
  end
37
37
 
38
+ if lorem.eql?(true)
39
+ language_class.include_lorem(lorem)
40
+ end
41
+
38
42
  # Create a file of specified language
39
43
  File.open("./config/locales/#{language}.yml", "w") do |f|
40
44
  f.write(language_class.render)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Habluhablu
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
@@ -19,7 +19,8 @@ class Languages
19
19
  "password" => "كلمه المرور",
20
20
  "remember_me" => "تذكرنى",
21
21
  "forgot_password" => "نسيت كلمة مرورك",
22
- "do_not_have_account" => "ليس لديك حساب؟"
22
+ "do_not_have_account" => "ليس لديك حساب؟",
23
+ "lorem" => "غينيا واستمر العصبة ضرب قد. وباءت الأمريكي الأوربيين هو به،, هو العالم، الثقيلة بال. مع وايرلندا الأوروبيّون كان, قد بحق أسابيع العظمى واعتلاء. انه كل وإقامة المواد. "
23
24
  }
24
25
  },
25
26
  en: {
@@ -34,7 +35,8 @@ class Languages
34
35
  "password" => "Password",
35
36
  "remember_me" => "Remember me",
36
37
  "forgot_password" => "Forgot password?",
37
- "do_not_have_account" => "Don't You have an account?"
38
+ "do_not_have_account" => "Don't You have an account?",
39
+ "lorem" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
38
40
  }
39
41
  },
40
42
  es: {
@@ -49,7 +51,8 @@ class Languages
49
51
  "password" => "Contraseña",
50
52
  "remember_me" => "Recordarme",
51
53
  "forgot_password" => "¿Has olvidado tu contraseña?",
52
- "do_not_have_account" => "¿No tienes una cuenta?"
54
+ "do_not_have_account" => "¿No tienes una cuenta?",
55
+ "lorem" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
53
56
  }
54
57
  },
55
58
  pl: {
@@ -64,7 +67,8 @@ class Languages
64
67
  "password" => "Hasło",
65
68
  "remember_me" => "Zapamiętaj mnie!",
66
69
  "forgot_password" => "Zapomniałeś hasła?",
67
- "do_not_have_account" => "Nie masz jeszcze konta?"
70
+ "do_not_have_account" => "Nie masz jeszcze konta?",
71
+ "lorem" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
68
72
  }
69
73
  },
70
74
  iw: {
@@ -80,7 +84,8 @@ class Languages
80
84
  "password" => "סיסמה",
81
85
  "remember_me" => "זכור אותי",
82
86
  "forgot_password" => "שכחת את הסיסמא?",
83
- "do_not_have_account" => "אין לך חשבון?"
87
+ "do_not_have_account" => "אין לך חשבון?",
88
+ "lorem" => "כדי יסוד מונחים מועמדים של, דת דפים מאמרשיחהצפה זאת. אתה דת שונה כלשהו, גם אחר ליום בשפות, או ניווט פולנית לחיבור ארץ. ויש בקלות ואמנות אירועים או, אל אינו כלכלה שתי."
84
89
  }
85
90
  },
86
91
  fr: {
@@ -95,7 +100,8 @@ class Languages
95
100
  "password" => "Mot de passe",
96
101
  "remember_me" => "Mémoriser",
97
102
  "forgot_password" => "Mot de passe oublié",
98
- "do_not_have_account" => "Vous n'avez pas de compte?"
103
+ "do_not_have_account" => "Vous n'avez pas de compte?",
104
+ "lorem" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
99
105
  }
100
106
  },
101
107
  it: {
@@ -110,7 +116,8 @@ class Languages
110
116
  "password" => "Password",
111
117
  "remember_me" => "Ricordami",
112
118
  "forgot_password" => "Ho dimenticato la password",
113
- "do_not_have_account" => "Non possiedi un account?"
119
+ "do_not_have_account" => "Non possiedi un account?",
120
+ "lorem" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
114
121
  }
115
122
  },
116
123
  de: {
@@ -125,7 +132,9 @@ class Languages
125
132
  "password" => "Passwort",
126
133
  "remember_me" => "Merken",
127
134
  "forgot_password" => "Passwort vergessen?",
128
- "do_not_have_account" => "Hast du noch kein FACEBOOK-Konto?" # Change facebook!
135
+ "do_not_have_account" => "Hast du noch kein FACEBOOK-Konto?", # Change facebook!
136
+ "lorem" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
137
+
129
138
  }
130
139
  }
131
140
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: habluhablu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Gramatowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-07 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Generate language file (for I18n) with translations of the most useful
14
14
  phrases.