habluhablu 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +18 -18
- data/.gitignore +13 -13
- data/.rspec +3 -3
- data/.travis.yml +6 -0
- data/CHANGELOG.md +5 -5
- data/Gemfile +12 -12
- data/Gemfile.lock +56 -55
- data/LICENSE.txt +21 -21
- data/README.md +37 -7
- data/Rakefile +12 -12
- data/bin/console +15 -15
- data/bin/setup +8 -8
- data/lib/habluhablu/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb118235fff4bf6f8980c1d28a291ca9284975099f4edc4a03aceb4f887ba233
|
4
|
+
data.tar.gz: e8a73abca8f4087eac11e49efd823e02e440e5fead510c95ace1cb75963e0d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9f9edb3d72e1d6710fd38b443f7f6cda4bad2468e09e0a4f3e04dd7aa9b069b4e17e6bc4eb11d1b056994fb8e1f84f067f802d2b1767caad97988fef42406cf
|
7
|
+
data.tar.gz: bc9e07917b6ac3c34b23587bab00a560d607af32d0a85868df086ff8f52a7655c578a67299b2476c300564ef3699d1b8063019e00d31b8bf8fbb19ed6b881c1d
|
data/.github/workflows/main.yml
CHANGED
@@ -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
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.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
|
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
|
-
|
33
|
+
**Important!**
|
34
|
+
To be able to use the gem:
|
35
|
+
- Install [I18n gem](https://github.com/ruby-i18n/i18n)
|
20
36
|
|
21
|
-
|
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
|
data/lib/habluhablu/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|