I'm indeed not Spanish, and I'm not particularly close with any of my Spanish colleagues either. This means we do not chat informally, and as such, I do not expect foul language - and indeed, they do not engage in any towards me. This very strongly indicates to me that they're perfectly aware what is the standard, where the lines lie, and what manner of conduct they should hold themselves to in a formal, professional setting. So we're culturally on the same page. They did not need any special training that I'm aware of to not push up foul language comments or commits either.
This is not about informal conduct. If they cuss among themselves or towards other colleagues who they are close to, that's completely of no interest to me, and as you say, is just plain normal. I do it with my closer peers as well all the time. This is about the work delivered and the formal communications. And I can understand if this informal speech seeps into work stuff at smaller scales, but that doesn't mean it's right. As you say, it's about everyone being on the same page and cutting themselves slack - but that does mean they are cutting slack, and so that there's a shared understanding of it not being proper, just being okay. According to the GP above though, this is not how it goes in Spain specifically, and it's an alternate reality there where commit histories and code comments will be full of cheap innuendo and cursing, and that that is somehow still completely professional there supposedly.
Well I'll be damned and be the ""cultural colonialist"" then, but I just do not buy that for one second. These standards were not invented yesterday, are not even specific to our industry, and are not nearly geo-localized enough for that to happen.