When notice templates of a given type are defined for a specific library, but not in all languages, we would likely expect Koha to select the template of that type for the given library in the default language, rather than a generic template in the requested language. For example, if we are looking for: { branch: 'BRANCH', lang: 'es-ES', code: 'CHECKOUT' } and such a template does not exist, we would prefer: { branch: 'BRANCH', lang: 'default', code: 'CHECKOUT' } over: { branch: '', lang: 'es-ES', code: 'CHECKOUT' }. However, Koha currently prioritizes language matching over library matching and therefore returns the template: { branch: '', lang: 'es-ES', code: 'CHECKOUT' }.