update: strip newlines from name/summary/video entries

These entries are hardcoded as a single line in all the app stores, so
newlines should be stripped to get the data simple to use.  This is in
contrast with the on-disk format for Fastlane and Triple-T, which includes
a newline in the title.txt and short_description.txt files.  I think all
files in those systems are normalized to end in a newline.
This commit is contained in:
Hans-Christoph Steiner 2020-01-13 18:54:28 +01:00
parent 3b5e3a62a3
commit 6ce22bff56
No known key found for this signature in database
GPG key ID: 3E177817BA1B9BFA
3 changed files with 11 additions and 8 deletions

View file

@ -714,7 +714,10 @@ def _set_localized_text_entry(app, locale, key, f):
with open(f, errors='replace') as fp:
text = fp.read()[:limit]
if len(text) > 0:
localized[key] = text
if key in ('name', 'summary', 'video'): # hardcoded as a single line
localized[key] = text.strip('\n')
else:
localized[key] = text
def _set_author_entry(app, key, f):