INNER CODE UNIT · Python

get_supported_locales

emanuele-f/PCAPdroid · tools/weblate.py:122

def get_supported_locales():
    """Non-English locales from resourceConfigurations in build.gradle."""
    with open(BUILD_GRADLE) as f:
        content = f.read()
    locales = re.findall(r'"([a-z]{2}(?:-r[A-Z]{2})?)"',
                         content.split("resourceConfigurations")[1].split("]")[0])
    locales = [l for l in locales if l != "en"]
    return sorted(locales)

# ---------------------------------------------------------------------------
# Grouping consecutive commits by author
# ---------------------------------------------------------------------------

def group_by_author(commits):
    """Return list of groups: {name, email, date, commits, message}."""
    groups = []
    for commit in commits:
        name, email, date, message = get_commit_info(commit)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…