summaryrefslogtreecommitdiffstats
path: root/generate_pot.py
Commit message (Collapse)AuthorAge
* [GTK] Fixup translation stringsCalum Lind2018-10-21
| | | | | | | | - Use named placeholders to allow translators to change text order. - Refactor fpcnt to use format() and markup strings properly. - Remove gettext.js creatation from generate_pot script since this step is now always done at build-time.
* [Lint] Use Black to auto-format codeCalum Lind2018-10-03
| | | | | | | | | | | | | | | | | The move to using auto-formatter makes it easier to read, submit and speeds up development time. https://github.com/ambv/black/ Although I would prefer 79 chars, the default line length of 88 chars used by black suffices. The flake8 line length remains at 120 chars since black does not touch comments or docstrings and this will require another round of fixes. The only black setting that is not standard is the use of double-quotes for strings so disabled any formatting of these. Note however that flake8 will still flag usage of double-quotes. I may change my mind on double vs single quotes but for now leave them. A new pyproject.toml file has been created for black configuration.
* [UI] Refactor appdata.xml code and markup translatable textCalum Lind2017-02-23
|
* [Py2to3] Force unicode_literals and fix related issuesCalum Lind2017-02-22
| | | | | | | | | | | | | | | | | | * Added `from __future__ import unicode_literals` to every file so now all strings in code are forced to be unicode strings unless marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`. This is a large change but we have been working towards the goal of unicode strings passed in the code so decoding external input and encoding output as byte strings (where applicable). Note that in Python 2 the `str` type still refers to byte strings. * Replaced the use of `str` for `basestring` in isinstance comparison as this was the original intention but breaks code when encoutering unicode strings. * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly related to gobject signal names.
* Revert "Rename version.py to calc_version.py to fix buildd error"Calum Lind2016-11-26
| | | | This reverts commit 943a9ded00660668100d2f7c7cdba3fddb9694ea.
* Rename version.py to calc_version.py to fix buildd errorCalum Lind2016-11-26
| | | | | | - There is a version.py included with buildd that is conflicting with the deluge one. Rather than messing with sys.path it is simplest to rename version.py to calc_version.py
* [Lint] Convert all python double quotes to single quotesCalum Lind2016-11-03
| | | | | | | | | | | | | | | | | | * A rather disruptive change but for a few reasons such as easier to read, easier type, keep consistent and javascript code uses single quotes. * There are a few exceptions for the automated process: * Any double quotes in comments * Triple double quotes for docstrings * Strings containing single quotes are left e.g. "they're" * To deal with merge conflicts from feature branches it is best to follow these steps for each commit: * Create a patch: `git format-patch -1 <sha1>` * Edit the patch and replace double quotes with single except those in comments or strings containing an unescaped apostrophe. * Check the patch `git apply --check <patchfile>` and fix any remaining issues if it outputs an error. * Apply the patch `git am < <patchfile>`
* [Lint] Cleanup helper scripts to pass PyLintCalum Lind2015-10-30
|
* Updates to helper scriptsCalum Lind2015-08-25
| | | | | * Python 3 compatible * Consistent quote symbol
* [WebUI] Improve the gen_web_gettext scriptCalum Lind2015-08-22
| | | | | * Create a 'minified' gettext.js by removing comments from file and simplifying js code. * Added creating the file to generate_pot.py, so it is not forgotten about.
* Minor updates to the translation scriptsCalum Lind2015-08-20
| | | | | | * General cleanup of code. * Add commandline folder option to js gettext script. * Include webui render html files to pot template creation.
* Workaround for js files generating warnings with generate_pot scriptCalum Lind2015-08-13
| | | | | | | With xgettext set to python it will parse the comments in javascript files, so single apostrophes or quotes are flagged as 'warning: untermined string'. This change just rewrites js comments to not use apostrophes.
* Update headers and isort importsCalum Lind2014-09-23
|
* Remove unneeded ez_setup and 'isort' importsCalum Lind2014-09-04
|
* Flake8 core and common filesCalum Lind2014-09-03
| | | | | | * Added N802 to flake8 ignore as certain inherited funcs cannot be changed to lowercase and this unresolved warning hides other errors/warnings. * Include new header
* Create new generate_pot.py script for translationsCalum Lind2013-05-02
* glade3 files require workaround with intltool-extract * webui javascript files are now included * fix multiline string for parse