add repo subcommand
All checks were successful
Pre-commit / pre-commit (pull_request) Successful in 1m36s
All checks were successful
Pre-commit / pre-commit (pull_request) Successful in 1m36s
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
||||
"github.com/leonelquinteros/gotext"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@ -61,3 +62,11 @@ func FormatCliExitWithCode(msg string, err error, exitCode int) cli.ExitCoder {
|
||||
}
|
||||
return cli.Exit(fmt.Errorf("%s: %w", msg, err), exitCode)
|
||||
}
|
||||
|
||||
func WarnLegacyCommand(newSyntax string) {
|
||||
slog.Warn(
|
||||
gotext.Get(
|
||||
"This command is deprecated and would be removed in the future, use \"%s\" instead!", newSyntax,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
@ -278,6 +278,12 @@ msgstr ""
|
||||
msgid "OPTIONS"
|
||||
msgstr ""
|
||||
|
||||
#: internal/cliutils/utils.go:69
|
||||
msgid ""
|
||||
"This command is deprecated and would be removed in the future, use \"%s\" "
|
||||
"instead!"
|
||||
msgstr ""
|
||||
|
||||
#: internal/db/db.go:137
|
||||
msgid "Database version mismatch; resetting"
|
||||
msgstr ""
|
||||
@ -363,11 +369,11 @@ msgstr ""
|
||||
msgid "Enable interactive questions and prompts"
|
||||
msgstr ""
|
||||
|
||||
#: main.go:145
|
||||
#: main.go:146
|
||||
msgid "Show help"
|
||||
msgstr ""
|
||||
|
||||
#: main.go:149
|
||||
#: main.go:150
|
||||
msgid "Error while running app"
|
||||
msgstr ""
|
||||
|
||||
@ -451,48 +457,60 @@ msgid ""
|
||||
"updating ALR if something doesn't work."
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:39
|
||||
msgid "Add a new repository"
|
||||
#: refresh.go:30
|
||||
msgid "Pull all repositories that have changed"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:46
|
||||
msgid "Name of the new repo"
|
||||
#: repo.go:39
|
||||
msgid "Manage repos"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:50 repo.go:220
|
||||
msgid "Remove an existing repository"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:52
|
||||
msgid "URL of the new repo"
|
||||
msgid "<name>"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:75
|
||||
msgid "Repo \"%s\" already exists"
|
||||
#: repo.go:82
|
||||
msgid "Repo \"%s\" does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:86 repo.go:159
|
||||
#: repo.go:89
|
||||
msgid "Error removing repo directory"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:93 repo.go:160
|
||||
msgid "Error saving config"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:112
|
||||
msgid "Remove an existing repository"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:119
|
||||
msgid "Name of the repo to be deleted"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:148
|
||||
msgid "Repo \"%s\" does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:155
|
||||
msgid "Error removing repo directory"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:178
|
||||
msgid "Error removing packages from database"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:189
|
||||
msgid "Pull all repositories that have changed"
|
||||
#: repo.go:123 repo.go:190
|
||||
msgid "Add a new repository"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:124
|
||||
msgid "<name> <url>"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:149
|
||||
msgid "Repo \"%s\" already exists"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:197
|
||||
msgid "Name of the new repo"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:203
|
||||
msgid "URL of the new repo"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:227
|
||||
msgid "Name of the repo to be deleted"
|
||||
msgstr ""
|
||||
|
||||
#: search.go:40
|
||||
|
@ -12,8 +12,8 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Gtranslator 48.0\n"
|
||||
|
||||
#: build.go:42
|
||||
@ -285,6 +285,12 @@ msgstr "КАТЕГОРИЯ"
|
||||
msgid "OPTIONS"
|
||||
msgstr "ПАРАМЕТРЫ"
|
||||
|
||||
#: internal/cliutils/utils.go:69
|
||||
msgid ""
|
||||
"This command is deprecated and would be removed in the future, use \"%s\" "
|
||||
"instead!"
|
||||
msgstr ""
|
||||
|
||||
#: internal/db/db.go:137
|
||||
msgid "Database version mismatch; resetting"
|
||||
msgstr "Несоответствие версий базы данных; сброс настроек"
|
||||
@ -371,11 +377,11 @@ msgstr "Аргументы, которые будут переданы мене
|
||||
msgid "Enable interactive questions and prompts"
|
||||
msgstr "Включение интерактивных вопросов и запросов"
|
||||
|
||||
#: main.go:145
|
||||
#: main.go:146
|
||||
msgid "Show help"
|
||||
msgstr "Показать справку"
|
||||
|
||||
#: main.go:149
|
||||
#: main.go:150
|
||||
msgid "Error while running app"
|
||||
msgstr "Ошибка при запуске приложения"
|
||||
|
||||
@ -465,49 +471,61 @@ msgstr ""
|
||||
"Минимальная версия ALR для ALR-репозитория выше текущей версии. Попробуйте "
|
||||
"обновить ALR, если что-то не работает."
|
||||
|
||||
#: repo.go:39
|
||||
msgid "Add a new repository"
|
||||
msgstr "Добавить новый репозиторий"
|
||||
#: refresh.go:30
|
||||
msgid "Pull all repositories that have changed"
|
||||
msgstr "Скачать все изменённые репозитории"
|
||||
|
||||
#: repo.go:46
|
||||
msgid "Name of the new repo"
|
||||
msgstr "Название нового репозитория"
|
||||
#: repo.go:39
|
||||
msgid "Manage repos"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:50 repo.go:220
|
||||
msgid "Remove an existing repository"
|
||||
msgstr "Удалить существующий репозиторий"
|
||||
|
||||
#: repo.go:52
|
||||
msgid "URL of the new repo"
|
||||
msgstr "URL-адрес нового репозитория"
|
||||
msgid "<name>"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:75
|
||||
msgid "Repo \"%s\" already exists"
|
||||
msgstr "Репозиторий \"%s\" уже существует"
|
||||
#: repo.go:82
|
||||
msgid "Repo \"%s\" does not exist"
|
||||
msgstr "Репозитория \"%s\" не существует"
|
||||
|
||||
#: repo.go:86 repo.go:159
|
||||
#: repo.go:89
|
||||
msgid "Error removing repo directory"
|
||||
msgstr "Ошибка при удалении каталога репозитория"
|
||||
|
||||
#: repo.go:93 repo.go:160
|
||||
msgid "Error saving config"
|
||||
msgstr "Ошибка при сохранении конфигурации"
|
||||
|
||||
#: repo.go:112
|
||||
msgid "Remove an existing repository"
|
||||
msgstr "Удалить существующий репозиторий"
|
||||
|
||||
#: repo.go:119
|
||||
msgid "Name of the repo to be deleted"
|
||||
msgstr "Название репозитория удалён"
|
||||
|
||||
#: repo.go:148
|
||||
msgid "Repo \"%s\" does not exist"
|
||||
msgstr "Репозитория \"%s\" не существует"
|
||||
|
||||
#: repo.go:155
|
||||
msgid "Error removing repo directory"
|
||||
msgstr "Ошибка при удалении каталога репозитория"
|
||||
|
||||
#: repo.go:178
|
||||
msgid "Error removing packages from database"
|
||||
msgstr "Ошибка при удалении пакетов из базы данных"
|
||||
|
||||
#: repo.go:189
|
||||
msgid "Pull all repositories that have changed"
|
||||
msgstr "Скачать все изменённые репозитории"
|
||||
#: repo.go:123 repo.go:190
|
||||
msgid "Add a new repository"
|
||||
msgstr "Добавить новый репозиторий"
|
||||
|
||||
#: repo.go:124
|
||||
msgid "<name> <url>"
|
||||
msgstr ""
|
||||
|
||||
#: repo.go:149
|
||||
msgid "Repo \"%s\" already exists"
|
||||
msgstr "Репозиторий \"%s\" уже существует"
|
||||
|
||||
#: repo.go:197
|
||||
msgid "Name of the new repo"
|
||||
msgstr "Название нового репозитория"
|
||||
|
||||
#: repo.go:203
|
||||
msgid "URL of the new repo"
|
||||
msgstr "URL-адрес нового репозитория"
|
||||
|
||||
#: repo.go:227
|
||||
msgid "Name of the repo to be deleted"
|
||||
msgstr "Название репозитория удалён"
|
||||
|
||||
#: search.go:40
|
||||
msgid "Search packages"
|
||||
|
Reference in New Issue
Block a user