Commit 716b6dcc authored by Hans-Christoph Steiner's avatar Hans-Christoph Steiner

Merge branch 'handful-of-fixes' into 'master'

Handful of fixes

See merge request !544
parents f35691d3 fc5dd79c
Pipeline #142871636 passed with stage
in 16 minutes and 54 seconds
......@@ -38,6 +38,8 @@ bower_components/*
Gemfile.lock
vendor
userconfig.yml
_userconfig.yml
# vagrant can be used to setup an env just like the production Docker
# install as run in .gitlab-ci.yml:
......
......@@ -45,8 +45,13 @@ AddEncoding x-gzip .gz
# cache all files without checking until max-age, after that, the
# browser check the ETag value to see whether it needs to redownload
# 1 week
<FilesMatch "\.ttf$">
Header set Cache-Control "max-age=604800, public, immutable"
</FilesMatch>
# 12 hours
<FilesMatch "\.(css|gif|ico|jpg|jpeg|js|json|png|svg|ttf|txt|xml)$">
<FilesMatch "\.(css|gif|ico|jpg|jpeg|js|json|png|svg|txt|xml)$">
Header set Cache-Control "max-age=43200, public, immutable"
</FilesMatch>
......
......@@ -6,6 +6,7 @@
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="preload" href="{% assets %}/roboto.ttf" as="font" type="font/ttf"/>
<link rel="dns-prefetch" href="https://search.f-droid.org"/>
<link rel="dns-prefetch" href="https://fdroid.gitlab.io"/>
<link rel="stylesheet" href="{% root %}/css/main.css"/>
......@@ -30,7 +31,7 @@
{% continue %}
{% endif %}
{% if site.baseurl == '' %}
<link rel="alternate" hreflang="{{ lang }}" href="/{{ lang }}{{ page.permalink }}" />
<link rel="alternate" hreflang="{{ lang | replace: '_', '-' }}" href="/{{ lang }}{{ page.permalink }}" />
{% endif %}
{% endfor %}
</head>
......@@ -87,8 +87,8 @@ and is brought to you by at least the following people:
{%- endfor -%}
</ul>
If your name is missing, it’s a mistake and you should
If you have contributed to F-Droid and your name is missing, it’s a mistake and you should
[add yourself to the list](https://gitlab.com/fdroid/fdroid-website/blob/master/_data/contributors.yaml)!
Keep it sorted by surname, please.
Please include your Weblate username if you are a translator. Keep it sorted by surname, please.
The original F-Droid client app was based on the Aptoide app developed by Roberto Jacinto.
......@@ -8,6 +8,7 @@
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url({{ site.baseurl }}/assets/roboto.ttf) format('truetype');
font-display: swap;
}
......
#!/bin/sh
# The CSV from Weblate contains the following header row:
# name,code,total,translated,translated_percent,total_words,translated_words,failing,failing_percent,fuzzy,fuzzy_percent,url_translate,url,last_change,last_author
# where the columns of interest are $5 (translated_percent) and $2 (code).
for f in f-droid fdroiddata repomaker repomaker-javascript website website-docs website-posts; do
echo $f `curl --silent https://hosted.weblate.org/exports/stats/f-droid/$f/\?format\=csv | tail -n +2 | awk -F ',' '{ if ($5 > 95.0) print $2 }' | sort -u`
done
#!/usr/bin/env python3
import os
import requests
import yaml
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
output = dict()
for slug in ('f-droid', 'fdroiddata', 'repomaker', 'repomaker-javascript',
'website', 'website-pages', 'website-docs', 'website-posts',
'website-tutorials'):
r = requests.get('https://hosted.weblate.org/exports/stats/f-droid/%s/?format=json' % slug)
data = r.json()
output[slug] = []
for item in data:
if item.get('translated_percent', 0) > 99.0:
output[slug].append(item['code'])
with open('_config.yml') as fp:
config = yaml.safe_load(fp)
print('Launch on f-droid.org:',
sorted((set(output['f-droid']) & set(output['website']) & set(output['website-pages']))
- set(config['languages'])))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment