From 6f88c925dcd4f35d22284d0d0bbb78cb2544f85f Mon Sep 17 00:00:00 2001
From: skodak <skodak>
Date: Sun, 17 May 2009 08:48:42 +0000
Subject: [PATCH] MDL-19184 moodle specific tinymce localization

---
 lib/editor/tinymce/extra/tools/.cvsignore   | 2 ++
 lib/editor/tinymce/extra/tools/compress.sh  | 1 +
 lib/editor/tinymce/extra/tools/get_langs.sh | 5 +++++
 lib/editor/tinymce/readme_moodle.txt        | 2 +-
 4 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 lib/editor/tinymce/extra/tools/.cvsignore
 create mode 100644 lib/editor/tinymce/extra/tools/get_langs.sh

diff --git a/lib/editor/tinymce/extra/tools/.cvsignore b/lib/editor/tinymce/extra/tools/.cvsignore
new file mode 100644
index 0000000000..8f9d6453b4
--- /dev/null
+++ b/lib/editor/tinymce/extra/tools/.cvsignore
@@ -0,0 +1,2 @@
+yuicompressor.jar
+temp
diff --git a/lib/editor/tinymce/extra/tools/compress.sh b/lib/editor/tinymce/extra/tools/compress.sh
index bc3f1a8580..dbdbfea6f3 100644
--- a/lib/editor/tinymce/extra/tools/compress.sh
+++ b/lib/editor/tinymce/extra/tools/compress.sh
@@ -1,2 +1,3 @@
+#!/bin/bash
 java -jar yuicompressor.jar --line-break 1000 ../../tiny_mce_src.js -o ../../tiny_mce.js
 java -jar yuicompressor.jar --line-break 1000 ../../Popup.js -o ../../tiny_mce_popup.js
\ No newline at end of file
diff --git a/lib/editor/tinymce/extra/tools/get_langs.sh b/lib/editor/tinymce/extra/tools/get_langs.sh
new file mode 100644
index 0000000000..2fc0cf9f7f
--- /dev/null
+++ b/lib/editor/tinymce/extra/tools/get_langs.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+for lang in 'sq' 'ar' 'az' 'be' 'bn' 'nb' 'bs' 'br' 'bg' 'ca' 'ch' 'zh' 'hr' 'cs' 'da' 'dv' 'nl' 'en' 'et' 'fi' 'fr' 'gl' 'de' 'el' 'gu' 'he' 'hu' 'is' 'id' 'ia' 'it' 'ja' 'ko' 'lv' 'lt' 'mk' 'ms' 'mn' 'se' 'no' 'nn' 'fa' 'pl' 'pt' 'ro' 'ru' 'sc' 'sr' 'ii' 'si' 'sk' 'sl' 'es' 'sv' 'tt' 'th' 'tr' 'tw' 'uk' 'cy' 'vi'  
+do
+ wget "http://services.moxiecode.com/i18n/download.aspx?format=xml&code=$lang&product=tinymce" -O temp/$lang.xml
+done
\ No newline at end of file
diff --git a/lib/editor/tinymce/readme_moodle.txt b/lib/editor/tinymce/readme_moodle.txt
index ce921aa665..a32d11f87e 100644
--- a/lib/editor/tinymce/readme_moodle.txt
+++ b/lib/editor/tinymce/readme_moodle.txt
@@ -10,7 +10,7 @@ Upgrade procedure:
  3/ copy tinymce/jscripts/tiny_mce/classes/Popup.js to Popup.js
  4/ apply plugins/media/* (extra/tinymce_plugin_media.patch) - MDL-16650
  5/ apply strings patch
- 6/ compress modified js files using yuicompressor.jar from dev package, use shell file extra/tools/compress.sh
+ 6/ copy yuicompressor.jar from dev package into extra/tools/, use shell script extra/tools/compress.sh to compress modified files
  7/ download all TinyMCE lang files and update moodle lang string files
  8/ rebuild string files 
 
-- 
2.39.5