summaryrefslogtreecommitdiffstats
path: root/gen_web_gettext.py
Commit message (Collapse)AuthorAge
* Upgrade codebase with pyupgrade (>=py3.6)DjLegolas2021-12-29
| | | | | | | | Added pyupgrade utility with manual stage to pre-commit and run on all files. Ref: https://github.com/asottile/pyupgrade Closes: deluge-torrent/deluge#326
* Remove all Python 2 supportdeluge-2.1.0.dev0DjLegolas2021-12-28
| | | | | | | | | * Removed all __future__ imports from code * Removed all six dependencies * Removed all future_builtins imports * Removed all Python 2 related code Closes: deluge-torrent/deluge#325
* [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.
* Fix files to pass new Flake8 checkersCalum Lind2018-06-01
| | | | | | | | | | | Some new flake8 checkers were added so fix these new warnings and any issues uncovered. Use add-trailing-comma to fix missing trailing commas. It does not format it as well as I would like however it was fast to change and helps with git changes in future. Removed pylint from tox due to large number of warnings.
* [WebUI] Set debug to false for gettext scriptCalum Lind2017-06-08
|
* [#2837] [WebUI] Create gettext.js when buildingCalum Lind2017-03-22
|
* Minor gettext script improvementsCalum Lind2017-03-21
|
* [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.
* [Lint] Fix files to pass Flake8 v3.2.0Calum Lind2016-11-17
|
* [Lint] Quote cleanupCalum Lind2016-11-17
|
* [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] Fix pylint warningsbendikro2016-11-03
|
* Revert "[Py2to3] Clean-up the use of keys() on dictionary objects."Calum Lind2016-10-26
| | | | This reverts commit 8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa.
* [Py2to3] Clean-up the use of keys() on dictionary objects.Andrew Resch2016-10-26
| | | | | | | | To make the code more Python 3 compatible, I've made a few changes to how we handle keys() or iterkeys() calls on dictionaries. All functionality should remain the same. * Remove the use of .keys() or .iterkeys() when iterating through a dictionary. * Remove the use of .keys() when checking if key exists in dictionary. * Replace dict.keys() with list(dict) to obtain a list of dictionary keys. In Python 3 dict.keys() returns a dict_keys object, not a list.
* [WebUI] Update gettext script to find any missed marked-up textCalum Lind2016-05-14
| | | | | Added a new function to the gettext script that will check common extjs attributes for missing markup text strings and print the result.
* [Lint] Fix redefining filename in scriptCalum Lind2016-05-09
|
* [WebUI] Fix to gen_web_gettextbendikro2016-04-25
|
* [WebUI] Reword doctring and update gettext.jsCalum Lind2016-04-23
|
* [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.
* Update headers and isort importsCalum Lind2014-09-23
|
* Fix building the code documentation with sphinxCalum Lind2014-02-20
Updated Sphinx conf and tested with Sphinx 1.2.1 Moved webui gen_gettext script Fixed docstring warning in code Renamed console update-tracker to update_tracker