Recent activity

[PATCH harelang.org] Make the mascot image in the nav link to home a month ago

From fattalion to ~sircmpwn/hare-dev

I was somewhat confused when I tried clicking on the mascot on my phone
but had nothing happen.
 layouts/partials/nav.html | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index e42cfb7..cdc86ed 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,8 +1,10 @@
[message trimmed]

Re: Autorezie of textarea 5 months ago

From fattalion to ~metalune/simplytranslate-devel

Thanks for your swift reply.

> I sent the patch from mailspring (after enabling plain text email, https://useplaintext.email/#mailspring)

Did you try `git send-email`? https://git-send-email.io/

> No I think it do not need to be as each script doing something else, If it's up to me I would create main.js file to keep everything in it's place but I just followed your style

I don't think that's really that important in a piece of JS as small as ours.
As for why we don't have a separate JS file, it would incur an extra HTTP
request, and for JS code this short the overhead of the request is too large.

> No, 'var' is bad you have const or let. For me I see const fit as we will not need to change contents of that variable later

[PATCH engines] Update dependencies in requirements.txt 5 months ago

From fattalion to ~metalune/simplytranslate-devel

 requirements.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/requirements.txt b/requirements.txt
index e1f6272..a66f4f3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,3 @@
[message trimmed]

[PATCH engines] Add missing translatepy dependency to `setup.py` 5 months ago

From fattalion to ~metalune/simplytranslate-devel

 setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 8def0af..a316880 100644
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,7 @@ setup(
    packages = ["simplytranslate_engines"],
    install_requires = [
[message trimmed]

Re: Autorezie of textarea 5 months ago

From fattalion to ~metalune/simplytranslate-devel

Thanks for the patch! There seems to be something wrong with it, but I'm
not sure what exactly (applying the patch fails, and Sourcehut isn't
detecting that it's a patch). How did you send this?

That aside, I have some comments on the patch itself:

- This script element should be joined with the previous one.
- Use `var` instead of `const`.
- Instead of getting all the text areas in the file, getting the two we
  want explicitly by `document.getElementById` sounds better to me.
  Something like:
  var inputTextArea = document.getElementById("input");

Re: [PATCH web] Fix translation API endpoint 6 months ago

From fattalion to ~metalune/simplytranslate-devel

Ignore this patch; the fact that the API now returns JSON is actually intentional, to give access to all the extra information in the dictionary.

[PATCH engines] Revert to old scraping method for translations 6 months ago

From fattalion to ~metalune/simplytranslate-devel

The code using Google Translate's `batchexecute` API endpoint seem to be
giving us pretty poor (sometimes half-untranslated!) translations. We
revert to the old method for now. While this means we need two requests,
the APIs don't appear to be rate-limited, and it's better than the
current situation at least.

I also removed the commented-out `translate` method, because we can
always get it back through Git history, and it somewhat clutters up the
 simplytranslate_engines/googletranslate.py | 65 +++-------------------
 1 file changed, 7 insertions(+), 58 deletions(-)

diff --git a/simplytranslate_engines/googletranslate.py b/simplytranslate_engines/googletranslate.py
[message trimmed]

[PATCH web] Fix translation API endpoint 6 months ago

From fattalion to ~metalune/simplytranslate-devel

We forgot to update it to account for the changes in

Also formatted the file with Black and removed outdated commented-out
 main.py | 48 +++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 33 deletions(-)

diff --git a/main.py b/main.py
index 4787a70..b524919 100644
--- a/main.py
+++ b/main.py
@@ -23,6 +23,7 @@ from simplytranslate_engines.utils import *
[message trimmed]

[PATCH web] Fix and refactor HTML a bit 6 months ago

From fattalion to ~metalune/simplytranslate-devel

Things done in this commit:
- fix engines being mashed together
- don't include trailing space in engine link
- remove outdated comment
- other small refactors
 templates/index.html | 27 ++++++---------------------
 templates/prefs.html |  4 ++--
 2 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/templates/index.html b/templates/index.html
index 5b71740..1bc041b 100644
--- a/templates/index.html
+++ b/templates/index.html
[message trimmed]