We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1a83ed commit 6826c85Copy full SHA for 6826c85
src/MarkdownLocalize.CLI/Program.cs
@@ -313,7 +313,15 @@ private void GeneratePOT(string inputMarkdown, string outputPOT)
313
private void AITranslate(string poFile, string outputFile, string targetLanguage)
314
{
315
string pot = File.ReadAllText(poFile);
316
- var existingCatalog = File.Exists(outputFile) ? POT.Load(File.ReadAllText(outputFile)) : null;
+ POCatalog existingCatalog = null;
317
+ try
318
+ {
319
+ existingCatalog = File.Exists(outputFile) ? POT.Load(File.ReadAllText(outputFile)) : null;
320
+ }
321
+ catch (Exception ex)
322
323
+ Log($"Error loading existing catalog: {ex.Message}. Will ignore existing translations.");
324
325
var catalog = POT.Load(pot);
326
Translator ModelTranslator = null;
327
0 commit comments