Commit graph

50 commits

Author SHA1 Message Date
Doug Melton
4d0f6326fb Slurp Android mulitline comments as single-line 2021-01-28 13:17:15 -08:00
Sebastian Ludwig
42895063e1 Ignore commented out lines in Django .PO files (fixes #286) 2019-09-23 17:01:54 +02:00
Sebastian Ludwig
59c2f23064 Add --escape-all-tags flag to force the Android formatter to always escape styling tags.
Closes #281
2019-07-01 20:19:57 +02:00
Kaloian Doganov
5e7a9c9be3 Support more Android styling tags 2019-05-23 23:28:30 +03:00
Jonas Rottmann
2e19dccd74 Make android formatter respect developer language
The output path of the android formatter will be `values` (no language
selector) of the language matches the developer language.
2019-04-18 23:46:58 +02:00
Sebastian Celis
e1ca68f6b9 Escape quotes in the gettext formatter
Fixes #267
2019-02-21 15:56:02 -06:00
Sebastian Ludwig
68b59b9e0f Fixes #255. While fixing #250 094ba47 introduced a regression that the language was no longer deducted from the given filename. 2018-06-17 16:17:22 +02:00
Aliaksei Piatrouski
a0a12ad1c1 Fixxing issue 252: Generating and Consuming Loc Drop Converts Double Quotes to Single Quotes 2018-06-06 12:58:11 -07:00
Sebastian Ludwig
094ba47ac8 Only recognize two letter language codes (with optional two letter region codes) as languages when deducting the language from filenames.
Also add the logic to recognize a language code folder name in the Abstract formatter to mirror its output_path_for_language implementation.

Fixes 250.
2018-06-04 21:22:09 +02:00
Sebastian Ludwig
5b2ddf3135 Fixes a regression introduced in ea58bd1: child HTML tags in strings like <b> were ignored when consuming strings. Closes #244. 2018-05-21 14:26:30 +02: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 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 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 Ludwig
37f1d11859 Fixed #172 by removing language mappings. 2016-11-21 21:44:56 +01: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
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
594fbfddcc Renamed StringsFile to TwineFile, StringsSection to TwineSection and StringsRow to TwineDefinition. 2016-03-31 22:36:06 +02: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 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
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
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
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
c55c7685b9 Storing formatter instances in Twine::Formatters.formatters to make it easier to inject mocks. 2016-01-17 20:47:44 -05: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
c9aa835621 Merge pull request #122 from sebastianludwig/consume_comments
Consume comments
2015-12-17 09:10:13 -06:00
Sebastian Ludwig
d21f07e735 Re-added @ sign escaping to Android formatter. 2015-12-05 17:12:45 +01:00
Sebastian Ludwig
1a49852a6e Added Placeholders module and added methods to convert from twine format to android and vice versa. 2015-12-05 15:38:33 +01:00
Sebastian Ludwig
1470494525 Moved newline escaping from JQuery formatter to Abstract. 2015-12-05 01:46:17 +01:00
Sebastian Ludwig
69d957fe16 Enabled test. 2015-12-05 01:39:53 +01:00
Sebastian Ludwig
00d2dc953e Tested and fixed comment consumption for all formatters. 2015-12-05 01:23:50 +01:00
Sebastian Ludwig
bcb6dd928e Added unit tests for Django and Flash formatters. 2015-11-28 13:31:39 +01:00
Sebastian Ludwig
1153d8c247 Using set_translation_for_key in JQuery formatter to transform the value instead of read_file. 2015-11-27 15:45:45 +01:00
Sebastian Ludwig
d3128cdbd9 Replaced unit tests with more targeted tests aimed to test the functionality thoroghly. Closes #91. 2015-11-27 15:04:45 +01:00