/
niceSOFT
/
gettext
Обзор
Документация
Войти
/
niceSOFT
/
gettext
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
gettext-tools/tests/format-librep-3
47 строк
1 KB
Bruno Haible
xgettext: librep: Improve heuristic for format strings.
02 июн 2025, 03:22
02 июн 2025, 03:22
93da58d
Код
Авторство
О чём код?
#! /bin/sh . "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test heuristic recognition of librep format strings like "100% complete". cat <<\EOF > f-lr-3.jl (_ "Test 1a is 100% complete") (format nil (_ "Test 1b is 100% complete") 120) (_ "Test 2a from 0% complete to 100% complete") (format nil (_ "Test 2b from 0% complete to 100% complete") 120 121) (_ "Test 3a of %s is 100% complete") (format nil (_ "Test 3b of %s is 100% complete") "foo" 120) EOF : ${XGETTEXT=xgettext} ${XGETTEXT} --omit-header --no-location -d f-lr-3.tmp f-lr-3.jl || Exit 1 LC_ALL=C tr -d '\r' < f-lr-3.tmp.po > f-lr-3.po || Exit 1 cat <<\EOF > f-lr-3.ok msgid "Test 1a is 100% complete" msgstr "" #, librep-format msgid "Test 1b is 100% complete" msgstr "" msgid "Test 2a from 0% complete to 100% complete" msgstr "" #, librep-format msgid "Test 2b from 0% complete to 100% complete" msgstr "" #, librep-format msgid "Test 3a of %s is 100% complete" msgstr "" #, librep-format msgid "Test 3b of %s is 100% complete" msgstr "" EOF : ${DIFF=diff} ${DIFF} f-lr-3.ok f-lr-3.po result=$? exit $result