Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/i18n-directories into 
lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/i18n-directories/+merge/53150

Putting the i18n files in openlp/i18n is incorrect on Linux/BSD/*nix, they 
belong in /usr/share/openlp/i18n. This proposal fixes that.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/i18n-directories/+merge/53150
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'MANIFEST.in'
--- MANIFEST.in	2010-12-29 09:43:02 +0000
+++ MANIFEST.in	2011-03-12 22:01:29 +0000
@@ -4,13 +4,10 @@
 recursive-include openlp *.html
 recursive-include openlp *.js
 recursive-include openlp *.css
-recursive-include openlp *.qm
 recursive-include documentation *
-recursive-include resources/forms *
-recursive-include resources/i18n *
-recursive-include resources/images *
-recursive-include scripts *.py
-include resources/*.desktop
+recursive-include resources *
+recursive-include scripts *
 include copyright.txt
 include LICENSE
+include README.txt
 include openlp/.version

=== modified file 'openlp/core/utils/__init__.py'
--- openlp/core/utils/__init__.py	2011-03-10 13:15:49 +0000
+++ openlp/core/utils/__init__.py	2011-03-12 22:01:29 +0000
@@ -35,6 +35,7 @@
 from datetime import datetime
 
 from PyQt4 import QtGui, QtCore
+
 if sys.platform != u'win32' and sys.platform != u'darwin':
     try:
         from xdg import BaseDirectory
@@ -134,7 +135,7 @@
         elif dir_type == AppLocation.LanguageDir:
             app_path = _get_frozen_path(
                 os.path.abspath(os.path.split(sys.argv[0])[0]),
-                os.path.split(openlp.__file__)[0])
+                _get_os_dir_path(dir_type))
             return os.path.join(app_path, u'i18n')
         else:
             return _get_os_dir_path(dir_type)
@@ -169,15 +170,21 @@
         if dir_type == AppLocation.DataDir:
             return os.path.join(unicode(os.getenv(u'APPDATA'), encoding),
                 u'openlp', u'data')
+        elif dir_type == AppLocation.LanguageDir:
+            return os.path.split(openlp.__file__)[0]
         return os.path.join(unicode(os.getenv(u'APPDATA'), encoding),
             u'openlp')
     elif sys.platform == u'darwin':
         if dir_type == AppLocation.DataDir:
             return os.path.join(unicode(os.getenv(u'HOME'), encoding),
                 u'Library', u'Application Support', u'openlp', u'Data')
+        elif dir_type == AppLocation.LanguageDir:
+            return os.path.split(openlp.__file__)[0]
         return os.path.join(unicode(os.getenv(u'HOME'), encoding),
             u'Library', u'Application Support', u'openlp')
     else:
+        if dir_type == AppLocation.LanguageDir:
+            return os.path.join(u'/usr', u'share', u'openlp')
         if XDG_BASE_AVAILABLE:
             if dir_type == AppLocation.ConfigDir:
                 return os.path.join(unicode(BaseDirectory.xdg_config_home,

=== modified file 'openlp/core/utils/languagemanager.py'
--- openlp/core/utils/languagemanager.py	2011-03-11 05:15:41 +0000
+++ openlp/core/utils/languagemanager.py	2011-03-12 22:01:29 +0000
@@ -63,6 +63,8 @@
         """
         Find all available language files in this OpenLP install
         """
+        log.debug(u'Translation files: %s', AppLocation.get_directory(
+            AppLocation.LanguageDir))
         trans_dir = QtCore.QDir(AppLocation.get_directory(
             AppLocation.LanguageDir))
         file_names = trans_dir.entryList(QtCore.QStringList(u'*.qm'),

=== modified file 'resources/debian/Makefile'
--- resources/debian/Makefile	2011-03-09 06:55:41 +0000
+++ resources/debian/Makefile	2011-03-12 22:01:29 +0000
@@ -2,12 +2,16 @@
 # -*- makefile -*-
 
 build:
-	mkdir -p openlp/i18n
+	mkdir -p resources/i18n/qm
 	for TSFILE in resources/i18n/*.ts; do\
-	    lrelease-qt4 $$TSFILE -qm openlp/i18n/`basename $$TSFILE .ts`.qm;\
+		lrelease-qt4 $$TSFILE -qm resources/i18n/qm/`basename $$TSFILE .ts`.qm;\
 	done
 
 install:
+	mkdir -p $(DESTDIR)/usr/share/openlp/i18n
+	cd resources/i18n/qm && for QMFILE in*.qm; do\
+		mv $QMFILE $(DESTDIR)/usr/share/openlp/i18n;\
+	done
 
 clean:
-
+	rm -fR resources/i18n/qm

=== modified file 'resources/debian/debian/rules'
--- resources/debian/debian/rules	2011-03-09 06:55:41 +0000
+++ resources/debian/debian/rules	2011-03-12 22:01:29 +0000
@@ -1,9 +1,9 @@
 #!/usr/bin/make -f
-  
+
 DEB_PYTHON_SYSTEM := pysupport
 DEB_MAKE_BUILD_TARGET := build
-DEB_MAKE_INSTALL_TARGET := 
-DEB_MAKE_CLEAN_TARGET := 
+DEB_MAKE_INSTALL_TARGET := install
+DEB_MAKE_CLEAN_TARGET := clean
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
@@ -14,8 +14,8 @@
 		mkdir -p debian/openlp/usr/share/icons/hicolor/$$SIZE/apps && \
 		cp resources/images/openlp-logo-$$SIZE.png debian/openlp/usr/share/icons/hicolor/$$SIZE/apps/openlp.png; \
 	done
-	
+
 	mkdir -p debian/openlp/usr/share/icons/hicolor/scalable/apps && \
 	cp resources/images/openlp-logo.svg debian/openlp/usr/share/icons/hicolor/scalable/apps/openlp.svg
-	
+
 	cd debian/openlp/usr/bin/ && mv openlp.pyw openlp

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to