{ "info": { "author": "Hans-Peter Jansen", "author_email": "hpj@urpla.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Environment :: X11 Applications :: Qt", "Framework :: Setuptools Plugin", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Internationalization", "Topic :: Software Development :: Localization", "Topic :: Software Development :: User Interfaces", "Topic :: System :: Software Distribution" ], "description": "distutils_ui\n============\n\nA distutils build extension for PyQt{4,5} applications\n------------------------------------------------------\n\nBuild UI specific elements in tree, controlled by configuration variables in\nsetup.cfg. Running the tool chain is delegated to a couple of internal build\ncommands.\n\nFollowing layout is assumed::\n\n project/\n i18n/ # keep all translation specific files here\n i18n/project.pro # translation project file (generated, optionally)\n ui/ # all designer forms, may contain sub folders\n project.qrc # project resource definition (generated)\n project_rc.py # project resources (generated)\n setup.py # distutils/setuptools module for the project\n setup.cfg # setup configuration\n ...\n\n\nTranslations\n------------\nProper translation is subject of fetching the translatable strings from\nall forms and source modules, translate them (with ``linguist``), and convert\nthe textual representation (``.ts``) into binary form (``.qm``), palatable for\n``QTranslator`` instances.\n\nThere are two ways to accomplish this task: using an intermediate project\nfile (``.pro``), that can be generated with the built-in command ``gentrpro``,\nor feeding globbing args to the tools ``pylupdate`` and ``lrelease`` directly.\nUnfortunately, the latter way is hampered by some bugs. Hence, the preferred way\nis using the ``.pro`` file.\n\nBecause the translation source files (``.ts``) references forms and sources with\nrelative paths, and the tools ``pylupdate`` and ``lrelease`` operate relative\nto the ``.pro`` file location, and *we* *want* to keep all translation specific\nfiles in one place, we run the translation tool chain relative to ``i18n/``.\n\nA new language\n~~~~~~~~~~~~~~\n* create an appropriately named file in ``i18n/``\n e.g. ``touch i18n/project_lang.ts``\n* build initial translation source with ``setup.py build_ui``\n* set up language parameter with linguist once\n e.g. ``linguist i18n/project_lang.ts``\n\nTranslation relies on tr() and translate() used properly in the source.\n\n\nForms\n-----\n\n``ui/`` and sub folders contain all designer forms. You shouldn't mix source\ncode and forms in one folder, because forms are translated to *Python* source\nfiles, that you want to handle differently (e.g. exclude from translation,\nbecause the translation source is generated from the forms already.\n\nThe ``