must be PNG or JPEG files ending with ".png", ".jpg", or ".jpeg"
and must be in the following layout:
# TODO replace these docs with link to All_About_Descriptions_Graphics_and_Screenshots
- # TODO mention that the 'localized' section is not in metadata.yml, so key names are like Java vars: camelCase with first letter lowercase.
+
repo/packageName/locale/featureGraphic.png
repo/packageName/locale/phoneScreenshots/1.png
repo/packageName/locale/phoneScreenshots/2.png
The changelog files must be text files named with the versionCode
ending with ".txt" and must be in the following layout:
- https://github.com/fastlane/fastlane/blob/1.109.0/supply/README.md#changelogs-whats-new
+ https://github.com/fastlane/fastlane/blob/2.28.7/supply/README.md#changelogs-whats-new
repo/packageName/locale/changelogs/12345.txt
metadata/ folder and the apps' source repos for standard locations
of graphic and screenshot files. If it finds them, it will copy
them into the repo. The fastlane files follow this pattern:
- https://github.com/fastlane/fastlane/blob/1.109.0/supply/README.md#images-and-screenshots
+ https://github.com/fastlane/fastlane/blob/2.28.7/supply/README.md#images-and-screenshots
"""
logging.debug(packageName + ' does not have app metadata, skipping l18n scan.')
continue
locale = segments[-1]
- destdir = os.path.join('repo', packageName, locale)
for f in files:
if f == 'full_description.txt':
_set_localized_text_entry(apps[packageName], locale, 'description',
os.path.join(root, f))
continue
elif f == str(apps[packageName]['CurrentVersionCode']) + '.txt':
- _set_localized_text_entry(apps[packageName], segments[-2], 'whatsNew',
+ locale = segments[-2]
+ _set_localized_text_entry(apps[packageName], locale, 'whatsNew',
os.path.join(root, f))
continue
base, extension = common.get_extension(f)
+ if locale == 'images':
+ locale = segments[-2]
+ destdir = os.path.join('repo', packageName, locale)
if base in GRAPHIC_NAMES and extension in ALLOWED_EXTENSIONS:
os.makedirs(destdir, mode=0o755, exist_ok=True)
logging.debug('copying ' + os.path.join(root, f) + ' ' + destdir)
fdroidserver.update.options = fdroidserver.common.options
os.chdir(os.path.join(localmodule, 'tests'))
+ shutil.rmtree(os.path.join('repo', 'info.guardianproject.urzip'), ignore_errors=True)
+
apps = dict()
for packageName in ('info.guardianproject.urzip', 'org.videolan.vlc', 'obb.mainpatch.current'):
apps[packageName] = dict()
apps['info.guardianproject.urzip']['CurrentVersionCode'] = 100
fdroidserver.update.insert_localized_app_metadata(apps)
+ appdir = os.path.join('repo', 'info.guardianproject.urzip', 'en-US')
+ self.assertTrue(os.path.isfile(os.path.join(appdir, 'icon.png')))
+ self.assertTrue(os.path.isfile(os.path.join(appdir, 'featureGraphic.png')))
+
self.assertEqual(3, len(apps))
for packageName, app in apps.items():
self.assertTrue('localized' in app)
self.assertTrue('en-US' in app['localized'])
self.assertEqual(1, len(app['localized']))
if packageName == 'info.guardianproject.urzip':
- self.assertEqual(5, len(app['localized']['en-US']))
+ self.assertEqual(7, len(app['localized']['en-US']))
self.assertEqual('full description\n', app['localized']['en-US']['description'])
self.assertEqual('title\n', app['localized']['en-US']['name'])
self.assertEqual('short description\n', app['localized']['en-US']['summary'])
self.assertEqual('video\n', app['localized']['en-US']['video'])
+ self.assertEqual('icon.png', app['localized']['en-US']['icon'])
+ self.assertEqual('featureGraphic.png', app['localized']['en-US']['featureGraphic'])
self.assertEqual('100\n', app['localized']['en-US']['whatsNew'])
elif packageName == 'org.videolan.vlc':
self.assertEqual('icon.png', app['localized']['en-US']['icon'])
fdroidserver.update.options = type('', (), {})()
fdroidserver.update.options.clean = True
+ fdroidserver.update.options.rename_apks = False
fdroidserver.update.options.delete_unknown = True
for icon_dir in fdroidserver.update.get_all_icon_dirs('repo'):