Skip to content

Instantly share code, notes, and snippets.

Matjaž Horvat mathjazz

View GitHub Profile
View gist:155f27211e1c4b2ff3b8f18a3d2470df
---------------------------------------------------
1. Disable sync for Firefox and Firefox for Android
---------------------------------------------------
------------------------------------------------------------
2. Check any bn-BD and bn-IN changes in ChangedEntityLocales
------------------------------------------------------------
from pontoon.base.models import *
@mathjazz
mathjazz / active_contributors.py
Last active Feb 22, 2019
Active contributors for given locales, timeframe and roles
View active_contributors.py
"""
Retrieve a list of active contributors for given locales, timeframe and roles.
Output is formatted as CSV with the following columns:
* locale
* date_joined
* profile_url
* user_role
* total_submission_count
* approved_count
@mathjazz
mathjazz / diff.diff
Created Dec 7, 2018
Change radio buttons
View diff.diff
diff --git a/pontoon/teams/static/css/request.css b/pontoon/teams/static/css/request.css
index 30a6d1ff..ea3f23cd 100644
--- a/pontoon/teams/static/css/request.css
+++ b/pontoon/teams/static/css/request.css
@@ -135,6 +135,10 @@
box-sizing: border-box;
}
+.item-list td.radio {
+ color: #4d5967;
View speedup.diff
diff --git a/pontoon/tour/static/js/tour.js b/pontoon/tour/static/js/tour.js
index 11a16bc0..41de6286 100644
--- a/pontoon/tour/static/js/tour.js
+++ b/pontoon/tour/static/js/tour.js
@@ -188,7 +188,6 @@ $(function () {
"string can be found in the History Tab. Icons to the right of " +
"each entry indicate its review status (Approved, Rejected or " +
"Unreviewed).",
- subject: "#helpers",
format: "markdown",
View patch.diff
diff --git a/pontoon/base/static/js/tour.js b/pontoon/base/static/js/tour.js
index 687d2ea4..1adcee71 100644
--- a/pontoon/base/static/js/tour.js
+++ b/pontoon/base/static/js/tour.js
@@ -1,9 +1,33 @@
$(function () {
- var canTranslate = Pontoon.user.canTranslate();
var isEntityClicked = false;
var isSubmitClicked = false;
@mathjazz
mathjazz / patch.diff
Created Jul 11, 2018
max_length check optimization
View patch.diff
diff --git a/pontoon/checks/libraries/pontoon.py b/pontoon/checks/libraries/pontoon.py
index fb80d3f4..1f284222 100644
--- a/pontoon/checks/libraries/pontoon.py
+++ b/pontoon/checks/libraries/pontoon.py
@@ -13,6 +13,7 @@ from pontoon.sync.formats.ftl import localizable_entries
MAX_LENGTH_RE = re.compile(r'MAX_LENGTH:( *)(\d+)', re.MULTILINE)
parser = FluentParser()
+html_parser = HTMLParser.HTMLParser()
View gist:13cdbe72b2ab010c46009de9e8f9a166
Running migrations:
Applying base.0123_rename_translated_to_unreviewed... OK
Applying base.0124_recalculate-all-stats...Traceback (most recent call last):
File "./manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/mathjazz/Desktop/pontoon/venv/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
View gist:299437e5190be35dae868feb4a9c07ae
diff --git a/pontoon/base/static/js/translate.js b/pontoon/base/static/js/translate.js
index 072621d..7e52443 100644
--- a/pontoon/base/static/js/translate.js
+++ b/pontoon/base/static/js/translate.js
@@ -3791,6 +3791,7 @@ var Pontoon = (function (my) {
* Tells if current project requires Inplace Editor
*/
requiresInplaceEditor: function() {
+ return false;
var part = this.currentPart;
View gist:248b043ff76710e4e8e71211b422e247
ka
---------
Changed Gettext entities: []
Changed Fluent entities: [168527, 168582, 168539, 168566, 168565, 177412, 174401, 174403, 176250, 176293, 178116, 176248]
uz
---------
Changed Gettext entities: []
Changed Fluent entities: [176293, 178116, 176248]
View gist:63c4f9ec767a5657b40ccb2e7cc3f9e3
ka
---------
Changed Gettext entities: []
Changed Fluent entities: [168527, 168582, 168539, 168566, 168565, 177412, 174401, 174403, 176250, 176293, 178116, 176248]
uz
---------
Changed Gettext entities: []
Changed Fluent entities: [176293, 178116, 176248]
You can’t perform that action at this time.