From 05eef5a454d50640f8bb88d8f3fb0a72eb75bf8f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 30 Jan 2018 11:14:36 +0100 Subject: [PATCH] metadata: add new Translation app field for URL for contributions This is a field requested from a bunch of translators so they can easily find where to translate apps: https://forum.f-droid.org/t/translation-field-for-app-entries/1403/5 --- .gitlab-ci.yml | 1 + fdroidserver/metadata.py | 6 +++++- tests/metadata-rewrite-yml/org.fdroid.fdroid.yml | 1 + tests/metadata/dump/com.politedroid.yaml | 1 + tests/metadata/dump/org.adaway.yaml | 1 + tests/metadata/dump/org.smssecure.smssecure.yaml | 1 + tests/metadata/dump/org.videolan.vlc.yaml | 1 + tests/metadata/info.guardianproject.checkey.txt | 1 + tests/metadata/org.adaway.json | 1 + tests/metadata/org.fdroid.fdroid.txt | 1 + tests/metadata/org.smssecure.smssecure.txt | 1 + 11 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c00c90c2..1705910f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,7 @@ metadata_v0: - cd fdroiddata - ../tests/dump_internal_metadata_format.py - sed -i + -e '/Translation:/d' -e '/kivy:\sfalse/d' -e '/timeout:\s/d' metadata/dump_*/*.yaml diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 1c43fbae..80c49a8d 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -67,6 +67,7 @@ app_fields = set([ 'Web Site', 'Source Code', 'Issue Tracker', + 'Translation', 'Changelog', 'Donate', 'FlattrID', @@ -118,6 +119,7 @@ class App(dict): self.WebSite = '' self.SourceCode = '' self.IssueTracker = '' + self.Translation = '' self.Changelog = '' self.Donate = None self.FlattrID = None @@ -400,7 +402,7 @@ valuetypes = { FieldValidator("HTTP link", r'^http[s]?://', - ["WebSite", "SourceCode", "IssueTracker", "Changelog", "Donate"]), + ["WebSite", "SourceCode", "IssueTracker", "Translation", "Changelog", "Donate"]), FieldValidator("Email", r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$', @@ -1143,6 +1145,7 @@ def write_yaml(mf, app): 'WebSite', 'SourceCode', 'IssueTracker', + 'Translation', 'Changelog', 'Donate', 'FlattrID', @@ -1437,6 +1440,7 @@ def write_plaintext_metadata(mf, app, w_comment, w_field, w_build): w_field_always('Web Site') w_field_always('Source Code') w_field_always('Issue Tracker') + w_field_nonempty('Translation') w_field_nonempty('Changelog') w_field_nonempty('Donate') w_field_nonempty('FlattrID') diff --git a/tests/metadata-rewrite-yml/org.fdroid.fdroid.yml b/tests/metadata-rewrite-yml/org.fdroid.fdroid.yml index 1982ace6..af3a767f 100644 --- a/tests/metadata-rewrite-yml/org.fdroid.fdroid.yml +++ b/tests/metadata-rewrite-yml/org.fdroid.fdroid.yml @@ -4,6 +4,7 @@ License: GPL-3.0+ WebSite: https://f-droid.org SourceCode: https://gitlab.com/fdroid/fdroidclient IssueTracker: https://gitlab.com/fdroid/fdroidclient/issues +Translation: https://hosted.weblate.org/projects/f-droid/f-droid Changelog: https://gitlab.com/fdroid/fdroidclient/raw/HEAD/CHANGELOG.md Donate: https://f-droid.org/about FlattrID: '343053' diff --git a/tests/metadata/dump/com.politedroid.yaml b/tests/metadata/dump/com.politedroid.yaml index 698f216d..bf0b9b6b 100644 --- a/tests/metadata/dump/com.politedroid.yaml +++ b/tests/metadata/dump/com.politedroid.yaml @@ -29,6 +29,7 @@ RepoType: git RequiresRoot: false SourceCode: https://github.com/miguelvps/PoliteDroid Summary: Calendar tool +Translation: '' UpdateCheckData: null UpdateCheckIgnore: null UpdateCheckMode: Tags diff --git a/tests/metadata/dump/org.adaway.yaml b/tests/metadata/dump/org.adaway.yaml index 8a599d29..b31b2a04 100644 --- a/tests/metadata/dump/org.adaway.yaml +++ b/tests/metadata/dump/org.adaway.yaml @@ -52,6 +52,7 @@ RepoType: git RequiresRoot: true SourceCode: https://github.com/dschuermann/ad-away Summary: Block advertisements +Translation: https://www.transifex.com/dominikschuermann/adaway UpdateCheckData: null UpdateCheckIgnore: null UpdateCheckMode: Tags diff --git a/tests/metadata/dump/org.smssecure.smssecure.yaml b/tests/metadata/dump/org.smssecure.smssecure.yaml index 8935e1c4..bcbffd6d 100644 --- a/tests/metadata/dump/org.smssecure.smssecure.yaml +++ b/tests/metadata/dump/org.smssecure.smssecure.yaml @@ -49,6 +49,7 @@ RepoType: git RequiresRoot: false SourceCode: https://github.com/SMSSecure/SMSSecure Summary: Send encrypted text messages (SMS) +Translation: https://www.transifex.com/silence/silence UpdateCheckData: null UpdateCheckIgnore: null UpdateCheckMode: Tags diff --git a/tests/metadata/dump/org.videolan.vlc.yaml b/tests/metadata/dump/org.videolan.vlc.yaml index a6d309e2..e40baaa1 100644 --- a/tests/metadata/dump/org.videolan.vlc.yaml +++ b/tests/metadata/dump/org.videolan.vlc.yaml @@ -51,6 +51,7 @@ RepoType: git RequiresRoot: false SourceCode: http://git.videolan.org/?p=vlc-ports/android.git;a=summary Summary: Media player +Translation: '' UpdateCheckData: null UpdateCheckIgnore: null UpdateCheckMode: Tags diff --git a/tests/metadata/info.guardianproject.checkey.txt b/tests/metadata/info.guardianproject.checkey.txt index 4beeec89..8e57eef0 100644 --- a/tests/metadata/info.guardianproject.checkey.txt +++ b/tests/metadata/info.guardianproject.checkey.txt @@ -3,6 +3,7 @@ License:GPL-3.0 Web Site:https://dev.guardianproject.info/projects/checkey Source Code:https://github.com/guardianproject/checkey Issue Tracker:https://dev.guardianproject.info/projects/checkey/issues +Translation:https://www.transifex.com/otf/checkey Bitcoin:1Fi5xUHiAPRKxHvyUGVFGt9extBe8Srdbk Auto Name:Checkey diff --git a/tests/metadata/org.adaway.json b/tests/metadata/org.adaway.json index dda8ae60..7a09ef5d 100644 --- a/tests/metadata/org.adaway.json +++ b/tests/metadata/org.adaway.json @@ -29,6 +29,7 @@ "RequiresRoot": true, "SourceCode": "https://github.com/dschuermann/ad-away", "Summary": "Block advertisements", + "Translation": "https://www.transifex.com/dominikschuermann/adaway", "UpdateCheckMode": "Tags", "WebSite": "http://sufficientlysecure.org/index.php/adaway", diff --git a/tests/metadata/org.fdroid.fdroid.txt b/tests/metadata/org.fdroid.fdroid.txt index 912cd581..4d38c837 100644 --- a/tests/metadata/org.fdroid.fdroid.txt +++ b/tests/metadata/org.fdroid.fdroid.txt @@ -3,6 +3,7 @@ License:GPL-3.0+ Web Site:https://f-droid.org Source Code:https://gitlab.com/fdroid/fdroidclient Issue Tracker:https://gitlab.com/fdroid/fdroidclient/issues +Translation:https://hosted.weblate.org/projects/f-droid/f-droid Changelog:https://gitlab.com/fdroid/fdroidclient/raw/HEAD/CHANGELOG.md Donate:https://f-droid.org/about FlattrID:343053 diff --git a/tests/metadata/org.smssecure.smssecure.txt b/tests/metadata/org.smssecure.smssecure.txt index 655857ef..38ab004f 100644 --- a/tests/metadata/org.smssecure.smssecure.txt +++ b/tests/metadata/org.smssecure.smssecure.txt @@ -3,6 +3,7 @@ License:GPL-3.0 Web Site:http://www.smssecure.org Source Code:https://github.com/SMSSecure/SMSSecure Issue Tracker:https://github.com/SMSSecure/SMSSecure/issues +Translation:https://www.transifex.com/silence/silence Auto Name:SMSSecure Summary:Send encrypted text messages (SMS)