diff options
author | Clément DAVID <clement.david@scilab.org> | 2011-05-13 10:50:16 +0200 |
---|---|---|
committer | Clément DAVID <clement.david@scilab.org> | 2011-05-13 10:50:16 +0200 |
commit | 243216a8d0fd685d4af1fda457ede653b9a87a5b (patch) | |
tree | 8eb2cef50bbe25ab53329475a56d6e485c7174c2 /scilab/tools | |
parent | 5e115d215049c518d4e687e5f74683ed6e59879f (diff) | |
parent | a5cbed5a0f7b8ea6ceed174cc6707a3ce4d655db (diff) | |
download | scilab-simulinkimport.zip scilab-simulinkimport.tar.gz |
Merge commit '5.3.2' into simulinkimportsimulinkimport
Change-Id: I61d0f569b84671ab0be452d8ae7ca9a9fd5595ff
Diffstat (limited to 'scilab/tools')
-rw-r--r-- | scilab/tools/innosetup/files.iss | 2 | ||||
-rwxr-xr-x | scilab/tools/localization/dispatchLocalizationFile.sh | 41 | ||||
-rw-r--r-- | scilab/tools/localization/updateLocalizationModule.sh | 1 |
3 files changed, 19 insertions, 25 deletions
diff --git a/scilab/tools/innosetup/files.iss b/scilab/tools/innosetup/files.iss index 92abb8a..9910a6c 100644 --- a/scilab/tools/innosetup/files.iss +++ b/scilab/tools/innosetup/files.iss | |||
@@ -18,7 +18,7 @@ | |||
18 | #include BinariesSourcePath + "\tools\innosetup\atlas.iss" | 18 | #include BinariesSourcePath + "\tools\innosetup\atlas.iss" |
19 | #endif | 19 | #endif |
20 | #include BinariesSourcePath + "\tools\tools.iss" | 20 | #include BinariesSourcePath + "\tools\tools.iss" |
21 | #include BinariesSourcePath + "\contrib\toolbox_skeleton\toolbox_skeleton.iss" | 21 | #include BinariesSourcePath + "\contrib\toolbox_skeleton.iss" |
22 | #include BinariesSourcePath + "\modules\core\core.iss" | 22 | #include BinariesSourcePath + "\modules\core\core.iss" |
23 | #include BinariesSourcePath + "\modules\helptools\helptools.iss" | 23 | #include BinariesSourcePath + "\modules\helptools\helptools.iss" |
24 | #include BinariesSourcePath + "\modules\demo_tools\demo_tools.iss" | 24 | #include BinariesSourcePath + "\modules\demo_tools\demo_tools.iss" |
diff --git a/scilab/tools/localization/dispatchLocalizationFile.sh b/scilab/tools/localization/dispatchLocalizationFile.sh index 36669b3..d9ffe37 100755 --- a/scilab/tools/localization/dispatchLocalizationFile.sh +++ b/scilab/tools/localization/dispatchLocalizationFile.sh | |||
@@ -19,19 +19,19 @@ if test $# -ne 1; then | |||
19 | echo "and dispatch them into Scilab source tree" | 19 | echo "and dispatch them into Scilab source tree" |
20 | echo "" | 20 | echo "" |
21 | echo "Syntax : $0 <path_to_launchpad_localization_file>" | 21 | echo "Syntax : $0 <path_to_launchpad_localization_file>" |
22 | exit -1 | 22 | exit 1 |
23 | fi | 23 | fi |
24 | 24 | ||
25 | if test -z "$SCI"; then | 25 | if test -z "$SCI"; then |
26 | echo "Please define the variable SCI" | 26 | echo "Please define the variable SCI" |
27 | exit -2 | 27 | exit 2 |
28 | fi | 28 | fi |
29 | 29 | ||
30 | LAUNCHPAD_DIRECTORY=$1 | 30 | LAUNCHPAD_DIRECTORY=$1 |
31 | if test ! -d $LAUNCHPAD_DIRECTORY; then | 31 | if test ! -d $LAUNCHPAD_DIRECTORY; then |
32 | echo "Could not find $LAUNCHPAD_DIRECTORY." | 32 | echo "Could not find $LAUNCHPAD_DIRECTORY." |
33 | echo "Exiting..." | 33 | echo "Exiting..." |
34 | exit -3 | 34 | exit 3 |
35 | fi | 35 | fi |
36 | 36 | ||
37 | # Don't know why but launchpad is placing some files in some sub dirs | 37 | # Don't know why but launchpad is placing some files in some sub dirs |
@@ -42,15 +42,15 @@ for file in $LAUNCHPAD_DIRECTORY/*.po; do | |||
42 | file=`echo $file|awk -F / '{print $NF}'` # get only the filename | 42 | file=`echo $file|awk -F / '{print $NF}'` # get only the filename |
43 | LOC=`echo $file|cut -d. -f1|awk -F - '{print $NF}'` # Get the locale (fr_FR, en_US ...) | 43 | LOC=`echo $file|cut -d. -f1|awk -F - '{print $NF}'` # Get the locale (fr_FR, en_US ...) |
44 | 44 | ||
45 | if test "$LOC" == "fr"; then LOC="fr_FR"; fi # Retrieve real format | 45 | if test "$LOC" = "fr"; then LOC="fr_FR"; fi # Retrieve real format |
46 | if test "$LOC" == "ru"; then LOC="ru_RU"; fi | 46 | if test "$LOC" = "ru"; then LOC="ru_RU"; fi |
47 | if test "$LOC" == "de"; then LOC="de_DE"; fi | 47 | if test "$LOC" = "de"; then LOC="de_DE"; fi |
48 | if test "$LOC" == "ca"; then LOC="ca_ES"; fi | 48 | if test "$LOC" = "ca"; then LOC="ca_ES"; fi |
49 | if test "$LOC" == "es"; then LOC="es_ES"; fi | 49 | if test "$LOC" = "es"; then LOC="es_ES"; fi |
50 | if test "$LOC" == "ja"; then LOC="ja_JP"; fi | 50 | if test "$LOC" = "ja"; then LOC="ja_JP"; fi |
51 | if test "$LOC" == "it"; then LOC="it_IT"; fi | 51 | if test "$LOC" = "it"; then LOC="it_IT"; fi |
52 | if test "$LOC" == "uk"; then LOC="uk_UA"; fi | 52 | if test "$LOC" = "uk"; then LOC="uk_UA"; fi |
53 | if test "$LOC" == "pl"; then LOC="pl_PL"; fi | 53 | if test "$LOC" = "pl"; then LOC="pl_PL"; fi |
54 | 54 | ||
55 | # check that it is the right format | 55 | # check that it is the right format |
56 | echo "$LOC"|grep -E "(.*_.*)" > /dev/null # it is a real localization name xx_YY | 56 | echo "$LOC"|grep -E "(.*_.*)" > /dev/null # it is a real localization name xx_YY |
@@ -58,37 +58,32 @@ for file in $LAUNCHPAD_DIRECTORY/*.po; do | |||
58 | if test $? -eq 0; then | 58 | if test $? -eq 0; then |
59 | MODULE=`echo $file|sed -e "s|\(.*\)-.*|\1|"|sed -e "s|-|_|g"` # Get the module name (for example signal_processing) | 59 | MODULE=`echo $file|sed -e "s|\(.*\)-.*|\1|"|sed -e "s|-|_|g"` # Get the module name (for example signal_processing) |
60 | 60 | ||
61 | DIR=$SCI/modules/$MODULE/locales/$LOC/ | 61 | TARGETFILE=$SCI/modules/$MODULE/locales/$LOC.po |
62 | if test ! -d $DIR; then | 62 | |
63 | mkdir $DIR | ||
64 | fi | ||
65 | 63 | ||
66 | # Before the copy, strip the line with the date. It is only making | 64 | # Before the copy, strip the line with the date. It is only making |
67 | # diff too big for a little gain. | 65 | # diff too big for a little gain. |
68 | # See bug #7059 | 66 | # See bug #7059 |
69 | sed -i -e "/X-Launchpad-Export-Date/d" $LAUNCHPAD_DIRECTORY/$file | 67 | sed -i -e "/X-Launchpad-Export-Date/d" $LAUNCHPAD_DIRECTORY/$file |
70 | 68 | ||
71 | echo "/bin/cp $LAUNCHPAD_DIRECTORY/$file $DIR/$MODULE.po" | 69 | echo "/bin/cp $LAUNCHPAD_DIRECTORY/$file $TARGETFILE" |
72 | /bin/cp -f $LAUNCHPAD_DIRECTORY/$file $DIR/$MODULE.po | 70 | /bin/cp -f $LAUNCHPAD_DIRECTORY/$file $TARGETFILE |
73 | if test $? -ne 0; then | 71 | if test $? -ne 0; then |
74 | echo "Error detected in the copy" | 72 | echo "Error detected in the copy" |
75 | exit 1; | 73 | exit 1; |
76 | fi | 74 | fi |
77 | 75 | ||
78 | # Check if the file contains single apos or single double quote | 76 | # Check if the file contains single apos or single double quote |
79 | #G=`cat $DIR/$MODULE.po | tr -d '\n' | grep "msgid \"[^']*''[^\"]*\"msgstr \"[^'\"]*'[^']"` | ||
80 | #G=`perl -0777 -ne "print if /msgid \"[^\']*\'\'[^\"]*\"\nmsgstr \"[^\'\"]*\'[^\']/" $DIR/$MODULE.po` | ||
81 | OG=`/usr/bin/printf '\u00AB'` | 77 | OG=`/usr/bin/printf '\u00AB'` |
82 | FG=`/usr/bin/printf '\u00BB'` | 78 | FG=`/usr/bin/printf '\u00BB'` |
83 | FILE=$DIR/$MODULE.po | ||
84 | 79 | ||
85 | awk '{if ( $0 ~ /msgstr/ ) { | 80 | awk '{if ( $0 ~ /msgstr/ ) { |
86 | print NR " :",$0; | 81 | print NR " :",$0; |
87 | } else { | 82 | } else { |
88 | print $0; | 83 | print $0; |
89 | }}' $FILE | awk 'BEGIN {FS = ""; RS = ""} { | 84 | }}' $TARGETFILE | awk 'BEGIN {FS = ""; RS = ""} { |
90 | gsub("\"\n\"","",$0); print $0 | 85 | gsub("\"\n\"","",$0); print $0 |
91 | }' | awk -v og="$OG" -v fg="$FG" -v file=$FILE ' | 86 | }' | awk -v og="$OG" -v fg="$FG" -v file=$TARGETFILE ' |
92 | BEGIN {FS = "\n"; RS = "\n"} | 87 | BEGIN {FS = "\n"; RS = "\n"} |
93 | NF > 0 { if ( $1 ~ /^msgid/ ) { | 88 | NF > 0 { if ( $1 ~ /^msgid/ ) { |
94 | x = split($1, tab, "\047\047"); | 89 | x = split($1, tab, "\047\047"); |
diff --git a/scilab/tools/localization/updateLocalizationModule.sh b/scilab/tools/localization/updateLocalizationModule.sh index aa30c34..e90b063 100644 --- a/scilab/tools/localization/updateLocalizationModule.sh +++ b/scilab/tools/localization/updateLocalizationModule.sh | |||
@@ -41,7 +41,6 @@ fi | |||
41 | 41 | ||
42 | 42 | ||
43 | XGETTEXT=/usr/bin/xgettext | 43 | XGETTEXT=/usr/bin/xgettext |
44 | MSGMERGE=/usr/bin/msgmerge | ||
45 | FROM_CODE=ISO-8859-1 | 44 | FROM_CODE=ISO-8859-1 |
46 | EXTENSIONS=( c h cpp hxx java sci sce start quit ) | 45 | EXTENSIONS=( c h cpp hxx java sci sce start quit ) |
47 | TARGETDIR=locales/ | 46 | TARGETDIR=locales/ |