]> git.pld-linux.org Git - packages/clementine.git/blob - unbundle-po.patch
- initial unbundling
[packages/clementine.git] / unbundle-po.patch
1 Do not bundle translations with a binary,
2 package them to system dir and use %lang tagging in package.
3
4 some paths debug:
5   qWarning() << "language: " << language;
6   qWarning() << "qtpath: " << QLibraryInfo::location(QLibraryInfo::TranslationsPath);
7   qWarning() << "apppath: " << a.applicationDirPath();
8   qWarning() << "curdir: " << QDir::currentPath();
9
10 TODO: add install target
11 TODO: make it configurable via cmake params.
12
13 Author: Elan Ruusamäe <glen@pld-linux.org>
14
15 --- clementine-0.5.3/src/main.cpp~      2010-10-18 23:59:12.000000000 +0300
16 +++ clementine-0.5.3/src/main.cpp       2010-10-18 23:59:15.876170584 +0300
17 @@ -176,7 +176,7 @@
18  
19    // Resources
20    Q_INIT_RESOURCE(data);
21 -  Q_INIT_RESOURCE(translations);
22 +  //Q_INIT_RESOURCE(translations);
23  
24    // Has the user forced a different language?
25    QString language = options.language();
26 @@ -187,9 +187,15 @@
27    }
28  
29    // Translations
30 +  // Qt: system path
31    LoadTranslation("qt", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
32 +  // Clementine: system path
33 +  LoadTranslation("clementine", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
34 +  // Clementine: QRC
35    LoadTranslation("clementine", ":/translations", language);
36 +  // Clementine: application path
37    LoadTranslation("clementine", a.applicationDirPath(), language);
38 +  // Clementine: current dir
39    LoadTranslation("clementine", QDir::currentPath(), language);
40  
41    // Icons
42 --- clementine-0.5.3/cmake/Translations.cmake~  2010-10-18 23:59:51.000000000 +0300
43 +++ clementine-0.5.3/cmake/Translations.cmake   2010-10-18 23:59:53.487509786 +0300
44 @@ -63,12 +63,12 @@
45      list(APPEND ${outfiles} ${_qm_filepath})
46    endforeach (_lang)
47  
48 -  # Generate a qrc file for the translations
49 -  set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/${ADD_PO_DIRECTORY}/translations.qrc)
50 -  file(WRITE ${_qrc} "<RCC><qresource prefix=\"/${ADD_PO_DIRECTORY}\">")
51 -  foreach(_lang ${ADD_PO_LANGUAGES})
52 -    file(APPEND ${_qrc} "<file>${po_prefix}${_lang}.qm</file>")
53 -  endforeach(_lang)
54 -  file(APPEND ${_qrc} "</qresource></RCC>")
55 -  qt4_add_resources(${outfiles} ${_qrc})
56 +#  # Generate a qrc file for the translations
57 +#  set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/${ADD_PO_DIRECTORY}/translations.qrc)
58 +#  file(WRITE ${_qrc} "<RCC><qresource prefix=\"/${ADD_PO_DIRECTORY}\">")
59 +#  foreach(_lang ${ADD_PO_LANGUAGES})
60 +#    file(APPEND ${_qrc} "<file>${po_prefix}${_lang}.qm</file>")
61 +#  endforeach(_lang)
62 +#  file(APPEND ${_qrc} "</qresource></RCC>")
63 +#  qt4_add_resources(${outfiles} ${_qrc})
64  endmacro(add_po)
This page took 0.112438 seconds and 3 git commands to generate.