habluhablu 0.5.2 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +37 -7
- data/lib/habluhablu/version.rb +1 -1
- data/lib/languages/languages.rb +69 -0
- data/lib/translation.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d1f721e948bfa1a1bf2d9d6de0cf494471cc88be928b361ac948ea52549961a
|
4
|
+
data.tar.gz: 3a04f76784dcde5a5ca4d12337983492c8080f4c72e55ee51d8c1e12854c5b38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8e19e9a36b8e4bca9819d4f0beb2f4d321777c4fcad4fde7f7d4e56b2dfd3ee93256d2480ae698791281d74692a9742d01006e552c2f276e128cbc51b6b7452
|
7
|
+
data.tar.gz: 726d7e05aac708ceca016e6e20d88921c87ddfe7379d015479b5edc4876e33b6540e55fd5384639839b61036c53513f60e991878dec358892145ab84de2396a8
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
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/lib/habluhablu/version.rb
CHANGED
data/lib/languages/languages.rb
CHANGED
@@ -267,6 +267,75 @@ 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
|
+
},
|
316
|
+
hu: {
|
317
|
+
"hu" => {
|
318
|
+
"date" => {
|
319
|
+
"months_names" => %w[
|
320
|
+
],
|
321
|
+
"abbr_month_names" => %w[
|
322
|
+
]
|
323
|
+
},
|
324
|
+
"language" => "Magyar",
|
325
|
+
"welcome" => "Üdvözöljük",
|
326
|
+
"registration" => "Fiók létrehozása",
|
327
|
+
"log_in" => "Bejelentkezés",
|
328
|
+
"log_in_with" => "Jelentkezz be %(replace)", # Example: 'with Facebook'
|
329
|
+
"log_out" => "Kijelentkezés",
|
330
|
+
"email_address" => "E-mail-címet",
|
331
|
+
"username" => "Felhasználónév",
|
332
|
+
"password" => "Jelszó",
|
333
|
+
"remember_me" => "Maradjak bejelentkezve",
|
334
|
+
"forgot_password" => "Nem tudsz bejelentkezni?",
|
335
|
+
"do_not_have_account" => "Nincs %(register) fiókja?",
|
336
|
+
"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."
|
337
|
+
}
|
338
|
+
},
|
270
339
|
example: {
|
271
340
|
"example" => {
|
272
341
|
"date" => {
|
data/lib/translation.rb
CHANGED
@@ -25,7 +25,7 @@ class Translation
|
|
25
25
|
$KEY = f.read
|
26
26
|
end
|
27
27
|
if $KEY.length <= 2 || $KEY.nil?
|
28
|
-
@request["x-rapidapi-key"] = '
|
28
|
+
@request["x-rapidapi-key"] = 'Add your google api key!'
|
29
29
|
else
|
30
30
|
@request["x-rapidapi-key"] = $KEY
|
31
31
|
end
|
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.7
|
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-
|
11
|
+
date: 2021-06-13 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
|