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,3 +1,4 @@
|
||||
import { t } from '../i18n/mod.ts';
|
||||
import { TimerOptions } from '../types/mod.ts';
|
||||
import { deriveNameFromExec, writeUnitFiles } from '../utils/mod.ts';
|
||||
|
||||
@@ -21,13 +22,13 @@ export async function generateUnitFiles(options: TimerOptions): Promise<void> {
|
||||
|
||||
if (result) {
|
||||
const { servicePath, timerPath } = result;
|
||||
console.log(`Service Unit geschrieben in: ${servicePath}`);
|
||||
console.log(`Timer Unit geschrieben in: ${timerPath}`);
|
||||
console.log(t('unit_written_service', { path: servicePath }));
|
||||
console.log(t('unit_written_timer', { path: timerPath }));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`\nℹ️ Hinweis:`);
|
||||
console.log(t('hint_header'));
|
||||
|
||||
if (options.user) {
|
||||
console.log(` systemctl --user daemon-reload`);
|
||||
|
Reference in New Issue
Block a user