summaryrefslogtreecommitdiff
path: root/sysui/desktop
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-01-08 20:12:41 +0100
committerPetr Mladek <pmladek@suse.cz>2011-01-10 16:49:46 +0100
commit6a72e7759946bcf227c6886e4e24732372ecb353 (patch)
treea9c83f00bd3452e27c6c202a4d82de01e1f70f2c /sysui/desktop
parent18e2b6173baecd1c24afdd8ccb3eb9e3ce8235b3 (diff)
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}" Signed off by Michael Meeks
Diffstat (limited to 'sysui/desktop')
-rw-r--r--sysui/desktop/menus/base.desktop2
-rw-r--r--sysui/desktop/menus/calc.desktop2
-rw-r--r--sysui/desktop/menus/draw.desktop2
-rw-r--r--sysui/desktop/menus/impress.desktop2
-rw-r--r--sysui/desktop/menus/javafilter.desktop2
-rw-r--r--sysui/desktop/menus/math.desktop2
-rw-r--r--sysui/desktop/menus/printeradmin.desktop2
-rw-r--r--sysui/desktop/menus/qstart.desktop2
-rw-r--r--sysui/desktop/menus/startcenter.desktop2
-rw-r--r--sysui/desktop/menus/writer.desktop2
-rw-r--r--sysui/desktop/share/brand.pl8
-rw-r--r--sysui/desktop/share/makefile.mk8
-rw-r--r--sysui/desktop/share/translate.pl6
13 files changed, 28 insertions, 14 deletions
diff --git a/sysui/desktop/menus/base.desktop b/sysui/desktop/menus/base.desktop
index a195c89f45b0..3cb84f84fb92 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 522c17923b46..d88558904bd7 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 3ea174127f9d..21c31b8f35c3 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 dc08e25748ea..33a7d9046320 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 f7f1f4f6c094..44370f374dd5 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 c10e5486e3e8..cd0717a56221 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 c845dd99ebde..3da4d82a33b1 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 c6f63d365302..1250fede3fe9 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 2a03e566a38c..8d330140d2ae 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 75d26a75cada..95fe8db02fa0 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 9a1b0af57816..ea689c310587 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 5b672aa7b2fc..898d7b029f01 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 197c333e6f37..cdc636b7a266 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/-/_/;