diff --git a/i18n/openlp_en.ts b/i18n/openlp_en.ts
index 3d66550cb..d92273c1d 100644
--- a/i18n/openlp_en.ts
+++ b/i18n/openlp_en.ts
@@ -1,95 +1,991 @@
-
-
- AmendThemeForm
+
+
+
+ BibleMediaItem
-
-
-
+
+
+
-
-
- AuditDeleteDialog
+
+
+ AlertsTab
-
-
-
-
-
-
- AuditDetailDialog
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+ Ui_OpenLPExportDialog
-
-
-
+
+
+
+
+
+ Ui_AmendThemeDialog
-
-
-
+
+
+
+
+
+ AlertForm
-
-
-
+
+
+
+
+
+ SplashScreen
-
-
-
+
+
+
+
+
+ MediaManagerItem
-
-
-
+
+
+
+
+
+ EditCustomForm
-
-
-
+
+
+
+
+
+ Ui_AmendThemeDialog
-
-
-
+
+
+
+
+
+ TestMediaManager:
-
-
-
+
+
+
+
+
+ AboutForm
-
-
-
+
+
+
+
+
+ TestMediaManager:
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
Ui_MainWindow
-
-
-
+
+
+
-
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ Ui_OpenSongImportDialog
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_customEditDialog
+
+
+
+
+
+
+
+
+
+
+
+
+ BibleImportForm
+
+
+
+
+
+
+
+ Ui_OpenSongExportDialog
+
+
+
+
+
+
+
+ Ui_customEditDialog
+
+
+
+
+
+
+
+ Ui_OpenLPImportDialog
+
+
+
+
+
+
+
+ ImageTab
+
+
+
+
+
+
+
+ Ui_OpenSongExportDialog
+
+
+
+
+
+
+
+ BibleMediaItem
+
+
+
+
+
+
+
+ Ui_OpenSongExportDialog
+
+
+
+
+
+
+
+ Ui_PluginViewDialog
+
+
+
+
+
+
+
+ Ui_OpenLPImportDialog
+
+
+
+
+
+
+
+ Ui_MainWindow
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_SongMaintenanceDialog
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ SongMaintenanceForm
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ Ui_MainWindow
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ MediaManagerItem
+
+
+
+
+
+
+
+ BibleMediaItem
+
+
+
+
+
+
+
+ Ui_SongMaintenanceDialog
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ SongsPlugin
+
+
+
+
+
+
+
+ MediaManagerItem
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ Ui_BibleImportDialog
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ GeneralTab
+
+
+
+
+
+
+
+ ThemeManager
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ AlertsTab
+
+
+
+
+
+
+
+ Ui_OpenLPExportDialog
+
+
+
+
+
+
+
+ Ui_OpenLPImportDialog
+
+
+
+
+
+
+
+ BiblesTab
+
+
+
+
+
+
+
+ Ui_AuditDetailDialog
+
+
+
+
+
+
+
+ Ui_BibleImportDialog
+
+
+
+
+
+
+
+ SongBookForm
+
+
+
+
+
+
+
+ Ui_OpenLPImportDialog
+
+
+
+
+
+
+
+ Ui_PluginViewDialog
+
+
+
+
+
+
+
+ AboutForm
+
+
+
+
+
+
+
+ GeneralTab
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ TopicsForm
+
+
+
+
+
+
+
+ SlideController
+
+
+
+
+
+
+
+ Ui_OpenLPExportDialog
+
+
+
+
+
+
+
+ BibleMediaItem
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ AboutForm
+
+
+
+
+
+
+
+ AlertForm
+
+
+
+
+
+
+
+ AuthorsForm
+
+
+
+
+
+
+
+ Ui_OpenSongExportDialog
+
+
+
+
+
+
+
+ MediaManagerItem
+
+
+
+
+
+
+
+ Ui_SettingsDialog
+
+
+
+
+
+
+
+ BibleMediaItem
+
+
+
+
+
+
+
+ Ui_OpenLPExportDialog
+
+
+
+
+
+
+
+ ImageTab
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ BibleMediaItem
+
+
+
+
+
+
+
+ MediaTab
+
+
+
+
+
+
+
+ AboutForm
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ Ui_OpenLPImportDialog
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ Ui_OpenSongExportDialog
+
+
+
+
+
+
+
+ ThemesTab
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ Ui_BibleImportDialog
+
+
+
+
+
+
+
+ Ui_SongMaintenanceDialog
+
+
+
+
+
+
+
+ Ui_AuditDetailDialog
+
+
+
+
+
+
+
+ Ui_SongMaintenanceDialog
+
+
+
+
+
+
+
+ SlideController
+
+
+
+
+
+
+
+ SongMediaItem
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_BibleImportDialog
+
+
+
+
+
+
+
+ Ui_customEditDialog
+
+
+
+
+
+
+
+ PresentationTab
+
+
+
+
+
+
+
+ ThemeManager
+
+
+
+
+
+
+
+ EditSongForm
+
+
+
+
+
+
+
+ Ui_SongMaintenanceDialog
+
+
+
+
+
+
+
+ Ui_BibleImportDialog
+
+
+
+
+
+
+
+ Ui_OpenLPExportDialog
+
+
+
+
+
+
+
+ GeneralTab
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ SlideController
+
+
+
+
+
+
+
+ AlertsTab
+
+
+
+
+
+
+
+ BiblesTab
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ SongMediaItem
+
+
+
+
+
+
+
+ Ui_OpenSongImportDialog
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+ Ui_EditSongDialog
+
+
+
+
+
+
+
+ SongMediaItem
+
+
+
+
+
+
+
+ MediaManagerItem
+
+
+
+
+
+
+
+ Ui_MainWindow
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_AuditDetailDialog
+
+
+
+
+
+
+
+ Ui_MainWindow
+
+
+
+
+
+
+
+ SongMediaItem
+
+
+
+
+
+
+
+ Ui_PluginViewDialog
+
+
+
+
+
+
+
+ Ui_AmendThemeDialog
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openlp-1to2-converter.py b/openlp-1to2-converter.py
index dd1d601dd..bccb44d31 100644
--- a/openlp-1to2-converter.py
+++ b/openlp-1to2-converter.py
@@ -1,5 +1,27 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2009 Raoul Snyman #
+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
import sys
import os
diff --git a/openlp-get-strings.py b/openlp-get-strings.py
new file mode 100644
index 000000000..0d4e3200a
--- /dev/null
+++ b/openlp-get-strings.py
@@ -0,0 +1,98 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2009 Raoul Snyman #
+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
+
+import os
+import sys
+import re
+
+ts_file = u"""
+
+
+%s
+
+"""
+ts_context = u"""
+ %s
+%s
+"""
+ts_message = u"""
+
+
+
+
+"""
+find_trUtf8 = re.compile(r"trUtf8\(u'([\w]+)'\)", re.UNICODE)
+strings = {}
+
+def parse_file(filename):
+ global strings
+ file = open(filename, u'r')
+ class_name = u''
+ line_number = 0
+ for line in file:
+ line_number += 1
+ if line[:5] == u'class':
+ class_name = line[6:line.find(u'(')]
+ continue
+ for match in find_trUtf8.finditer(line):
+ key = u'%s-%s' % (class_name, match.group(1))
+ if not key in strings:
+ strings[key] = [class_name, filename, line_number, match.group(1)]
+ file.close()
+
+def write_file(filename):
+ global strings
+ translation_file = u''
+ translation_contexts = []
+ translation_messages = []
+ class_name = strings[strings.keys()[0]][0]
+ current_context = u''
+ for key, translation in strings.iteritems():
+ if class_name != translation[0]:
+ current_context = ts_context % (class_name, u''.join(translation_messages))
+ translation_contexts.append(current_context)
+ translation_messages = []
+ class_name = translation[0]
+ translation_messages.append(ts_message % (translation[1], translation[2], translation[3]))
+ current_context = ts_context % (class_name, u''.join(translation_messages))
+ translation_contexts.append(current_context)
+ translation_file = ts_file % (u''.join(translation_contexts))
+ file = open(filename, u'w')
+ file.write(translation_file)
+ file.close()
+
+def main():
+ start_dir = u'/home/raoul/Projects/openlp/i18n'
+ for root, dirs, files in os.walk(start_dir):
+ for file in files:
+ if file.endswith(u'.py'):
+ print u'Parsing "%s"' % file
+ parse_file(os.path.join(root, file))
+ print u'Generating TS file...',
+ write_file(os.path.join(start_dir, u'i18n', u'openlp_en.ts'))
+ print u'done.'
+
+if __name__ == u'__main__':
+ main()