Repository navigation
Revamp: resource-based localization, bug fixes, naming cleanup, .NET 10 - #2
Merged
Merged
Conversation
- Implemented localization using RESX resource files (`Resources.resx` and `Resources.de.resx`) for multi-language support (e.g., de-DE). - Removed `langVal` class and replaced hardcoded strings with resource-based localization. - Added `LanguageLoader` class to handle language and culture settings dynamically. - Migrated HTTP requests from `HttpWebRequest` to `HttpClient` for modernized and efficient networking. - Improved error handling for network and HTTP exceptions with localized messages. - Removed deprecated functions (`TranslationMaker`, `langHandler`) and unused dependencies. - Optimized code with modern C# features (e.g., `string.IsNullOrEmpty`, String-Interpolation, `using` statements). - Enhanced user interface with consistent and localized console output. - Updated project file (`Reaper.csproj`) to support resource file integration and satellite assemblies. - Improved SFTP integration with cleaner code and parameterized constructors. - Overhauled mail functionality to use localized strings and improve usability. - Ensured consistent naming conventions (e.g., `IRExcecute` -> `IRExecute`). - Removed old language files and replaced them with resource-based localization.
Remove redundant comment
--- updated-dependencies: - dependency-name: SSH.NET dependency-version: 2026.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
An empty bcc now means no BCC mail. The old marker was the localized "no"/"nein", so a config written in one language crashed Bcc.Add when used in the other. Legacy "no"/"nein" values are still accepted.
Properties keep their JSON keys through JsonPropertyName.
Use the proxy handler in APICall instead of leaving it unused.
Fixes IDE0028, IDE0290, IDE0300 and IDE0305.
A timeout throws TaskCanceledException, which the HttpRequestException catch missed, so the app continued with the API unreachable.
Nothing created it after the langFiles directory handling was removed, so the first config write failed.
Initialize model properties, default ReadLine results to empty strings, guard the default proxy and throw on an empty weather response.
DeviceOfflineDetails and ExceptionRaisedFormat lacked the leading line break of the neutral resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the JSON language-file system with standard .NET resources (English and German), fixes several bugs found along the way, cleans up naming and analyzer violations, and moves the project from net6.0 to net10.0.
Changes
Localization
Properties/Resources.resxandResources.de.resx.LanguageLoadermaps the chosen language to a culture and an OpenWeatherMap language code.TranslationMaker, thelangValmodel and thelangFilesdownload in superuser mode. Only English and German are offered for now.de-DE, so English output now uses.decimals and English date formats.Bug fixes
&&, so it could never fail. It now uses||.nein) crashedBcc.Addin an English run. The setup now asks a yes/no question and stores an emptybccfor "no". Oldno/neinvalues are still accepted.Desktop\Reaperis created again. Nothing created it after thelangFileshandling was removed, so the first config write failed.HttpClienttimeout throwsTaskCanceledException, which theHttpRequestExceptioncatch missed, so the app carried on with the API unreachable. It now exits like other network errors.APICallbuilt a proxy handler but never passed it to theHttpClient. It is now used, so the default proxy and Windows credentials apply.DeviceOfflineDetailsandExceptionRaisedFormatnow start with the same whitespace as the neutral resources.Code quality
[JsonPropertyName]), IDE0044, IDE0059, IDE0060, IDE0028, IDE0290, IDE0300, IDE0305, CA2211 and CA1854.ReadLine()results default to empty strings, and an empty weather response throwsInvalidOperationExceptioninstead of a laterNullReferenceException.Framework
System.Formats.Asn1dependency produced a TFM warning).mainalready contains the SSH.NET bump through Bump SSH.NET from 2020.0.2 to 2026.0.0 #1, so that commit overlaps with this branch. The merge is clean.Behavior to be aware of
config.jsonkeeps its existing keys, so existing configs still load.null.CfgCheckertreats both as missing.Testing
Verified:
dotnet buildon net10: 0 errors, 0 warnings.dotnet formatstyle and analyzer checks report nothing at info severity.Configand the weather response model, run in a throwaway project, produces the same keys and values as before the renames.HttpClienttimeout throwsTaskCanceledExceptionon .NET 8, which the new catch filter handles.Not verified, because the app is interactive and needs live services. Please run these before merging:
Desktop\Reaper).