ProTranslate uses spec-driven development for agentic coding. Work starts with behavior, constraints, edge cases, and validation, then moves into implementation. This keeps a broad multi-framework surface from becoming a collection of adapter-specific decisions.
Working Method
Every feature should define:
Inputs: keys, cultures, regions, values, provider data, bindings, user actions, and host options.
Outputs: service results, UI updates, generated files, diagnostics, and package artifacts.
Constraints: package boundaries, threading, trimming, framework compatibility, and performance.
dotnet test tests/ProTranslate.Tests/ProTranslate.Tests.csproj -c Release
Phase 3: Provider Integrations
Status: implemented for the current providers.
Deliverables:
In-memory provider for tests, samples, and embedded catalogs.
Composite provider for ordered lookup.
ResourceManager provider for .resx and satellite assemblies.
IStringLocalizer provider for Microsoft.Extensions localization workflows.
Remaining hardening:
Rich provider traces.
Remote provider reference package, if needed by future scenarios.
Phase 4: Globalization Runtime
Status: implemented for culture, region, measurement metadata, unit conversion, localized unit formatting, and flow direction.
Deliverables:
IGlobalizationService.
RegionProfile.
MeasurementSystemProfile.
Region override.
Measurement-system override.
Default measurement-system resolver.
Built-in unit conversion service.
Localized unit formatter.
Framework-neutral TextFlowDirection.
Remaining hardening:
Persistent user preference policy.
Phase 5: XAML Adapters
Status: implemented across Avalonia, WPF, MAUI, WinUI, and Uno.
Deliverables:
Translate and T markup extensions.
Format and F markup extensions.
Translation binding source.
Attached Translation.Key.
Attached Translation.FallbackValue.
Attached Translation.StringFormat.
Attached Translation.Culture.
Attached Translation.AutoFlowDirection.
DI registration helpers.
XML namespace mappings where supported.
Avalonia adapter smoke, runtime, and release-only leak tests.
Framework sample builds.
Manual runtime culture-switch verification where native UI tooling is available.
Remaining hardening:
Broader runtime UI automation for WPF, MAUI, WinUI, and Uno.
Dispatcher abstraction hardening.
Phase 6: Source Generation
Status: implemented for key generation, accessor generation, provider manifests, and analyzer diagnostics.
Deliverables:
Incremental source generator.
Text key catalog support.
JSON catalog support.
ProTranslateKeys.
ProTranslateAccessors.
ProTranslateProviderManifest.
Invalid JSON diagnostic PTSG001.
Duplicate key diagnostic PTSG002.
Placeholder compatibility analysis.
Missing-key analysis for XAML and generated accessors.
Resource coverage diagnostics.
Unsafe dynamic key diagnostics.
Invalid catalog analyzer diagnostics.
Remaining hardening:
Code fixes.
Phase 7: Samples
Status: implemented for each supported framework.
Sample expectations:
MVVM view model.
Runtime culture switching.
Region display.
Measurement-system display.
Formatting examples.
Markup extension usage.
Attached-property usage.
Compiled binding or x:Bind path where supported.
Prefix-free XAML where supported by the target framework.
Validation split:
macOS validates portable projects, the Avalonia sample, and the MAUI adapter plus sample restore; full MAUI sample app packaging remains local/platform validation.
Windows CI validates WPF, WinUI, and Uno sample paths.
Phase 8: Documentation
Status: expanded.
Documentation levels:
Getting started and installation.
XAML namespace guidance.
Provider, formatting, globalization, and diagnostics guides.