[Libreoffice-commits] .: reportbuilder/util

Andras Timar timar at kemper.freedesktop.org
Mon Oct 31 07:58:45 PDT 2011


 reportbuilder/util/component.txt         |    1 -
 reportbuilder/util/description-en-US.txt |    1 +
 reportbuilder/util/description.xml       |    2 +-
 reportbuilder/util/makefile.mk           |   21 ++++++++++++++-------
 4 files changed, 16 insertions(+), 9 deletions(-)

New commits:
commit d5486145c510de842a17f906fd8a7119d30d9993
Author: Andras Timar <atimar at suse.com>
Date:   Mon Oct 31 15:51:35 2011 +0100

    enable localization of extension description in reportbuilder

diff --git a/reportbuilder/util/component.txt b/reportbuilder/util/component.txt
deleted file mode 100755
index 21a1f1e..0000000
--- a/reportbuilder/util/component.txt
+++ /dev/null
@@ -1 +0,0 @@
-Create with the Report Builder stylish, smart-looking database reports. The flexible report editor can define group and page headers as well as group and page footers and even calculation fields are available to accomplish complex database reports.
diff --git a/reportbuilder/util/description-en-US.txt b/reportbuilder/util/description-en-US.txt
new file mode 100644
index 0000000..21a1f1e
--- /dev/null
+++ b/reportbuilder/util/description-en-US.txt
@@ -0,0 +1 @@
+Create with the Report Builder stylish, smart-looking database reports. The flexible report editor can define group and page headers as well as group and page footers and even calculation fields are available to accomplish complex database reports.
diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml
index 78ae108..f048b86 100644
--- a/reportbuilder/util/description.xml
+++ b/reportbuilder/util/description.xml
@@ -17,7 +17,7 @@
     <default xlink:href="images/extension_32.png" />
   </icon>
   <extension-description>
-    <src xlink:href="component.txt" lang="en-US" />
+    <src xlink:href="description-en-US.txt" lang="en-US" />
   </extension-description>
 </description>
 
diff --git a/reportbuilder/util/makefile.mk b/reportbuilder/util/makefile.mk
index c099efb..99752c2 100644
--- a/reportbuilder/util/makefile.mk
+++ b/reportbuilder/util/makefile.mk
@@ -81,8 +81,8 @@ COMPONENT_HTMLFILES = $(EXTENSIONDIR)$/THIRDPARTYREADMELICENSE.html \
 COMPONENT_JARFILES = \
     $(EXTENSIONDIR)$/sun-report-builder.jar
 
-COMPONENT_HELP= \
-    $(EXTENSIONDIR)$/component.txt
+COMPONENT_DESCRIPTION= \
+    $(foreach,lang,$(alllangiso) $(EXTENSIONDIR)$/description-$(lang).txt)
 
 # .jar files from solver
 COMPONENT_EXTJARFILES = \
@@ -114,7 +114,7 @@ COMPONENT_MANIFEST_GENERIC:=TRUE
 COMPONENT_MANIFEST_SEARCHDIR:=registry
 
 # make sure to add your custom files here
-EXTENSION_PACKDEPS=$(COMPONENT_EXTJARFILES) $(MISC)/$(TARGET).copied $(COMPONENT_HTMLFILES) $(COMPONENT_OTR_FILES) $(COMPONENT_HELP) $(COMPONENT_IMAGES)
+EXTENSION_PACKDEPS=$(COMPONENT_EXTJARFILES) $(MISC)/$(TARGET).copied $(COMPONENT_HTMLFILES) $(COMPONENT_OTR_FILES) $(COMPONENT_DESCRIPTION) $(COMPONENT_IMAGES)
 .ENDIF
 # --- Targets ----------------------------------
 
@@ -138,13 +138,20 @@ $(EXTENSIONDIR)$/THIRDPARTYREADMELICENSE.html : $(PRJ)$/license$/THIRDPARTYREADM
     @@-$(MKDIRHIER) $(@:d)
     $(COPY) $< $@
     
-$(COMPONENT_HELP) : $$(@:f)
-    @@-$(MKDIRHIER) $(@:d)
-    $(COPY) $< $@
+$(COMPONENT_DESCRIPTION) : $(DESCRIPTION)
+    
 
 $(DESCRIPTION_SRC): description.xml
     +-$(RM) $@
-    $(TYPE) description.xml | $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" > $@
+    $(COPY) description-en-US.txt $(EXTENSIONDIR)/description-en-US.txt
+.IF "$(WITH_LANG)" != ""
+    $(XRMEX) -p $(PRJNAME) -i description.xml -o $@ -m $(LOCALIZESDF) -l all
+    $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" < $@ > $@.new
+    mv $@.new $@
+    @$(COPY) $(@:d)/description-*.txt $(EXTENSIONDIR)
+.ELSE
+    $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" < $< > $@
+.ENDIF
 
 $(MISC)/$(TARGET).copied: $(COMPONENT_EXTJARFILES_COPY)
     @@-$(MKDIRHIER) $(EXTENSIONDIR)
diff --git a/reportbuilder/util/makefile.pmk b/reportbuilder/util/makefile.pmk
old mode 100755
new mode 100644


More information about the Libreoffice-commits mailing list