There are many ways 「という」 works, but in this type of sentence, I think you can voice it as the word that
.
Although you understand the meaning of the sentence correctly, your literal translation leads me to suspect you are parsing it incorrectly. (I'm sorry if that's not the case.)
X からといって Y ということにはならない
This is a frequently used construct in the form 「X からといって Y ということにはならない」. Remember that ことになる
here can be voiced as make it fact
. So ことにならない
is doesn't make it fact
. And notice that the といって
is also a form of という
.
X ←[ から(because) ][ といって(that) ] Y←[ という(that) ][ ことにはならない(doesn't make it fact) ]
Reorder the words, and you get “Because that X, doesn't make it fact that Y”. (= Just because X is true, doesn't mean that Y is true)
Now, take the translations of 「他人が悪い事をしている (Other people are doing bad things)」「自分もそうしてよい (It is fine for one to do so also)」, and insert them in as the X and Y. This procedure will work for other sentences in this format (e.g. 「自分ができないからといって、あきらめていいということにはならない」「値段{ねだん}が高いからといって、おいしいということにはならない」).
Similar uses of という
Maybe visualize it as a pointer:
- 王子が結婚した という(→) ニュース (news ← that is "the prince married")
- 彼が生きている という(→) うわさ (rumor ← that is "he is alive")
- コーヒーが飲みたい という(→) 気持ち (feeling ← that is "wanting to drink coffee")
- iPhone 6 という(→) スマートフォン (smartphone ← that is "iPhone 6")
- 女性が多い という(→) 情報 (information ← that is "there are many women")
Using this pointer image, maybe you can also visualize 「これは X という (This is called X)」 reordered, as:
X という(→) これ (this ← that is "X")
Hope that helps in some way.