crowdin-cli 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +17 -18
- data/README.md +25 -0
- data/bin/crowdin-cli +13 -1
- data/lib/crowdin-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 167ef12c5091fa606c78a514bb4ba5eca0f1edf4
|
4
|
+
data.tar.gz: f2e3308d437fcac56099fb9ca118619508c703b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 731742a0475fe5070dda8bad25d7b6afbac5fc86ed2b8fe6f051d9b6127d0604085d13a63cf163824c45a4f18a9c1ab8a86921d948bb6eeaeb5a4146cd8e0bbd
|
7
|
+
data.tar.gz: 1e50b3cb3bf5d5b7f148a6c905d1fd8c1e6f289d59a92f01f32eacce9f366355fbfe0ca178d2dbaef49a67af169aa6654f53795c58ebf80f274d8bf5352e8efa
|
data/LICENSE
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
3
|
+
Copyright (c) 2012-2014 Anton Maminov
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
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:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
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 THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -192,6 +192,31 @@ base_path: /path/to/your/project
|
|
192
192
|
preserve_hierarchy: true
|
193
193
|
```
|
194
194
|
|
195
|
+
### Escape quotes for `.properties` file format
|
196
|
+
|
197
|
+
Defines whether single quote should be escaped by another single quote or backslash in exported translations.
|
198
|
+
You can add `escape_quote: <value>` per-file option.
|
199
|
+
Acceptable values are: 0, 1, 2, 3. Default is 3.
|
200
|
+
|
201
|
+
* 0 — Do not escape single quote;
|
202
|
+
* 1 — Escape single quote by another single quote;
|
203
|
+
* 2 — Escape single quote by backslash;
|
204
|
+
* 3 — Escape single quote by another single quote only in strings containing variables ( {0} )
|
205
|
+
|
206
|
+
```
|
207
|
+
---
|
208
|
+
project_identifier: test
|
209
|
+
api_key: KeepTheAPIkeySecret
|
210
|
+
base_url: https://api.crowdin.com
|
211
|
+
base_path: /path/to/your/project
|
212
|
+
|
213
|
+
files:
|
214
|
+
-
|
215
|
+
source: '/en/strings.properties'
|
216
|
+
translation: '/%two_letters_code%/%original_file_name%'
|
217
|
+
escape_quotes: 1
|
218
|
+
```
|
219
|
+
|
195
220
|
### Uploading CSV files via API
|
196
221
|
|
197
222
|
```
|
data/bin/crowdin-cli
CHANGED
@@ -919,7 +919,10 @@ pre do |globals ,command, options, args|
|
|
919
919
|
# Use skips_pre before a command to skip this block
|
920
920
|
# on that command only
|
921
921
|
|
922
|
+
# TODO: check for validity options
|
922
923
|
@allowed_options = [
|
924
|
+
# *.properties files only
|
925
|
+
'escape_quotes',
|
923
926
|
# CSV files only
|
924
927
|
'scheme',
|
925
928
|
'first_line_contains_header',
|
@@ -939,7 +942,16 @@ Type `crowdin-cli help` to know how to specify custom configuration file
|
|
939
942
|
See http://crowdin.com/page/cli-tool#configuration-file for more details
|
940
943
|
EOS
|
941
944
|
else
|
942
|
-
|
945
|
+
begin
|
946
|
+
@config = YAML.load_file(globals[:config]) || {}
|
947
|
+
rescue Psych::SyntaxError => err
|
948
|
+
exit_now! <<EOS
|
949
|
+
Could not parse YAML: #{err.message}
|
950
|
+
|
951
|
+
We were unable to successfully parse the crowdin.yaml file that you provided - it most likely is not well-formed YAML.
|
952
|
+
Please check whether your crowdin.yaml is valid YAML - you can use the http://yamllint.com/ validator to do this - and make any necessary changes to fix it.
|
953
|
+
EOS
|
954
|
+
end
|
943
955
|
|
944
956
|
if File.exists?(globals[:identity])
|
945
957
|
identity = YAML.load_file(globals[:identity]) || {}
|
data/lib/crowdin-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowdin-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Crowdin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|