Where can I find language source strings that are displayed in terminal for messages, warnings, errors etc

Solution 1:

There is not one place for all strings which show up in terminal. It depends on which package(s) are providing the command you run.

This is the list of the translation templates with the Spanish translations:

https://translations.launchpad.net/ubuntu/jammy/+lang/es

As regards your example, sudo apt upgrade, it's probably the apt template.

$ echo $(LANGUAGE=es gettext -d apt 'Do you want to continue?')
¿Desea continuar?