Merge pull request #182 from itdoginfo/translation

Translation
This commit is contained in:
Kirill Sobakin
2025-10-02 10:54:26 +03:00
committed by GitHub
3 changed files with 14 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ set -euo pipefail
PODIR="po"
POTFILE="$PODIR/templates/podkop.pot"
WIDTH=120
if [ $# -ne 1 ]; then
echo "Usage: $0 <language_code> (e.g., ru, de, fr)"
@@ -19,11 +20,11 @@ fi
if [ -f "$POFILE" ]; then
echo "Updating $POFILE"
msgmerge --update "$POFILE" "$POTFILE"
msgmerge --update --width="$WIDTH" "$POFILE" "$POTFILE"
else
echo "Creating new $POFILE using msginit"
mkdir -p "$PODIR/$LANG"
msginit --no-translator --locale="$LANG" --width=120 --input="$POTFILE" --output-file="$POFILE"
msginit --no-translator --locale="$LANG" --width="$WIDTH" --input="$POTFILE" --output-file="$POFILE"
fi
echo "Translation file for $LANG updated."

View File

@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: none\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\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"
@@ -307,8 +307,8 @@ msgid ""
"Enter connection string starting with vless:// or ss:// for proxy configuration. Add comments with // for backup "
"configs"
msgstr ""
"Введите строку подключения, начинающуюся с vless:// или ss:// для настройки прокси. "
"Добавляйте комментарии с // для сохранения других конфигураций"
"Введите строку подключения, начинающуюся с vless:// или ss:// для настройки прокси. Добавляйте комментарии с // для "
"сохранения других конфигураций"
#: htdocs/luci-static/resources/view/podkop/configSection.js:100
msgid "No active configuration found. At least one non-commented line is required."
@@ -501,7 +501,8 @@ msgstr "Список пользовательских доменов"
#: htdocs/luci-static/resources/view/podkop/configSection.js:332
msgid "Enter domain names separated by comma, space or newline. You can add comments after //"
msgstr "Введите имена доменов, разделяя их запятой, пробелом или с новой строки. Вы можете добавлять комментарии после //"
msgstr ""
"Введите имена доменов, разделяя их запятой, пробелом или с новой строки. Вы можете добавлять комментарии после //"
#: htdocs/luci-static/resources/view/podkop/configSection.js:360
#, javascript-format
@@ -602,8 +603,8 @@ msgid ""
"Enter subnets in CIDR notation or single IP addresses, separated by comma, space or newline. You can add comments "
"after //"
msgstr ""
"Введите подсети в нотации CIDR или отдельные IP-адреса, разделенные запятой, пробелом или новой строкой. "
"Вы можете добавлять комментарии после //"
"Введите подсети в нотации CIDR или отдельные IP-адреса, разделенные запятой, пробелом или новой строкой. Вы можете "
"добавлять комментарии после //"
#: htdocs/luci-static/resources/view/podkop/configSection.js:487
#, javascript-format
@@ -623,8 +624,8 @@ msgstr "CIDR должен быть между 0 и 32 в: %s"
#: htdocs/luci-static/resources/view/podkop/configSection.js:510
msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed."
msgstr ""
"Должна быть указана хотя бы одна действительная подсеть или IP. Содержимое, состоящее только из комментариев, "
"не допускается."
"Должна быть указана хотя бы одна действительная подсеть или IP. Содержимое, состоящее только из комментариев, не "
"допускается."
#: htdocs/luci-static/resources/view/podkop/configSection.js:516
msgid "Remote Subnet Lists"

View File

@@ -3,6 +3,7 @@
SRC_DIR="htdocs/luci-static/resources/view/podkop"
OUT_POT="po/templates/podkop.pot"
ENCODING="UTF-8"
WIDTH=120
mapfile -t FILES < <(find "$SRC_DIR" -type f -name "*.js")
if [ ${#FILES[@]} -eq 0 ]; then
@@ -17,7 +18,7 @@ xgettext --language=JavaScript \
--keyword=_ \
--from-code="$ENCODING" \
--output="$OUT_POT" \
--width=120 \
--width="$WIDTH" \
--package-name="PODKOP" \
"${FILES[@]}"