feat: sync langpack and auth updates

Sync telesrv commits 49f9bab and 04d9563 into the public mirror. Exclude private docs and runtime key material per sync rules.
This commit is contained in:
A 2026-07-18 00:07:41 +08:00
parent 6af61f26ba
commit 1292540350
244 changed files with 1552172 additions and 27668 deletions

View file

@ -2,11 +2,32 @@ package rpc
import (
"encoding/json"
"telesrv/internal/domain"
"github.com/iamxvbaba/td/tg"
"sort"
"telesrv/internal/domain"
)
func tgLangPackLanguages(items []domain.LangPackLanguage) []tg.LangPackLanguage {
out := make([]tg.LangPackLanguage, 0, len(items))
for _, item := range items {
out = append(out, tg.LangPackLanguage{
Official: item.Official,
Rtl: item.Rtl,
Beta: item.Beta,
Name: item.Name,
NativeName: item.NativeName,
LangCode: item.LangCode,
BaseLangCode: item.BaseLangCode,
PluralCode: item.PluralCode,
StringsCount: item.StringsCount,
TranslatedCount: item.TranslatedCount,
TranslationsURL: item.TranslationsURL,
})
}
return out
}
func tgLangPackStrings(items []domain.LangPackString) []tg.LangPackStringClass {
out := make([]tg.LangPackStringClass, 0, len(items))
for _, item := range items {