-
Notifications
You must be signed in to change notification settings - Fork 22
/
TODO
49 lines (36 loc) · 1.98 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
* Improvements
- Remove the ex1.output ex1.i18n-extractor duplication. (or move to tmp dir): Move to test/tmp a-la the way workflow is working.
- Add {} to disallowed characters
- Add yaml fixtures and compare those
- Refactor tests: split out what is integration vs unit, too much coupling.
- Prompter.new should just be a singleton.
- rm hax_shit, move to setup/teardown, shutdown/startup
- make directories now that are more abstractions? finder/ -> finder,exceptionfinder,etc...replacer/ -> parser too, & stuffz?
- rm the :overwrite, :dump stuff to UserAction?
* Issues
- CLI options: Extractor.new accepts options. pass through workflow. First up: yaml_file (issue#5)
- add a ~/.haml-i18n-extractor file/dir/config file etc. to keep preferences of interactive mode or not?
* Ideas
- handled email suffixes (foo.en.html.haml etc)
- add herbgobbler (ERB) and this to another more generalized repo for translating templates?
* Refactor
https://github.com/shaiguitar/haml-i18n-extractor/issues/2
Refactor out text_replacer? it's pretty simple. we can:
return a result class like Finder
and refactor the main modified_line method so it's not dumb?!
Change naive implementation!
right now it gets full_line, replace_this. just does a simple gsub.
Now we are able to have internal access to Haml::Parser internals, we can deal with...
ExceptionText needs to be responsible for knowing if needed to interpolate?
(BUG: duplicate texts in one line...)
Basically, need to make a list of texts that the finder needs to match w/out a full haml element, etc, just raw text
IF no match, keep behavior.
IF match no_interpolation?, check if duplicate, find correct index.
IF match with_interpolation?, find interpolation index, check if whole thing duplicate, find correct index.
it then passes back to orchestrator info as well:
text_it_should_translate
indexes of what to replace, where etc?
line_type
is_interpolated?
?
?