]> git.pld-linux.org Git - packages/clementine.git/commitdiff
- initial unbundling
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Oct 2010 21:12:06 +0000 (21:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    unbundle-po.patch -> 1.1

unbundle-po.patch [new file with mode: 0644]

diff --git a/unbundle-po.patch b/unbundle-po.patch
new file mode 100644 (file)
index 0000000..f7a899a
--- /dev/null
@@ -0,0 +1,64 @@
+Do not bundle translations with a binary,
+package them to system dir and use %lang tagging in package.
+
+some paths debug:
+  qWarning() << "language: " << language;
+  qWarning() << "qtpath: " << QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+  qWarning() << "apppath: " << a.applicationDirPath();
+  qWarning() << "curdir: " << QDir::currentPath();
+
+TODO: add install target
+TODO: make it configurable via cmake params.
+
+Author: Elan Ruusamäe <glen@pld-linux.org>
+
+--- clementine-0.5.3/src/main.cpp~     2010-10-18 23:59:12.000000000 +0300
++++ clementine-0.5.3/src/main.cpp      2010-10-18 23:59:15.876170584 +0300
+@@ -176,7 +176,7 @@
+   // Resources
+   Q_INIT_RESOURCE(data);
+-  Q_INIT_RESOURCE(translations);
++  //Q_INIT_RESOURCE(translations);
+   // Has the user forced a different language?
+   QString language = options.language();
+@@ -187,9 +187,15 @@
+   }
+   // Translations
++  // Qt: system path
+   LoadTranslation("qt", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
++  // Clementine: system path
++  LoadTranslation("clementine", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
++  // Clementine: QRC
+   LoadTranslation("clementine", ":/translations", language);
++  // Clementine: application path
+   LoadTranslation("clementine", a.applicationDirPath(), language);
++  // Clementine: current dir
+   LoadTranslation("clementine", QDir::currentPath(), language);
+   // Icons
+--- clementine-0.5.3/cmake/Translations.cmake~ 2010-10-18 23:59:51.000000000 +0300
++++ clementine-0.5.3/cmake/Translations.cmake  2010-10-18 23:59:53.487509786 +0300
+@@ -63,12 +63,12 @@
+     list(APPEND ${outfiles} ${_qm_filepath})
+   endforeach (_lang)
+-  # Generate a qrc file for the translations
+-  set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/${ADD_PO_DIRECTORY}/translations.qrc)
+-  file(WRITE ${_qrc} "<RCC><qresource prefix=\"/${ADD_PO_DIRECTORY}\">")
+-  foreach(_lang ${ADD_PO_LANGUAGES})
+-    file(APPEND ${_qrc} "<file>${po_prefix}${_lang}.qm</file>")
+-  endforeach(_lang)
+-  file(APPEND ${_qrc} "</qresource></RCC>")
+-  qt4_add_resources(${outfiles} ${_qrc})
++#  # Generate a qrc file for the translations
++#  set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/${ADD_PO_DIRECTORY}/translations.qrc)
++#  file(WRITE ${_qrc} "<RCC><qresource prefix=\"/${ADD_PO_DIRECTORY}\">")
++#  foreach(_lang ${ADD_PO_LANGUAGES})
++#    file(APPEND ${_qrc} "<file>${po_prefix}${_lang}.qm</file>")
++#  endforeach(_lang)
++#  file(APPEND ${_qrc} "</qresource></RCC>")
++#  qt4_add_resources(${outfiles} ${_qrc})
+ endmacro(add_po)
This page took 0.107763 seconds and 4 git commands to generate.