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
| # City list — one name per line. Blank lines, '#' comments, and | |
| # country-header lines (ending in ':') are ignored. | |
| US: | |
| San Francisco | |
| Seattle | |
| Miami | |
| Washington D.C. | |
| Houston | |
| Dallas |
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
| # ============================================================ | |
| # Time-to-translate report for Firefox products. | |
| # Run in Django shell: make shell -> ./manage.py shell then paste. | |
| # Prints CSV to stdout (copy-paste into a spreadsheet). | |
| # ============================================================ | |
| import csv | |
| import io | |
| import sys | |
| from datetime import datetime, timezone as dt_timezone |
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
| """ | |
| Backfill Community Health Score (CHS) history into Pontoon's | |
| LocaleHealthSnapshot table from the spreadsheet data extracted by | |
| extract_chs_backfill.py. | |
| Scores and the final CHS are RECOMPUTED here from the raw inputs using the live | |
| pontoon.insights.chs.compute_chs, so stored values stay consistent with the | |
| current formula (rather than copying the sheet's precomputed totals). The sheet | |
| total is used only to print a verification diff. |
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
| """ | |
| Extract Community Health Score (CHS) data from the historical monthly | |
| spreadsheets so it can be backfilled into Pontoon's LocaleHealthSnapshot table. | |
| Each spreadsheet is named YYYY-MM.xlsx and holds a "Summary" sheet with one | |
| row per locale. The score for a month is recorded on the 1st of the *following* | |
| month (matching how the automated snapshots work), so 2025-01.xlsx maps to a | |
| created_at of 2025-02-01. | |
| This script only reads the raw inputs needed to recompute the score in Django: |
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 bash | |
| # | |
| # Reproduce bug 2049845 (catastrophic AboutNewTabResourceMapping observer | |
| # re-entrancy -> ballooning memory + main-thread freeze) on a LOCAL build. | |
| # | |
| # The hang needs THREE ingredients together: | |
| # 1. newtab running as the train-hop XPI (not the built-in add-on), so the | |
| # AboutNewTabResourceMapping observer is actually installed. | |
| # 2. Many active langpacks (>=20) so there are enough locales for the | |
| # L10nRegistry/LocaleService source churn to matter. |
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 bash | |
| # | |
| # Run the local Firefox build on a clean profile with: | |
| # - intl.locale.requested set to an empty value (forces OS-locale negotiation) | |
| # - a batch of 152.0.2 release langpacks pre-installed | |
| # - the nimbus-devtools extension installed | |
| # | |
| # The langpacks match the local 152 build version, so they install as-is. | |
| set -euo pipefail |
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 | |
| """Query Transvision for IP-protection strings and report completion per locale, | |
| then map a CSV of country/locale/DAUs to the best-matching Transvision locale.""" | |
| import csv | |
| import io | |
| import json | |
| import sys | |
| import urllib.request | |
| import urllib.parse |
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/intl/l10n/docs/fluent/review.md b/intl/l10n/docs/fluent/review.md | |
| index febf7af2bc59..5ab292812aca 100644 | |
| --- a/intl/l10n/docs/fluent/review.md | |
| +++ b/intl/l10n/docs/fluent/review.md | |
| @@ -14,7 +14,7 @@ This document is intended as a guideline for developers and reviewers when | |
| working with FTL (Fluent) files. As such, it’s not meant to replace the | |
| [existing extensive documentation](./tutorial.html) about Fluent. | |
| -[Herald] is used to set the group [fluent-reviewers] as blocking reviewer for | |
| +[Herald](https://phabricator.services.mozilla.com/herald/) is used to set the group [fluent-reviewers](https://phabricator.services.mozilla.com/tag/fluent-reviewers/) as blocking reviewer for |
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 copy import deepcopy | |
| from moz.l10n.migrate import Migrate | |
| from moz.l10n.migrate.utils import get_entry | |
| from moz.l10n.model import Expression, PatternMessage, VariableRef | |
| def copy_int_to_float(src_id): | |
| """Like moz.l10n.migrate.copy() with replace=, but deep-copies the entry | |
| first so the source resource is not mutated. Rewrites any `integer` |
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(2027, 1, 1, tzinfo=timezone.utc) |
NewerOlder