1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

Merge branch 'fdroiddata-localization-fixes' into 'master'

fdroiddata localization fixes

See merge request !283
This commit is contained in:
Boris Kraut 2017-06-08 01:54:34 +00:00
commit c687a5c65d
3 changed files with 6 additions and 9 deletions

View File

@ -88,8 +88,6 @@ regex_checks = {
"Unnecessary trailing space"),
],
'Summary': [
(re.compile(r'^$'),
"Summary yet to be filled"),
(re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
"No need to specify that the app is Free Software"),
(re.compile(r'.*((your|for).*android|android.*(app|device|client|port|version))', re.IGNORECASE),
@ -102,8 +100,6 @@ regex_checks = {
"Unnecessary trailing space"),
],
'Description': [
(re.compile(r'^No description available$'),
"Description yet to be filled"),
(re.compile(r'\s*[*#][^ .]'),
"Invalid bulleted list"),
(re.compile(r'^\s'),

View File

@ -1225,8 +1225,8 @@ def write_plaintext_metadata(mf, app, w_comment, w_field, w_build):
mf.write('\n')
w_field_nonempty('Name')
w_field_nonempty('Auto Name')
w_field_always('Summary')
w_field_always('Description', description_txt(app.Description))
w_field_nonempty('Summary')
w_field_nonempty('Description', description_txt(app.Description))
mf.write('\n')
if app.RequiresRoot:
w_field_always('Requires Root', 'yes')

View File

@ -703,6 +703,7 @@ def insert_localized_app_metadata(apps):
"""
sourcedirs = glob.glob(os.path.join('build', '[A-Za-z]*', 'fastlane', 'metadata', 'android', '[a-z][a-z]*'))
sourcedirs += glob.glob(os.path.join('build', '[A-Za-z]*', 'metadata', '[a-z][a-z]*'))
sourcedirs += glob.glob(os.path.join('metadata', '[A-Za-z]*', '[a-z][a-z]*'))
for d in sorted(sourcedirs):
@ -716,15 +717,15 @@ def insert_localized_app_metadata(apps):
continue
locale = segments[-1]
for f in files:
if f == 'full_description.txt':
if f in ('description.txt', 'full_description.txt'):
_set_localized_text_entry(apps[packageName], locale, 'description',
os.path.join(root, f))
continue
elif f == 'short_description.txt':
elif f in ('summary.txt', 'short_description.txt'):
_set_localized_text_entry(apps[packageName], locale, 'summary',
os.path.join(root, f))
continue
elif f == 'title.txt':
elif f in ('name.txt', 'title.txt'):
_set_localized_text_entry(apps[packageName], locale, 'name',
os.path.join(root, f))
continue