MCPcopy Create free account
hub / github.com/GRAnimated/MinecraftLCE / stringReplacements

Method stringReplacements

tools/parse_languages_loc.py:178–188  ·  view source on GitHub ↗
(self, string: str)

Source from the content-addressed store, hash-verified

176 return unique_name
177
178 def stringReplacements(self, string: str):
179 # some things that we can shorten
180 string = re.sub(r"Minecraft: .* Edition", "Console", string)
181 string = string.replace("n't", "nt") # can't -> nt
182 string = string.replace(" the", "")
183 string = string.replace(" the", "")
184 string = string.replace(" ", " ") # double spaces
185
186 # confirm messages
187 string = string.replace("Are you sure you want to ", "")
188 return string
189
190 def sanitizeString(self, string: str):
191 string = string.replace("\n",r"\n").replace("\r",r"\r").replace("\t",r"\t")

Callers 1

createHeaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected