mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
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
This commit is contained in:
parent
eac391c58f
commit
05eef5a454
11 changed files with 15 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue