Skip to content

Instantly share code, notes, and snippets.

View flodolo's full-sized avatar

Francesco Lodolo flodolo

View GitHub Profile
#localization_table th {
font-family: "League Gothic", Impact, sans-serif;
width: 0.6em;
text-align: center;
padding: 0;
font-size: 2.11em;
}
#localization_table td {
padding: 0.3em 0 0;
@flodolo
flodolo / changelog.php
Created December 18, 2015 11:51
Temp Transvision
<?php
namespace Transvision;
$output = '';
foreach ($changelog as $release => $changes) {
// Add release title and initialize variables
$output .= $release_title($release);
$new_section = $empty_release = true;
$section = '';
foreach ($changes as $change => $attributes) {
@flodolo
flodolo / update.sh
Last active January 8, 2016 16:07
Update iOS with individual commits
#! /usr/bin/env bash
# Place your updated en-US XLIFF file inside /en-US before starting the script
ios_build_tools=/home/flodolo/mozilla/git/firefox-ios-build-tools/
ios_l10n_repository=/home/flodolo/mozilla/git/firefoxios-l10n/
# Create a branch in the repository
cd ${ios_l10n_repository}
branch_name=$(date +"%Y%m%d_%H%M")
Last update: 2016-06-21 19:00 CET
Affected locales:
ach, af, an, ar, as, az, bn-BD, bn-IN, brx, bs, cak, da, dsb, eo, es-AR, es-ES,
es-MX, fa, ff, fy-NL, ga-IE, gd, gl, gn, he, hi-IN, hr, hsb, hy-AM, it, ka, kk,
km, kn, kok, ks, lij, mai, ml, mr, ms, my, ne-NP, or, ro, sat, si, sl, son, sv-SE,
ta, te, th, uk, ur, uz, vi, wo, xh, zh-CN
Results:
-----
#! /usr/bin/env python
import argparse
import glob
import json
import os
import sys
import urllib2
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import json
import os
import urllib2
import sys
def diff(a, b):
b = set(b)
@flodolo
flodolo / remove_ebay_thunderbird.py
Last active September 23, 2016 10:04
Script to remove eBay from Thunderbird
#! /usr/bin/env python
''' This script assumes that localizations are stored in a
structure like the following:
this_script
|__locales
|__locale_code
|__l10n-central
|__mozilla-aurora
@flodolo
flodolo / verify_json.py
Created October 14, 2016 09:47
Thunderbird list.json verification
#! /usr/bin/env python
import argparse
import glob
import json
import os
import sys
import urllib2
@flodolo
flodolo / missing_android_locales.py
Created April 7, 2017 09:33
Compare all-locales and maemo-locales
#! /usr/bin/env python
import urllib2
def read_list(url):
locales = []
remote_locales = urllib2.urlopen(url)
print('Reading {0}'.format(url))
for locale in remote_locales:
locales.append(locale.rstrip())
@flodolo
flodolo / test_compare_locales.py
Created June 6, 2017 06:27
Test compare-locales
import json
import subprocess
import sys
locales = [
'ach', 'af', 'an', 'ar', 'as', 'ast', 'az', 'be', 'bg', 'bn-BD', 'bn-IN', 'br',
'bs', 'ca', 'cak', 'cs', 'cy', 'da', 'de', 'dsb', 'el', 'en-GB', 'en-ZA', 'eo',
'es-AR', 'es-CL', 'es-ES', 'es-MX', 'et', 'eu', 'fa', 'ff', 'fi', 'fr', 'fy-NL',
'ga-IE', 'gd', 'gl', 'gn', 'gu-IN', 'he', 'hi-IN', 'hr', 'hsb', 'hu', 'hy-AM',
'id', 'is', 'it', 'ja', 'ja-JP-mac', 'ka', 'kab', 'kk', 'km', 'kn', 'ko', 'lij',