function PseudoLocalize.addToLocalizationTable(V,L,B)local U=L or DEFAULT_PSEUDO_LOCALE_ID local A=B or"\101\110"local m=V:GetEntries()for V,L in pairs(m)do if not L.Values[U]then local V=L.Values[A]if V then L.Values[U]=PseudoLocalize.pseudoLocalize(V)else warn(("\091\080\115\101\117\100\111\076\111\099\097\108\105\122\101\046\097\100\100\084\111\076\111\099\097\108\105\122\097\116\105\111\110\084\097\098\108\101\093 - \078\111 \101\110\116\114\121 \105\110 \107\101\121 \037\113 \102\111\114 \108\111\099\097\108\101 \037\113"):format(L.Key,A))end end end V:SetEntries(m)end
--[=[
    Parses a localization table and adds a pseudo localized locale to the table.

    @param localizationTable LocalizationTable -- LocalizationTable to add to.
    @param preferredLocaleId string? -- Preferred locale to use. Defaults to "qlp-pls"
    @param preferredFromLocale string? -- Preferred from locale. Defaults to "en-us"
    @return string -- The translated line
]=]
function PseudoLocalize.addToLocalizationTable(localizationTable, preferredLocaleId, preferredFromLocale)
	local localeId = preferredLocaleId or DEFAULT_PSEUDO_LOCALE_ID
	local fromLocale = preferredFromLocale or "en"

	local entries = localizationTable:GetEntries()
	for _, entry in pairs(entries) do
		if not entry.Values[localeId] then
			local line = entry.Values[fromLocale]
			if line then
				entry.Values[localeId] = PseudoLocalize.pseudoLocalize(line)
			else
				warn(
					("[PseudoLocalize.addToLocalizationTable] - No entry in key %q for locale %q"):format(
						entry.Key,
						fromLocale
					)
				)
			end
		end
	end

	localizationTable:SetEntries(entries)
end
