{ "info": { "author": "Stefan Martin", "author_email": "s.martin@iwm-kmrc.de", "bugtrack_url": null, "classifiers": [], "description": "***********\r\nI18n recipe\r\n***********\r\n\r\n.. contents::\r\n\r\nThis recipe generate calls of zope3 i18n utilities i18nextract and i18nmaergeall\r\nfor collecting and merging msgstr from packages.\r\n\r\nDetailed Documentation\r\n**********************\r\n\r\nI18n Recipe\r\n===========\r\n\r\nParameter\r\n---------\r\n\r\nThis recipe generate calls of zope3 i18n utilities i18nextract and i18nmaergeall\r\nfor collecting and merging msgstr from packages.\r\n\r\nThe recipe has two options:\r\n\r\neggs\r\n The eggs option specified a list of eggs to test given as one ore\r\n more setuptools requirement strings. Each string must be given on\r\n a separate line.\r\n\r\nextra-paths\r\n One or more extra paths to include in the generated i18nextract script.\r\n\r\n\r\nExample\r\n-------\r\n\r\nIn Bebop the name of the domain is 'bebop', the package is 'src/bebop',\r\nthe output relative to the package is locales, and the location of site.zcml\r\nis parts/instance/etc/site.zcml. The buildout snippet looks like:\r\n\r\n::\r\n\r\n [i18n]\r\n recipe = iwm.recipe.i18n\r\n eggs = ${testinstance:eggs}\r\n iwm.recipe.i18n\r\n extra-paths = parts/zope3/src\r\n parts/zope3/utilities\r\n\r\nTo re-extract i18n messages from the code execute ``bin/i18nextract``\r\nfrom your buildout directory:\r\n\r\n::\r\n\r\n $ bin/i18nextract -d -p -o -s \r\n\r\nThis will update the ``.pot`` file.\r\n\r\nTo merge those changes to all existing translations you can do that by\r\nexecuting the ``bin/i18nmergeall`` script from your buildout directory:\r\n\r\n::\r\n\r\n $ bin/i18nmergeall -l /\r\n\r\n\r\nDetails\r\n-------\r\n\r\nThe following text is partly lend from zc.recipe.testrunner.README.txt.\r\n\r\nTo illustrate this, we'll create a pair of projects in our sample\r\nbuildout::\r\n\r\n >>> mkdir(sample_buildout, 'demo')\r\n >>> mkdir(sample_buildout, 'demo', 'demo')\r\n >>> write(sample_buildout, 'demo', 'demo', '__init__.py', '')\r\n >>> write(sample_buildout, 'demo', 'setup.py',\r\n ... \"\"\"\r\n ... from setuptools import setup\r\n ... \r\n ... setup(name = \"demo\")\r\n ... \"\"\")\r\n\r\n >>> mkdir(sample_buildout, 'demo2')\r\n >>> mkdir(sample_buildout, 'demo2', 'demo2')\r\n >>> write(sample_buildout, 'demo2', 'demo2', '__init__.py', '')\r\n >>> write(sample_buildout, 'demo2', 'setup.py',\r\n ... \"\"\"\r\n ... from setuptools import setup\r\n ... \r\n ... setup(name = \"demo2\", install_requires= ['demoneeded'])\r\n ... \"\"\")\r\n\r\nDemo 2 depends on demoneeded::\r\n\r\n >>> mkdir(sample_buildout, 'demoneeded')\r\n >>> mkdir(sample_buildout, 'demoneeded', 'demoneeded')\r\n >>> write(sample_buildout, 'demoneeded', 'demoneeded', '__init__.py', '')\r\n >>> write(sample_buildout, 'demoneeded', 'setup.py',\r\n ... \"\"\"\r\n ... from setuptools import setup\r\n ... \r\n ... setup(name = \"demoneeded\")\r\n ... \"\"\")\r\n\r\nWe'll update our buildout to install the demo project as a\r\ndevelop egg and to create the test script::\r\n\r\n >>> write(sample_buildout, 'buildout.cfg',\r\n ... \"\"\"\r\n ... [buildout]\r\n ... develop = demo demoneeded demo2\r\n ... parts = i18n\r\n ... offline = true\r\n ...\r\n ... [i18n]\r\n ... recipe = iwm.recipe.i18n\r\n ... eggs = \r\n ... demo\r\n ... demo2\r\n ... extra-paths = parts/zope3/src\r\n ... parts/zope3/utilities\r\n ... \"\"\")\r\n\r\nNote that we specified both demo and demo2 in the eggs\r\noption and that we put them on separate lines.\r\n\r\nWe also specified the offline option to run the buildout in offline mode.\r\n\r\nNow when we run the buildout::\r\n\r\n >>> import os\r\n >>> os.chdir(sample_buildout)\r\n >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'),\r\n\r\nWe get a i18n script installed in our bin directory::\r\n\r\n >>> ls(sample_buildout, 'bin')\r\n - buildout\r\n - i18nextract\r\n - i18nmergeall\r\n\r\nWe take a look of the content of i18nextract::\r\n\r\n >>> cat(sample_buildout, 'bin', 'i18nextract') # doctest:\r\n #!python\r\n \r\n import sys\r\n sys.path[0:0] = [\r\n '/sample-buildout/demo',\r\n '/sample-buildout/demo2',\r\n '/sample-buildout/eggs/zope.testing-X-pyN.N.egg',\r\n '/sample-buildout/eggs/setuptools-X-pyN.N.egg',\r\n '/sample-buildout/demoneeded',\r\n '/sample-buildout/parts/zope3/src',\r\n '/sample-buildout/parts/zope3/utilities',\r\n ]\r\n \r\n import os\r\n sys.argv[0] = os.path.abspath(sys.argv[0])\r\n \r\n \r\n import i18nextract\r\n \r\n if __name__ == '__main__':\r\n i18nextract.main()\r\n\r\nAnd the content of i18nmergeall::\r\n\r\n >>> cat(sample_buildout, 'bin', 'i18nmergeall') # doctest:\r\n #!python\r\n \r\n import sys\r\n sys.path[0:0] = [\r\n '/sample-buildout/demo',\r\n '/sample-buildout/demo2',\r\n '/sample-buildout/eggs/zope.testing-X-pyN.N.egg',\r\n '/sample-buildout/eggs/setuptools-X-pyN.N.egg',\r\n '/sample-buildout/demoneeded',\r\n '/sample-buildout/parts/zope3/src',\r\n '/sample-buildout/parts/zope3/utilities',\r\n ]\r\n \r\n import os\r\n sys.argv[0] = os.path.abspath(sys.argv[0])\r\n \r\n \r\n import iwm.recipe.i18n.ctl\r\n \r\n if __name__ == '__main__':\r\n iwm.recipe.i18n.ctl.main_i18nmergeall()\r\n\r\nDownload\r\n**********************", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.kmrc.de/projects/devel/iwm.recipe.i18n", "keywords": "zope3 bebop buildout i18n", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "iwm.recipe.i18n", "package_url": "https://pypi.org/project/iwm.recipe.i18n/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/iwm.recipe.i18n/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.kmrc.de/projects/devel/iwm.recipe.i18n" }, "release_url": "https://pypi.org/project/iwm.recipe.i18n/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "ZC Buildout recipe for creating i18n utilities", "version": "0.0.1" }, "last_serial": 793525, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2e23d68af5b0233c7cdf59f138c1d13a", "sha256": "fea8d40a2adc7be4a6e8b670fbcc405110c488e04fbd6a7754522810ea5a2f37" }, "downloads": -1, "filename": "iwm.recipe.i18n-0.0.1-py2.4.egg", "has_sig": false, "md5_digest": "2e23d68af5b0233c7cdf59f138c1d13a", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 10787, "upload_time": "2007-08-29T14:04:42", "url": "https://files.pythonhosted.org/packages/9b/f5/d3cbff423c38abb8e6f5d33b35d717cd5f190c3db18075a142965121a7ed/iwm.recipe.i18n-0.0.1-py2.4.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e23d68af5b0233c7cdf59f138c1d13a", "sha256": "fea8d40a2adc7be4a6e8b670fbcc405110c488e04fbd6a7754522810ea5a2f37" }, "downloads": -1, "filename": "iwm.recipe.i18n-0.0.1-py2.4.egg", "has_sig": false, "md5_digest": "2e23d68af5b0233c7cdf59f138c1d13a", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 10787, "upload_time": "2007-08-29T14:04:42", "url": "https://files.pythonhosted.org/packages/9b/f5/d3cbff423c38abb8e6f5d33b35d717cd5f190c3db18075a142965121a7ed/iwm.recipe.i18n-0.0.1-py2.4.egg" } ] }