Commit graph

87 commits

Author SHA1 Message Date
Sebastian Celis
22482c3587 Update version to 0.5.0. 2014-02-28 13:40:00 -06:00
Sebastian Celis
05854553a1 Make the resources regular expression more forgiving. 2014-02-24 16:16:58 -06:00
Sebastian Celis
d91a727e00 Merge remote-tracking branch 'pichirichi/patch-2' 2014-02-20 16:26:05 -06:00
Shai Shamir
4e7c0a9590 add Django formatter 2014-02-20 15:41:45 +02:00
pichirichi
9c546be6c9 Adding Django formatter
This will enable the creation of Django formated translation files as described here: https://docs.djangoproject.com/en/dev/topics/i18n/translation/
2014-02-20 14:18:56 +02:00
Sebastian Celis
2b6e9fc1b8 Clean up write_all_files.
We now ignore the current directory and its parent as neither of these
are meant to be checked in write_all_files. This could cause extra files
to be written unexpectedly.
2013-10-01 10:37:06 -05:00
Blake Watters
367b275b3e Fix incorrect handling of nested paths when generating string files 2013-10-01 11:05:29 -04:00
Sebastian Celis
bb6f2b656f Merge remote-tracking branch 'GateGuru/bugfix/do-not-strip-positionals' 2013-10-01 09:06:56 -05:00
Blake Watters
fdbff215cd Drop code that strips positionals from iOS strings 2013-09-27 17:50:49 -04:00
Blake Watters
fbdb9b1fe7 Add encoding comment to ensure file is parsed as utf-8 2013-09-27 17:34:27 -04:00
Sebastian Celis
50e5d23f0a When writing a set of files, only write to valid directories.
This fixes issue #40
2013-09-16 08:11:57 -05:00
Joseph Earl
bbc8e42602 Modified gettext formatter to print out sections as .po comments 2013-07-03 15:42:07 +01:00
Kevin Everets
e13c2c2c7d Fix parsing of .po files for multiline msgstr
It's valid for a msgstr to be broken over multiple lines, all of which
are enclosed with ".  To handle this, no longer iterate over the lines within
an item but rather apply the matching to the entire item.
2013-06-16 21:45:32 -05:00
Sebastian Celis
63fd78f0bc Write all languages to the twine strings file.
We used to only write translations to the strings file that did not
match the developer language. It was done this way to try and reduce
space in the strings file and to get en-UK to pick up en changes.

This turned out to be the wrong decision. It's better to explicitly
ensure that all strings are translated in all languages, and to not
automatically pick up en string changes in other languages.

This fixes issue #29.
2013-06-16 21:40:13 -05:00
Sebastian Celis
ca1422eda0 Update verstion to 0.4.0. 2013-05-17 08:03:17 -05:00
Kevin Everets
a84a84d8c5 Fix regex for reading gettext to be more lenient and remove extra logging
We don't distinguish between the types of comments and should allow space between
the field type and the value.

Also, the extra logging was accidentally left in and should be removed
2013-03-21 16:40:18 -05:00
Kevin Everets
d1dc043b3f Fix bug in generation of .po comments
It was written ".#" but should have been "#." for extracted comments
2013-03-21 16:40:13 -05:00
Sebastian Celis
8e453c1995 Fix possible crash when consuming Android string files.
Twine would crash if --tags were supplied on the command line. This
parameter is undocumented for consume-string-file. It shouldn't do
anything (at least not yet).

Fixes #23
2013-02-07 16:21:48 -06:00
Mohammad Hejazi
f191da57db Added flash formatter for 'resources.properties' file
Conflicts:
	lib/twine/formatters.rb
2013-01-27 15:00:35 -06:00
Kevin Everets
41234c9f95 Add escaping of strings that start with "@ " for android 2013-01-17 11:45:57 -05:00
Kevin Everets
bd0953dce4 Update documentation to reflect addition of gettext formatted files 2013-01-15 14:58:02 -05:00
Kevin Everets
5c63f8d1c1 Add Gettext formatter to read and write to .po files
This uses the same style as android2po where msgctxt is used as the
key, msgid is the original string in the default language, and msgstr
is the translated version in the destination language.
2013-01-15 14:21:08 -05:00
Sebastian Celis
b6a8d0b345 Fix case of the line requiring the CGI module.
This fixes issue #19
2012-11-27 09:02:15 -06:00
Sebastian Celis
12f6ec02bc Add an option for overriding the default file name. 2012-11-08 09:37:55 -06:00
Sebastian Celis
7f34f8e6ad Update version to 0.3.2. 2012-09-13 10:28:29 -05:00
Sebastian Celis
34cc06f5f5 Fix issue where section names are parsed as string comments. 2012-09-13 10:15:40 -05:00
Sebastian Celis
addbc79191 Properly escape and unescape HTML entities. 2012-09-13 10:08:54 -05:00
Sebastian Celis
7cc1b7b646 Update version to 0.3.1. 2012-07-18 09:30:06 -05:00
Sebastian Celis
4958a0bff0 Do not strip whitespace from sections and string keys.
Fixes Issue #14
2012-07-18 09:28:01 -05:00
Sebastian Celis
c0b49745fe Fix comment parsing in Android XML files.
Ensure only comments within the resources block are parsed.
2012-07-17 10:01:53 -05:00
Sebastian Celis
1190b65695 Default to saving strings in the iOS format. 2012-07-17 09:56:01 -05:00
Robert Guo
9642e69389 make Android formatter use Regex instead of REXML, add comments support for Android, modify test files to support comments 2012-07-05 08:31:41 -05:00
Robert Guo
afee09b707 make iOS formatter compatible with twine string files that may have Android substitution formats 2012-07-05 08:30:16 -05:00
Sebastian Celis
a32e291668 Update version to 0.3.0. 2012-07-02 06:34:14 -05:00
Sebastian Celis
144e693aa7 Fix crash when default language is missing for a string.
Fixes issue #13
2012-07-02 06:04:01 -05:00
Sebastian Celis
cafdfb6dde Improve rubyzip error messages. 2012-05-10 14:45:05 -05:00
Sebastian Celis
dd5d853ce5 Exit nicely if requiring json fails. 2012-05-10 14:43:29 -05:00
Sebastian Celis
345ce6d109 Fixup help text to mention all supported string file formats. 2012-05-10 14:25:41 -05:00
Sebastian Celis
af4f5654a7 Cleanup. 2012-05-10 12:33:09 -05:00
ISHITOYA Kentaro
213c9bdd00 Added formatter for jquery-localize https://github.com/coderifous/jquery-localize. 2012-05-10 12:16:45 -05:00
Sebastian Celis
c9fe34eed4 Update version to 0.2.2. 2012-04-16 13:29:58 -05:00
Sebastian Celis
369e64d65f Add the ability to consume comments in a strings file. 2012-04-16 13:25:43 -05:00
Sebastian Celis
68b5469e46 Add consume-all-string-files command. 2012-04-16 13:16:31 -05:00
Sebastian Celis
ceeb0a2f01 Ignore dotfiles when consuming localization drops. 2012-04-16 07:28:38 -05:00
Sebastian Celis
b886d78198 Update test cases to work with recent formatter changes. 2012-03-21 11:27:14 -05:00
Sebastian Celis
7014d193b4 Add Twine version number to generated files. 2012-03-21 11:13:55 -05:00
Sebastian Celis
a3e4e42b15 Cleanup format of generated Apple strings file.
* Remove unnecessary linebreaks.
* Make section headers stand out.
2012-03-21 11:12:24 -05:00
Kevin Wood
9277e070fe Edited Apple formatter to more closely match the Apple-generated syntax 2012-03-21 11:05:52 -05:00
Sebastian Celis
3789cfbabe Merge pull request #5 from kwood/master
Help text fix
2012-03-20 17:09:54 -07:00
Kevin Wood
c8f8a2efbd Fixes incorrect spelling of generate-string-file in help text 2012-03-20 16:07:05 -07:00