Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Michael,

could you please sign off the attached patch?

It is needed to create the linux desktop files with
"Name[pt_BR]=BrOffice 3.3".

I am sorry, I havn't managed to verify your original fix before 3.3-rc2
release. I have lated found that it did not work because of:

        + * dekstop files need "pt_BR" instead of "pt-BR" (undescore vs.
            dash)
        * "%PRODUCTNAME_BR" was wrongly substituted to
          "${PRODUCTNAME} ${PRODUCTVERSION}_BR"; it should be
          "${PRODUCTNAME_BR} ${PRODUCTVERSION}"

It works fine with the attached patch.


Best Regards,
Petr
From 2977c5dda829890fd73462848469de9da56c1759 Mon Sep 17 00:00:00 2001
From: Petr Mladek <pmladek@suse.cz>
Date: Sat, 8 Jan 2011 20:12:41 +0100
Subject: [PATCH] Really set BrOffice in the linux desktop files

* dekstop files need "pt_BR" instead of "pt-BR" (undescore vs. dash)
* "%PRODUCTNAME_BR" was wrongly substitured to
  "${PRODUCTNAME} ${PRODUCTVERSION}_BR"; it should be
  "${PRODUCTNAME_BR} ${PRODUCTVERSION}"
---
 sysui/desktop/menus/base.desktop         |    2 +-
 sysui/desktop/menus/calc.desktop         |    2 +-
 sysui/desktop/menus/draw.desktop         |    2 +-
 sysui/desktop/menus/impress.desktop      |    2 +-
 sysui/desktop/menus/javafilter.desktop   |    2 +-
 sysui/desktop/menus/math.desktop         |    2 +-
 sysui/desktop/menus/printeradmin.desktop |    2 +-
 sysui/desktop/menus/qstart.desktop       |    2 +-
 sysui/desktop/menus/startcenter.desktop  |    2 +-
 sysui/desktop/menus/writer.desktop       |    2 +-
 sysui/desktop/share/brand.pl             |    8 ++++++++
 sysui/desktop/share/makefile.mk          |    8 ++++----
 sysui/desktop/share/translate.pl         |    6 ++++++
 13 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/sysui/desktop/menus/base.desktop b/sysui/desktop/menus/base.desktop
index a195c89..3cb84f8 100644
--- a/sysui/desktop/menus/base.desktop
+++ b/sysui/desktop/menus/base.desktop
@@ -7,7 +7,7 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-MoreApplicat
 Exec=${UNIXBASISROOTNAME} -base %U
 MimeType=application/vnd.oasis.opendocument.database;application/vnd.sun.xml.base;
 Name=%PRODUCTNAME Base
-Name[pt-BR]=%PRODUCTNAME_BR Base
+Name[pt_BR]=%PRODUCTNAME_BR Base
 GenericName=Database Development
 Comment=Manage databases, create queries and reports to track and manage your information by using 
Base.
 InitialPreference=5
diff --git a/sysui/desktop/menus/calc.desktop b/sysui/desktop/menus/calc.desktop
index 522c179..d885589 100644
--- a/sysui/desktop/menus/calc.desktop
+++ b/sysui/desktop/menus/calc.desktop
@@ -7,7 +7,7 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Sprea
 Exec=${UNIXBASISROOTNAME} -calc %U
 
MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;
 Name=%PRODUCTNAME Calc
-Name[pt-BR]=%PRODUCTNAME_BR Calc
+Name[pt_BR]=%PRODUCTNAME_BR Calc
 GenericName=Spreadsheet
 Comment=Perform calculation, analyze information and manage lists in spreadsheets by using Calc.
 InitialPreference=5
diff --git a/sysui/desktop/menus/draw.desktop b/sysui/desktop/menus/draw.desktop
index 3ea1741..21c31b8 100644
--- a/sysui/desktop/menus/draw.desktop
+++ b/sysui/desktop/menus/draw.desktop
@@ -7,7 +7,7 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Drawi
 Exec=${UNIXBASISROOTNAME} -draw %U
 
MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw;
 Name=%PRODUCTNAME Draw
-Name[pt-BR]=%PRODUCTNAME_BR Draw
+Name[pt_BR]=%PRODUCTNAME_BR Draw
 GenericName=Drawing Program
 Comment=Create and edit drawings, flow charts, and logos by using Draw.
 InitialPreference=5
diff --git a/sysui/desktop/menus/impress.desktop b/sysui/desktop/menus/impress.desktop
index dc08e25..33a7d90 100644
--- a/sysui/desktop/menus/impress.desktop
+++ b/sysui/desktop/menus/impress.desktop
@@ -7,7 +7,7 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Prese
 Exec=${UNIXBASISROOTNAME} -impress %U
 
MimeType=application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;
 Name=%PRODUCTNAME Impress
-Name[pt-BR]=%PRODUCTNAME_BR Impress
+Name[pt_BR]=%PRODUCTNAME_BR Impress
 GenericName=Presentation
 Comment=Create and edit presentations for slideshows, meeting and Web pages by using Impress.
 InitialPreference=5
diff --git a/sysui/desktop/menus/javafilter.desktop b/sysui/desktop/menus/javafilter.desktop
index f7f1f4f..44370f3 100644
--- a/sysui/desktop/menus/javafilter.desktop
+++ b/sysui/desktop/menus/javafilter.desktop
@@ -5,6 +5,6 @@ Type=Application
 Exec=openoffice -writer %U
 MimeType=application/x-aportisdoc;application/x-pocket-word;application/x-pocket-excel;
 Name=%PRODUCTNAME Small Device Format Importer
-Name[pt-BR]=%PRODUCTNAME_BR Small Device Format Importer
+Name[pt_BR]=%PRODUCTNAME_BR Small Device Format Importer
 GenericName=Small Device Format Importer
 NoDisplay=true
diff --git a/sysui/desktop/menus/math.desktop b/sysui/desktop/menus/math.desktop
index c10e548..cd0717a 100644
--- a/sysui/desktop/menus/math.desktop
+++ b/sysui/desktop/menus/math.desktop
@@ -7,7 +7,7 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other
 Exec=${UNIXBASISROOTNAME} -math %U
 
MimeType=application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math;
 Name=%PRODUCTNAME Math
-Name[pt-BR]=%PRODUCTNAME_BR Math
+Name[pt_BR]=%PRODUCTNAME_BR Math
 GenericName=Formula Editor
 Comment=Create and edit scientific formulas and equations by using Math.
 InitialPreference=5
diff --git a/sysui/desktop/menus/printeradmin.desktop b/sysui/desktop/menus/printeradmin.desktop
index c845dd9..3da4d82 100644
--- a/sysui/desktop/menus/printeradmin.desktop
+++ b/sysui/desktop/menus/printeradmin.desktop
@@ -6,5 +6,5 @@ Type=Application
 Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;
 Exec=${UNIXBASISROOTNAME}-printeradmin
 Name=%PRODUCTNAME Printer Administration
-Name[pt-BR]=%PRODUCTNAME_BR Printer Administration
+Name[pt_BR]=%PRODUCTNAME_BR Printer Administration
 
diff --git a/sysui/desktop/menus/qstart.desktop b/sysui/desktop/menus/qstart.desktop
index c6f63d3..1250fed 100644
--- a/sysui/desktop/menus/qstart.desktop
+++ b/sysui/desktop/menus/qstart.desktop
@@ -6,5 +6,5 @@ Categories=Office;
 Exec=${UNIXBASISROOTNAME} -quickstart -nologo -nodefault
 NoDisplay=true
 Name=%PRODUCTNAME Quickstarter
-Name[pt-BR]=%PRODUCTNAME_BR Quickstarter
+Name[pt_BR]=%PRODUCTNAME_BR Quickstarter
 Comment=Hook for quickstarter startup
diff --git a/sysui/desktop/menus/startcenter.desktop b/sysui/desktop/menus/startcenter.desktop
index 2a03e56..8d33014 100644
--- a/sysui/desktop/menus/startcenter.desktop
+++ b/sysui/desktop/menus/startcenter.desktop
@@ -7,6 +7,6 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other
 Exec=${UNIXBASISROOTNAME} %U
 MimeType=application/vnd.openofficeorg.extension;
 Name=%PRODUCTNAME 
-Name[pt-BR]=%PRODUCTNAME_BR
+Name[pt_BR]=%PRODUCTNAME_BR
 GenericName=Office 
 Comment=The office productivity suite compatible to the open and standardized ODF document format. 
Supported by Sun Microsystems.
diff --git a/sysui/desktop/menus/writer.desktop b/sysui/desktop/menus/writer.desktop
index 75d26a7..95fe8db 100644
--- a/sysui/desktop/menus/writer.desktop
+++ b/sysui/desktop/menus/writer.desktop
@@ -7,7 +7,7 @@ Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Wordp
 Exec=${UNIXBASISROOTNAME} -writer %U
 
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;
 Name=%PRODUCTNAME Writer
-Name[pt-BR]=%PRODUCTNAME_BR Writer
+Name[pt_BR]=%PRODUCTNAME_BR Writer
 GenericName=Word Processor
 Comment=Create and edit text and graphics in letters, reports, documents and Web pages by using 
Writer.
 InitialPreference=5
diff --git a/sysui/desktop/share/brand.pl b/sysui/desktop/share/brand.pl
index 65ab6e2..b928ccd 100644
--- a/sysui/desktop/share/brand.pl
+++ b/sysui/desktop/share/brand.pl
@@ -39,6 +39,7 @@ $destdir = pop @ARGV;
 mkdir $destdir,0777;
 
 $productname = "LibreOffice";
+$productname_br = "BrOffice";
 $productfilename = "libreoffice";
 $prefix = "";
 $iconprefix = "";
@@ -50,6 +51,10 @@ while ($_ = $ARGV[0], /^-/) {
         $productname = $ARGV[0];
         shift;
     }
+    if (/^-b/) {
+        $productname_br = $ARGV[0];
+        shift;
+    }
     if (/^-u/) {
         $productfilename = $ARGV[0];
         shift;
@@ -116,6 +121,9 @@ while (<>) {
             }
         }
 
+        # replace %PRODUCTNAME_BR placeholders
+        s/%PRODUCTNAME_BR/$productname_br/g;
+
         # replace %PRODUCTNAME placeholders
         s/%PRODUCTNAME/$productname/g;
         
diff --git a/sysui/desktop/share/makefile.mk b/sysui/desktop/share/makefile.mk
index 5b672aa..898d7b0 100644
--- a/sysui/desktop/share/makefile.mk
+++ b/sysui/desktop/share/makefile.mk
@@ -150,10 +150,10 @@ $(LAUNCHERFLAGFILE) : $(LAUNCHERDEPN)
     @@-$(MKDIRHIER) $(@:db).$(INPATH).$(@:f)
     @echo Creating desktop entries for $(@:f) ..
     @echo ---------------------------------
-    @$(PERL) brand.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -u $(UNIXWRAPPERNAME) 
--iconprefix '$${{WITHOUTDOTUNIXPRODUCTNAME}}-' $< $(@:db).$(INPATH).$(@:f)
-    @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) 
--ext "desktop" --key "Name" $(ULFDIR)$/launcher_name.ulf
-    @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) 
--ext "desktop" --key "Comment" $(ULFDIR)$/launcher_comment.ulf
-    @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) 
--ext "desktop" --key "GenericName" $(ULFDIR)$/launcher_genericname.ulf
+    @$(PERL) brand.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}'  -b '$${{PRODUCTNAME_BR}} 
$${{PRODUCTVERSION}}' -u $(UNIXWRAPPERNAME) --iconprefix '$${{WITHOUTDOTUNIXPRODUCTNAME}}-' $< 
$(@:db).$(INPATH).$(@:f)
+    @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -b '$${{PRODUCTNAME_BR}} 
$${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Name" 
$(ULFDIR)$/launcher_name.ulf
+    @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -b '$${{PRODUCTNAME_BR}} 
$${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Comment" 
$(ULFDIR)$/launcher_comment.ulf
+    @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -p '$${{PRODUCTNAME_BR}} 
$${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "GenericName" 
$(ULFDIR)$/launcher_genericname.ulf
 .IF "$(WITH_LIBSN)"=="YES"
     @noop x$(foreach,i,$(LAUNCHERLIST) $(shell @echo "StartupNotify=true" >> 
$(@:db).$(INPATH).$(@:f)/$i.desktop))x
 .ENDIF
diff --git a/sysui/desktop/share/translate.pl b/sysui/desktop/share/translate.pl
index 8c6cca0..cb209e4 100644
--- a/sysui/desktop/share/translate.pl
+++ b/sysui/desktop/share/translate.pl
@@ -37,6 +37,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
 
 my ($prefix, $ext, $key);
 $productname = "LibreOffice";
+$productname_br = "BrOffice";
 $workdir = ".";
 
 while ($_ = $ARGV[0], /^-/) {
@@ -46,6 +47,10 @@ while ($_ = $ARGV[0], /^-/) {
         $productname = $ARGV[0];
         shift;
     }
+    if (/^-b/) {
+        $productname_br = $ARGV[0];
+        shift;
+    }
     if (/^-d/) {
         $workdir = $ARGV[0];
         shift;
@@ -122,6 +127,7 @@ KEY:    while (<TEMPLATE>) {
             $value = substr($value, index($value, "\"") + 1, rindex($value, "\"") - 1);
             
             # replace resource placeholder
+            $value=~s/%PRODUCTNAME_BR/$productname_br/g;
             $value=~s/%PRODUCTNAME/$productname/g;
         
             $locale=~s/-/_/;
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.