This commit is contained in:
2025-04-13 19:54:04 +03:00
parent f26b72b2a2
commit b8cb7af3bb
14 changed files with 213 additions and 261 deletions

View File

@ -46,3 +46,11 @@ func HandleExitCoder(err error) {
return
}
}
func FormatCliExit(msg string, err error) cli.ExitCoder {
return FormatCliExitWithCode(msg, err, 1)
}
func FormatCliExitWithCode(msg string, err error, exitCode int) cli.ExitCoder {
return cli.Exit(fmt.Errorf("%s: %w", msg, err), exitCode)
}

View File

@ -9,76 +9,76 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: build.go:47
#: build.go:48
msgid "Build a local package"
msgstr ""
#: build.go:53
#: build.go:54
msgid "Path to the build script"
msgstr ""
#: build.go:58
#: build.go:59
msgid "Specify subpackage in script (for multi package script only)"
msgstr ""
#: build.go:63
#: build.go:64
msgid "Name of the package to build and its repo (example: default/go-bin)"
msgstr ""
#: build.go:68
#: build.go:69
msgid ""
"Build package from scratch even if there's an already built package available"
msgstr ""
#: build.go:74 build.go:79 build.go:89 build.go:103
#: build.go:75 build.go:79 build.go:88
msgid "Error getting working directory"
msgstr ""
#: build.go:110 build.go:115
#: build.go:104 build.go:108
msgid "Error dropping capabilities"
msgstr ""
#: build.go:123
#: build.go:115
msgid "Error loading config"
msgstr ""
#: build.go:131
#: build.go:122
msgid "Error initialization database"
msgstr ""
#: build.go:141
#: build.go:131
msgid "Unable to detect a supported package manager on the system"
msgstr ""
#: build.go:147
#: build.go:137
msgid "Error parsing os release"
msgstr ""
#: build.go:179 build.go:221
#: build.go:168 build.go:209
msgid "Error building package"
msgstr ""
#: build.go:197
#: build.go:185
msgid "Package not found"
msgstr ""
#: build.go:225
#: build.go:212
msgid "Nothing to build"
msgstr ""
#: build.go:234
#: build.go:221
msgid "Error moving the package"
msgstr ""
#: fix.go:37
#: fix.go:38
msgid "Attempt to fix problems with ALR"
msgstr ""
#: fix.go:58
#: fix.go:59
msgid "Clearing cache directory"
msgstr ""
#: fix.go:63
#: fix.go:64
msgid "Unable to open cache directory"
msgstr ""
@ -86,19 +86,19 @@ msgstr ""
msgid "Unable to read cache directory contents"
msgstr ""
#: fix.go:77
msgid "Unable to remove cache item"
#: fix.go:76
msgid "Unable to remove cache item (%s)"
msgstr ""
#: fix.go:82
#: fix.go:80
msgid "Rebuilding cache"
msgstr ""
#: fix.go:86
#: fix.go:84
msgid "Unable to create new cache directory"
msgstr ""
#: fix.go:101
#: fix.go:98
msgid "Done"
msgstr ""
@ -110,19 +110,19 @@ msgstr ""
msgid "Generate a ALR script for a pip module"
msgstr ""
#: helper.go:41
#: helper.go:42
msgid "List all the available helper commands"
msgstr ""
#: helper.go:53
#: helper.go:54
msgid "Run a ALR helper command"
msgstr ""
#: helper.go:60
#: helper.go:61
msgid "The directory that the install commands will install to"
msgstr ""
#: helper.go:73 helper.go:74
#: helper.go:74 helper.go:75
msgid "No such helper command"
msgstr ""
@ -130,67 +130,67 @@ msgstr ""
msgid "Error parsing os-release file"
msgstr ""
#: info.go:43
#: info.go:42
msgid "Print information about a package"
msgstr ""
#: info.go:48
#: info.go:47
msgid "Show all information, not just for the current distro"
msgstr ""
#: info.go:69
#: info.go:68
msgid "Error getting packages"
msgstr ""
#: info.go:78
#: info.go:76
msgid "Error iterating over packages"
msgstr ""
#: info.go:93
#: info.go:90
msgid "Command info expected at least 1 argument, got %d"
msgstr ""
#: info.go:113
#: info.go:110
msgid "Error finding packages"
msgstr ""
#: info.go:129
#: info.go:124
msgid "Can't detect system language"
msgstr ""
#: info.go:148
#: info.go:141
msgid "Error resolving overrides"
msgstr ""
#: info.go:157 info.go:163
#: info.go:149 info.go:154
msgid "Error encoding script variables"
msgstr ""
#: install.go:43
#: install.go:44
msgid "Install a new package"
msgstr ""
#: install.go:57
#: install.go:58
msgid "Command install expected at least 1 argument, got %d"
msgstr ""
#: install.go:96
#: install.go:94
msgid "Error pulling repositories"
msgstr ""
#: install.go:164
#: install.go:157
msgid "Remove an installed package"
msgstr ""
#: install.go:189
#: install.go:180
msgid "Error listing installed packages"
msgstr ""
#: install.go:227
#: install.go:217
msgid "Command remove expected at least 1 argument, got %d"
msgstr ""
#: install.go:242
#: install.go:232
msgid "Error removing packages"
msgstr ""
@ -315,7 +315,7 @@ msgstr ""
msgid "You need to be root to perform this action"
msgstr ""
#: list.go:40
#: list.go:41
msgid "List ALR repo packages"
msgstr ""
@ -419,51 +419,51 @@ msgid ""
"updating ALR if something doesn't work."
msgstr ""
#: repo.go:42
#: repo.go:43
msgid "Add a new repository"
msgstr ""
#: repo.go:49
#: repo.go:50
msgid "Name of the new repo"
msgstr ""
#: repo.go:55
#: repo.go:56
msgid "URL of the new repo"
msgstr ""
#: repo.go:93 repo.go:173
#: repo.go:93 repo.go:169
msgid "Error saving config"
msgstr ""
#: repo.go:98
#: repo.go:97
msgid "Can't drop privileges"
msgstr ""
#: repo.go:105 repo.go:111
#: repo.go:104 repo.go:110
msgid "Error pulling repos"
msgstr ""
#: repo.go:123
#: repo.go:121
msgid "Remove an existing repository"
msgstr ""
#: repo.go:130
#: repo.go:128
msgid "Name of the repo to be deleted"
msgstr ""
#: repo.go:159
#: repo.go:156
msgid "Repo does not exist"
msgstr ""
#: repo.go:167
#: repo.go:164
msgid "Error removing repo directory"
msgstr ""
#: repo.go:184
#: repo.go:179
msgid "Error removing packages from database"
msgstr ""
#: repo.go:196
#: repo.go:190
msgid "Pull all repositories that have changed"
msgstr ""
@ -495,22 +495,22 @@ msgstr ""
msgid "Error while executing search"
msgstr ""
#: search.go:105
#: search.go:104
msgid "Error parsing format template"
msgstr ""
#: search.go:114
#: search.go:112
msgid "Error executing template"
msgstr ""
#: upgrade.go:48
#: upgrade.go:49
msgid "Upgrade all installed packages"
msgstr ""
#: upgrade.go:111 upgrade.go:129
#: upgrade.go:107 upgrade.go:124
msgid "Error checking for updates"
msgstr ""
#: upgrade.go:133
#: upgrade.go:127
msgid "There is nothing to do."
msgstr ""

View File

@ -16,80 +16,80 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Gtranslator 47.1\n"
#: build.go:47
#: build.go:48
msgid "Build a local package"
msgstr "Сборка локального пакета"
#: build.go:53
#: build.go:54
msgid "Path to the build script"
msgstr "Путь к скрипту сборки"
#: build.go:58
#: build.go:59
msgid "Specify subpackage in script (for multi package script only)"
msgstr "Укажите подпакет в скрипте (только для многопакетного скрипта)"
#: build.go:63
#: build.go:64
msgid "Name of the package to build and its repo (example: default/go-bin)"
msgstr "Имя пакета для сборки и его репозиторий (пример: default/go-bin)"
#: build.go:68
#: build.go:69
msgid ""
"Build package from scratch even if there's an already built package available"
msgstr "Создайте пакет с нуля, даже если уже имеется готовый пакет"
#: build.go:74 build.go:79 build.go:89 build.go:103
#: build.go:75 build.go:79 build.go:88
msgid "Error getting working directory"
msgstr "Ошибка при получении рабочего каталога"
#: build.go:110 build.go:115
#: build.go:104 build.go:108
#, fuzzy
msgid "Error dropping capabilities"
msgstr "Ошибка при открытии базы данных"
#: build.go:123
#: build.go:115
#, fuzzy
msgid "Error loading config"
msgstr "Ошибка при кодировании конфигурации"
#: build.go:131
#: build.go:122
msgid "Error initialization database"
msgstr "Ошибка инициализации базы данных"
#: build.go:141
#: build.go:131
msgid "Unable to detect a supported package manager on the system"
msgstr "Не удалось обнаружить поддерживаемый менеджер пакетов в системе"
#: build.go:147
#: build.go:137
msgid "Error parsing os release"
msgstr "Ошибка при разборе файла выпуска операционной системы"
#: build.go:179 build.go:221
#: build.go:168 build.go:209
msgid "Error building package"
msgstr "Ошибка при сборке пакета"
#: build.go:197
#: build.go:185
msgid "Package not found"
msgstr "Пакет не найден"
#: build.go:225
#: build.go:212
#, fuzzy
msgid "Nothing to build"
msgstr "Исполнение build()"
#: build.go:234
#: build.go:221
msgid "Error moving the package"
msgstr "Ошибка при перемещении пакета"
#: fix.go:37
#: fix.go:38
msgid "Attempt to fix problems with ALR"
msgstr "Попытка устранить проблемы с ALR"
#: fix.go:58
#: fix.go:59
#, fuzzy
msgid "Clearing cache directory"
msgstr "Удаление каталога кэша"
#: fix.go:63
#: fix.go:64
#, fuzzy
msgid "Unable to open cache directory"
msgstr "Не удалось удалить каталог кэша"
@ -99,20 +99,20 @@ msgstr "Не удалось удалить каталог кэша"
msgid "Unable to read cache directory contents"
msgstr "Не удалось удалить каталог кэша"
#: fix.go:77
#: fix.go:76
#, fuzzy
msgid "Unable to remove cache item"
msgid "Unable to remove cache item (%s)"
msgstr "Не удалось удалить каталог кэша"
#: fix.go:82
#: fix.go:80
msgid "Rebuilding cache"
msgstr "Восстановление кэша"
#: fix.go:86
#: fix.go:84
msgid "Unable to create new cache directory"
msgstr "Не удалось создать новый каталог кэша"
#: fix.go:101
#: fix.go:98
msgid "Done"
msgstr "Сделано"
@ -124,19 +124,19 @@ msgstr "Генерация скрипта ALR из шаблона"
msgid "Generate a ALR script for a pip module"
msgstr "Генерация скрипта ALR для модуля pip"
#: helper.go:41
#: helper.go:42
msgid "List all the available helper commands"
msgstr "Список всех доступных вспомогательных команды"
#: helper.go:53
#: helper.go:54
msgid "Run a ALR helper command"
msgstr "Запустить вспомогательную команду ALR"
#: helper.go:60
#: helper.go:61
msgid "The directory that the install commands will install to"
msgstr "Каталог, в который будут устанавливать команды установки"
#: helper.go:73 helper.go:74
#: helper.go:74 helper.go:75
msgid "No such helper command"
msgstr "Такой вспомогательной команды нет"
@ -144,68 +144,68 @@ msgstr "Такой вспомогательной команды нет"
msgid "Error parsing os-release file"
msgstr "Ошибка при разборе файла выпуска операционной системы"
#: info.go:43
#: info.go:42
msgid "Print information about a package"
msgstr "Отобразить информацию о пакете"
#: info.go:48
#: info.go:47
msgid "Show all information, not just for the current distro"
msgstr "Показывать всю информацию, не только для текущего дистрибутива"
#: info.go:69
#: info.go:68
msgid "Error getting packages"
msgstr "Ошибка при получении пакетов"
#: info.go:78
#: info.go:76
msgid "Error iterating over packages"
msgstr "Ошибка при переборе пакетов"
#: info.go:93
#: info.go:90
msgid "Command info expected at least 1 argument, got %d"
msgstr "Для команды info ожидался хотя бы 1 аргумент, получено %d"
#: info.go:113
#: info.go:110
msgid "Error finding packages"
msgstr "Ошибка при поиске пакетов"
#: info.go:129
#: info.go:124
#, fuzzy
msgid "Can't detect system language"
msgstr "Ошибка при парсинге языка системы"
#: info.go:148
#: info.go:141
msgid "Error resolving overrides"
msgstr "Ошибка устранения переорпеделений"
#: info.go:157 info.go:163
#: info.go:149 info.go:154
msgid "Error encoding script variables"
msgstr "Ошибка кодирования переменных скрита"
#: install.go:43
#: install.go:44
msgid "Install a new package"
msgstr "Установить новый пакет"
#: install.go:57
#: install.go:58
msgid "Command install expected at least 1 argument, got %d"
msgstr "Для команды install ожидался хотя бы 1 аргумент, получено %d"
#: install.go:96
#: install.go:94
msgid "Error pulling repositories"
msgstr "Ошибка при извлечении репозиториев"
#: install.go:164
#: install.go:157
msgid "Remove an installed package"
msgstr "Удалить установленный пакет"
#: install.go:189
#: install.go:180
msgid "Error listing installed packages"
msgstr "Ошибка при составлении списка установленных пакетов"
#: install.go:227
#: install.go:217
msgid "Command remove expected at least 1 argument, got %d"
msgstr "Для команды remove ожидался хотя бы 1 аргумент, получено %d"
#: install.go:242
#: install.go:232
msgid "Error removing packages"
msgstr "Ошибка при удалении пакетов"
@ -331,7 +331,7 @@ msgstr "ОШИБКА"
msgid "You need to be root to perform this action"
msgstr ""
#: list.go:40
#: list.go:41
msgid "List ALR repo packages"
msgstr "Список пакетов репозитория ALR"
@ -441,52 +441,52 @@ msgstr ""
"Минимальная версия ALR для ALR-репозитория выше текущей версии. Попробуйте "
"обновить ALR, если что-то не работает."
#: repo.go:42
#: repo.go:43
msgid "Add a new repository"
msgstr "Добавить новый репозиторий"
#: repo.go:49
#: repo.go:50
msgid "Name of the new repo"
msgstr "Название нового репозитория"
#: repo.go:55
#: repo.go:56
msgid "URL of the new repo"
msgstr "URL-адрес нового репозитория"
#: repo.go:93 repo.go:173
#: repo.go:93 repo.go:169
#, fuzzy
msgid "Error saving config"
msgstr "Ошибка при кодировании конфигурации"
#: repo.go:98
#: repo.go:97
msgid "Can't drop privileges"
msgstr ""
#: repo.go:105 repo.go:111
#: repo.go:104 repo.go:110
msgid "Error pulling repos"
msgstr "Ошибка при извлечении репозиториев"
#: repo.go:123
#: repo.go:121
msgid "Remove an existing repository"
msgstr "Удалить существующий репозиторий"
#: repo.go:130
#: repo.go:128
msgid "Name of the repo to be deleted"
msgstr "Название репозитория удалён"
#: repo.go:159
#: repo.go:156
msgid "Repo does not exist"
msgstr "Репозитория не существует"
#: repo.go:167
#: repo.go:164
msgid "Error removing repo directory"
msgstr "Ошибка при удалении каталога репозитория"
#: repo.go:184
#: repo.go:179
msgid "Error removing packages from database"
msgstr "Ошибка при удалении пакетов из базы данных"
#: repo.go:196
#: repo.go:190
msgid "Pull all repositories that have changed"
msgstr "Скачать все изменённые репозитории"
@ -519,23 +519,23 @@ msgstr "Формат выходных данных с использование
msgid "Error while executing search"
msgstr "Ошибка при запуске приложения"
#: search.go:105
#: search.go:104
msgid "Error parsing format template"
msgstr "Ошибка при разборе шаблона"
#: search.go:114
#: search.go:112
msgid "Error executing template"
msgstr "Ошибка при выполнении шаблона"
#: upgrade.go:48
#: upgrade.go:49
msgid "Upgrade all installed packages"
msgstr "Обновить все установленные пакеты"
#: upgrade.go:111 upgrade.go:129
#: upgrade.go:107 upgrade.go:124
msgid "Error checking for updates"
msgstr "Ошибка при проверке обновлений"
#: upgrade.go:133
#: upgrade.go:127
msgid "There is nothing to do."
msgstr "Здесь нечего делать."