Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to parse Mojolicious syntax for TT messages #4

Merged
merged 3 commits into from
Aug 19, 2011

Conversation

cosimo
Copy link

@cosimo cosimo commented Aug 18, 2011

Hi Clinton,

Thanks for maintaining this distribution. It's been a blessing for our i18n work.

I have added the ability to parse Mojolicious syntax for i18n strings in the TT2 plugin,
so now the plugin detects also strings like [% c.l('...') %].

I have added a test case to t/5-extract.t and verified that all the existing tests are also passing.
Would be cool to have it out on CPAN :)

Cosimo

When using TT with Mojolicious, you need to prepend a "c." to all TT methods.

This patch allows the TT2 plugin to detect and correctly report localized
strings in your TT templates when they are written like:

   [% c.l('Hello, world!') %]

which is the default Mojolicious syntax.
Now you can also use the filter syntax, as in:

   [% 'Some string' | c.l %]
clintongormley added a commit that referenced this pull request Aug 19, 2011
Add ability to parse Mojolicious syntax for TT messages
@clintongormley clintongormley merged commit 5b07a0e into clintongormley:master Aug 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants