ooo-build r13396 - in trunk: . bin distro-configs doc patches/dev300



Author: pmladek
Date: Fri Jul 25 19:06:32 2008
New Revision: 13396
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13396&view=rev

Log:
2008-07-25  Petr Mladek  <pmladek suse cz>

	* distro-configs/PlainLinux.conf.in, configure.in, patches/dev300/apply:
	  new PlainLinux distro; the main purpose is extract strings from
	  an unpatched build
	  
	  Feel free to improve it to build upstream-like builds that might
	  be suitable for the upstream QA
	  
	* doc/localization.txt, bin/extract-gsi, bin/extract-new-strings:
	  initial support for localizing ooo-build-specific strings, see
	  the localization.txt for more details



Added:
   trunk/bin/extract-gsi   (contents, props changed)
   trunk/bin/extract-new-strings   (contents, props changed)
   trunk/distro-configs/PlainLinux.conf.in
   trunk/doc/localization.txt
Modified:
   trunk/ChangeLog
   trunk/bin/Makefile.am
   trunk/configure.in
   trunk/patches/dev300/apply

Modified: trunk/bin/Makefile.am
==============================================================================
--- trunk/bin/Makefile.am	(original)
+++ trunk/bin/Makefile.am	Fri Jul 25 19:06:32 2008
@@ -7,6 +7,8 @@
 	build-ooo \
 	build-tools \
 	cvs-tags-normalize \
+	extract-gsi \
+	extract-new-strings \
 	font-munge \
 	fix-deps \
 	generate-bash-completion \

Added: trunk/bin/extract-gsi
==============================================================================
--- (empty file)
+++ trunk/bin/extract-gsi	Fri Jul 25 19:06:32 2008
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+#
+# See setup for user tweakables.
+#
+. ./setup
+. $OOBUILDDIR/*.[sS]et.sh
+. ./setup
+
+primary_lang="en-US"
+extra_options=
+
+usage()
+{
+    echo "This script extracts localized strings in to the GSI file"
+    echo
+    echo "Usage:" ${0##*/} [-d] locale gsi_file
+    echo
+    echo "Options:"
+    echo "	-d	 use default date in extracted sdf file"
+    echo "	locale   locale id of the language, e.g. en-US"
+    echo "      gsi_file output file"
+    echo
+    echo "Presumptions:"
+    echo "	- the module transex3 is built"
+    echo
+    echo "Note that the script is quite slow. It takes some minutes to extract strings"
+    echo "for one localization..."
+}
+
+test "$1" = "--help" && usage && exit 1;
+
+test "$1" = "-d" && extra_options="-d" && shift
+locale="$1"
+gsi_file="$2"
+
+if test -z "$locale" ; then
+    echo "Error: locale is not defined, try --help"
+    exit 1;
+fi
+
+if test -z "$locale" ; then
+    echo "Error: output gsi file is not defined, try --help"
+    exit 1;
+fi
+
+if ! which localize >/dev/null 2>&1 ; then
+    echo "Error: Unable to find the script \"localize\". Please, build and deliver"
+    echo "       the module transex3."
+    exit 1;
+fi
+
+if ! echo "$2" | grep -q "^/" ; then
+    gsi_file=`pwd`/$gsi_file
+fi
+
+cd $OOBUILDDIR
+localize -e -f "$gsi_file" -l "$locale=$primary_lang" $extra_options
+cd -

Added: trunk/bin/extract-new-strings
==============================================================================
--- (empty file)
+++ trunk/bin/extract-new-strings	Fri Jul 25 19:06:32 2008
@@ -0,0 +1,47 @@
+#! /bin/sh
+
+#
+# See setup for user tweakables.
+#
+
+usage()
+{
+    echo "This script compares two GSI files and puts new strings into"
+    echo "the output GSI file"
+    echo
+    echo "Usage:" ${0##*/} gsi_old gsi_new gsi_out
+    echo
+}
+
+test $# -lt 3 -o "$1" = "--help" && usage && exit 1;
+
+gsi_old="$1"
+gsi_new="$2"
+gsi_out="$3"
+
+gsi_old_norm=`mktemp /tmp/extract-new-strings.XXXXXX`
+gsi_new_norm=`mktemp /tmp/extract-new-strings.XXXXXX`
+
+gsi_old_sort=`mktemp /tmp/extract-new-strings.XXXXXX`
+gsi_new_sort=`mktemp /tmp/extract-new-strings.XXXXXX`
+
+echo $gsi_old_norm
+
+cat $gsi_old >>$gsi_old_norm
+cat $gsi_new >>$gsi_new_norm
+
+echo "Normalizing..."
+
+perl -pi -e 's/^([^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t)[0-9]+/${1}999/' $gsi_old_norm
+perl -pi -e 's/^([^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t)[0-9]+/${1}999/' $gsi_new_norm
+
+echo "Sorting..."
+
+sort $gsi_old_norm >$gsi_old_sort
+sort $gsi_new_norm >$gsi_new_sort
+
+echo "Extracting..."
+
+diff -up $gsi_old_sort $gsi_new_sort | grep -v "^+++" | grep "^+" | sed "s|^+||" >$gsi_out
+
+rm -f $gsi_old_norm $gsi_new_norm $gsi_old_sort $gsi_new_sort

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Jul 25 19:06:32 2008
@@ -1300,6 +1300,7 @@
 distro-configs/rpl2-64.conf
 distro-configs/Pardus2007.conf
 distro-configs/Pardus2008.conf
+distro-configs/PlainLinux.conf
 distro-configs/Win32.conf
 distro-configs/Solaris.conf
 distro-configs/GoOoLinux.conf

Added: trunk/distro-configs/PlainLinux.conf.in
==============================================================================
--- (empty file)
+++ trunk/distro-configs/PlainLinux.conf.in	Fri Jul 25 19:06:32 2008
@@ -0,0 +1,28 @@
+--with-intro-bitmaps=\"$SRCDIR/openintro_go-oo.bmp\"
+--with-about-bitmaps=\"$SRCDIR/openabout_go-oo.bmp\"
+--with-vendor=\"Novell, Inc.\"
+--disable-access
+--enable-odk
+--enable-binfilter
+--disable-libsn
+--with-ant-home=/usr/share/ant
+--with-jdk-home=$JAVA_HOME
+--enable-epm
+--enable-kde
+--without-system-mozilla
+--without-system-freetype
+--without-system-jpeg
+--without-system-libxml
+--without-system-libxslt
+--without-system-python
+--without-system-zlib
+--without-system-jars
+--without-system-stdlibs
+--disable-crypt-link
+--disable-mozilla
+--disable-pam-link
+--disable-xrender-link
+--without-openldap
+--without-system-xrender-headers
+--without-system-mesa-headers
+--without-unix-wrapper

Added: trunk/doc/localization.txt
==============================================================================
--- (empty file)
+++ trunk/doc/localization.txt	Fri Jul 25 19:06:32 2008
@@ -0,0 +1,57 @@
+Localization of ooo-build features/fixes
+========================================
+
+How to regenerate POT/PO files:
+-------------------------------
+
+1. do plain build (without patches)
+    + ./configure --with-distro=PlainLinux
+    + enough to build transex3
+2. get upstream strings
+    + cd ooo-build/bin
+    + ./extract-gsi -d en-US GSI-upstream-en-US.sdf
+3. do patched build
+    + FIXME: --with-distro=SUSE or apply patches in the plain build
+    + again enough to build transex3
+4.get ooo-build strings
+    ./extract-gsi -d en-US GSI-ooo-build-en-US.sdf
+5. get ooo-build-specific strings
+    ./extract-new-strings GSI-upstream-en-US.sdf GSI-ooo-build-en-US.sdf GSI-upstream-en-US-new.sdf
+6. transform SDF -> PO
+    + have to install oo2po tool that is part of translate-toolkit, see
+      http://translate.sourceforge.net/wiki/
+    + the package for openSUSE is named python-translate-toolkit and
+      can be found at
+      http://download.opensuse.org/repositories/OpenOffice.org:/EXTRAS/
+    + FIXME: put it into the python project in the Build Service
+    + TODO: a tool to do the transformation easily
+
+
+How to get the strings translated:
+----------------------------------
+
++ by GNOME community?
+    + could get more and earlier?
+    + follow GNOME project rules
++ by Novell and openSUSE community
+    + problem with timing because it is synced with openSUSE release
+    + guarantee supported languages
+    + translation is not project specific
+
+How to apply new translations:
+------------------------------
+
+1. transform PO -> SDF 
+    + TODO: in bin/localize-ooo or by make?
+    + using the po2oo tool from translate-toolkit, see above
+2. apply the translations:
+    + TODO: in localize-ooo
+    + using the localize tool (like the other gsi/sdf files
+
+
+Extra stuff:
+------------
+
+    + get SDF for single patch (when upstreaming)
+    + merge translations from other sources (really needed?)
+    + distro-specific translations (do they exist?)

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Jul 25 19:06:32 2008
@@ -138,6 +138,9 @@
 
 OxygenOfficeLinux:	OxygenOfficeLinuxCommon, OxygenOfficePalettes, OxygenOfficeDefaultSettings, OxygenOfficeExtras
 OxygenOfficeWindows:	OxygenOfficeWin32Common, OxygenOfficePalettes, OxygenOfficeDefaultSettings, OxygenOfficeExtras
+# Plain build; just with base build fixes
+PlainLinux: PlainBuildFixes
+
 # -------- [ Tag [ >= <tag> etc. ], ] patch sets --------
 
 [ PreprocessPatches ]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]