refactor(cli): integrate i18n support across commands
- Centralize CLI text strings using the i18n module for localization - Refactor `createCommand` and `createCli` to improve modularity - Update logging and error messages to use translated strings
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ensureDir, exists } from 'https://deno.land/std@0.224.0/fs/mod.ts';
|
||||
import { join } from 'https://deno.land/std@0.224.0/path/mod.ts';
|
||||
import { TimerOptions } from '../types/mod.ts';
|
||||
import { t } from '../i18n/mod.ts';
|
||||
|
||||
export async function writeUnitFiles(
|
||||
name: string,
|
||||
@@ -28,9 +29,9 @@ export async function writeUnitFiles(
|
||||
await Deno.remove(timerPath);
|
||||
}
|
||||
} catch (rollbackError) {
|
||||
console.error('Rollback fehlgeschlagen:', rollbackError);
|
||||
console.error(t('rollback_failed'), rollbackError);
|
||||
}
|
||||
console.error('Fehler beim Schreiben der Units:', error);
|
||||
console.error(t('error_write_units'), error);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user