Files
Sergio Costas 61be59e81d usersession: Use the app name from .desktop file in notifications (#13678)
* usersession: Use the app name from .desktop file in notifications

Currently, when a notification is shown to the user to inform
they that there is an update for an open snap, the snap name is
used, which can be misleading to the user.

This PR uses the application name from the .desktop file, taking
into account the current locale of the user.

* Add tests for localized name getter

* Take into account the instance key

* Change variable name

* Code simplification

* Try to pass the static analyzer

* Revert "Try to pass the static analyzer"

This reverts commit 3c031bef098d1a1fab6afad02aa456a80fb84154.

* Another try to pass the static analyzer

* Revert "Another try to pass the static analyzer"

This reverts commit 39a37d9e129d1220566e7da9e4be4dd2d3f7324f.

* Added extra tests to check notification text

These four tests ensure that the notification text is correct
when there is an instance key and/or there is a .desktop file
from where a translatable name can be obtained.

* Renamed TestGuessAppIcon... to TestGuessAppData...
2024-05-31 17:10:55 +02:00
..