habluhablu 0.5.1 → 0.5.6

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: 7eed0b9343162e21a5494ad84ae29f33aab82f52ba4df5350c631cd134bf2a6d
4
- data.tar.gz: e5a54c5b427bb3792cb4369b6f38bfa8da7c3fbc6d12ca3e1e1b71e52878f3bf
3
+ metadata.gz: eb118235fff4bf6f8980c1d28a291ca9284975099f4edc4a03aceb4f887ba233
4
+ data.tar.gz: e8a73abca8f4087eac11e49efd823e02e440e5fead510c95ace1cb75963e0d1d
5
5
  SHA512:
6
- metadata.gz: 01cb6ad52bd398d61c1864303f8ac8f7073fd45170c9c16ea4ac0d645b96ea458b35f5eaefc12040276e5aa497bdae44277d042086b301b69cb04d544b36182a
7
- data.tar.gz: ba01336399138153c09802390791ddcfe5a2f31b314d2594269b44e3c3ee31facdae115f9480926b02ad69052d7b5fc92fc66a27e45c84675e14830a75b41490
6
+ metadata.gz: b9f9edb3d72e1d6710fd38b443f7f6cda4bad2468e09e0a4f3e04dd7aa9b069b4e17e6bc4eb11d1b056994fb8e1f84f067f802d2b1767caad97988fef42406cf
7
+ data.tar.gz: bc9e07917b6ac3c34b23587bab00a560d607af32d0a85868df086ff8f52a7655c578a67299b2476c300564ef3699d1b8063019e00d31b8bf8fbb19ed6b881c1d
@@ -1,18 +1,18 @@
1
- name: Ruby
2
-
3
- on: [push,pull_request]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v2
10
- - name: Set up Ruby
11
- uses: ruby/setup-ruby@v1
12
- with:
13
- ruby-version: 2.7.2
14
- - name: Run the default task
15
- run: |
16
- gem install bundler -v 2.2.14
17
- bundle install
18
- bundle exec rake
1
+ name: Ruby
2
+
3
+ on: [push,pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.2
14
+ - name: Run the default task
15
+ run: |
16
+ gem install bundler -v 2.2.14
17
+ bundle install
18
+ bundle exec rake
data/.gitignore CHANGED
@@ -1,13 +1,13 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- *.gem
11
-
12
- # rspec failure tracking
13
- .rspec_status
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ *.gem
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.7.2
4
+ install: bundle install --retry=3
5
+ before_install:
6
+ - gem update bundler
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- ## [Unreleased]
2
-
3
- ## [0.1.0] - 2021-05-05
4
-
5
- - Initial release
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2021-05-05
4
+
5
+ - Initial release
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in habluhablu.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "rspec", "~> 3.0"
11
-
12
- gem "rubocop", "~> 1.7"
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in habluhablu.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.7"
data/Gemfile.lock CHANGED
@@ -1,55 +1,56 @@
1
- PATH
2
- remote: .
3
- specs:
4
- habluhablu (0.5.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- diff-lcs (1.4.4)
11
- parallel (1.20.1)
12
- parser (3.0.1.1)
13
- ast (~> 2.4.1)
14
- rainbow (3.0.0)
15
- rake (13.0.3)
16
- regexp_parser (2.1.1)
17
- rexml (3.2.5)
18
- rspec (3.10.0)
19
- rspec-core (~> 3.10.0)
20
- rspec-expectations (~> 3.10.0)
21
- rspec-mocks (~> 3.10.0)
22
- rspec-core (3.10.1)
23
- rspec-support (~> 3.10.0)
24
- rspec-expectations (3.10.1)
25
- diff-lcs (>= 1.2.0, < 2.0)
26
- rspec-support (~> 3.10.0)
27
- rspec-mocks (3.10.2)
28
- diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.10.0)
30
- rspec-support (3.10.2)
31
- rubocop (1.14.0)
32
- parallel (~> 1.10)
33
- parser (>= 3.0.0.0)
34
- rainbow (>= 2.2.2, < 4.0)
35
- regexp_parser (>= 1.8, < 3.0)
36
- rexml
37
- rubocop-ast (>= 1.5.0, < 2.0)
38
- ruby-progressbar (~> 1.7)
39
- unicode-display_width (>= 1.4.0, < 3.0)
40
- rubocop-ast (1.5.0)
41
- parser (>= 3.0.1.1)
42
- ruby-progressbar (1.11.0)
43
- unicode-display_width (2.0.0)
44
-
45
- PLATFORMS
46
- x64-mingw32
47
-
48
- DEPENDENCIES
49
- habluhablu!
50
- rake (~> 13.0)
51
- rspec (~> 3.0)
52
- rubocop (~> 1.7)
53
-
54
- BUNDLED WITH
55
- 2.2.14
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ habluhablu (0.5.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ diff-lcs (1.4.4)
11
+ parallel (1.20.1)
12
+ parser (3.0.1.1)
13
+ ast (~> 2.4.1)
14
+ rainbow (3.0.0)
15
+ rake (13.0.3)
16
+ regexp_parser (2.1.1)
17
+ rexml (3.2.5)
18
+ rspec (3.10.0)
19
+ rspec-core (~> 3.10.0)
20
+ rspec-expectations (~> 3.10.0)
21
+ rspec-mocks (~> 3.10.0)
22
+ rspec-core (3.10.1)
23
+ rspec-support (~> 3.10.0)
24
+ rspec-expectations (3.10.1)
25
+ diff-lcs (>= 1.2.0, < 2.0)
26
+ rspec-support (~> 3.10.0)
27
+ rspec-mocks (3.10.2)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.10.0)
30
+ rspec-support (3.10.2)
31
+ rubocop (1.14.0)
32
+ parallel (~> 1.10)
33
+ parser (>= 3.0.0.0)
34
+ rainbow (>= 2.2.2, < 4.0)
35
+ regexp_parser (>= 1.8, < 3.0)
36
+ rexml
37
+ rubocop-ast (>= 1.5.0, < 2.0)
38
+ ruby-progressbar (~> 1.7)
39
+ unicode-display_width (>= 1.4.0, < 3.0)
40
+ rubocop-ast (1.5.0)
41
+ parser (>= 3.0.1.1)
42
+ ruby-progressbar (1.11.0)
43
+ unicode-display_width (2.0.0)
44
+
45
+ PLATFORMS
46
+ x64-mingw32
47
+
48
+ DEPENDENCIES
49
+ habluhablu!
50
+ rake (~> 13.0)
51
+ rspec (~> 3.0)
52
+ rubocop (~> 1.7)
53
+
54
+ BUNDLED WITH
55
+ 2.2.14
56
+
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 Patrick Gramatowski
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Patrick Gramatowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,24 +1,40 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/habluhablu.svg)](https://badge.fury.io/rb/habluhablu)
2
+ [![Build Status](https://travis-ci.org/patrickgramatowski/habluhablu_gem.svg?branch=master)](https://travis-ci.org/patrickgramatowski/habluhablu_gem)
2
3
 
3
4
  # HabluHablu
4
5
 
5
- HabluHablu is a CLI written in Ruby, which allows you to generate language file with translations of the most useful phrases.
6
+ :earth_americas: HabluHablu is a CLI written in Ruby, which allows you to generate a language file (for I18n) with translations of the most useful phrases. :closed_book:
7
+
8
+ :dart: The main goal for me is to create a library of translations for the most of languages and maybe even for the most popular dialects.
9
+ What about ancient languages? :scroll:
6
10
 
7
11
  ## Supported languages
8
12
 
9
13
  - English
14
+ - Spanish
15
+ - German
16
+ - French
17
+ - Italian
18
+ - Japanese
19
+ - Russian
20
+ - Korean
21
+ - Portuguese
22
+ - Turkish
10
23
  - Polish
24
+ - Thai (th - symbol)
25
+ - Chinese (zh - symbol)
11
26
  - Arabic
12
- - Spanish
13
27
  - Hebrew
14
28
  - If you want to help me out and add your language, don't hesitate!
15
29
  - In progress...
16
30
 
17
31
  ### Installation
18
32
 
19
- Add this line to your application's Gemfile:
33
+ **Important!**
34
+ To be able to use the gem:
35
+ - Install [I18n gem](https://github.com/ruby-i18n/i18n)
20
36
 
21
- Install [I18n gem](https://github.com/ruby-i18n/i18n)
37
+ Add this line to your application's Gemfile:
22
38
 
23
39
  ```ruby
24
40
  gem 'habluhablu'
@@ -34,10 +50,24 @@ Or install it yourself as:
34
50
 
35
51
  ### Usage
36
52
 
37
- Generate file for a specific language using `habluhablu -l <symbol>` command.
38
- Generate an example language file using `habluhablu -l example` command (it generates empty file with keywords to fill).
39
- Generate files for a more languages using `habluhablu -m <symbols>(separated by '_')` command.
40
53
  [List of symbols](https://www.w3.org/International/O-charset-lang.html)
54
+ Generate file for a specific language using `habluhablu -l <symbol>` command.
55
+
56
+ Generate an example language file using `habluhablu -l example` command (it generates empty file with keywords to fill).
57
+
58
+ Generate files for a more languages using `habluhablu -m <symbols>(separated by '_')` command.
59
+
60
+ To generate a keyword for all languages files use: `habluhablu -k <keyword>` command.
61
+
62
+ To translate a phrase/word use: `habluhablu -t hello_world -f en -o es`, where the command translates 'hello there' to spanish (-o flag).
63
+
64
+ **Important!** to use translator you will have to create an account [Google API](https://rapidapi.com/googlecloud/api/google-translate1) and put api_key into api_key.txt file in config/locales directory.
65
+
66
+ If you want to generate your own sample for languages files, You can do it by:
67
+ - creating your own sample.yml file in config/locales directory
68
+ - using `habluhablu -s <symbols>(separated by '_')` command
69
+
70
+ Generate a json file of the languages you want, use `habluhablu -j <symbols>(separated by '_')` command.
41
71
 
42
72
  `habluhablu --help`
43
73
 
data/Rakefile CHANGED
@@ -1,12 +1,12 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[spec rubocop]
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console CHANGED
@@ -1,15 +1,15 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "habluhablu"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "habluhablu"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup CHANGED
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -45,5 +45,3 @@ es:
45
45
  irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
46
46
  pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
47
47
  deserunt mollit anim id est laborum.
48
- ---
49
- translation: "¡amigo!"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Habluhablu
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.6"
5
5
  end
@@ -267,6 +267,52 @@ class Languages
267
267
  "lorem" => "국민경제의 발전을 위한 중요정책의 수립에 관하여 대통령의 자문에 응하기 위하여 국민경제자문회의를 둘 수 있다."
268
268
  }
269
269
  },
270
+ th: {
271
+ "th" => {
272
+ "date" => {
273
+ "months_names" => %w[
274
+ ],
275
+ "abbr_month_names" => %w[
276
+ ]
277
+ },
278
+ "language" => "ไทย",
279
+ "welcome" => "ยินดีต้อนรับ",
280
+ "registration" => "ลงทะเบียน",
281
+ "log_in" => "ลงชื่อเข้าใช้",
282
+ "log_in_with" => "ลงชื่อเข้าใช้ด้วย %(replace)", # Example: 'with Facebook'
283
+ "log_out" => "ลงชื่อออก",
284
+ "email_address" => "อีเมล",
285
+ "username" => "ชื่อผู้ใช้",
286
+ "password" => "รหัสผ่าน",
287
+ "remember_me" => "จำฉันไว้",
288
+ "forgot_password" => "ลืมรหัสผ่าน",
289
+ "do_not_have_account" => "ไม่มีบัญชี %(register) ใช่ไหม",
290
+ "lorem" => "เป็นข้อความแทนที่ ใช้เพื่อลดความสนใจต่อข้อความที่นำมาแสดง สำหรับการแสดงลักษณะของ ฟอนต์ การพิมพ์และการจัดหน้า"
291
+ }
292
+ },
293
+ zh: {
294
+ "zh" => {
295
+ "date" => {
296
+ "months_names" => %w[
297
+ ],
298
+ "abbr_month_names" => %w[
299
+ ]
300
+ },
301
+ "language" => "简体中文",
302
+ "welcome" => "欢迎",
303
+ "registration" => "注册",
304
+ "log_in" => "登录",
305
+ "log_in_with" => "登录 %(replace)", # Example: 'with Facebook'
306
+ "log_out" => "登出",
307
+ "email_address" => "电子邮件地址",
308
+ "username" => "用户名",
309
+ "password" => "密码",
310
+ "remember_me" => "记住我",
311
+ "forgot_password" => "忘记密码",
312
+ "do_not_have_account" => "还没有 %(register) 账户?",
313
+ "lorem" => "側経意責家方家閉討店暖育田庁載社転線宇。得君新術治温抗添代話考振投員殴大闘北裁。品間識部案代学凰処済準世一戸刻法分。悼測済諏計飯利安凶断理資沢同岩面文認革。内警格化再薬方久化体教御決数詭芸得筆代。"
314
+ }
315
+ },
270
316
  example: {
271
317
  "example" => {
272
318
  "date" => {
data/lib/translation.rb CHANGED
@@ -43,6 +43,3 @@ class Translation
43
43
  end
44
44
  end
45
45
  end
46
-
47
- tr = Translation.new("Hi_there", "es")
48
- tr.response
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.5.1
4
+ version: 0.5.6
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-14 00:00:00.000000000 Z
11
+ date: 2021-05-18 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.
@@ -23,6 +23,7 @@ files:
23
23
  - ".gitignore"
24
24
  - ".rspec"
25
25
  - ".rubocop.yml"
26
+ - ".travis.yml"
26
27
  - CHANGELOG.md
27
28
  - Gemfile
28
29
  - Gemfile.lock
@@ -64,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  - !ruby/object:Gem::Version
65
66
  version: '0'
66
67
  requirements: []
67
- rubygems_version: 3.2.14
68
+ rubygems_version: 3.1.6
68
69
  signing_key:
69
70
  specification_version: 4
70
71
  summary: HabluHablu makes it easier to use I18n.