From 076a850959d420608ebea4aeb38fc13ac1b3e122 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 26 2011 19:59:35 +0000 Subject: Update render_getIdentityDefs.sh: - Re-define directory absolute path of final output directory. As convenction, when we produce content in English language, we do not add a laguage-specific directory to organize content. However, when we produce content in a language different from English we do use language-specific directories to organize content. --- diff --git a/Scripts/Bash/Functions/Render/render_getIdentityDefs.sh b/Scripts/Bash/Functions/Render/render_getIdentityDefs.sh index 5c09f38..fe1bfc2 100644 --- a/Scripts/Bash/Functions/Render/render_getIdentityDefs.sh +++ b/Scripts/Bash/Functions/Render/render_getIdentityDefs.sh @@ -315,16 +315,24 @@ function render_getIdentityDefs { | sed -r "s!.*${PARENTDIR}/!!" \ | sed -r 's!\.(png\.sh|svg|html|htm)$!!') - # Re-define absolute path to directory holding image file. - DIRNAME=$IMG/$(dirname $FILE)/$(cli_getCurrentLocale) + # Re-define directory absolute path of final output directory. As + # convenction, when we produce content in English language, we do + # not add a laguage directory to organize content. However, when + # we produce content in a language different from English we do + # use language-specific directory to organize content. + if [[ $(cli_getCurrentLocale) =~ '^en' ]];then + DIRNAME=$IMG/$(dirname $FILE) + else + DIRNAME=$IMG/$(dirname $FILE)/$(cli_getCurrentLocale) + fi # Check existence of output image directory. if [[ ! -d $DIRNAME ]];then mkdir -p $DIRNAME fi - + # Define absolute path to file. - FILE=$DIRNAME/$(basename $FILE) + FILE=$(echo $DIRNAME/$(basename $FILE) | sed -r 's!/\./!/!') # Define instance name. INSTANCE=$(cli_getTemporalFile $TEMPLATE) @@ -336,7 +344,7 @@ function render_getIdentityDefs { # Create the design template instance. cat $TEMPLATE > $INSTANCE - + # Replace translation markers with appropriate information. render_doIdentityTMarkers