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,10 +1,12 @@
|
||||
import { Command } from '@cliffy/command';
|
||||
import { createCommand } from './create.ts';
|
||||
import { getVersion } from '../utils/mod.ts';
|
||||
import { t } from '../i18n/mod.ts';
|
||||
import { createCommand } from './mod.ts';
|
||||
|
||||
await new Command()
|
||||
.name('systemd-timer')
|
||||
.version(await getVersion())
|
||||
.description('CLI Tool zum Erzeugen von systemd .timer und .service Units')
|
||||
.command('create', createCommand)
|
||||
.parse(Deno.args);
|
||||
export async function createCli() {
|
||||
return new Command()
|
||||
.name('systemd-timer')
|
||||
.version(await getVersion())
|
||||
.description(t('cli_description'))
|
||||
.command('create', createCommand());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user