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 argparse | |
import os | |
import signal | |
import subprocess | |
import sys | |
from compare_locales import parser | |
# Capture CTRL+C | |
unreferenced_entities = [] |
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 argparse | |
import os | |
import signal | |
import subprocess | |
import sys | |
from compare_locales import parser | |
# Capture CTRL+C | |
unreferenced_entities = [] |
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 json | |
from urllib.parse import quote as urlquote | |
from urllib.request import urlopen | |
def main(): | |
# Get completion stats for locales from Pontoon | |
query = """ |
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 python | |
# Requires PyGithub | |
from github import Github | |
import configparser | |
import os | |
import requests | |
import sys |
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 json | |
import os | |
import signal | |
import subprocess | |
import sys | |
# Capture CTRL+C | |
unreferenced_entities = [] | |
processed_files = [] |
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 | |
# Extract strings | |
fx_repo="/Users/flodolo/github/firefox-ios" | |
python ./extract_ids_strings.py "${fx_repo}/firefox-ios/Shared/Strings.swift" | |
input="./string_ids.txt" | |
while IFS= read -r id | |
do | |
grep -qr "${fx_repo}/firefox-ios" --include=\*.swift --exclude=Strings.swift -e "\.${id}" && : || echo "${id}" |
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 json | |
import os | |
import re | |
import sys | |
import argparse | |
def parse_po_file(filepath): | |
""" | |
Reads a .po file and returns the value of the header |
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
# Any copyright is dedicated to the Public Domain. | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
from fluent.migrate.helpers import transforms_from | |
from fluent.migrate.transforms import TransformPattern | |
import fluent.syntax.ast as FTL | |
class REPLACE_TOTAL(TransformPattern): | |
def visit_TextElement(self, node): |
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 json | |
import requests | |
base_url = "https://product-details.mozilla.org/1.0/l10n/" | |
changesets = {} | |
for version in range(68, 128): | |
version_str = f"{version}.0" | |
for build_number in range(1, 6): |
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 python | |
""" | |
The script looks for TTF fonts in FontAwesome folder. It doesn't use WOFF2 | |
directly, because glyph names seem to be unreliable. | |
Optimized fonts are saved in `/pontoon/base/static/fonts/` as WOFF2. | |
The list of possible icons is done searching for `fa-*` in specific files (HTML, |
NewerOlder