Замена vercmp и оптимизация сборки зависимостей с полной русификацией интерфейса
All checks were successful
Pre-commit / pre-commit (push) Successful in 6m13s
Create Release / changelog (push) Successful in 2m58s

- Заменен vercmp с go.elara.ws/vercmp на gitea.plemya-x.ru/xpamych/vercmp v0.0.1
- Добавлена функция FilterPackagesByVersion для проверки версий установленных
  пакетов перед пересборкой зависимостей (учитывает version-release и epoch)
- Исправлена инициализация переводов в плагинах: добавлены вызовы translations.Setup()
  во всех plugin subcommands (_internal-safe-script-executor, _internal-installer,
  _internal-repos)
- Добавлен GetSubcommandHelpTemplate для корректного отображения справки команд
  с подкомандами на русском языке
- Добавлены кастомные help команды для config, repo, helper и mirror
- Добавлены русские переводы для всех пользовательских сообщений:
  * Сообщения о создании пакетов (Creating package file, Packaging with nfpm и др.)
  * Сообщения команды fix (Clearing cache, Fixing permissions и др.)
  * Сообщения обновления (Updating system packages, System packages updated)
  * Сообщения о версиях пакетов (Package is installed with older/newer version)
  * Заголовки справки (NAME, USAGE, COMMANDS, OPTIONS)
  * Справочные сообщения (Shows a list of commands or help for one command)
- Оптимизирован assets/logo.png (уменьшен с 37KB до 17KB)
This commit is contained in:
2025-11-29 19:32:13 +03:00
parent c9c8397856
commit 72cdfcaa4b
19 changed files with 337 additions and 31 deletions

View File

@@ -36,7 +36,7 @@ import (
"github.com/go-git/go-git/v5/plumbing"
"github.com/leonelquinteros/gotext"
"github.com/pelletier/go-toml/v2"
"go.elara.ws/vercmp"
"gitea.plemya-x.ru/xpamych/vercmp"
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
@@ -420,13 +420,13 @@ func (rs *Repos) processRepoChanges(ctx context.Context, repo types.Repo, r *git
case actionDelete:
scriptFl, err := oldCommit.File(action.File)
if err != nil {
slog.Warn("Failed to get deleted file from old commit", "file", action.File, "error", err)
slog.Warn(gotext.Get("Failed to get deleted file from old commit"), "file", action.File, "error", err)
continue
}
r, err := scriptFl.Reader()
if err != nil {
slog.Warn("Failed to read deleted file", "file", action.File, "error", err)
slog.Warn(gotext.Get("Failed to read deleted file"), "file", action.File, "error", err)
continue
}
@@ -445,13 +445,13 @@ func (rs *Repos) processRepoChanges(ctx context.Context, repo types.Repo, r *git
case actionUpdate:
scriptFl, err := newCommit.File(action.File)
if err != nil {
slog.Warn("Failed to get updated file from new commit", "file", action.File, "error", err)
slog.Warn(gotext.Get("Failed to get updated file from new commit"), "file", action.File, "error", err)
continue
}
r, err := scriptFl.Reader()
if err != nil {
slog.Warn("Failed to read updated file", "file", action.File, "error", err)
slog.Warn(gotext.Get("Failed to read updated file"), "file", action.File, "error", err)
continue
}
@@ -505,7 +505,7 @@ func (rs *Repos) processRepoFull(ctx context.Context, repo types.Repo, repoDir s
}
if len(matches) == 0 {
slog.Warn("No alr.sh files found in repository", "repo", repo.Name)
slog.Warn(gotext.Get("No alr.sh files found in repository"), "repo", repo.Name)
return nil
}