You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document describes the refactored translation architecture that provides clear separation of concerns between metadata management, translation execution, and caching.
5
+
This document describes the refactored translation architecture that provides clear separation of concerns between
6
+
metadata management, translation execution, and caching.
6
7
7
8
## Architectural Principles
8
9
@@ -18,7 +19,6 @@ This document describes the refactored translation architecture that provides cl
18
19
3.**Caching is handled at the service layer**
19
20
- Translation Service owns cache strategy
20
21
- Cache implementations can be swapped (local disk, remote, memory, etc.)
21
-
- Translators remain pure and simple
22
22
23
23
4.**Partial failures are handled gracefully**
24
24
- Service returns both successful translations and errors
@@ -29,18 +29,18 @@ This document describes the refactored translation architecture that provides cl
A: Caching is an infrastructure concern, not a translation concern. Different deployments might need different cache strategies (local dev vs production, single server vs distributed).
94
+
A: Caching is an infrastructure concern, not a translation concern. Different deployments might need different cache
95
+
strategies (local dev vs production, single server vs distributed).
283
96
284
97
**Q: What if I need context in the cache?**
285
-
A: The service already has access to metadata context. If you need it in the cache, extend the cache interface to store `TranslationEntry` instead of just strings.
286
-
287
-
**Q: Can I still use the old cached translator?**
288
-
A: Yes, it's deprecated but kept for backward compatibility. However, it won't receive new features and will be removed in a future major version.
98
+
A: The service already has access to metadata context. If you need it in the cache, extend the cache interface to store
99
+
`TranslationEntry` instead of just strings.
289
100
290
101
**Q: How do I add a new translator?**
291
-
A: Implement the `Translator` interface, add a case to `translator-factory.ts`, and you're done. No need to worry about caching.
102
+
A: Implement the `Translator` interface, add a case to `translator-factory.ts`, and you're done. No need to worry about
103
+
caching.
292
104
293
105
**Q: What happens if translation fails?**
294
-
A: The service returns partial results with errors. The cached translations are still returned, and errors include details for debugging.
295
-
296
-
---
297
-
298
-
**Last Updated:** November 2025
299
-
**Version:** 0.1.0 (Beta)
106
+
A: The service returns partial results with errors. The cached translations are still returned, and errors include
0 commit comments