Skip to content

Commit

Permalink
checkAPT: Don't use upstream descriptions for snap pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
clefebvre committed Mar 27, 2024
1 parent 20f346e commit 054667f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions usr/lib/linuxmint/mintUpdate/checkAPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

meta_names = []

# packages which description is incorrect in Ubuntu (usually those which were replaced by snap dependencies)
NON_TRANSLATED_PKGS = ["firefox", "thunderbird"]

class APTCheck():

def __init__(self):
Expand Down Expand Up @@ -281,8 +284,9 @@ def apply_l10n_descriptions(self):
# Add missing punctuation
if len(value) > 0 and value[-1] not in [".", "!", "?"]:
value = "%s." % value
update.short_description = value
update.description = ""
if update.source_name not in NON_TRANSLATED_PKGS:
update.short_description = value
update.description = ""
except Exception as e:
print(e)
print(sys.exc_info()[0])
Expand Down Expand Up @@ -316,7 +320,8 @@ def apply_l10n_descriptions(self):
# Add missing punctuation
if len(value) > 0 and value[-1] not in [".", "!", "?"]:
value = "%s." % value
update.description += description
if update.source_name not in NON_TRANSLATED_PKGS:
update.description += description
except Exception as e:
print (e)
print(sys.exc_info()[0])
Expand Down

0 comments on commit 054667f

Please sign in to comment.