Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text output to console #49

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add text output to console #49

wants to merge 2 commits into from

Conversation

vicr123
Copy link
Owner

@vicr123 vicr123 commented Aug 16, 2023

This PR introduces a heading in console output when Parlance starts up, and gives information about the current status of the CLDR data.

@vicr123 vicr123 requested a review from reflectronic August 16, 2023 10:58
Comment on lines +31 to +45
var currentVersion = Cldr.Instance.CurrentVersion();
Console.WriteLine($"Current CLDR data version: {currentVersion}");
var latestVersion = await Cldr.LatestVersionAsync();
Console.WriteLine($"Latest CLDR data version: {latestVersion}");

if (currentVersion < latestVersion)
{
Console.WriteLine("Updating CLDR data. This may take some time.");
await Cldr.Instance.DownloadAsync(latestVersion);
Console.WriteLine("CLDR data was updated.");
}
else
{
Console.WriteLine("The CLDR data is up to date.");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use ILogger

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is ILogger available before DI is resolved?

@vicr123 vicr123 force-pushed the features/console-head branch from c59827a to 93c4b03 Compare June 6, 2024 23:05
@vicr123 vicr123 force-pushed the features/console-head branch from 93c4b03 to 890347b Compare June 30, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants