Commit graph

294 commits

Author SHA1 Message Date
Sebastian Ludwig
9e7e51e4c6 Moved heavily redundant file opening logic (necessary to read string files) from formatters to Runner and unified the encoding handling. 2016-03-01 12:56:42 -06:00
Sebastian Ludwig
7124b36b2d Removed Ruby 1.9 leftovers since Twine requires Ruby 2.0. 2016-03-01 12:56:20 -06:00
Sebastian Ludwig
feea61744c Cleaned up Runner::consume_loc_drop 2016-03-01 12:38:26 -06:00
Sebastian Celis
e690be4eee Merge pull request #141 from sebastianludwig/android_output_folders
Properly prefixing Android output path
2016-02-29 09:14:18 -06:00
Sebastian Celis
4be87b8d3f Merge pull request #140 from sebastianludwig/empty_results
Empty results
2016-02-29 09:12:37 -06:00
Sebastian Ludwig
f29d73c6fa Properly prefixing Android output path with values-. 2016-02-28 11:58:33 -06:00
Sebastian Ludwig
1aa45c0c75 Logging a warning, if a file is skipped because it would be empty while generating a loc drop. 2016-02-28 11:42:55 -06:00
Sebastian Ludwig
eec7d3b5d2 Logging a warning, if a file is skipped because it would be empty while generating all string files. 2016-02-28 09:18:51 -06:00
Sebastian Ludwig
d7dfe19512 Moved write_all_files from Abstract formatter to Runner. 2016-02-28 09:14:25 -06:00
Sebastian Ludwig
430bc1bac2 Raising an error if generate_string_file would create an empty file. 2016-02-28 09:14:25 -06:00
Sebastian Ludwig
1e63a89860 Inlined method that was only used once. 2016-02-28 09:14:25 -06:00
Sebastian Ludwig
0f2535223e Removed Abstract::write_file, since formatters should focus on formatting. format_file is used directly instead. 2016-02-27 19:49:01 -06:00
Sebastian Ludwig
3cb766d9a2 Renamed test cases to match the command line option they are testing (--validate). 2016-02-27 17:40:34 -06:00
Sebastian Ludwig
e5f9625105 Fixed typo. 2016-02-27 17:39:15 -06:00
Sebastian Celis
c863485b1d Merge pull request #136 from sebastianludwig/android_langauges
Fixed Android language determination. Closes #134.
2016-02-22 16:32:59 -06:00
Sebastian Ludwig
0a80890f87 Added more Android formatter language determination unit tests. 2016-02-22 16:31:24 -06:00
Sebastian Ludwig
e2dc6dce01 Fixed Android language determination. Closes #134. 2016-02-22 15:45:11 -06:00
Sebastian Celis
8700257f95 Update version to 0.8.1. 2016-02-22 09:32:52 -06:00
Sebastian Celis
3c1a931404 Merge pull request #133 from sebastianludwig/duplicate_strings
Duplicate strings
2016-02-22 09:32:17 -06:00
Sebastian Ludwig
9374fdb40a Converted otherwise unused instance variables to local variables. 2016-02-22 09:12:03 -06:00
Sebastian Ludwig
689ad2cd72 Added validate option to validate a strings file before generating any output. 2016-02-22 09:11:04 -06:00
Sebastian Ludwig
1d4e0aeb9b Added pendantic option to validate-strings-file command and hid errors for keys without tags behind it. 2016-02-16 12:54:45 -06:00
Sebastian Celis
cb285dfc32 Merge pull request #131 from sebastianludwig/runner_improvements
Runner improvements
2016-01-27 16:00:31 -06:00
Sebastian Ludwig
b6b443cef4 Split up reat_write_string_file. 2016-01-25 16:41:27 -05:00
Sebastian Ludwig
4223e3b9e8 Cleaned up Runner. 2016-01-25 16:41:27 -05:00
Sebastian Celis
662da698ad Merge pull request #129 from sebastianludwig/formatter_refactoring
Formatter refactoring
2016-01-19 16:36:18 -06:00
Sebastian Ludwig
b53ecb2be6 Removed initializer parameters from Abstract formatter because they were only used in unit tests. 2016-01-19 13:22:29 -05:00
Sebastian Ludwig
1e363f9c65 Added legacy method for registering formatters back (was removed in 0403b17) to ensure backwards compability. 2016-01-19 13:21:15 -05:00
Sebastian Celis
2ac52789b7 Merge pull request #128 from sebastianludwig/fixed_tests
Changed fixtures to be independent of the gem version
2016-01-17 20:01:06 -06:00
Sebastian Ludwig
cd055e7021 Changed fixtures to be independent of the gem version. 2016-01-17 20:56:37 -05:00
Sebastian Ludwig
faa896b91b Better way of resetting formatters for every test 2016-01-17 20:53:41 -05:00
Sebastian Ludwig
e4a121ea7d Using instance methods instead of class constants to convey formatter capabilities. 2016-01-17 20:51:40 -05:00
Sebastian Ludwig
0403b17c2e Letting the formatters register themselves. 2016-01-17 20:47:44 -05:00
Sebastian Ludwig
c55c7685b9 Storing formatter instances in Twine::Formatters.formatters to make it easier to inject mocks. 2016-01-17 20:47:44 -05:00
Sebastian Ludwig
5f37416f49 Deleted unnecessary methods. 2016-01-17 20:46:08 -05:00
Sebastian Ludwig
17efb76019 Refactored formattes to get rid of dynamic method dispatching. 2016-01-17 20:46:07 -05:00
Sebastian Celis
aab8179f14 Update required ruby version to 2.0.
This closes #115
2016-01-15 09:27:37 -06:00
Sebastian Celis
a01086ef8d Add license to gemspec. 2016-01-12 06:25:26 -06:00
Sebastian Celis
9b7d55f1c3 Update twine to 0.8.0. 2016-01-12 06:20:56 -06:00
Sebastian Celis
faedb5ee78 Merge pull request #125 from sebastianludwig/placeholders
Improved placeholder handling
2016-01-12 06:19:54 -06:00
Sebastian Celis
c9a0fd4bc5 Merge pull request #123 from sebastianludwig/no_skip
Post modularization cleanup
2016-01-12 06:19:22 -06:00
Sebastian Celis
9c0fc9b296 Remove period from the list of valid characters.
Period is not allowed in Android strings.
2016-01-12 06:18:11 -06:00
Sebastian Celis
fdb1e3489f Merge pull request #121 from sebastianludwig/validate_strings_file
Check for invalid characters
2016-01-12 06:17:35 -06:00
Sebastian Ludwig
b73045b33b Fixed tests for ruby 1.9. 2015-12-18 13:47:10 +01:00
Sebastian Ludwig
7bcab89373 Cleanup of validate_strings_file. 2015-12-18 13:47:10 +01:00
Sebastian Ludwig
0f9bd0dcba Closed #84 by checking for invalid characters in keys in validate-strings-file. 2015-12-18 13:47:10 +01:00
Sebastian Ludwig
1ecb483dbd Added unit test for validate-strings-file command. 2015-12-18 13:47:10 +01:00
Sebastian Ludwig
527d3aa60c Got rid of unnecessary if in return statement. 2015-12-18 13:44:25 +01:00
Sebastian Ludwig
eaa3666f5a Added explanation why %@ is used as string placeholder to README. 2015-12-18 13:40:38 +01:00
Sebastian Celis
c9aa835621 Merge pull request #122 from sebastianludwig/consume_comments
Consume comments
2015-12-17 09:10:13 -06:00