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

Bug#180973: openoffice.org: File - New and Wizard not translated



Package: openoffice.org
Version: 1.0.2-2
Severity: normal
Tags: patch

I built OpenOffice.org for Red Hat recently, and noticed that the
File - New and Wizard menus were translated. Red Hat uses a similar
language pack setup as Debian, so I tried to find out what they had
done to make this work.

I found two passages in the RPM spec file, one before and one after
doing the net install. I adapted them to Debian's rules file, as in
the attached patch. It seems to work nicely.

The code is adapted from openoffice-1.0.1-8.src.rpm from Red Hat 8.0.
I couldn't find the original spec file accessible anywhere on the net,
so I've put it here for reference:

<URL: http://developer.skulelinux.no/~gautehk/openoffice/openoffice-1.0.spec >

Feel free to reorganize the code, as I don't know the build system
well enough to determine where the code snippets should preferably be
placed.

Regards,
 Gaute Hvoslef Kvalnes


localhost:/usr/src/1.0.2/openoffice.org-1.0.2/debian# cvs diff -u rules
Index: rules
===================================================================
RCS file: /cvs/debian-openoffice/oo-deb/debian/rules,v
retrieving revision 1.92
diff -u -r1.92 rules
--- rules       11 Feb 2003 16:49:27 -0000      1.92
+++ rules       14 Feb 2003 09:30:28 -0000
@@ -341,6 +341,29 @@
        dh_testdir
        . $(SOURCE_TREE)/$(ENVFILE); cd $(SOURCE_TREE)/instsetoo && $(BUILDCMD) -from instsetoo instsetext="$(BUILDLANG)" $(BUILDFLAGS)

+       # Localize New and Wizard menus and OfficeObjects
+       cd $(SOURCE_TREE)/instsetoo/$(ARCHBUILDDIR)/01/normal/; \
+       (\
+       for i in `( cd ../../; echo [0-9][0-9] ) | sed 's/01 //'`; do \
+       if [ -f ../../$$i/normal/setup.ins ]; then \
+               CONV=cat; \
+               case "$$i" in \
+                       3[34]|4[69]) \
+                               CONV="iconv -f ISO-8859-1// -t UTF-8//";; \
+                       3[19]|45|90) \
+                               ;; \
+                       0[37]|30|4[28]) \
+                               ;; \
+               esac; \
+               grep -A6 'gid_Configurationitem_Common_\(Objectnames.*_Name\|Menus_.*Titel\)' \
+               ../../$$i/normal/setup.ins | $$CONV \
+               | sed "s/^--//;/^ConfigurationItem/s/\(Name\|Titel\)/$$i&/"; \
+               echo; \
+       fi \
+       done \
+       ) | awk ' $$1 ~ /Value/ { l=$$0; sub(/^.*= "/,"",l); sub(/";.*$$/,"",l); sub(/%PRODUCTNAME/,"OpenOffice.org",l); sub(/%PRODUCTVERSION/,"%{fullver}",l); n=n+1; str="@@REPLACEME" n "@@"; s="\"" str "\""; sub(/".*"/,s); printf "s|%s|%s|\n", str, l > "Common.xml.sed" } { print } ' \
+       >> setup.ins \
+
        touch $@

 # Build step . - build insetsetoo installation scrips for langpacks
@@ -432,6 +455,15 @@

        # Remove copy of libstdc++ since we do not use it
        rm -f $(PKGOPENOFFICEDIR)/program/libstdc++*
+
+       # Now fixup Common.xml
+       sed -e 's|<cfg:string cfg:type="string" cfg:name="\([^"]*\)"\(>@@REPLACEME.*@@</cfg:\)string>|<cfg:value xml:lang="\1"\2value>|' \
+       $(DEBTREEDIR)/usr/lib/openoffice/share/config/registry/instance/org/openoffice/Office/Common.xml \
+       > $(DEBTREEDIR)/usr/lib/openoffice/share/config/registry/instance/org/openoffice/Office/Common.xml.tmp ; \
+       sed -f $(CURDIR)/$(BUILD_DIR)/instsetoo/$(ARCHBUILDDIR)/01/normal/Common.xml.sed \+       $(DEBTREEDIR)/usr/lib/openoffice/share/config/registry/instance/org/openoffice/Office/Common.xml.tmp \
+       > $(DEBTREEDIR)/usr/lib/openoffice/share/config/registry/instance/org/openoffice/Office/Common.xml ; \
+       rm -f $(DEBTREEDIR)/usr/lib/openoffice/share/config/registry/instance/org/openoffice/Office/Common.xml.tmp

        touch $@


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux localhost 2.4.20-386 #1 Sat Dec 21 14:31:26 EST 2002 i686
Locale: LANG=nn_NO, LC_CTYPE=nn_NO

Versions of packages openoffice.org depends on:
ii  openoffice.org-bin            1.0.2-2    OpenOffice.org office suite binary
ii  openoffice.org-debian-files   1.0.2-2+1  Debian specific parts of OpenOffic
ii  openoffice.org-l10n-ar        1.0.2-2    Arabic language package for openof
ii  openoffice.org-l10n-da        1.0.2-2    Danish language package for openof
ii  openoffice.org-l10n-de        1.0.2-2    German language package for openof
ii  openoffice.org-l10n-el        1.0.2-2    Greek language package for openoff
ii  openoffice.org-l10n-en        1.0.2-2    English (US) language package for 
ii  openoffice.org-l10n-es        1.0.2-2    Spanish language package for openo
ii  openoffice.org-l10n-fr        1.0.2-2    French language package for openof
ii  openoffice.org-l10n-it        1.0.2-2    Italian language package for openo
ii  openoffice.org-l10n-ja        1.0.2-2    Japanese language package for open
ii  openoffice.org-l10n-ko        1.0.2-2    Korean language package for openof
ii  openoffice.org-l10n-nl        1.0.2-2    Dutch language package for openoff
ii  openoffice.org-l10n-pl        1.0.2-2    Polish language package for openof
ii  openoffice.org-l10n-pt        1.0.2-2    Portuguese language package for op
ii  openoffice.org-l10n-ru        1.0.2-2    Russian language package for openo
ii  openoffice.org-l10n-sv        1.0.2-2    Swedish language package for openo
ii  openoffice.org-l10n-tr        1.0.2-2    Turkish language package for openo
ii  openoffice.org-l10n-zh-CN     1.0.2-2    Chinese (simplified) language pack
ii  openoffice.org-l10n-zh-TW     1.0.2-2    Chinese (traditional) language pac




Reply to: