Skip to content

Commit b351a94

Browse files
committed
Added Hebrew localizations and scripts. README fixed.
1 parent d0be488 commit b351a94

8 files changed

Lines changed: 997 additions & 38 deletions

File tree

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project>
2-
<!--
2+
<!--
33
Local Development Configuration
44
===============================
55
Set UseLocalFlowery to true to use a local project reference instead of NuGet.
66
This is useful for debugging Flowery.NET alongside this application.
7-
7+
88
IMPORTANT: Do not commit this file with UseLocalFlowery=true
99
-->
1010
<PropertyGroup>
1111
<!-- Toggle this to switch between NuGet and local project reference -->
1212
<UseLocalFlowery>true</UseLocalFlowery>
13-
13+
1414
<!-- Path to Flowery.NET project (relative to this file) -->
1515
<FloweryPath>D:\github\Flowery.NET\Flowery.NET</FloweryPath>
1616
</PropertyGroup>

OpenSourceToolkit.NET.png

149 KB
Loading

OpenSourceToolkit.NET/Localization/ToolkitLocalization.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class ToolkitLocalization : INotifyPropertyChanged
4646
{
4747
("en", "English"),
4848
("ar", "العربية"),
49+
("he", "עברית"),
4950
("de", "Deutsch"),
5051
("es", "Español"),
5152
("fr", "Français"),

OpenSourceToolkit.NET/Localization/he.json

Lines changed: 680 additions & 0 deletions
Large diffs are not rendered by default.

OpenSourceToolkit.NET/OpenSourceToolkit.NET.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<EmbeddedResource Include="Localization\it.json" />
2424
<EmbeddedResource Include="Localization\ja.json" />
2525
<EmbeddedResource Include="Localization\ko.json" />
26+
<EmbeddedResource Include="Localization\he.json" />
2627
<EmbeddedResource Include="Localization\ar.json" />
2728
<EmbeddedResource Include="Localization\tr.json" />
2829
<EmbeddedResource Include="Localization\uk.json" />

README.md

Lines changed: 153 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1+
<!-- markdownlint-disable MD033 -->
2+
<!-- markdownlint-disable MD041 -->
3+
14
# OpenSourceToolkit.Net
25

3-
A comprehensive C# .NET Framework 4.7.2 port of the utilities and tools found in the main **[OpenSourceToolkit](https://github.com/truethari/OpensourceToolkit/)** project. **Special thanks to the original author [truethari](https://github.com/truethari) for the incredible work.**
6+
![OpenSourceToolkit.NET Screenshot](OpenSourceToolkit.NET.png)
7+
8+
Originally started as a C#/.NET 8 port of the utilities and tools found in the inspiring **[OpenSourceToolkit](https://github.com/truethari/OpensourceToolkit/)** project, and has since been extended with additional tools and features (including a full Avalonia desktop app to explore everything interactively). **Special thanks to the original author [truethari](https://github.com/truethari) for their incredible work.**
9+
10+
This suite provides reusable, modular components for text manipulation, security, networking, hardware testing, and more. Crucially, it includes a full **Avalonia UI application** that allows users to interactively test and verify most functions of the **40+ tools (currently 41)** and libraries in a modern desktop interface.
11+
12+
Porting was mainly done by help of AI, but I spent hundreds of hours tweaking
13+
the tools, adding translations, add more features and simultaneously enhancing
14+
my [Flowery.NET component suite](https://github.com/tobitege/Flowery.NET) for the UI.
15+
16+
<div align="center">
17+
18+
🌐 **Localized in 12 languages** including:
419

5-
This project is a **pure AI-driven port** executed using **Gemini 3 Pro** and **GPT-5.1**.
20+
🇯🇵 日本語にローカライズ済み &nbsp;&nbsp; 🇰🇷 한국어로 현지화됨 &nbsp;&nbsp; 🇨🇳 已本地化为简体中文
621

7-
This suite provides reusable, modular components for text manipulation, security, networking, hardware testing, and more. Crucially, it includes a full **Avalonia UI application** that allows users to interactively test and verify all functions of the **25+ separate tools** and libraries in a modern desktop interface.
22+
🇺🇦 Локалізовано українською &nbsp;&nbsp; 🇸🇦 مترجم للعربية &nbsp;&nbsp; 🇮🇱 מתורגם לעברית
23+
24+
</div>
825

926
## 🚀 Overview
1027

11-
- **Framework**: .NET Framework 4.7.2
12-
- **Language**: C# 7.3
13-
- **Output**: Reusable DLLs (Class Libraries) and Console Applications.
28+
- **Frameworks**: .NET 8 (`net8.0` libraries + `net8.0-windows` desktop app)
29+
- **Language**: C# (LangVersion: `latest`)
30+
- **Output**: Reusable DLLs (class libraries) and a desktop GUI (WinExe).
1431
- **Architecture**: Modular design with a core library and specialized domain libraries.
1532

1633
## 📁 Project Structure
@@ -19,8 +36,9 @@ The solution `OpenSourceToolkit.Net.sln` is organized into the following project
1936

2037
### **OpenSourceToolkit.NET**
2138

22-
- **Full GUI Application** to test all 25+ tools interactively.
23-
- Dependencies: All of the below, `Avalonia`
39+
- **Avalonia desktop application (GUI)** to test all tools interactively.
40+
- Target framework: `net8.0-windows`
41+
- Dependencies: All of the below, `Avalonia`, `Flowery.NET`
2442

2543
| Project | Description | Dependencies |
2644
|---------|-------------|--------------|
@@ -37,15 +55,88 @@ The solution `OpenSourceToolkit.Net.sln` is organized into the following project
3755
| **OpenSourceToolkit.Colors** | Color format converters (HEX, RGB, HSL). | `System.Drawing.Common` |
3856
| **OpenSourceToolkit.Hardware** | Hardware testing abstractions for Keyboard, Speaker, Mic, and Camera. | `NAudio` |
3957
| **OpenSourceToolkit.Calculators** | Financial calculators (Compound Interest, Loan Payments, ROI). | None |
40-
| **OpenSourceToolkit.Demo** | Console application demonstrating usage of the libraries. | All of the above |
4158
| **OpenSourceToolkit.Tests** | MSTest unit tests for ensuring parity and correctness. | MSTest |
4259

60+
> Note: This repository also contains `OpenSourceToolkit.AI` (a .NET 8 library), but it is not included in `OpenSourceToolkit.Net.sln` by default.
61+
62+
## 🧰 Tool Catalog (GUI)
63+
64+
The desktop app (`OpenSourceToolkit.NET`) currently includes **41 tools**, grouped in the sidebar as follows:
65+
66+
### Media & Files
67+
68+
- Image Editor
69+
- Folder Analyzer
70+
- ASCII Art Generator
71+
- PDF Tools
72+
- Clipboard Image Saver
73+
- Audio Noise Reduction
74+
- Fonts Viewer
75+
76+
### Generators
77+
78+
- UUID Generator
79+
- Lorem Ipsum Generator
80+
- Mock Data Generator
81+
- Privacy Policy Generator
82+
- QR Code Generator
83+
- Password Generator
84+
- VCard Generator
85+
86+
### Converters
87+
88+
- Text Case Converter
89+
- Timestamp Converter
90+
- Base64 Converter
91+
- Color Toolkit
92+
- Ethereum Converter
93+
- JSON Formatter
94+
95+
### Security
96+
97+
- Hash Generator
98+
- HMAC Generator
99+
- JWT Debugger
100+
101+
### Networking
102+
103+
- Uptime Monitor
104+
- DNS Lookup
105+
- IP Location
106+
- IP Calculator
107+
- Speed Test
108+
109+
### Development
110+
111+
- Cron Scheduler
112+
- API Tester
113+
- Next.js Image Decoder
114+
- Regex Tester
115+
- Diff Checker
116+
- SQL Formatter
117+
- Markdown Editor
118+
- Theme Testing
119+
120+
### Hardware
121+
122+
- Hardware Tester
123+
- Keyboard Tester
124+
- Stopwatch & Timer
125+
126+
### Math
127+
128+
- Scientific Calculator
129+
130+
### Finance
131+
132+
- Financial Calculator
133+
43134
## 🛠️ Building & Running
44135

45136
### Prerequisites
46137

47-
- .NET SDK (capable of targeting .NET Framework 4.7.2)
48-
- Windows OS (recommended for Hardware/Audio/System.Drawing dependencies)
138+
- .NET 8 SDK
139+
- Windows (required for the `OpenSourceToolkit.NET` desktop app, and for projects targeting `net8.0-windows`)
49140

50141
### Build
51142

@@ -55,38 +146,51 @@ To build the entire solution, run the following command in this directory:
55146
dotnet build
56147
```
57148

58-
**Note**: The build is configured via `Directory.Build.props` to output all artifacts to a common directory:
149+
**Note**: Debug builds are configured to output artifacts to a common directory:
59150

60-
- **Debug**: `bin\Debug\net472\`
61-
- **Release**: `bin\Release\net472\`
151+
- **Debug**: `bin\debug\net8.0\` and `bin\debug\net8.0-windows\`
62152

63153
### Run Avalonia App (GUI)
64154

65155
The best way to explore the toolkit is via the Avalonia UI app, which provides a dedicated interface for every tool:
66156

67157
```bash
68-
.\bin\Debug\net472\OpenSourceToolkit.NET.exe
158+
.\bin\debug\net8.0-windows\OpenSourceToolkit.NET.exe
69159
```
70160

71-
### Run Demo (Console)
161+
### Run Tests
72162

73-
You can also run the console demo application:
163+
To execute the unit tests:
74164

75165
```bash
76-
.\bin\Debug\net472\OpenSourceToolkit.Demo.exe
166+
dotnet test
77167
```
78168

79-
### Run Tests
169+
### Scripts (PowerShell)
80170

81-
To execute the 48 test cases in the unit tests:
171+
For convenience, the repo includes two PowerShell scripts under `scripts/` to build and run the Avalonia desktop app.
82172

83-
```bash
84-
dotnet test
173+
- **`scripts/build_desktop.ps1`**: builds `OpenSourceToolkit.NET` (optionally also `OpenSourceToolkit.Tests`)
174+
- Examples:
175+
176+
```powershell
177+
pwsh ./scripts/build_desktop.ps1
178+
pwsh ./scripts/build_desktop.ps1 -Configuration Release
179+
pwsh ./scripts/build_desktop.ps1 -IncludeTests
180+
pwsh ./scripts/build_desktop.ps1 -NoRestore
181+
```
182+
183+
- **`scripts/run_desktop.ps1`**: builds and starts `OpenSourceToolkit.NET` in the background
184+
- Examples:
185+
186+
```powershell
187+
pwsh ./scripts/run_desktop.ps1
188+
pwsh ./scripts/run_desktop.ps1 -Configuration Release
85189
```
86190

87191
## 📦 Usage Examples
88192

89-
### Text & Data
193+
### Text & Data library
90194

91195
```csharp
92196
using OpenSourceToolkit.TextData;
@@ -99,7 +203,7 @@ var generator = new LoremIpsumGenerator();
99203
string text = generator.GenerateSentences(3);
100204
```
101205

102-
### Security
206+
### Security library
103207

104208
```csharp
105209
using OpenSourceToolkit.Security;
@@ -111,7 +215,7 @@ string md5 = HashGenerator.ComputeMd5("OpenSourceToolkit");
111215
string token = JwtHelper.GenerateToken("secret_key", "issuer", "audience");
112216
```
113217

114-
### Networking
218+
### Networking library
115219

116220
```csharp
117221
using OpenSourceToolkit.Networking;
@@ -122,7 +226,7 @@ var result = await monitor.CheckAsync("https://google.com");
122226
Console.WriteLine($"Is Up: {result.IsUp}");
123227
```
124228

125-
### Hardware (Windows)
229+
### Hardware (Windows) library
126230

127231
```csharp
128232
using OpenSourceToolkit.Hardware;
@@ -145,14 +249,24 @@ The project relies on high-quality open-source packages:
145249
- **[NCrontab](https://github.com/atifaziz/NCrontab)**: Cron parsing.
146250
- **[NAudio](https://github.com/naudio/NAudio)**: Audio playback and capture.
147251
- **[Avalonia](https://github.com/AvaloniaUI/Avalonia)**: Cross-platform UI framework.
148-
- **[Flowery.NET](https://github.com/tobitege/Flowery.NET)**: DaisyUI component library for Avalonia. **Requires v1.0.9 or later** (for `CustomThemeApplicator` support).
252+
- **[Flowery.NET](https://github.com/tobitege/Flowery.NET)**: Themed component library for Avalonia. **Requires v1.7.2 or later** (for `CustomThemeApplicator` support).
149253

150254
## 🌍 Localization
151255

152256
The application supports multiple languages with runtime switching. Currently supported:
153257

154-
- **English (en-US)** - Default
155-
- **German (de-DE)** - Full translation
258+
- **English (en)** - Default / fallback
259+
- **Arabic (ar)**
260+
- **Hebrew (he)**
261+
- **German (de)**
262+
- **Spanish (es)**
263+
- **French (fr)**
264+
- **Italian (it)**
265+
- **Japanese (ja)**
266+
- **Korean (ko)**
267+
- **Turkish (tr)**
268+
- **Ukrainian (uk)**
269+
- **Chinese (Simplified) (zh-Hans)**
156270

157271
### For Users
158272

@@ -178,30 +292,34 @@ Use the `Localize` markup extension:
178292

179293
#### Adding New Translations
180294

181-
1. Add resource key to `ToolkitStrings.resx` (English)
182-
2. Add translation to `ToolkitStrings.de.resx` (German)
295+
Localization strings are stored as embedded JSON files in `OpenSourceToolkit.NET\Localization\` (e.g. `en.json`, `de.json`, `fr.json`).
296+
297+
1. Add / update keys in `OpenSourceToolkit.NET\Localization\en.json` (fallback)
298+
2. Add / update the same keys in the target language JSON (e.g. `de.json`)
183299
3. Use the key in XAML via `{loc:Localize YourKey}`
184300

185301
#### Implementation Notes
186302

187-
**Critical**: The `ToolkitLocalization.SetCulture()` method sets culture at multiple levels to ensure `ResourceManager` respects culture changes:
303+
The `ToolkitLocalization.SetCulture()` method updates thread cultures and notifies bindings so `{loc:Localize ...}` updates immediately:
188304

189305
```csharp
190306
Thread.CurrentThread.CurrentUICulture = culture;
191307
CultureInfo.DefaultThreadCurrentUICulture = culture;
192308
CultureInfo.DefaultThreadCurrentCulture = culture;
193-
_resourceManager.ReleaseAllResources();
309+
CultureChanged?.Invoke(null, culture);
310+
Instance.PropertyChanged?.Invoke(Instance, new PropertyChangedEventArgs("Item"));
311+
Instance.PropertyChanged?.Invoke(Instance, new PropertyChangedEventArgs("Item[]"));
194312
```
195313

196-
This pattern is **essential** for reliable runtime culture switching. Without `DefaultThreadCurrentUICulture`, the ResourceManager may cache strings from the initial system culture even after calling `ReleaseAllResources()`.
314+
Translations are loaded lazily from embedded JSON resources when a language is selected.
197315

198316
## 📄 License
199317

200318
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
201319

202320
## 🧪 Tests
203321

204-
The solution includes a comprehensive test suite in `OpenSourceToolkit.Tests` using **MSTest**. These tests verify the functionality of the ported libraries and ensure parity with the original tools.
322+
The solution includes a comprehensive test suite in `OpenSourceToolkit.Tests` using **MSTest**. These 170+ tests verify the functionality of most of the libraries.
205323

206324
### Coverage Areas
207325

0 commit comments

Comments
 (0)