Skip to content

Commit e56ee17

Browse files
committed
Remove lane to trim keywords text files longer than 100 chars
Trimming too long keywords client side is the wrong solution to the problem of having keywords that are too long. Because keywords change sporadically, it's much better to edit the localization source on the GlotPress end. And even better long term fix would be to add a character limit to GlotPress. I don't know how to do that know but I'll get in touch with folks that might help with that. See discussion at #1201 (comment)
1 parent 7de433c commit e56ee17

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

fastlane/Fastfile

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -106,44 +106,6 @@ end
106106
release_version: options[:version])
107107
end
108108

109-
# This lane lacks documentation because it ought to be part of the localized
110-
# metadata download script instead!
111-
desc "Updates the files with the localized keywords values for App Store Connect to match the 100 characters requirement"
112-
lane :sanitize_appstore_keywords do | options |
113-
Dir["./metadata/**"].each do |locale_dir|
114-
keywords_path = File.join(locale_dir, 'keywords.txt')
115-
116-
unless File.exists?(keywords_path)
117-
UI.message "Could not find keywords file in #{locale_dir}. Skipping."
118-
next
119-
end
120-
121-
keywords = File.read(keywords_path)
122-
app_store_connect_keywords_length_limit = 100
123-
124-
if keywords.length <= app_store_connect_keywords_length_limit
125-
UI.verbose "#{keywords_path} has less than #{app_store_connect_keywords_length_limit} characters. Not trimming."
126-
next
127-
end
128-
129-
UI.message "#{keywords_path} has more than #{app_store_connect_keywords_length_limit} characters. Trimming it..."
130-
131-
case File.basename(locale_dir)
132-
when 'ar-SA'
133-
separator = '،'
134-
else
135-
separator = ','
136-
end
137-
138-
until keywords.length <= app_store_connect_keywords_length_limit do
139-
keywords = keywords.split(separator)[0...-1].join(separator)
140-
puts keywords
141-
end
142-
143-
File.write(keywords_path, keywords)
144-
end
145-
end
146-
147109
#####################################################################################
148110
# new_beta_release
149111
# -----------------------------------------------------------------------------------

0 commit comments

Comments
 (0)