{ "info": { "author": "Alastair Houghton", "author_email": "alastair@alastairs-place.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Internationalization" ], "description": "nslocalized\n===========\n\nWhat is this?\n-------------\n\nIt\u2019s a package of Python code for manipulating Mac OS X/iOS .strings files,\nwhich has been written carefully to support all of the character escapes and\nUnicode characters you might wish to use.\n\nHow do I use it?\n----------------\n\nTo read a .strings file::\n\n >>> from nslocalized import StringTable\n >>> st = StringTable.read('/path/to/my/Localized.strings')\n\nor to read the strings into an existing ``StringTable``::\n\n >>> st.read('/path/to/my/other/Localized.strings')\n\nTo write a new .strings file::\n\n >>> st.write('/path/to/my/new/Localized.strings')\n\nBy default, that uses host-endian UTF-16, but you can specify the encoding::\n\n >>> st.write('/path/to/my/new/Localized.strings', encoding='utf_8')\n\nEach string is represented by a ``LocalizedString`` object; given the strings\nfile::\n\n /* My important string */\n \"Very important\" = \"Tr\u00e8s important\";\n\nin a ``StringTable`` ``st``::\n\n >>> ls = st.lookup('Very important')\n >>> print ls.source\n Very important\n >>> print ls.target\n Tr\u00e8s important\n >>> print ls.comment\n My important string\n\nYou can also add entries to a ``StringTable`` with::\n\n >>> st.store(LocalizedString('One', 'Uno'))\n\nor with a comment::\n\n >>> st.store(LocalizedString('MB', 'Mo', 'Megabytes'))\n\nFinally, for simple access you can use the ``[]`` operator::\n\n >>> st['GB'] = 'Go'\n >>> print st['MB']\n Mo\n\nIn some cases you might want to load the string table without processing\nescapes. In that case, you can do::\n\n >>> st = StringTable.read('/path/to/my/Localized.strings',\n process_escapes=False)\n\nwhich will read the table without any escape processing taking place.\nObviously if you read a table in this form, you will also want to write it\nwithout escaping::\n\n >>> st.write('/path/to/my/new/Localized.strings', escape_strings=False)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/al45tair/nslocalized", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "nslocalized", "package_url": "https://pypi.org/project/nslocalized/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nslocalized/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/al45tair/nslocalized" }, "release_url": "https://pypi.org/project/nslocalized/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Reads and writes Mac OS X .strings files", "version": "0.2.0" }, "last_serial": 1898934, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "38b79d50d18abc41c88226c817c5eac3", "sha256": "4cb50d35aa7e16ad4cc4d09996387f822446687be8eac703d454f8ca62e43988" }, "downloads": -1, "filename": "nslocalized-0.1.0.tar.gz", "has_sig": false, "md5_digest": "38b79d50d18abc41c88226c817c5eac3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5713, "upload_time": "2015-04-23T15:29:31", "url": "https://files.pythonhosted.org/packages/1e/83/ef54663caf79d2e3ced11f8dd17b58d802e453247d298eb7aafc248725e2/nslocalized-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c61c7dd8819ca2aaedf72b5b7de9560b", "sha256": "46d6f776b26e9da0e0d0c759d99782884882cade59d5c935005a85cba654db9e" }, "downloads": -1, "filename": "nslocalized-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c61c7dd8819ca2aaedf72b5b7de9560b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6083, "upload_time": "2016-01-11T11:45:34", "url": "https://files.pythonhosted.org/packages/77/b7/610c101e59810d9d54d5308df8531ca401528a2d9cd3014e26d01b7be9e5/nslocalized-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c61c7dd8819ca2aaedf72b5b7de9560b", "sha256": "46d6f776b26e9da0e0d0c759d99782884882cade59d5c935005a85cba654db9e" }, "downloads": -1, "filename": "nslocalized-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c61c7dd8819ca2aaedf72b5b7de9560b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6083, "upload_time": "2016-01-11T11:45:34", "url": "https://files.pythonhosted.org/packages/77/b7/610c101e59810d9d54d5308df8531ca401528a2d9cd3014e26d01b7be9e5/nslocalized-0.2.0.tar.gz" } ] }