mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
Merge branch 'fdroiddata-localization-fixes' into 'master'
fdroiddata localization fixes See merge request !283
This commit is contained in:
commit
c687a5c65d
3 changed files with 6 additions and 9 deletions
|
@ -88,8 +88,6 @@ regex_checks = {
|
||||||
"Unnecessary trailing space"),
|
"Unnecessary trailing space"),
|
||||||
],
|
],
|
||||||
'Summary': [
|
'Summary': [
|
||||||
(re.compile(r'^$'),
|
|
||||||
"Summary yet to be filled"),
|
|
||||||
(re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
|
(re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
|
||||||
"No need to specify that the app is Free Software"),
|
"No need to specify that the app is Free Software"),
|
||||||
(re.compile(r'.*((your|for).*android|android.*(app|device|client|port|version))', re.IGNORECASE),
|
(re.compile(r'.*((your|for).*android|android.*(app|device|client|port|version))', re.IGNORECASE),
|
||||||
|
@ -102,8 +100,6 @@ regex_checks = {
|
||||||
"Unnecessary trailing space"),
|
"Unnecessary trailing space"),
|
||||||
],
|
],
|
||||||
'Description': [
|
'Description': [
|
||||||
(re.compile(r'^No description available$'),
|
|
||||||
"Description yet to be filled"),
|
|
||||||
(re.compile(r'\s*[*#][^ .]'),
|
(re.compile(r'\s*[*#][^ .]'),
|
||||||
"Invalid bulleted list"),
|
"Invalid bulleted list"),
|
||||||
(re.compile(r'^\s'),
|
(re.compile(r'^\s'),
|
||||||
|
|
|
@ -1225,8 +1225,8 @@ def write_plaintext_metadata(mf, app, w_comment, w_field, w_build):
|
||||||
mf.write('\n')
|
mf.write('\n')
|
||||||
w_field_nonempty('Name')
|
w_field_nonempty('Name')
|
||||||
w_field_nonempty('Auto Name')
|
w_field_nonempty('Auto Name')
|
||||||
w_field_always('Summary')
|
w_field_nonempty('Summary')
|
||||||
w_field_always('Description', description_txt(app.Description))
|
w_field_nonempty('Description', description_txt(app.Description))
|
||||||
mf.write('\n')
|
mf.write('\n')
|
||||||
if app.RequiresRoot:
|
if app.RequiresRoot:
|
||||||
w_field_always('Requires Root', 'yes')
|
w_field_always('Requires Root', 'yes')
|
||||||
|
|
|
@ -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]*', '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]*'))
|
sourcedirs += glob.glob(os.path.join('metadata', '[A-Za-z]*', '[a-z][a-z]*'))
|
||||||
|
|
||||||
for d in sorted(sourcedirs):
|
for d in sorted(sourcedirs):
|
||||||
|
@ -716,15 +717,15 @@ def insert_localized_app_metadata(apps):
|
||||||
continue
|
continue
|
||||||
locale = segments[-1]
|
locale = segments[-1]
|
||||||
for f in files:
|
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',
|
_set_localized_text_entry(apps[packageName], locale, 'description',
|
||||||
os.path.join(root, f))
|
os.path.join(root, f))
|
||||||
continue
|
continue
|
||||||
elif f == 'short_description.txt':
|
elif f in ('summary.txt', 'short_description.txt'):
|
||||||
_set_localized_text_entry(apps[packageName], locale, 'summary',
|
_set_localized_text_entry(apps[packageName], locale, 'summary',
|
||||||
os.path.join(root, f))
|
os.path.join(root, f))
|
||||||
continue
|
continue
|
||||||
elif f == 'title.txt':
|
elif f in ('name.txt', 'title.txt'):
|
||||||
_set_localized_text_entry(apps[packageName], locale, 'name',
|
_set_localized_text_entry(apps[packageName], locale, 'name',
|
||||||
os.path.join(root, f))
|
os.path.join(root, f))
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue