This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from django.conf import settings | |
| from django.db import connection, transaction | |
| from django.db.models import F | |
| from pontoon.base.models import Resource, Translation, TranslatedResource | |
| settings.DEBUG = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Benchmark: current calculate_stats() (5 queries) vs single aggregate approach. | |
| Runs against the top 10 largest resources for the Italian (it) locale. | |
| Safe for production: read-only queries, low iteration count. | |
| """ | |
| import timeit | |
| from functools import partial | |
| from django.db.models import Count, Q | |
| from pontoon.base.models import Locale, TranslatedResource, Translation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| GitHub Org Repository Access Report | |
| Checks your access level to all public, active repositories in a GitHub | |
| organization and prints a grouped report, distinguishing direct vs. | |
| team-inherited permissions. | |
| Usage: | |
| python github_access_report.py --org <org> --token <token> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Remove trailing punctuation from specific Fluent message attributes in | |
| browser/browser/preferences/preferences.ftl across all locales. | |
| - preferences-doh-radio-default/custom/off: fix .description | |
| - preferences-doh-fallback-label: fix .label | |
| """ | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pontoon.base.models import Project, Locale, Entity, Translation | |
| from django.db.models import F | |
| from datetime import datetime, timezone | |
| project_slug = "firefox" | |
| # Top 15 desktop locales based on DAU, excluding en-* | |
| locale_codes = ["de", "fr", "es-ES", "ru", "pl", "pt-BR", "it", "zh-CN", "ja", "es-MX", "nl", "id", "cs", "hu", "es-AR"] | |
| start_date = datetime(2026, 1, 1, tzinfo=timezone.utc) | |
| end_date = datetime(2026, 12, 31, 23, 59, 59, tzinfo=timezone.utc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Pontoon translation coverage report for a given search query. | |
| - Queries Pontoon search/translations endpoint (custom User-Agent). | |
| - Extracts entity IDs. | |
| - Fetches translations for each entity. | |
| - Computes per-locale completion across the entity set. | |
| Requires: requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/browser/components/preferences/moreFromMozilla.js b/browser/components/preferences/moreFromMozilla.js | |
| index 109d334ea334..d426bebcc1bf 100644 | |
| --- a/browser/components/preferences/moreFromMozilla.js | |
| +++ b/browser/components/preferences/moreFromMozilla.js | |
| @@ -170,7 +170,7 @@ var gMoreFromMozillaPane = { | |
| products.push({ | |
| id: "mdn", | |
| - title_string_id: "more-from-moz-mdn-title", | |
| + title_string_id: "more-from-moz-mdn-title2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -brand-account = | |
| { $capitalization -> | |
| [uppercase] Mozilla Account | |
| *[lowercase] Mozilla account | |
| } | |
| test-message-lowercase = Your { -brand-account } | |
| test-message-uppercase = Your { -brand-account(capitalization: "uppercase") } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import os | |
| def extractFileList(repository_path): | |
| """ | |
| Extract the list of supported files. Store the relative path and ignore | |
| specific paths. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE resources> | |
| <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> | |
| <string name="single_quote">They\'re great</string> | |
| <string name="double_quotes">They are \"great\"</string> | |
| <string name="both_quotes">They\'re really \"great\"</string> | |
| </resources> |
NewerOlder