Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into frontier
  • Loading branch information
fidso committed Jan 26, 2025
2 parents aa6901f + 5aa188a commit d238687
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Content.Shared/Localizations/ContentLocalizationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public void Initialize()
{
var culture = new CultureInfo(Culture);

var fallbackCulture = new CultureInfo("en-US");

_loc.LoadCulture(culture);
_loc.AddFunction(culture, "PRESSURE", FormatPressure);
_loc.AddFunction(culture, "POWERWATTS", FormatPowerWatts);
Expand All @@ -39,7 +37,6 @@ public void Initialize()
_loc.AddFunction(culture, "NATURALFIXED", FormatNaturalFixed);
_loc.AddFunction(culture, "NATURALPERCENT", FormatNaturalPercent);
_loc.AddFunction(culture, "PLAYTIME", FormatPlaytime);
_loc.AddFunction(culture, "GASQUANTITY", FormatGasQuantity); // Frontier


/*
Expand All @@ -48,9 +45,20 @@ public void Initialize()
* This ensures the english translations continue to work as expected when fallbacks are needed.
*/
var cultureEn = new CultureInfo("en-US");
_loc.LoadCulture(cultureEn);
_loc.SetFallbackCluture(cultureEn); //estava escrito cluture, meu .net ta com problema, nao consigo ver se esse era mesma a void ou tinham digitado errado

_loc.AddFunction(cultureEn, "MAKEPLURAL", FormatMakePlural);
_loc.AddFunction(cultureEn, "MAKEPLURAL", FormatMakePlural); //isso deve arrumar o fallback
_loc.AddFunction(cultureEn, "MANY", FormatMany);
_loc.AddFunction(cultureEn, "POWERWATTS", FormatPowerWatts);
_loc.AddFunction(cultureEn, "POWERJOULES", FormatPowerJoules);
_loc.AddFunction(cultureEn, "UNITS", FormatUnits);
_loc.AddFunction(cultureEn, "TOSTRING", args => FormatToString(cultureEn, args));
_loc.AddFunction(cultureEn, "LOC", FormatLoc);
_loc.AddFunction(cultureEn, "NATURALFIXED", FormatNaturalFixed);
_loc.AddFunction(cultureEn, "NATURALPERCENT", FormatNaturalPercent);
_loc.AddFunction(cultureEn, "PLAYTIME", FormatPlaytime);
_loc.AddFunction(cultureEn, "PRESSURE", FormatPressure);
}

private ILocValue FormatMany(LocArgs args)
Expand Down

0 comments on commit d238687

Please sign in to comment.