diff options
author | Petr Mladek <pmladek@suse.cz> | 2011-01-08 20:12:41 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-01-10 16:49:46 +0100 |
commit | 6a72e7759946bcf227c6886e4e24732372ecb353 (patch) | |
tree | a9c83f00bd3452e27c6c202a4d82de01e1f70f2c /sysui/desktop/share | |
parent | 18e2b6173baecd1c24afdd8ccb3eb9e3ce8235b3 (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/share')
-rw-r--r-- | sysui/desktop/share/brand.pl | 8 | ||||
-rw-r--r-- | sysui/desktop/share/makefile.mk | 8 | ||||
-rw-r--r-- | sysui/desktop/share/translate.pl | 6 |
3 files changed, 18 insertions, 4 deletions
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/-/_/; |