Browse files

Merge tapestry support into tools branch.

Conflicts:
	tasks/extract.js
  • Loading branch information...
2 parents a1944be + e351ba2 commit 8160f7d62f56192461fd8fdd5c0166ab1f71a6eb @rubenv committed Feb 27, 2014
Showing with 18 additions and 2 deletions.
  1. +1 −0 Gruntfile.coffee
  2. +2 −2 package.json
  3. +12 −0 test/extract.coffee
  4. +3 −0 test/fixtures/tapestry.tml
View
1 Gruntfile.coffee
@@ -46,6 +46,7 @@ module.exports = (grunt) ->
'tmp/test14.pot': 'test/fixtures/concat.js'
'tmp/test15.pot': 'test/fixtures/data.html'
'tmp/test19.pot': 'test/fixtures/no_delimiter.html'
+ 'tmp/test21.pot': 'test/fixtures/tapestry.tml'
manual:
files:
'tmp/test5.pot': 'test/fixtures/corrupt.html'
View
4 package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-angular-gettext",
"description": "Tasks for extracting/compiling angular-gettext strings.",
- "version": "0.2.8",
+ "version": "0.2.9",
"homepage": "http://angular-gettext.rocketeer.be/",
"author": {
"name": "Ruben Vermeersch",
@@ -47,6 +47,6 @@
"gettext"
],
"dependencies": {
- "angular-gettext-tools": "~0.0.4"
+ "angular-gettext-tools": "~0.0.6"
}
}
View
12 test/extract.coffee
@@ -267,3 +267,15 @@ describe 'Extract', ->
assert.equal(catalog.items[0].references.length, 1)
assert.equal(catalog.items[0].references[0], 'test/fixtures/custom_marker_name.js')
done()
+
+ it 'Can extract tapestry files', (done) ->
+ assert(fs.existsSync('tmp/test21.pot'))
+
+ po.load 'tmp/test21.pot', (err, catalog) ->
+ assert.equal(err, null)
+ assert.equal(catalog.items.length, 1)
+ assert.equal(catalog.items[0].msgid, 'Bonjour from HelloWorld component.')
+ assert.equal(catalog.items[0].msgstr, '')
+ assert.equal(catalog.items[0].references.length, 1)
+ assert.equal(catalog.items[0].references[0], 'test/fixtures/tapestry.tml')
+ done()
View
3 test/fixtures/tapestry.tml
@@ -0,0 +1,3 @@
+<html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
+ <h1 translate>Bonjour from HelloWorld component.</h1>
+</html>

0 comments on commit 8160f7d

Please sign in to comment.