Commit graph

128 commits

Author SHA1 Message Date
Sebastian Celis
c6b3c9c875 Fix an error caused by combining %@ with other placeholders
Fixes #234
2018-01-24 08:56:04 -06:00
Sebastian Celis
7a7ca59c2d
Merge pull request #228 from sebastianludwig/212-improvement
Improved Android HTML escaping
2017-12-30 15:36:40 -06:00
Sebastian Ludwig
e838dcc8fd Add unit tests for regression fixed in #222. Closes #223. 2017-12-12 17:27:08 +01:00
Sebastian Ludwig
b5cd295e3a Escape angle brackets in Android formatter, if the string contains a placeholder to enable users to use the official way to retrieve these strings. Improves #212. 2017-12-12 15:26:38 +01:00
Philippe Auriach
86cf20478b developer_language options only for one unit test 2017-10-13 23:29:49 +02:00
Philippe Auriach
f5af8cf670 Added test for base folder resolved to developer_language option value 2017-10-13 11:49:56 +02:00
Sebastian Ludwig
f7092c7605 Close #212: Change Android escaping to preserve basic styling tags and anything inside CDATA. 2017-09-18 12:26:07 +02:00
Sebastian Ludwig
f106e2e272 Fix #213: Add --version again which got lost in c619dd6. 2017-09-13 19:38:49 +02:00
Sebastian Ludwig
545c106b44 Fail twine commands if there’s more than one formatter candidate. Fixes #201. 2017-08-23 19:32:26 -04:00
Sebastian Ludwig
81f8f15f1d Remove double space. 2017-08-08 20:03:37 +02:00
Sebastian Celis
9d75f104df Add unit test 2017-08-04 08:12:08 -05:00
Sebastian Celis
1270ef2767 Fix language detection for .po formatters
The old regular expressions were only supporting two character language
identifiers. This commit allows languages to scale to things like
"en-GB".

Fixes #199
2017-07-31 10:17:16 -05:00
Sebastian Ludwig
7b599e5f92 Fix #191 by using the parsed boolean value for CLI options, not always true. 2017-05-22 14:40:45 +02:00
Sebastian Ludwig
2f81399a7c Fixed #182: Renamed command generate-loc-drop to generate-localization-archive and consume-loc-drop to consume-localization-archive. 2017-01-16 23:32:02 +01:00
Sebastian Ludwig
c619dd61e4 Improved CLI and only showing applicable options per command. 2016-12-20 00:47:14 +01:00
Sebastian Celis
b33d8425f8 Merge pull request #177 from sebastianludwig/fix-169-153
Implements #169 and resolves #153
2016-12-19 12:34:03 -06:00
Sebastian Ludwig
e2c400ea6d Fixed #179 by converting placeholders before escaping @ signs. 2016-12-14 23:13:05 +01:00
Sebastian Ludwig
f9720a67d7 Implemented determine_language_given_path for Flash formatter. 2016-12-08 10:19:47 +01:00
Sebastian Ludwig
280914bdc5 Fixed #169 by adding proper placeholder handling to Flash formatter. 2016-12-08 10:18:15 +01:00
Sebastian Celis
74d7cb1d85 Merge pull request #174 from sebastianludwig/fix-164-printf-space
Fixed #165 by disallowing single spaces as valid printf flags.
2016-11-21 15:16:46 -06:00
Sebastian Ludwig
43b83cc8e6 Fixed #165 by disallowing single spaces as valid printf flags. 2016-11-21 22:05:25 +01:00
Sebastian Ludwig
37f1d11859 Fixed #172 by removing language mappings. 2016-11-21 21:44:56 +01:00
Sebastian Ludwig
7c84dbb418 Added AND and NOT logic for tags. 2016-06-21 15:28:04 +02:00
Sebastian Celis
762196050e Merge pull request #161 from sebastianludwig/fix_117_xliff_tags
Fix 117 xliff tags
2016-05-16 11:19:58 -05:00
Sebastian Ludwig
d8387e55f4 Added unit test to verify empty sections don't contribute to jQuery formatter output. 2016-05-03 23:25:44 +02:00
Sebastian Ludwig
a53384c5d7 Added test to verify the android formatter unescapes values properly. 2016-05-03 22:59:22 +02:00
Sebastian Ludwig
60b0eb2adf Allowing xliff tags in android values and escaping special characters as recommended by Android docs. 2016-05-03 22:59:22 +02:00
Sebastian Ludwig
2e283d7057 Got rid of the Case in test class names. 2016-05-03 22:44:22 +02:00
Paul Wagener
111840ed70 Add UTF-8 Content-Type to the Django formatter 2016-05-03 21:53:12 +02:00
Sebastian Ludwig
ea58bd10ca Properly parsing multiline strings in Android formatter by using REXML instead of regexps. Fixes #81. 2016-04-27 08:35:52 +02:00
Sebastian Ludwig
f4cbf08122 Fixed #155 by removing mapping from zh to zh-Hans in Android formatter. 2016-04-26 21:11:34 +02:00
Sebastian Ludwig
ef84dd322c Renamed commands to get rid of more 'string' ambiguities. 2016-03-31 22:36:06 +02:00
Sebastian Ludwig
594fbfddcc Renamed StringsFile to TwineFile, StringsSection to TwineSection and StringsRow to TwineDefinition. 2016-03-31 22:36:06 +02:00
Sebastian Ludwig
4e0eeaa9f1 Relying on and using more features of OptionParser and improved --help formatting. 2016-03-01 16:20:44 -06:00
Sebastian Ludwig
e59f33c882 Fixed #137 by allowing unquoted keys in Apple string files. 2016-03-01 15:41:59 -06:00
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 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 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
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 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 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