haml-i18n-extractor 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +4 -6
- data/TODO +10 -9
- data/lib/haml-i18n-extractor/extractor.rb +0 -1
- data/lib/haml-i18n-extractor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTRlOTVmMDNhOWVmMmRmN2JkMDhhOTMzOTAyZGViNmEyNDIyMTJkZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODY1NDJjZTRmMjQ0Y2ZmMWZlZTE3MGZjYjdhNTc3OTE2ZDlkMDNiMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDViNDlhMjk2ZjE1N2JkZjM1ODVhNTNhMWQ4YTU2MjFhNThiNTkwYmI3Y2Ey
|
10
|
+
OTQ1ODM0OTQxMGQzY2Y5ZTlhNGE4ZDk0ZjhmZWEzOTVjODkxZjIwMGIyMzk3
|
11
|
+
MzMxZmYzNWEwZjNiMTdmY2JhODRjZmJlZThlMzYzNTNlNWJiMjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzY0MjVmOWQ1NTMzZTYzNzkyMGIyNjFhNTRjMWZjMGZkM2ViZmJkNDA3Yzky
|
14
|
+
MGMxOWQyZjZlZGRkNjJhYjFlMmU2NTRkNTI5N2RjYzFjZWU0MDkxOWY1ZjMz
|
15
|
+
YTFmZTQ1OTg2ZDA0MDJhMzVkOTY2ZGRkMjdjMTgyZjVmNmM5MWY=
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ However I don't upload gems to rubygems in my spare time, so if you want the lat
|
|
13
13
|
|
14
14
|
## Usage
|
15
15
|
|
16
|
-
- You can use the lib directly:
|
16
|
+
- You can use the lib directly:
|
17
17
|
|
18
18
|
<pre>
|
19
19
|
begin
|
@@ -21,9 +21,7 @@ begin
|
|
21
21
|
@ex1.run
|
22
22
|
rescue Haml::I18n::Extractor::InvalidSyntax
|
23
23
|
puts "There was an error with #{haml_path}"
|
24
|
-
|
25
|
-
puts "Nothing to translate for #{haml_path}"
|
26
|
-
end
|
24
|
+
end
|
27
25
|
</pre>
|
28
26
|
|
29
27
|
- You can also simply run the binary provided with the gem on a rails app:
|
@@ -36,7 +34,7 @@ The workflow is an interactive one using highline which will allow you to choose
|
|
36
34
|
2) place a tmp haml file.
|
37
35
|
3) pass, move on to the next haml file.
|
38
36
|
|
39
|
-
Run the binary and see!
|
37
|
+
Then it will ask you on a line-per-line basis if you wish to replace that line or not. It's WIP, but it does work, so - Run the binary and see!
|
40
38
|
|
41
39
|
## Example output
|
42
40
|
|
@@ -124,4 +122,4 @@ Can use github issues to address any concern you have, or simply email me, with
|
|
124
122
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
125
123
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
126
124
|
4. Push to the branch (`git push origin my-new-feature`)
|
127
|
-
5. Create new Pull Request
|
125
|
+
5. Create new Pull Request
|
data/TODO
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
## general todo's
|
2
|
+
|
1
3
|
- Remove the ex1.output ex1.i18n-extractor duplication. (or move to tmp dir):
|
2
4
|
Move to test/tmp a-la the way workflow is working.
|
3
5
|
- Ensure that yaml file gets written to the right directory, and does a deep merge.
|
@@ -5,16 +7,15 @@
|
|
5
7
|
- Add yaml fixtures and compare those
|
6
8
|
- handled email suffixes (foo.en.html.haml etc)
|
7
9
|
- admin/bla should be namespaced such as: en.admin.bla vs just en.bla in the yml file?
|
8
|
-
- add to README 'it is idempotent...' :P
|
9
10
|
- add herbgobbler (ERB) and this to another more generalized repo for translating templates?
|
10
11
|
- Refactor tests: split out what is integration vs unit, too much coupling.
|
11
12
|
|
12
|
-
##
|
13
|
+
## workflow todo's
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
cleanup workflow - keep around
|
16
|
+
just handle a rails project dir move any prompting in workflow into prompter.
|
17
|
+
if the user says 'no' on a line, make sure to not replace it
|
18
|
+
no extra yaml keys...
|
19
|
+
make sure yaml keys are in one file and fall into config/locales properly.
|
20
|
+
give user more context on line changes (like grep -C 4)
|
21
|
+
also right now there is a bug where it asks for 'y' twice?
|
@@ -67,7 +67,6 @@ module Haml
|
|
67
67
|
should_be_replaced, text_to_replace, locale_hash = handle_line_replacing(orig_line, line_match, line_type, line_no)
|
68
68
|
if should_be_replaced
|
69
69
|
if prompt_per_line?
|
70
|
-
Haml::I18n::Extractor::Prompter.new(orig_line,text_to_replace).ask_user
|
71
70
|
user_approves = Haml::I18n::Extractor::Prompter.new(orig_line,text_to_replace).ask_user
|
72
71
|
else
|
73
72
|
user_approves = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-i18n-extractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shai Rosenfeld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|