[Freeipa-devel] [PATCH 70] validate i18n strings when running "make lint"

Petr Viktorin pviktori at redhat.com
Thu Apr 12 13:26:15 UTC 2012


On 03/30/2012 03:45 AM, John Dennis wrote:
> Translatable strings have certain requirements for proper translation
> and run time behaviour. We should routinely validate those strings. A
> recent checkin to install/po/test_i18n.py makes it possible to validate
> the contents of our current pot file by searching for problematic strings.
>
> However, we only occasionally generate a new pot file, far less
> frequently than translatable strings change in the source base. Just
> like other checkin's to the source which are tested for correctness we
> should also validate new or modified translation strings when they are
> introduced and not accumulate problems to fix at the last minute. This
> would also raise the awareness of developers as to the requirements for
> proper string translation.
>
> The top level Makefile should be enhanced to create a temporary pot
> files from the current sources and validate it. We need to use a
> temporary pot file because we do not want to modify the pot file under
> source code control and exported to Transifex.
>

NACK

install/po/Makefile is not created early enough when running `make rpms` 
from a clean checkout.

# git clean -fx
...
# make rpms
rm -rf /rpmbuild
mkdir -p /rpmbuild/BUILD
mkdir -p /rpmbuild/RPMS
mkdir -p /rpmbuild/SOURCES
mkdir -p /rpmbuild/SPECS
mkdir -p /rpmbuild/SRPMS
mkdir -p dist/rpms
mkdir -p dist/srpms
if [ ! -e RELEASE ]; then echo 0 > RELEASE; fi
sed -e s/__VERSION__/2.99.0GITde16a82/ -e s/__RELEASE__/0/ \
         freeipa.spec.in > freeipa.spec
sed -e s/__VERSION__/2.99.0GITde16a82/ version.m4.in \
         > version.m4
sed -e s/__VERSION__/2.99.0GITde16a82/ ipapython/setup.py.in \
         > ipapython/setup.py
sed -e s/__VERSION__/2.99.0GITde16a82/ ipapython/version.py.in \
         > ipapython/version.py
perl -pi -e "s:__NUM_VERSION__:2990:" ipapython/version.py
perl -pi -e "s:__API_VERSION__:2.34:" ipapython/version.py
sed -e s/__VERSION__/2.99.0GITde16a82/ daemons/ipa-version.h.in \
         > daemons/ipa-version.h
perl -pi -e "s:__NUM_VERSION__:2990:" daemons/ipa-version.h
perl -pi -e "s:__DATA_VERSION__:20100614120000:" daemons/ipa-version.h
sed -e s/__VERSION__/2.99.0GITde16a82/ -e s/__RELEASE__/0/ \
         ipa-client/ipa-client.spec.in > ipa-client/ipa-client.spec
sed -e s/__VERSION__/2.99.0GITde16a82/ ipa-client/version.m4.in \
         > ipa-client/version.m4
if [ "redhat" != "" ]; then \
         sed -e s/SUPPORTED_PLATFORM/redhat/ ipapython/services.py.in \
                 > ipapython/services.py; \
fi
if [ "" != "yes" ]; then \
         ./makeapi --validate; \
fi
make -C install/po validate-src-strings
make[1]: Entering directory `/home/pviktori/freeipa/install/po'
make[1]: *** No rule to make target `validate-src-strings'.  Stop.
make[1]: Leaving directory `/home/pviktori/freeipa/install/po'
make: *** [validate-src-strings] Error 2



-- 
Petr³




More information about the Freeipa-devel mailing list