{ "info": { "author": "Anton Bykov aka Tigra San", "author_email": "tigrawap@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "PyBabel-HBS\n===============\n\nRelease notes\n--------------\n- 0.2.2 -\n - Fixed bug with \\n_ extraction\n - Fixed bug when _ and \\n_ variable translations being inserted into .po file\n- 0.2.1 - Great speed improvement (x4) by moving file reading to nodejs.\n- 0.2.0 - Now only one nodejs process spawned for single babel run, so in total for big amount of files will work much faster.\n- 0.1.4 - minor bugfixes\n- 0.1.3 - Initial release\n\nInstallation\n--------------\npip install pybabel-hbs\n\nUsage\n-------\nAdd `[hbs: path/\\*\\*.hbs]` to babel.cfg\n\nExpected workflow\n------------------\n\n1. Use helpers inside handlebar (gettext/ngettext as both regular and block heleprs supported)\n#. JS side should pass data to Jed wrapper (see client_side_usage)\n#. Jed wrapper passes the strings and parameters to Jed\n#. Jed instance translates string to language it was initiated with\n#. Jed uses po2json output (use po2json on generated .po files and then pass output to Jed)\n#. As for generating .po files just add `[hbs: \\*\\*.hbs]` to babel config (babel.cfg), (considering extension installed via pip or via setup.py install)\n\n- Extension for babel to support handlebars.\n- Uses native Handlebars.js parsing with small hack for passing line numbers.\n- **Since Handlebars.js is JS this babel extension requires node.js**\n\nSupported handlebars helpers:\n--------------------------------\n\n - _ (Undercore) helper ::\n\n {{_ \"Some text to be translated %(param)s\" param=\"some param\"}}\n\n - \\n_ helper ::\n\n {{\\n_ num_to_check_against \"Some text to be translated with %(num)s\" \"Some plural text to be translated with %(num)s\" num=num_to_check_against}}\n\n - trans block helper::\n\n {{#trans params_1=\"something\"}}\n Some text to be translated with %(param_1)s\n {{/trans}}\n\n - ntrans block helper::\n\n {{#ntrans num_to_check_aganst param_1=\"something\" num=num_to_check_against}}\n Some text to be translated with %(param_1)s and %(num)s\n {{else}}\n Some plural text to be translated with %(param_1)s and %(num)s\n {{/ntrans}}\n\n\n*Summarizing*\n---------------\n - Every helper can have params, they will be passed to sprintf (built-in into Jed)\n - *n_* and *ntrans* helpers MUST have some integer as first parameter, it will determine if plural or singular form should be used", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tigrawap/pybabel-hbs", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "PyBabel-hbs", "package_url": "https://pypi.org/project/PyBabel-hbs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyBabel-hbs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tigrawap/pybabel-hbs" }, "release_url": "https://pypi.org/project/PyBabel-hbs/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "PyBabel handlebars gettext strings extractor", "version": "0.2.2" }, "last_serial": 913667, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "aa4d26fea3ef5cb69811632e697ba68a", "sha256": "623032e39eb5729ef103b1d1b851670c18a31feddd56315179918de6572bbf04" }, "downloads": -1, "filename": "PyBabel-hbs-0.1.3.tar.gz", "has_sig": false, "md5_digest": "aa4d26fea3ef5cb69811632e697ba68a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23235, "upload_time": "2013-10-18T22:49:21", "url": "https://files.pythonhosted.org/packages/b5/93/574c6316ff51a9cf109021f9fe0eb8a4a615be4b8ac89f1b24d85908a216/PyBabel-hbs-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "bb35efa9bde54cee0c11aaa31689baca", "sha256": "3d1a83e06c4bbd029ba026db376126b8840390eed6db655099084a74af525c92" }, "downloads": -1, "filename": "PyBabel-hbs-0.1.4.tar.gz", "has_sig": false, "md5_digest": "bb35efa9bde54cee0c11aaa31689baca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23325, "upload_time": "2013-10-19T08:37:06", "url": "https://files.pythonhosted.org/packages/4e/18/f0d02808c0c8d25a8e1a24194be0c7f91e7cf32780222ab36a77dc566110/PyBabel-hbs-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7962fb637dc4fc237c91e7f7f039f3b9", "sha256": "cac0be6db97f0815fec0e97c54aa28ba47bd12ff7582557616f8c9e5261a5d18" }, "downloads": -1, "filename": "PyBabel-hbs-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7962fb637dc4fc237c91e7f7f039f3b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24001, "upload_time": "2013-10-19T18:41:57", "url": "https://files.pythonhosted.org/packages/1b/26/96ee5566902edad793cd9420eb190b8dc374a109ab154eda7114f90e7bd7/PyBabel-hbs-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "48ec311c6972964298fd3a28b1981189", "sha256": "5fb2d90a82c220636012157be5a4d4ba4b0d5eeb64128f1e34d4cb363fd0510b" }, "downloads": -1, "filename": "PyBabel-hbs-0.2.1.tar.gz", "has_sig": false, "md5_digest": "48ec311c6972964298fd3a28b1981189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24189, "upload_time": "2013-10-19T20:03:31", "url": "https://files.pythonhosted.org/packages/58/33/e690fef3aaa60ae61ae8084f6fdbeeb34c8ed3ae43f7a7dfa0d054f87fc8/PyBabel-hbs-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a8232f25e1666e2bc2e989172136b2c1", "sha256": "be4b3bf8879a2ca6e52f7ccb9682d97f5b25faadcef5916c6df5d017dc853d5b" }, "downloads": -1, "filename": "PyBabel-hbs-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a8232f25e1666e2bc2e989172136b2c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24421, "upload_time": "2013-11-07T15:54:37", "url": "https://files.pythonhosted.org/packages/35/b2/e7ba098693498e99a384813d485abcc6536f09f9af6ee4f631ea8df580e7/PyBabel-hbs-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8232f25e1666e2bc2e989172136b2c1", "sha256": "be4b3bf8879a2ca6e52f7ccb9682d97f5b25faadcef5916c6df5d017dc853d5b" }, "downloads": -1, "filename": "PyBabel-hbs-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a8232f25e1666e2bc2e989172136b2c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24421, "upload_time": "2013-11-07T15:54:37", "url": "https://files.pythonhosted.org/packages/35/b2/e7ba098693498e99a384813d485abcc6536f09f9af6ee4f631ea8df580e7/PyBabel-hbs-0.2.2.tar.gz" } ] }