From 04623c0739fd41eca6382f3534efb5d6332e9bd1 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 17 Jun 2009 13:15:46 +0000 Subject: CWS-TOOLING: integrate CWS l10ncleanup04 2009-05-28 13:46:54 +0200 ihi r272407 : remove forgotten sdf's 2009-05-25 22:32:35 +0200 ihi r272273 : no WITH_LANG fix 2009-05-25 20:45:58 +0200 ihi r272272 : remove some comments 2009-05-25 19:55:21 +0200 ihi r272271 : svx dialog -> cui l10n move 2009-05-25 18:30:58 +0200 ihi r272268 : build fix 2009-05-18 16:32:02 +0200 ihi r272033 : bash fix 2009-05-18 16:31:32 +0200 ihi r272032 : bash fix 2009-05-14 16:23:39 +0200 ihi r271901 : #i79750# Translation moved to l10n module 2009-05-11 23:36:05 +0200 ihi r271793 : #i79750# Translation moved into own module --- helpcontent2/helpers/update_tree.pl | 44 ++++++++++++++++++++++++++++--- helpcontent2/makefile.pmk | 4 +-- helpcontent2/prj/build.lst | 2 +- helpcontent2/source/auxiliary/makefile.mk | 9 ++++--- 4 files changed, 49 insertions(+), 10 deletions(-) diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl index 36fab9ac5d..ae7dddf0d6 100644 --- a/helpcontent2/helpers/update_tree.pl +++ b/helpcontent2/helpers/update_tree.pl @@ -38,6 +38,10 @@ use File::Copy qw/cp mv/; use File::Basename; use Benchmark; +my $is_win = "false"; + +$is_win = "true" , if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq "4nt" ); + $t0 = new Benchmark; # update the tree files in /misc/* @@ -60,12 +64,30 @@ $prj =~ s/\\/\//g if defined($prj); $inpath =~ s/\\/\//g; $destpath =~ s/\\/\//g; + if ( ! defined $prj ) { # do someting that works for manual call ($scriptname = `pwd`) =~ s/\n/\/$0/; ($tree_src = $scriptname) =~ s/\/update_tree.pl/\/..\/source\/auxiliary/; ($tree_dest = $scriptname) =~ s/\/update_tree.pl/\/..\/$destpath\/misc/; ($source_dir = $scriptname) =~ s/\/update_tree.pl/\/..\/source/; + if ( defined $ENV{TRYSDF} && defined $ENV{LOCALIZESDF} ) + { + if( defined $ENV{LOCALIZATION_FOUND} && $ENV{LOCALIZATION_FOUND} eq "YES" ) + { + $source_dir = $ENV{TRYSDF}; + } + else + { + $source_dir = $ENV{LOCALIZESDF}; + } + if( $is_win eq "false" ) { $source_dir =~ s/\/auxiliary\/localize.sdf$// ; } + else { $source_dir =~ s/\\auxiliary\\localize.sdf$// ; } + + } + #else {die "ERROR: The env variables TRYSDF LOCALIZATION_FOUND LOCALIZESDF not found ... something is wrong!\n";} + + $treestrings = "$source_dir/text/shared/tree_strings.xhp"; } else { $tree_src = "$prj\/source\/auxiliary"; @@ -73,10 +95,21 @@ if ( ! defined $prj ) { $source_dir = "$prj\/source"; $treestrings = "$source_dir/text/shared/tree_strings.xhp"; - print "$tree_src\n"; - print "$tree_dest\n"; - print "$source_dir\n"; - print "$treestrings\n"; + if ( defined $ENV{TRYSDF} && defined $ENV{LOCALIZESDF} ) + { + if( defined $ENV{LOCALIZATION_FOUND} && $ENV{LOCALIZATION_FOUND} eq "YES" ) + { + $source_dir = $ENV{TRYSDF}; + } + else + { + $source_dir = $ENV{LOCALIZESDF}; + } + if( $is_win eq "false" ) { $source_dir =~ s/\/auxiliary\/localize.sdf$// ; } + else { $source_dir =~ s/\\auxiliary\\localize.sdf$// ; } + } + #else {die "ERROR: The env variables TRYSDF LOCALIZATION_FOUND LOCALIZESDF not found ... something is wrong!\n";} + } # Get the English tree files as master @@ -313,6 +346,9 @@ sub readtv { sub read_loc { print "\n\nReading localized titles..."; $/ = "\n"; + my $path = "$source_dir/text"; + $path =~ s/\//\\/g , if $is_win eq "true"; + print " in $source_dir/text\n"; @files = `find $source_dir/text -name localize.sdf`; for my $fname (@files) { $FS = '\t'; diff --git a/helpcontent2/makefile.pmk b/helpcontent2/makefile.pmk index d47e0ae66c..384d8590f5 100755 --- a/helpcontent2/makefile.pmk +++ b/helpcontent2/makefile.pmk @@ -44,7 +44,7 @@ $(COMMONMISC)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp $(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES) .IF "$(WITH_LANG)"!="" - @$(HELPEX) -QQ -p helpcontent2 -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m localize.sdf && $(TOUCH) $@ + $(AUGMENT_LIBRARY_PATH) $(HELPEX) -QQ -p helpcontent2 -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@ .ELSE # "$(WITH_LANG)"!="" .IF "$(USE_SHELL)"=="4nt" # it's getting real ugly... @@ -71,7 +71,7 @@ $(COMMONMISC)$/$(TARGET).done .PHONY : $(COMMONMISC)$/$(TARGET).done : makefile.mk .IF "$(WITH_LANG)"!="" -$(COMMONMISC)$/$(TARGET).done : localize.sdf +$(COMMONMISC)$/$(TARGET).done : $(LOCALIZESDF) .ENDIF # "$(WITH_LANG)"!="" .ENDIF # "$(HELPTRANSPHONY)"!="" .ENDIF # "$(HLANGXHPFILES)"!="" diff --git a/helpcontent2/prj/build.lst b/helpcontent2/prj/build.lst index 7f34e05221..bd5b05a1f9 100644 --- a/helpcontent2/prj/build.lst +++ b/helpcontent2/prj/build.lst @@ -1,4 +1,4 @@ -h2 helpcontent2 : xmlhelp transex3 NULL +h2 helpcontent2 : l10n xmlhelp NULL h2 helpcontent2 usr1 - all helpcontent2_mkout helpcontent2_aux NULL h2 helpcontent2\prj get - all helpcontent2_prj helpcontent2_aux NULL h2 helpcontent2\source\text\sbasic\guide nmake - all helpcontent2_sbas_guid helpcontent2_aux NULL diff --git a/helpcontent2/source/auxiliary/makefile.mk b/helpcontent2/source/auxiliary/makefile.mk index 386d06305c..5f4369adb1 100644 --- a/helpcontent2/source/auxiliary/makefile.mk +++ b/helpcontent2/source/auxiliary/makefile.mk @@ -14,7 +14,7 @@ #************************************************************************* PRJ = ..$/.. -PRJNAME = help2 +PRJNAME = helpcontent2 TARGET = auxiliary # --- Settings ----------------------------------------------------- @@ -33,6 +33,7 @@ TREEFILES = \ # --- Targets ------------------------------------------------------ .INCLUDE : target.mk +.EXPORT : LOCALIZESDF LOCALIZATION_FOUND TRYSDF ALLTAR : aux_dirs $(COMMONMISC)$/treefiles.done $(COMMONBIN)$/helpimg.ilst @@ -58,7 +59,7 @@ LOCTREEFILES:=$(foreach,j,$(TREEFILES) $(COMMONMISC)$/en-US$/$j) .ENDIF #IF "$(WITH_LANG)"!="" $(COMMONMISC)$/treefiles.done : $(LOCTREEFILES) - @$(PERL) $(PRJ)$/helpers$/update_tree.pl && $(TOUCH) $@ + +$(PERL) $(PRJ)$/helpers$/update_tree.pl && $(TOUCH) $@ %.created: @-$(MKDIRHIER) $(@:d) && $(TOUCH) $@ @@ -67,7 +68,9 @@ $(LOCTREEFILES) : $(TREEFILES) $$(@:d)$/dir.created @$(TOUCH) $@ .IF "$(WITH_LANG)"!="" -$(LOCTREEFILES) : $(PRJ)$/source$/text$/shared$/localize.sdf +#$(LOCTREEFILES) : $(PRJ)$/source$/text$/shared$/localize.sdf +$(LOCTREEFILES) : $(LOCALIZESDF:d:d:d:d)$/text$/shared/localize.sdf +$(LOCALIZESDF:d:d:d:d)$/text$/shared/localize.sdf : $(LOCALIZESDF) .ENDIF # "$(WITH_LANG)"!="" aux_dirs .PHONY : -- cgit