Commit e91278fb authored by emmapeel's avatar emmapeel 🤖
Browse files

l10n mantainer stats

parent a16bc99f
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -32,11 +32,11 @@ pages:
  stage: build
  interruptible: true
  cache:
    key: $CI_PROJECT_PATH_SLUG.$CI_COMMIT_BRANCH
    key: $CI_PROJECT_PATH_SLUG
    paths:
      # - venv
      - apt-cache
      - 'public/*'
      - 'stats/*.json'
      - translation
      - .cache/pip
      - '**/i18n/*'
@@ -53,10 +53,18 @@ pages:
      git clone https://gitlab.torproject.org/tpo/translation.git
      fi
    - pip3 install polib
    - echo  "check all translation branches"
    - |-
      echo  "check all translation branches"
      if [ -d "public/*.html" ]; then
      rm public/*.html
      rm public/style.css
      fi
    - bin/check_websites.sh
    - echo "making stats for Tor Browser"
    - mkdir stats
    - |-
      echo "making stats for Tor Browser"
      if [ ! -d "stats" ]; then
      mkdir stats
      fi
    - pip3 install httpx markdown
    - python3 bin/check-torbrowser-translations.py $WEBLATE_TOKEN
    - echo "making stats for all languages"
@@ -67,6 +75,8 @@ pages:
    - echo "checking for translation template updates in URLs"
    - pip3 install requests
    - python3 bin/check-remote-updates.py
    - echo "checking for components history and events, stats that should run monthly or similar"
    - python3 bin/component-activity.py $WEBLATE_TOKEN

  artifacts:
    paths:
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ try:
    BRANCHNAME = sys.argv[1]
except IndexError:
    logging.warning("Please run me with a lektor-based translation branch, i.e. `../check_po_status.py 'communitytpo-contentspot'`")
    logging.warning("the available branches are: communitytpo-contentspot, support-portal, tbmanual-contentspot, tpo-web, or gettor-website-contentspot")
    logging.warning("the available branches are: communitytpo-contentspot, support-portal, tbmanual-contentspot, or tpo-web")
    sys.exit()


@@ -78,7 +78,7 @@ def get_remote_po():
        pofile = polib.pofile('oldcontents+es.po')
    except OSError:
        print("Please run me with a lektor-based translation branch, i.e. `../check_po_status.py 'communitytpo-contentspot'`")
        print("the available branches are: communitytpo-contentspot, support-portal, tbmanual-contentspot, tpo-web, or gettor-website-contentspot")
        print("the available branches are: communitytpo-contentspot, support-portal, tbmanual-contentspot or tpo-web")
        sys.exit()
    return pofile

+825 −0

File added.

Preview size limit exceeded, changes collapsed.

+13 −0
Original line number Diff line number Diff line
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
<header>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Translation stats for the Tor Project, more from the mantainer side. History about components, add-ons enabled or not, etc.">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="./favicon.png">

<title>Translation stats for the Tor Project</title>
</header>
<body>
<a href="./stats.html">Translator stats</a> - <a href="./stats.html#tor-browser-translations">Tor Browser translations</a>
+30 −34
Original line number Diff line number Diff line
@@ -14,10 +14,6 @@ workflow:
      variables:
         ONE_LEKTOR : "support"
         LEKTOR_FILE: "portal.lektorproject"
    - if: '$TRANSLATION_BRANCH == "gettor-website-contentspot"'
      variables:                     
         ONE_LEKTOR : "gettor-web"
         LEKTOR_FILE: "GetTor.lektorproject"
    - if: '$TRANSLATION_BRANCH == "communitytpo-contentspot"'
      variables:
         ONE_LEKTOR : "community"
Loading