diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2020-09-27 19:29:50 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2020-09-27 19:29:50 +0000 |
commit | 20e01801965f4dad6b5a5159f974f3aae3a1460c (patch) | |
tree | 4cfb99b5f5dddd277e783399fe7f9536f1611082 | |
parent | Updtae to 1.66.0 (diff) |
Add translate-toolkit 3.1.1
The Translate Toolkit is a set of software and documentation designed to help
make the lives of localizers both more productive and less frustrating. The
Toolkit is part of the Translate project.
The software includes programs to convert localization formats to the common PO,
and emerging XLIFF format. There are also programs to check and manage PO and
XLIFF files. Online documentation includes guides on using the tools, running a
localization project and how to localize various projects from OpenOffice.org to
Mozilla.
At its core the software contains a set of classes for handling various
localization storage formats: DTD, properties, OpenOffice.org GSI/SDF, CSV, MO,
Qt .ts, TMX, TBX, WordFast txt, Gettext .mo, Windows RC, and of course PO and
XLIFF. It also provides scripts to convert between these formats.
Also part of the Toolkit are Python programs to create word counts, merge
translations and perform various checks on translation files.
WWW: https://toolkit.translatehouse.org/
WWW: https://github.com/translate/translate
Notes
Notes:
svn path=/head/; revision=550296
-rw-r--r-- | MOVED | 1 | ||||
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/translate-toolkit/Makefile | 61 | ||||
-rw-r--r-- | textproc/translate-toolkit/distinfo | 3 | ||||
-rw-r--r-- | textproc/translate-toolkit/files/patch-requirements-optional.txt | 38 | ||||
-rw-r--r-- | textproc/translate-toolkit/files/patch-tools-pocompendium | 28 | ||||
-rw-r--r-- | textproc/translate-toolkit/files/patch-tools-pomigrate2 | 22 | ||||
-rw-r--r-- | textproc/translate-toolkit/files/patch-tools-popuretext | 11 | ||||
-rw-r--r-- | textproc/translate-toolkit/files/patch-tools-poreencode | 10 | ||||
-rw-r--r-- | textproc/translate-toolkit/pkg-descr | 20 | ||||
-rw-r--r-- | textproc/translate-toolkit/pkg-plist | 54 |
11 files changed, 248 insertions, 1 deletions
@@ -15591,7 +15591,6 @@ textproc/plover||2020-09-19|Has expired: Uses deprecated version of python textproc/py-esmre||2020-09-19|Has expired: Uses deprecated version of python textproc/py-libxslt||2020-09-19|Has expired: Uses deprecated version of python textproc/py-pdfminer||2020-09-19|Has expired: Uses deprecated version of python -textproc/translate-toolkit||2020-09-19|Has expired: Uses deprecated version of python www/bluefish||2020-09-19|Has expired: Uses deprecated version of python www/calendarserver||2020-09-19|Has expired: Uses deprecated version of python www/geeknote||2020-09-19|Has expired: Uses deprecated version of python diff --git a/textproc/Makefile b/textproc/Makefile index 7ecaec2d164c..e95fbec4e081 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1773,6 +1773,7 @@ SUBDIR += tokyodystopia SUBDIR += tr-aspell SUBDIR += trang + SUBDIR += translate-toolkit SUBDIR += trdsql SUBDIR += ts-hunspell SUBDIR += tth diff --git a/textproc/translate-toolkit/Makefile b/textproc/translate-toolkit/Makefile new file mode 100644 index 000000000000..03e648b22365 --- /dev/null +++ b/textproc/translate-toolkit/Makefile @@ -0,0 +1,61 @@ +# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= translate-toolkit +PORTVERSION= 3.1.1 +CATEGORIES= textproc +MASTER_SITES= CHEESESHOP + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Tools and API for translation and localization engineering + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= bash:shells/bash \ + msghack:devel/gettext-msghack \ + ${PYTHON_PKGNAMEPREFIX}lxml>=4.0:devel/py-lxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} + +USES= gettext python:3.5+ shebangfix +USE_PYTHON= autoplist distutils noflavors + +NO_ARCH= yes + +SHEBANG_FILES= tools/* + +MANPAGES= csv2po csv2tbx dtd2po flatxml2po html2po idml2po json2po moz2po mozlang2po odf2xliff oo2po oo2xliff po2csv po2dtd po2flatxml po2html po2idml po2json po2moz po2mozlang po2oo po2prop po2resx po2sub po2symb po2tiki po2tmx po2ts po2txt po2web2py po2wordfast po2xliff pot2po prop2po resx2po sub2po symb2po tbx2po tiki2po ts2po txt2po web2py2po xliff2odf xliff2oo + +OPTIONS_DEFINE= OPTIONAL +OPTIONS_DEFAULT=OPTIONAL +OPTIONS_SUB= yes +OPTIONAL_DESC= Optional dependencies + +OPTIONAL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aeidon>=1.7.0:textproc/py-aeidon@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4.3:www/py-beautifulsoup@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}chardet>=3.0.4:textproc/py-chardet@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}iniparse>=0.5:devel/py-iniparse@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}phply>=1.2.5:devel/py-phply@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycountry>=20.7.3:textproc/py-pycountry@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}enchant>=3.1.1:textproc/py-enchant@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyparsing>=2.4.7:devel/py-pyparsing@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-Levenshtein>=0.12:devel/py-python-Levenshtein@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}vobject>=0.9.6.1:deskutils/py-vobject@${PY_FLAVOR} +OPTIONAL_MANPAGES= ical2po ini2po php2po po2ical po2ini po2php po2rc rc2po + +post-build: + @${MKDIR} ${WRKSRC}/manpages +.for manpage in ${MANPAGES} + cd ${WRKSRC}/build/lib/translate/convert && ${SETENV} PYTHONPATH=${WRKSRC}/build/lib ${PYTHON_CMD} ${manpage}.py --man > ${WRKSRC}/manpages/${manpage}.1 +.endfor + +post-build-OPTIONAL-on: +.for manpage in ${OPTIONAL_MANPAGES} + cd ${WRKSRC}/build/lib/translate/convert && ${SETENV} PYTHONPATH=${WRKSRC}/build/lib ${PYTHON_CMD} ${manpage}.py --man > ${WRKSRC}/manpages/${manpage}.1 +.endfor + +post-install: + cd ${WRKSRC}/manpages && ${INSTALL_MAN} * ${STAGEDIR}${PREFIX}/man/man1 + +.include <bsd.port.mk> diff --git a/textproc/translate-toolkit/distinfo b/textproc/translate-toolkit/distinfo new file mode 100644 index 000000000000..44f09c6cf201 --- /dev/null +++ b/textproc/translate-toolkit/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1601021618 +SHA256 (translate-toolkit-3.1.1.tar.gz) = 00ae3e02a816bc53fd06f63dc6119001ecbe0be4c5fb16ac9fa10296c52ef1b0 +SIZE (translate-toolkit-3.1.1.tar.gz) = 6003899 diff --git a/textproc/translate-toolkit/files/patch-requirements-optional.txt b/textproc/translate-toolkit/files/patch-requirements-optional.txt new file mode 100644 index 000000000000..73cb62ce072d --- /dev/null +++ b/textproc/translate-toolkit/files/patch-requirements-optional.txt @@ -0,0 +1,38 @@ +--- requirements/optional.txt.orig 2020-09-23 07:08:04 UTC ++++ requirements/optional.txt +@@ -1,25 +1,25 @@ + -r required.txt + + # Format support +-aeidon==1.7.0 # Subtitles ++aeidon>=1.7.0 # Subtitles + # Format support + BeautifulSoup4>=4.3 # Trados + # Encoding detection +-chardet==3.0.4 # chardet ++chardet>=3.0.4 # chardet + # Tmserver backend +-cheroot==8.4.5 # tmserver ++cheroot>=8.4.5 # tmserver + # Format support +-iniparse==0.5 # INI ++iniparse>=0.5 # INI + # Format support +-phply==1.2.5 # PHP ++phply>=1.2.5 # PHP + # To provide translations for language names without need for OS package. +-pycountry==20.7.3 # Languages +-pyenchant==3.1.1 # spellcheck ++pycountry>=20.7.3 # Languages ++pyenchant>=3.1.1 # spellcheck + # Windows Resources (rc2po and po2rc) +-pyparsing==2.4.7 # RC ++pyparsing>=2.4.7 # RC + # Faster matching in e.g. pot2po + python-Levenshtein>=0.12 # Levenshtein + # Format support +-ruamel.yaml==0.16.12 # YAML ++ruamel.yaml>=0.16.12 # YAML + # Format support +-vobject==0.9.6.1 # iCal ++vobject>=0.9.6.1 # iCal diff --git a/textproc/translate-toolkit/files/patch-tools-pocompendium b/textproc/translate-toolkit/files/patch-tools-pocompendium new file mode 100644 index 000000000000..6eaa5de7742b --- /dev/null +++ b/textproc/translate-toolkit/files/patch-tools-pocompendium @@ -0,0 +1,28 @@ +--- tools/pocompendium.orig 2020-04-25 10:43:45 UTC ++++ tools/pocompendium +@@ -94,7 +94,7 @@ fi + output=$1 + shift + +-tmp_dir=`mktemp -d tmp.XXXXXXXXXX` ++tmp_dir=`mktemp -d -t /tmp tmp.XXXXXXXXXX` + + if [ $1 == "-d" ]; then + shift +@@ -159,14 +159,14 @@ msgcat -o $output `find $tmp_dir -name "*.po"` 2> >(eg + + # Extract only errors if requested + if [ $option_errors -eq 1 ] ; then +- tmp=`mktemp tmp.XXXXXXXXXX` ++ tmp=`mktemp -t /tmp tmp.XXXXXXXXXX` + msgattrib --only-fuzzy $output > $tmp + mv $tmp $output + fi + + # Extract only correct translations if requested + if [ $option_correct -eq 1 ] ; then +- tmp=`mktemp tmp.XXXXXXXXXX` ++ tmp=`mktemp -t /tmp tmp.XXXXXXXXXX` + msgattrib --translated --no-fuzzy -o $tmp $output 2> >(egrep -v "warning: internationali.ed messages should not contain the .* escape sequence" >&2) && mv $tmp $output + fi + diff --git a/textproc/translate-toolkit/files/patch-tools-pomigrate2 b/textproc/translate-toolkit/files/patch-tools-pomigrate2 new file mode 100644 index 000000000000..db624196313b --- /dev/null +++ b/textproc/translate-toolkit/files/patch-tools-pomigrate2 @@ -0,0 +1,22 @@ +--- tools/pomigrate2.orig 2020-04-25 10:43:45 UTC ++++ tools/pomigrate2 +@@ -125,7 +125,7 @@ done + + if [ "$option_use_compendium" != "" ]; then + echo "** Creating compendium from old files... **" +- compendium=`mktemp tmp.compendium.XXXXXXXXXX` ++ compendium=`mktemp -t /tmp tmp.compendium.XXXXXXXXXX` + # Move and rename to work around inability of mktemp TEMPLATE to end on anything but X's + mv $compendium ${compendium}.po + compendium=${compendium}.po +@@ -144,8 +144,8 @@ if [ ! $option_pot2po ]; then + [ -f $templates/${po}t ] && msgmerge --previous $option_verbose_msgmerge $option_no_fuzzy_matching $option_no_wrap $option_use_compendium $option_use_own_compendium --backup=off --update $new/$po $templates/${po}t + done + else +- temp_pot2po_new=`mktemp -d tmp.XXXXXXXXXX` +- temp_msgcat_new=`mktemp -d tmp.XXXXXXXXXX` ++ temp_pot2po_new=`mktemp -d -t /tmp tmp.XXXXXXXXXX` ++ temp_msgcat_new=`mktemp -d -t /tmp tmp.XXXXXXXXXX` + cp -rp $new/* $temp_pot2po_new + pot2po --errorlevel=traceback --progress=none $option_pot2po_use_compendium $option_pot2po_use_own_compendium -t $temp_pot2po_new $templates $temp_msgcat_new + for file in `cd $temp_msgcat_new; find . -name "*.po"` diff --git a/textproc/translate-toolkit/files/patch-tools-popuretext b/textproc/translate-toolkit/files/patch-tools-popuretext new file mode 100644 index 000000000000..9fbc920e5002 --- /dev/null +++ b/textproc/translate-toolkit/files/patch-tools-popuretext @@ -0,0 +1,11 @@ +--- tools/popuretext.orig 2020-04-25 10:43:45 UTC ++++ tools/popuretext +@@ -39,7 +39,7 @@ accelerator=$3 + + + if [ $do_pot -eq 1 ]; then +- tempdir=`mktemp -d tmp.XXXXXXXXXX` ++ tempdir=`mktemp -d -t /tmp tmp.XXXXXXXXXX` + for pot in `cd $potdir; find . -name "*.pot"` + do + mkdir -p $tempdir/$(dirname $pot) diff --git a/textproc/translate-toolkit/files/patch-tools-poreencode b/textproc/translate-toolkit/files/patch-tools-poreencode new file mode 100644 index 000000000000..63c513b22ad0 --- /dev/null +++ b/textproc/translate-toolkit/files/patch-tools-poreencode @@ -0,0 +1,10 @@ +--- tools/poreencode.orig 2020-04-25 10:43:45 UTC ++++ tools/poreencode +@@ -33,6 +33,6 @@ po_dir=$2 + + for po_file in `find $po_dir -name "*.po"` + do +- tmp=`mktemp tmp.XXXXXXXXXX` ++ tmp=`mktemp -t /tmp tmp.XXXXXXXXXX` + msgconv -o $tmp $po_file && mv $tmp $po_file + done diff --git a/textproc/translate-toolkit/pkg-descr b/textproc/translate-toolkit/pkg-descr new file mode 100644 index 000000000000..669c39e26cb3 --- /dev/null +++ b/textproc/translate-toolkit/pkg-descr @@ -0,0 +1,20 @@ +The Translate Toolkit is a set of software and documentation designed to help +make the lives of localizers both more productive and less frustrating. The +Toolkit is part of the Translate project. + +The software includes programs to convert localization formats to the common PO, +and emerging XLIFF format. There are also programs to check and manage PO and +XLIFF files. Online documentation includes guides on using the tools, running a +localization project and how to localize various projects from OpenOffice.org to +Mozilla. + +At its core the software contains a set of classes for handling various +localization storage formats: DTD, properties, OpenOffice.org GSI/SDF, CSV, MO, +Qt .ts, TMX, TBX, WordFast txt, Gettext .mo, Windows RC, and of course PO and +XLIFF. It also provides scripts to convert between these formats. + +Also part of the Toolkit are Python programs to create word counts, merge +translations and perform various checks on translation files. + +WWW: https://toolkit.translatehouse.org/ +WWW: https://github.com/translate/translate diff --git a/textproc/translate-toolkit/pkg-plist b/textproc/translate-toolkit/pkg-plist new file mode 100644 index 000000000000..07f20845ebc0 --- /dev/null +++ b/textproc/translate-toolkit/pkg-plist @@ -0,0 +1,54 @@ +man/man1/csv2po.1.gz +man/man1/csv2tbx.1.gz +man/man1/dtd2po.1.gz +man/man1/flatxml2po.1.gz +man/man1/html2po.1.gz +%%OPTIONAL%%man/man1/ical2po.1.gz +man/man1/idml2po.1.gz +%%OPTIONAL%%man/man1/ini2po.1.gz +man/man1/json2po.1.gz +man/man1/moz2po.1.gz +man/man1/mozlang2po.1.gz +man/man1/odf2xliff.1.gz +man/man1/oo2po.1.gz +man/man1/oo2xliff.1.gz +%%OPTIONAL%%man/man1/php2po.1.gz +man/man1/po2csv.1.gz +man/man1/po2dtd.1.gz +man/man1/po2flatxml.1.gz +man/man1/po2html.1.gz +%%OPTIONAL%%man/man1/po2ical.1.gz +man/man1/po2idml.1.gz +%%OPTIONAL%%man/man1/po2ini.1.gz +man/man1/po2json.1.gz +man/man1/po2moz.1.gz +man/man1/po2mozlang.1.gz +man/man1/po2oo.1.gz +%%OPTIONAL%%man/man1/po2php.1.gz +man/man1/po2prop.1.gz +%%OPTIONAL%%man/man1/po2rc.1.gz +man/man1/po2resx.1.gz +man/man1/po2sub.1.gz +man/man1/po2symb.1.gz +man/man1/po2tiki.1.gz +man/man1/po2tmx.1.gz +man/man1/po2ts.1.gz +man/man1/po2txt.1.gz +man/man1/po2web2py.1.gz +man/man1/po2wordfast.1.gz +man/man1/po2xliff.1.gz +@comment %%OPTIONAL%%man/man1/po2yaml.1.gz +man/man1/pot2po.1.gz +man/man1/prop2po.1.gz +%%OPTIONAL%%man/man1/rc2po.1.gz +man/man1/resx2po.1.gz +man/man1/sub2po.1.gz +man/man1/symb2po.1.gz +man/man1/tbx2po.1.gz +man/man1/tiki2po.1.gz +man/man1/ts2po.1.gz +man/man1/txt2po.1.gz +man/man1/web2py2po.1.gz +man/man1/xliff2odf.1.gz +man/man1/xliff2oo.1.gz +@comment %%OPTIONAL%%man/man1/yaml2po.1.gz |