Fetching contributors…
Cannot retrieve contributors at this time
50 lines (36 sloc) 1.98 KB
* 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.
- 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: 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
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:
indexes of what to replace, where etc?