Skip to content

Commit

Permalink
Visual studio não quis enviar o restante da tradução
Browse files Browse the repository at this point in the history
  • Loading branch information
LaryNevesPR committed Jan 20, 2025
1 parent 822a3a6 commit b9dd675
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Content.Shared/Localizations/ContentLocalizationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public sealed class ContentLocalizationManager
[Dependency] private readonly ILocalizationManager _loc = default!;

// If you want to change your codebase's language, do it here.
private const string Culture = "en-US";
private const string Culture = "pt-BR";

/// <summary>
/// Custom format strings used for parsing and displaying minutes:seconds timespans.
Expand Down Expand Up @@ -44,9 +44,19 @@ 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);

_loc.AddFunction(cultureEn, "MAKEPLURAL", FormatMakePlural);
_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, "PRESSURE", FormatPressure);
}

private ILocValue FormatMany(LocArgs args)
Expand Down

0 comments on commit b9dd675

Please sign in to comment.