]> git.lyx.org Git - features.git/commitdiff
Added version suffix to symlinks. Tested with --enable-version-suffix.
authorTommaso Cucinotta <tommaso@lyx.org>
Fri, 11 Feb 2011 23:27:34 +0000 (23:27 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Fri, 11 Feb 2011 23:27:34 +0000 (23:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37598 a592a061-630c-0410-9148-cb99ea01b6c8

development/autotests/Makefile
development/autotests/keytest.py
development/autotests/run-tests.sh

index 97ad33d1dea79510ff2eb7e8dcc134dcc0aa0599..695e2e021762d28f5dfb902adb7600e71b173404 100644 (file)
@@ -6,5 +6,8 @@ build-xvkbd:
        cd xvkbd && xmkmf && make
 
 .PHONY:
-run-tests: xvkbd
+run-tests:
        ./run-tests.sh
+
+clean:
+       rm -rf locale out-*
index 1122e6e7b64ba09dc575b0f4cd82d079b55a800d..cf5d13e0894c8c370545b4a2a8e6ee69ae5f2c2c 100755 (executable)
@@ -389,6 +389,9 @@ while not failed:
         lang = c[5:].rstrip()
         print "Setting LANG=" + lang + "\n"
         os.environ['LANG'] = lang
+# If it doesn't exist, create a link <locale_dir>/<country-code>/LC_MESSAGES/lyx<version-suffix>.mo
+# pointing to the corresponding .gmo file. Needed to let lyx find the right translation files.
+# See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg165613.html
         idx = lang.rfind(".")
         if idx != -1:
             ccode = lang[0:idx]
@@ -400,14 +403,15 @@ while not failed:
         else:
             short_code = ccode
         lyx_dir = os.popen("dirname \"" + lyx_exe + "\"").read().rstrip()
+        print "Executing: grep 'PACKAGE =' " + lyx_dir + "/Makefile | sed -e 's/PACKAGE = \(.*\)/\\1/'"
+        lyx_name = os.popen("grep 'PACKAGE =' " + lyx_dir + "/Makefile | sed -e 's/PACKAGE = \(.*\)/\\1/'").read().rstrip()
         intr_system("mkdir -p " + locale_dir + "/" + ccode + "/LC_MESSAGES")
-# Append version suffix ?
         if lyx_dir[0:3] == "../":
             rel_dir = "../../" + lyx_dir
         else:
             rel_dir = lyx_dir
-        intr_system("rm -f " + locale_dir + "/" + ccode + "/LC_MESSAGES/lyx.mo")
-        intr_system("ln -s " + rel_dir + "/../po/" + short_code + ".gmo " +  locale_dir + "/" + ccode + "/LC_MESSAGES/lyx.mo")
+        intr_system("rm -f " + locale_dir + "/" + ccode + "/LC_MESSAGES/" + lyx_name + ".mo")
+        intr_system("ln -s " + rel_dir + "/../po/" + short_code + ".gmo " + locale_dir + "/" + ccode + "/LC_MESSAGES/" + lyx_name + ".mo")
     else:
         print "Unrecognised Command '" + c + "'\n"
         failed = True
index 6cbbbe563b708da2010ae4741c1a9150cf625693..f5ac847c9bf0dec032e4eaa4350ad409b0fb7146 100755 (executable)
@@ -60,7 +60,7 @@ if [ ! -d $LYX_HOME ]; then
 fi
 
 # Launch the emergency STOP button
-./stop_autotests.tcl &
+./stop_autotests.tcl > /dev/null 2>&1 &
 
 echo "Running test cases . . ."
 failed=0