Skip to content

Instantly share code, notes, and snippets.

View mathjazz's full-sized avatar

Matjaž Horvat mathjazz

View GitHub Profile
@mathjazz
mathjazz / gist:41ce13a473ae939181b902b106323bd4
Created September 9, 2026 07:38
LLM pilot funnel 2026-08-26 → 2026-09-09
LLM pilot funnel 2026-08-26 → 2026-09-09
locales: ar, cs, de, el, es-AR, es-CL, es-ES, es-MX, fi, fr, hu, id, it, ja, nl, pl, pt-BR, pt-PT, ro, ru, sk, sv-SE, sl, tr, vi, zh-CN, zh-TW
locale shown cache p50 p95 in k out k USD | copied copy% saved save% appr rej pend appr% users
-------------------------------------------------------------------------------------------------------------------------------
ar 60 31.7% 1417 2686 14.2 0.6 0.07 | 5 8.3% 1 20.0% 0 0 1 0.0% 1
cs 183 4.9% 1386 2566 57.3 2.5 0.28 | 30 16.4% 17 56.7% 17 0 0 100.0% 1
de 968 17.0% 1626 4291 377.1 12.0 1.75 | 71 7.3% 46 64.8% 40 6 0 87.0% 3
el 499 16.6% 1987 5406 150.5 15.0 0.90 | 22 4.4% 5 22.7% 5 0 0 100.0% 1
es-AR 264 15.9% 1284 2409 77.1 3.6 0.38 |
LLM pilot funnel 2026-08-13 → 2026-08-26
locales: de, es-MX, fr, it, sl, tr
locale shown cache p50 p95 in k out k USD | copied copy% saved save% appr rej pend appr% users
-------------------------------------------------------------------------------------------------------------------------------
de 510 12.2% 1786 4691 248.8 7.6 1.15 | 94 18.4% 70 74.5% 67 3 0 95.7% 3
es-MX 57 10.5% 1517 3305 29.1 1.0 0.14 | 0 0.0% 0 - 0 0 0 - 0
fr 389 18.5% 1717 3619 184.9 6.7 0.87 | 38 9.8% 20 52.6% 19 1 0 95.0% 1
it 263 35.7% 1855 3883 104.7 6.0 0.54 | 40 15.2% 17 42.5% 17 0 0 100.0% 1
sl 678 15.9% 1485 3502 332.4 13.8 1.61 | 56 8.3% 14 25.0% 13 1 0 92.9% 2
LLM pilot funnel 2026-08-13 → 2026-08-26
locales: de, es-MX, fr, it, sl, tr
locale shown cache p50 p95 in k out k | copied copy% saved save% appr rej pend appr% users
-----------------------------------------------------------------------------------------------------------------------
de 510 12.2% 1786 4691 248.8 7.6 | 86 16.9% 66 76.7% 63 3 0 95.5% 3
es-MX 57 10.5% 1517 3305 29.1 1.0 | 0 0.0% 0 - 0 0 0 - 0
fr 389 18.5% 1717 3619 184.9 6.7 | 38 9.8% 20 52.6% 19 1 0 95.0% 1
it 263 35.7% 1855 3883 104.7 6.0 | 40 15.2% 17 42.5% 17 0 0 100.0% 1
sl 678 15.9% 1485 3502 332.4 13.8 | 56 8.3% 14 25.0% 13 1 0 92.9% 2
[server] [ERROR:django.request] 2026-08-14 08:43:55,343 Internal Server Error: /translations/
[server] Traceback (most recent call last):
[server] File "/usr/local/lib/python3.13/site-packages/django/core/handlers/exception.py", line 55, in inner
[server] response = get_response(request)
[server] File "/usr/local/lib/python3.13/site-packages/django/core/handlers/base.py", line 197, in _get_response
[server] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[server] File "/usr/local/lib/python3.13/contextlib.py", line 85, in inner
[server] return func(*args, **kwds)
[server] File "/app/pontoon/base/views.py", line 1031, in download_translations
[server] zipfile.writestr(filename, serialize_translated_resource(resource, locale))
diff --git a/translate/src/modules/entities/components/StringNotFound.css b/translate/src/modules/entities/components/StringNotFound.css
index 3c5e0994e..b13d7ca7f 100644
--- a/translate/src/modules/entities/components/StringNotFound.css
+++ b/translate/src/modules/entities/components/StringNotFound.css
@@ -1,37 +1,35 @@
-/* Shown in the editor panel in place of the string, when the requested string
- * doesn't match the rest of the query (#2921). */
#string-not-found {
box-sizing: border-box;
height: 100%;
@mathjazz
mathjazz / optimization.diff
Last active June 29, 2025 22:20
Move prefetch_related() on the ProjectListView to also have impact when include_disabled and include_system are used
diff --git a/pontoon/api/serializers.py b/pontoon/api/serializers.py
index ffd6f0b4a..1c8b41ce3 100644
--- a/pontoon/api/serializers.py
+++ b/pontoon/api/serializers.py
@@ -107,7 +107,7 @@ class NestedProjectSerializer(ProjectSerializer):
fields = ProjectSerializer.Meta.fields + ["tags", "locales"]
def get_locales(self, obj):
- return list(obj.project_locale.values_list("locale__code", flat=True))
+ return [projectLocale.locale.code for projectLocale in obj.project_locale.all()]
Yes, you *can* import data from your local **SQLite** database into your **production PostgreSQL** database in a **Django + Wagtail** app — but you’ll need to be careful, especially with things like IDs, foreign keys, and data integrity.
Here’s a breakdown of your options and steps:
---
## ✅ Option 1: Use `manage.py dumpdata` + `loaddata`
### Step 1: Dump the data from SQLite
On your **local machine**, run:
What is the yearly gas consumption for heating a 100 m2 appartment in Slovenia with a ceiling height of 290 cm? The appartment is 200 years old, but has been renovated in 2023. It used floor heating, the windows are new and the walls (15 cm styrofoam) and the ceiling have been insulated.
Gas is also used for heating the sanitary water for 2 people.
Thanks for the detailed info — it really helps to give a more accurate estimate! Let’s break it down.
---
### 🔢 **Assumptions and Inputs:**
@mathjazz
mathjazz / patch.diff
Created January 13, 2025 20:29
Centralized Notification parsing logic
Sideshow:pontoon mathjazz$ git diff a0b431cff0b6844dd1ba9018010db4010e11497e 4575dbf4d09b79fbac72467b07b8337767e28e4c translate/
diff --git a/translate/src/context/BadgeTooltip.tsx b/translate/src/context/BadgeTooltip.tsx
index aaf56db37..e79b6dba0 100644
--- a/translate/src/context/BadgeTooltip.tsx
+++ b/translate/src/context/BadgeTooltip.tsx
@@ -1,49 +1,17 @@
-import { createContext, useEffect, useState } from 'react';
-import { Localized } from '@fluent/react';
-
-export type BadgeTooltipMessage = Readonly<{
diff --git a/pontoon/base/forms.py b/pontoon/base/forms.py
index 73fe2a93b..181cb2686 100644
--- a/pontoon/base/forms.py
+++ b/pontoon/base/forms.py
@@ -10,12 +10,10 @@ from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
from django.urls import reverse
-from django.utils import timezone