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 | |
""" | |
Script to determine localization completion based on .strings files. | |
""" | |
import re | |
import sys | |
from pathlib import Path | |
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 | |
""" | |
Script to find unused localized string IDs in .strings files under en-US.lproj | |
folders by checking their definitions in firefox-ios/Shared/Strings.swift. | |
""" | |
import re | |
import sys | |
from pathlib import Path |
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): |
NewerOlder