diff --git a/README.md b/README.md index d7d7acc..2153949 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ __Features__ * Easy to use and maintain * Encourages reuse in templates by allowing template inclusion and inheritance. * Highly extensible through filters, tags, and template extensions. - * Includes a rich set of filters and tags for string formatting, HTML helpers and - internationalization support. + * Includes a rich set of filters and tags for string formatting, HTML helpers and + internationalization support. Requirement @@ -27,15 +27,15 @@ Requirement News ------------------------ - - version 0.4 - 1. **Breaking changes** autoescape is now turned on by default - 2. Improved searchpath and file loading handling - 3. Improved handling on PHP overloaded objects - 4. Plenty of bug fixes + - version 0.4 + 1. **Breaking changes** autoescape is now turned on by default + 2. Improved searchpath and file loading handling + 3. Improved handling on PHP overloaded objects + 4. Plenty of bug fixes - version 0.3 - 1. Support internationalized templates and translation parsing toolkit - 2. Performance optimization on context lookup - 3. Fixed operator parsing + 1. Support internationalized templates and translation parsing toolkit + 2. Performance optimization on context lookup + 3. Fixed operator parsing Getting started ------------------------ @@ -45,47 +45,47 @@ Getting started Download [](http://code.google.com/p/h2o-template/downloads) - + With Git `git clone http://github.com/speedmax/h2o-php.git` -With SVN +With SVN `svn checkout http://h2o-template.googlecode.com/svn/trunk/ h2o` ### Installation 1. Download and extract h2o into your project path or your php include path - Sample file structure setup - - myawesome_app/ - index.php - templates/ - index.html - h2o/ + Sample file structure setup + + myawesome_app/ + index.php + templates/ + index.html + h2o/ 2. Use `require 'h2o/h2o.php'` in your php files to include the h2o library. - 3. Below is a basic code sample to get your project going. - 3. Check out the *\example* and *\specs* dirs to see some of h2o's more interesting features in action. - + 3. Below is a basic code sample to get your project going. + 3. Check out the *\example* and *\specs* dirs to see some of h2o's more interesting features in action. + *templates/index.html* - - Hello world - - Greetings {{ name }} - - + + Hello world + + Greetings {{ name }} + + *index.php* - render(array('name'=>'Peter Jackson')); - ?> + render(array('name'=>'Peter Jackson')); + ?> Useful links @@ -108,7 +108,7 @@ Use dot (.) to access attributes of a variable #### variable lookup order 1. key of an associative array -2. array-index +2. array-index 3. object attribute 4. object method call @@ -116,97 +116,97 @@ Use dot (.) to access attributes of a variable *in your template* - {{ person.name }} + {{ person.name }} *in php* - 'Peter Jackson', 'age' => 25 - ); - $h2o->render(compact('person')); - ?> - -Let's say that you have assigned the value `Peter Jackson` to a 'person' variable in your php script. The following + 'Peter Jackson', 'age' => 25 + ); + $h2o->render(compact('person')); + ?> + +Let's say that you have assigned the value `Peter Jackson` to a 'person' variable in your php script. The following variable tag will print out `Peter Jackson`. ## Filters -Filters are variable modifiers that manipulate or format the value of a variable. -A filter usually looks like this `{{ person.name|capitalize }}`, a pipe ( | ) +Filters are variable modifiers that manipulate or format the value of a variable. +A filter usually looks like this `{{ person.name|capitalize }}`, a pipe ( | ) character after a variable, plus a filter name, will cause H2O to apply the filter. __Filter chaining__ -![filter chaining](http://wiki.shopify.com/upload/8/8c/Filterchain.jpg) +![filter chaining](http://wiki.shopify.com/upload/8/8c/Filterchain.jpg) Let me borrow the image from liquid template -You can chain multiple filters together and use a pipe ( | ) character to separate +You can chain multiple filters together and use a pipe ( | ) character to separate them. `{{ document.body|escape|nl2br }}` -__Filter arguments__ +__Filter arguments__ Filters can accept arguments. For example: -`{{ document.description|truncate 20 }}` +`{{ document.description|truncate 20 }}` will display the first 20 characters of the document's description. -Moreover, there are cases where you might want to pass in multiple arguments. +Moreover, there are cases where you might want to pass in multiple arguments. Use commas ( , ) to separate them: `{{ person.bio|truncate 20, "..." }}` -__Filter named arguments__ -h2o uses colons ( : ) for named arguments. These allow you to build 'optional argument' arrays. +__Filter named arguments__ +h2o uses colons ( : ) for named arguments. These allow you to build 'optional argument' arrays. `{{ '/images/logo.png' | image_tag width:450, height:250, alt:"company logo" }}` The above code translated to php will be like the below snippet, which resembles what happens internally: - - 450, - 'height' => 250, - 'alt'=>'company logo' - )); - ?> - -Note: Difference with Django, Smarty -H2o does not use the colon ( : ) character to separate arguments for readability reasons, + + 450, + 'height' => 250, + 'alt'=>'company logo' + )); + ?> + +Note: Difference with Django, Smarty +H2o does not use the colon ( : ) character to separate arguments for readability reasons, H2o uses the comma ( , ) which is more logical. - -## Tag + +## Tag `{% tag %}` -Tags are very powerful, as they control the logical flow and structure of a template, -There are inline tags `{% inline_tag %}` or tags that requires a -close tag. For example: `{% if condition %} ... {% endif %}` +Tags are very powerful, as they control the logical flow and structure of a template, +There are inline tags `{% inline_tag %}` or tags that requires a +close tag. For example: `{% if condition %} ... {% endif %}` ### The "if" tag -`if` tags evaluate either a variable or a simple expression. If the result of the `if` +`if` tags evaluate either a variable or a simple expression. If the result of the `if` expression is *true*, then the contents of the `if` block will be allowed to render. - - {% if person.is_adult %} - You are old enough. - {% else %} - sorry, you are too young for that. - {% endif %} + + {% if person.is_adult %} + You are old enough. + {% else %} + sorry, you are too young for that. + {% endif %} ### The "for" tag -`for` tags allow iteratation over an array of items. - - {% for task in tasks %} - {{ task }} - {% endfor %} +`for` tags allow iteratation over an array of items. + + {% for task in tasks %} + {{ task }} + {% endfor %} The above snippet will print out each "task" in the "tasks" array. Template inheritance ------------------------ -H2o supports template inheritance. Inheritance allows you to factor out a lot +H2o supports template inheritance. Inheritance allows you to factor out a lot of common code that would otherwise be duplicated across most of your templates. Template inheritance is implemented using the `block` and `extends` tags, with child templates @@ -216,7 +216,7 @@ Template inheritance is implemented using the `block` and `extends` tags, with c Quote from the Django docs: -> ... a base skeleton template that contains all the common elements of your +> ... a base skeleton template that contains all the common elements of your > site and defines blocks that child templates can override. @@ -224,55 +224,55 @@ Quote from the Django docs: _base.html_ - defines the base structure of our pages. - - {%block title %}This is a page title {% endblock %} - -
- {% block content%} -

Page title

-

H2O template inheritance is a powerful tool

- {% endblock %} -
- - - - - -As you can see, the base template is a typical web page using a two column layout. + + {%block title %}This is a page title {% endblock %} + +
+ {% block content%} +

Page title

+

H2O template inheritance is a powerful tool

+ {% endblock %} +
+ + + + + +As you can see, the base template is a typical web page using a two column layout. We defined two blocks (`content` and `sidebar`) and HTML code common across all of our pages. _page.html_ - defines a page-specific template. - {% extends 'base.html' %} - - {% block content %} -

extended page

-

Body of extended page

- {% endblock %} - - {% block sidebar %} - Sidebar contains use links. - {% endblock %} + {% extends 'base.html' %} + + {% block content %} +

extended page

+

Body of extended page

+ {% endblock %} + {% block sidebar %} + Sidebar contains use links. + {% endblock %} -The `page.html` extends `base.html`, allowing us to override any block -previously defined in `base.html`. + +The `page.html` extends `base.html`, allowing us to override any block +previously defined in `base.html`. Below is an excellent article about template inheritance in Django. If you wish to understand H2o's -template-inheritance system, this would be a great spot to start, since H2o's template-inheritance system +template-inheritance system, this would be a great spot to start, since H2o's template-inheritance system is strongly influenced by Django's. -[Power of inheritance][3] is a very good blog post explaining inheritance +[Power of inheritance][3] is a very good blog post explaining inheritance [3]:http://www2.jeffcroft.com/blog/2006/feb/25/django-templates-the-power-of-inheritance/ *Tips* -* If you have found that you have several common elements inside the same template, it may be a - good idea to put that portion of the template inside a `block` in a base template. +* If you have found that you have several common elements inside the same template, it may be a + good idea to put that portion of the template inside a `block` in a base template. * `block` give you a hook, which is useful, since these can help with javascript and css too. * When defining a block use a short and distinctive name @@ -281,11 +281,11 @@ is strongly influenced by Django's. ### Configuration There are a range of options for configuring the template engine. - [option_value] - )); - ?> + [option_value] + )); + ?> #### Loader The name of the loader or an instance of H2o_Loader @@ -296,28 +296,28 @@ __Use file loader [default]__ __Advanced setup__ - $loader ); - ?> - + $loader ); + ?> + __Use dictionary loader__ If you want to load templates from resources other than files, then this will be your friend. H2o uses `dict_loader()` for testing. - 'Hello {{ person }}' - )); - $template = new H2o('index.html', array('loader' => $loader')); - ?> + 'Hello {{ person }}' + )); + $template = new H2o('index.html', array('loader' => $loader')); + ?> #### Searchpath default: this will be the base path of your template -H2o use this path to load additional templates and extensions. +H2o use this path to load additional templates and extensions. You can either explicity set the search path, @@ -328,7 +328,7 @@ or h2o will try to find the searchpath for you. `$template = new H2o('/sites/common_templates/index.html');` #### Cache -You can define the type of caching engine h2o should use, if any. +You can define the type of caching engine h2o should use, if any. Set 'cache' to false to disable caching. You can read more about performance and caching in following sections @@ -349,7 +349,7 @@ Disable caching `$template = new H2o('index.html', array('cache'=>false));` #### Cache_dir -When the file cache is used, you can define where you want templates to be cached. +When the file cache is used, you can define where you want templates to be cached. It will put a cached template in same location as the normal template @@ -365,28 +365,28 @@ that is bundled in the cache extension will use this as default ttl value. Performance and Caching ------------------------ -Caching can increase performance since it skips step of inefficient template parsing. +Caching can increase performance since it skips step of inefficient template parsing. H2o caches the template objects (the internal data structure of a template) and the bundled caching backends include File, APC, and Memcache. ### File cache -By default h2o uses the file cache to store template objects. Change h2o option `cache_dir` to where you +By default h2o uses the file cache to store template objects. Change h2o option `cache_dir` to where you want to store template cache (ie: /tmp). - - 'file', - 'cache_dir' => '/tmp' - )); - ?> + + 'file', + 'cache_dir' => '/tmp' + )); + ?> ### APC cache -APC is an op-code and object cache extension for php whose performance is -generally 10-30% better than just plain file caching. +APC is an op-code and object cache extension for php whose performance is +generally 10-30% better than just plain file caching. - 'apc')); - ?> + 'apc')); + ?> ### Memcache Currently not implemented @@ -399,25 +399,25 @@ Extending H2o Known issues ------------------------ Yes, h2o has them. However, if you are careful, these shouldn't hinder your template development. -The deep inheritance issue is a bit problematic for some template architectures, but again, if you +The deep inheritance issue is a bit problematic for some template architectures, but again, if you are careful, and perhaps a bit inventive, it won't hinder you terribly much. * `{{ block.super }}` doesn't work with more than 1 level of inheritance yet, so if `{{ block.super }}` - invokes another `{{ block.super }}` it won't work just yet. - * 'if' conditions don't support multiple expressions or mathematical expressions yet, like: - `{% if something > 3 or something < 2 %}` or `{% if something + else > 12 %}` - These likely will not be implemented in the future unless some daring soul implements them and - contributes the code back to the h2o-php project. - + invokes another `{{ block.super }}` it won't work just yet. + * 'if' conditions don't support multiple expressions or mathematical expressions yet, like: + `{% if something > 3 or something < 2 %}` or `{% if something + else > 12 %}` + These likely will not be implemented in the future unless some daring soul implements them and + contributes the code back to the h2o-php project. + Contributors --- - - - jlogsdon - Major refactoring (wip) and bug fixes - - cyberklin - Added filter support for any context resolve - - idlesign - Added if_changed tag support - - metropolis - Improved our test coverage - - plus many others + + - jlogsdon - Major refactoring (wip) and bug fixes + - cyberklin - Added filter support for any context resolve + - idlesign - Added if_changed tag support + - metropolis - Improved our test coverage + - plus many others Credit @@ -432,7 +432,7 @@ Special Thanks: Armin Ronacher, since early versions of h2o were based off of hi The MIT License ------------------------ -Copyright (c) 2008 Taylor Luk +Copyright (c) 2008 Taylor Luk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/example/README.md b/example/README.md index 54b4b31..021a4a6 100644 --- a/example/README.md +++ b/example/README.md @@ -4,7 +4,7 @@ This directory contains example code covering various aspect of h2o template. Simple ===================== -A simple template displaying a list of users, it demonstrate +A simple template displaying a list of users, it demonstrate - how to setup h2o template and pass view variables to template - display variables and using build-in tags and filters @@ -33,11 +33,11 @@ Demonstrates - how to use different cache driver - bundled cache extension to provide fragment cache to speed up resource intensive operations - such as loading complex logic from database + such as loading complex logic from database I18n ===================== -Demo to show how to build a internationalized template with h2o by displaying a template +Demo to show how to build a internationalized template with h2o by displaying a template supporting three languages. I18n extension also bundled message extraction class to extract translatable strings into diff --git a/example/caching/index.php b/example/caching/index.php index 21dc8fd..5d44cd4 100644 --- a/example/caching/index.php +++ b/example/caching/index.php @@ -5,7 +5,7 @@ //// Set language to German //$i18n = new H2o_I18n(dirname(__FILE__).DS, array( -// 'gettext_path' => dirname(__FILE__).DS.'bin/gettext/bin/' +// 'gettext_path' => dirname(__FILE__).DS.'bin/gettext/bin/' //)); //$i18n->setLocale('fr'); // @@ -14,40 +14,40 @@ //// // Choose domain //extract_translations( -// realpath('trans.tpl'), array('tpl', 'html'), dirname(__FILE__).DS.'bin/gettext/bin/' +// realpath('trans.tpl'), array('tpl', 'html'), dirname(__FILE__).DS.'bin/gettext/bin/' //); // //compile_translations( -// realpath('trans.tpl'), null, dirname(__FILE__).DS.'bin/gettext/bin/' +// realpath('trans.tpl'), null, dirname(__FILE__).DS.'bin/gettext/bin/' //); - + $template = new H2o('trans.tpl', array('cache'=> false, 'cache_dir' => dirname(__FILE__))); $time_start = microtime(true); for($i=0; $i<10; $i++) $r = $template->render(array( - 'users' => array( - array( - 'username' => 'peter', - 'tasks' => array('school', 'writing'), - 'user_id' => 1, - ), - array( - 'username' => 'anton', - 'tasks' => array('go shopping'), - 'user_id' => 2, - ), - array( - 'username' => 'john doe', - 'tasks' => array('write report', 'call tony', 'meeting with arron'), - 'user_id' => 3 - ), - array( - 'username' => 'foobar', - 'tasks' => array(), - 'user_id' => 4 - ) - ) + 'users' => array( + array( + 'username' => 'peter', + 'tasks' => array('school', 'writing'), + 'user_id' => 1, + ), + array( + 'username' => 'anton', + 'tasks' => array('go shopping'), + 'user_id' => 2, + ), + array( + 'username' => 'john doe', + 'tasks' => array('write report', 'call tony', 'meeting with arron'), + 'user_id' => 3 + ), + array( + 'username' => 'foobar', + 'tasks' => array(), + 'user_id' => 4 + ) + ) )); echo $r; diff --git a/example/extensions/ext/site_tags.php b/example/extensions/ext/site_tags.php index eedba6a..9f92760 100644 --- a/example/extensions/ext/site_tags.php +++ b/example/extensions/ext/site_tags.php @@ -1,9 +1,9 @@ write('This is my site'); - } + function render($context, $stream) { + $stream->write('This is my site'); + } } diff --git a/example/i18n/index.php b/example/i18n/index.php index d56987e..eae1537 100644 --- a/example/i18n/index.php +++ b/example/i18n/index.php @@ -2,14 +2,14 @@ require '../../h2o.php'; $template = new H2o('trans.html', array( - 'cache'=> false, - 'i18n' => array( - 'locale' => isset($_GET['lang']) ? $_GET['lang'] : false, - 'charset' => 'UTF-8', - 'gettext_path' => '../bin/gettext/bin/', - 'extract_message' => true, - 'compile_message' => true, - ) + 'cache'=> false, + 'i18n' => array( + 'locale' => isset($_GET['lang']) ? $_GET['lang'] : false, + 'charset' => 'UTF-8', + 'gettext_path' => '../bin/gettext/bin/', + 'extract_message' => true, + 'compile_message' => true, + ) )); # Setup custom gettext resolver @@ -18,28 +18,28 @@ $time_start = microtime(true); echo $template->render(array( - 'users' => array( - array( - 'username' => 'peter', - 'tasks' => array('school', 'writing'), - 'user_id' => 1, - ), - array( - 'username' => 'anton', - 'tasks' => array('go shopping'), - 'user_id' => 2, - ), - array( - 'username' => 'john doe', - 'tasks' => array('write report', 'call tony', 'meeting with arron'), - 'user_id' => 3 - ), - array( - 'username' => 'foobar', - 'tasks' => array(), - 'user_id' => 4 - ) - ) + 'users' => array( + array( + 'username' => 'peter', + 'tasks' => array('school', 'writing'), + 'user_id' => 1, + ), + array( + 'username' => 'anton', + 'tasks' => array('go shopping'), + 'user_id' => 2, + ), + array( + 'username' => 'john doe', + 'tasks' => array('write report', 'call tony', 'meeting with arron'), + 'user_id' => 3 + ), + array( + 'username' => 'foobar', + 'tasks' => array(), + 'user_id' => 4 + ) + ) )); echo "in ".(microtime(true) - $time_start)." seconds\n
"; diff --git a/example/i18n/locale/de/LC_MESSAGES/messages.po b/example/i18n/locale/de/LC_MESSAGES/messages.po index eff287a..2f0f1df 100644 --- a/example/i18n/locale/de/LC_MESSAGES/messages.po +++ b/example/i18n/locale/de/LC_MESSAGES/messages.po @@ -29,44 +29,44 @@ msgid "Finish" msgstr "Fertig stellen" msgid "" -" (software engineering) The act or process of making a product suitable " +" (software engineering) The act or process of making a product suitable " "for \n" -" international markets, typically by making text messages easily " +" international markets, typically by making text messages easily " "translatable \n" -" and ensuring support of non-Latin character sets.\n" +" and ensuring support of non-Latin character sets.\n" msgstr "" -" (Software Engineering) Die Handlung oder Verfahren zur Herstellung " +" (Software Engineering) Die Handlung oder Verfahren zur Herstellung " "eines Produktes geeignet für \n" -" internationalen Märkten, die in der Regel durch das Erstellen von Text-" +" internationalen Märkten, die in der Regel durch das Erstellen von Text-" "Nachrichten leicht zu vermitteln \n" -" und die Gewährleistung von Unterstützung von nicht-lateinischen " +" und die Gewährleistung von Unterstützung von nicht-lateinischen " "Zeichensätzen. \n" msgid "Pluralization support" msgstr "Pluralisierung Unterstützung" msgid "" -"\t there is one %(count) item.\n" +"\t there is one %(count) item.\n" "\t" msgid_plural "" -"\t there are number of %(count) items.\n" +"\t there are number of %(count) items.\n" "\t" msgstr[0] "" -"\t gibt es ein %(count) Posten.\n" +"\t gibt es ein %(count) Posten.\n" "\t" msgstr[1] "" -"\t Es gibt einige %(count) Elemente.\n" +"\t Es gibt einige %(count) Elemente.\n" "\t" msgid "" -"\t\t %(name) has %(count) task\n" +"\t\t %(name) has %(count) task\n" "\t\t" msgid_plural "" -"\t\t %(name) has %(count) tasks\n" +"\t\t %(name) has %(count) tasks\n" "\t\t" msgstr[0] "" -"\t\t %(name) hat %(count) Aufgabe\n" +"\t\t %(name) hat %(count) Aufgabe\n" "\t\t" msgstr[1] "" -"\t\t %(name) hat %(count) Aufgaben \n" +"\t\t %(name) hat %(count) Aufgaben \n" "\t\t" \ No newline at end of file diff --git a/example/i18n/locale/fi/LC_MESSAGES/messages.po b/example/i18n/locale/fi/LC_MESSAGES/messages.po index 362aeb9..c73ea4e 100644 --- a/example/i18n/locale/fi/LC_MESSAGES/messages.po +++ b/example/i18n/locale/fi/LC_MESSAGES/messages.po @@ -29,42 +29,42 @@ msgid "Finish" msgstr "Maali" msgid "" -" (software engineering) The act or process of making a product suitable " +" (software engineering) The act or process of making a product suitable " "for \n" -" international markets, typically by making text messages easily " +" international markets, typically by making text messages easily " "translatable \n" -" and ensuring support of non-Latin character sets.\n" +" and ensuring support of non-Latin character sets.\n" msgstr "" "(Software Engineering) Lakia tai prosessin tehdä tuote soveltuu \n" -" kansainvälisillä markkinoilla, tyypillisesti tekemällä tekstiviestejä " +" kansainvälisillä markkinoilla, tyypillisesti tekemällä tekstiviestejä " "helposti käännettävissä \n" -" ja varmistamaan tuki ei-latinalaisia merkistöjä. \n" +" ja varmistamaan tuki ei-latinalaisia merkistöjä. \n" msgid "Pluralization support" msgstr "Pluralization tukea" msgid "" -"\t there is one %(count) item.\n" +"\t there is one %(count) item.\n" "\t" msgid_plural "" -"\t there are number of %(count) items.\n" +"\t there are number of %(count) items.\n" "\t" msgstr[0] "" -"\t on yksi %(count) erä.\n" +"\t on yksi %(count) erä.\n" "\t" msgstr[1] "" -"\t on olemassa joukko %(count) kohteita.\n" +"\t on olemassa joukko %(count) kohteita.\n" "\t" msgid "" -"\t\t %(name) has %(count) task\n" +"\t\t %(name) has %(count) task\n" "\t\t" msgid_plural "" -"\t\t %(name) has %(count) tasks\n" +"\t\t %(name) has %(count) tasks\n" "\t\t" msgstr[0] "" -"\t\t %(name) on %(count) tehtävä \n" +"\t\t %(name) on %(count) tehtävä \n" "\t\t" msgstr[1] "" -"\t\t %(name) on %(count) tehtävät\n" +"\t\t %(name) on %(count) tehtävät\n" "\t\t" \ No newline at end of file diff --git a/example/i18n/locale/fr/LC_MESSAGES/messages.po b/example/i18n/locale/fr/LC_MESSAGES/messages.po index e927082..8746fe1 100644 --- a/example/i18n/locale/fr/LC_MESSAGES/messages.po +++ b/example/i18n/locale/fr/LC_MESSAGES/messages.po @@ -29,51 +29,51 @@ msgid "Finish" msgstr "Terminer" msgid "" -" (software engineering) The act or process of making a product suitable " +" (software engineering) The act or process of making a product suitable " "for \n" -" international markets, typically by making text messages easily " +" international markets, typically by making text messages easily " "translatable \n" -" and ensuring support of non-Latin character sets.\n" +" and ensuring support of non-Latin character sets.\n" msgstr "" -" (génie logiciel) L'acte ou processus de fabrication d'un produit adapté " +" (génie logiciel) L'acte ou processus de fabrication d'un produit adapté " "à \n" -" les marchés internationaux, généralement en faisant des messages texte " +" les marchés internationaux, généralement en faisant des messages texte " "facilement traduisible \n" -" et d'assurer le soutien de la non-latino-jeux de caractères. \n" -" \n" +" et d'assurer le soutien de la non-latino-jeux de caractères. \n" +" \n" msgid "Pluralization support" msgstr "Pluralisation de soutien" msgid "" -"\t there is one %(count) item.\n" +"\t there is one %(count) item.\n" "\t" msgid_plural "" -"\t there are number of %(count) items.\n" +"\t there are number of %(count) items.\n" "\t" msgstr[0] "" -"\t il ya un %(count) point.\n" +"\t il ya un %(count) point.\n" "\t" msgstr[1] "" -"\t Il existe un certain nombre de %(count) points. \n" +"\t Il existe un certain nombre de %(count) points. \n" "\t" msgid "" -"\t\t %(name) has %(count) task\n" +"\t\t %(name) has %(count) task\n" "\t\t" msgid_plural "" -"\t\t %(name) has %(count) tasks\n" +"\t\t %(name) has %(count) tasks\n" "\t\t" msgstr[0] "" -"\t\t %(name) a %(count) tâche \n" +"\t\t %(name) a %(count) tâche \n" "\t\t" msgstr[1] "" -"\t\t %(name) a %(count) tâches \n" +"\t\t %(name) a %(count) tâches \n" "\t\t" # C:\workspace\h2o\example\i18n\trans.html:7 -#~ msgid " (software engineering)\n" -#~ msgstr " (software engineering fr)\n" +#~ msgid " (software engineering)\n" +#~ msgstr " (software engineering fr)\n" #~ msgid "Insert title here" #~ msgstr "Insérer le titre ici" diff --git a/example/i18n/trans.html b/example/i18n/trans.html index 115160c..9e72b14 100644 --- a/example/i18n/trans.html +++ b/example/i18n/trans.html @@ -7,7 +7,7 @@