]> git.pld-linux.org Git - packages/clementine.git/blobdiff - unbundle-po.patch
update files
[packages/clementine.git] / unbundle-po.patch
index 45e2b3c319c35757b0d7389561a6bffce69582a7..7cb3704d6095cfdeb0caf835bbd41198e32672f2 100644 (file)
@@ -12,8 +12,8 @@ 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
+--- clementine-1.3.0rc1/src/main.cpp~  2016-01-20 17:03:12.000000000 +0200
++++ clementine-1.3.0rc1/src/main.cpp   2016-01-20 17:04:21.767206898 +0200
 @@ -176,7 +176,7 @@
  
    // Resources
@@ -23,12 +23,14 @@ Author: Elan Ruusamäe <glen@pld-linux.org>
  
    // Has the user forced a different language?
    QString language = options.language();
-@@ -187,9 +187,15 @@
-   }
+@@ -417,10 +417,15 @@
+                                : override_language;
  
    // Translations
+-  LoadTranslation("qt", QLibraryInfo::location(QLibraryInfo::TranslationsPath),
+-                  language);
 +  // Qt: system path
-   LoadTranslation("qt", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
++  LoadTranslation("qt", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
 +  // Clementine: system path
 +  LoadTranslation("clementine", QLibraryInfo::location(QLibraryInfo::TranslationsPath), language);
 +  // Clementine: QRC
@@ -38,39 +40,42 @@ Author: Elan Ruusamäe <glen@pld-linux.org>
 +  // Clementine: current dir
    LoadTranslation("clementine", QDir::currentPath(), language);
  
-   // Icons
---- clementine-0.5.3/src/ui/settingsdialog.cpp~        2010-10-19 11:24:36.488320486 +0300
-+++ clementine-0.5.3/src/ui/settingsdialog.cpp 2010-10-19 11:24:40.594127569 +0300
-@@ -93,15 +93,22 @@
+ #ifdef Q_OS_WIN32
+--- clementine-1.3.0rc1/src/ui/behavioursettingspage.cpp~      2016-01-20 17:03:12.000000000 +0200
++++ clementine-1.3.0rc1/src/ui/behavioursettingspage.cpp       2016-01-20 17:06:51.358232182 +0200
+@@ -21,6 +21,7 @@
+ #include "playlist/playlist.h"
+ #include <QDir>
++#include <QLibraryInfo>
  
-   // Populate the language combo box.  We do this by looking at all the
-   // compiled in translations.
+ BehaviourSettingsPage::BehaviourSettingsPage(SettingsDialog* dialog)
+@@ -60,16 +60,15 @@
+   ui_->menu_previousmode->setItemData(0, Player::PreviousBehaviour_DontRestart);
+   ui_->menu_previousmode->setItemData(1, Player::PreviousBehaviour_Restart);
+-  // Populate the language combo box.  We do this by looking at all the
+-  // compiled in translations.
 -  QDir dir(":/translations/");
 -  QStringList codes(dir.entryList(QStringList() << "*.qm"));
 -  QRegExp lang_re("^clementine_(.*).qm$");
--  foreach (const QString& filename, codes) {
+-  for (const QString& filename : codes) {
 -    // The regex captures the "ru" from "clementine_ru.qm"
--    if (!lang_re.exactMatch(filename))
-+//  QDir dir(":/translations/");
+-    if (!lang_re.exactMatch(filename)) continue;
++  // Populate the language combo box
++  // We do this by looking at all the compiled in translations.
 +  QDir localeDir(QLibraryInfo::location(QLibraryInfo::TranslationsPath));
 +  QStringList dirList = localeDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
 +  foreach (const QString& code, dirList) {
 +    if (!QFile::exists(QLibraryInfo::location(QLibraryInfo::TranslationsPath) + "/" + code + "/LC_MESSAGES/clementine.qm")) {
-       continue;
++       continue;
 +    }
  
 -    QString code = lang_re.cap(1);
-+//  QStringList codes(dir.entryList(QStringList() << "*.qm"));
-+//  QRegExp lang_re("^clementine_(.*).qm$");
-+//  foreach (const QString& filename, codes) {
-+//    // The regex captures the "ru" from "clementine_ru.qm"
-+//    if (!lang_re.exactMatch(filename))
-+//      continue;
-+
-+//    QString code = lang_re.cap(1);
-     QString name = QString("%1 (%2)").arg(
-         QLocale::languageToString(QLocale(code).language()), code);
+     QString lookup_code = QString(code)
+                               .replace("@latin", "_Latn")
+                               .replace("_CN", "_Hans_CN")
 --- clementine-0.5.3/cmake/Translations.cmake  2010-10-18 23:59:53.487509786 +0300
 +++ clementine-0.5.3/cmake/Translations.cmake  2010-10-19 01:42:52.112825900 +0300
 @@ -65,10 +65,22 @@
@@ -104,3 +109,37 @@ Author: Elan Ruusamäe <glen@pld-linux.org>
 +#  file(APPEND ${_qrc} "</qresource></RCC>")
 +#  qt4_add_resources(${outfiles} ${_qrc})
  endmacro(add_po)
+--- clementine-1.1.1/tests/resources_env.h~    2013-09-08 01:29:59.000000000 +0300
++++ clementine-1.1.1/tests/resources_env.h     2013-09-08 01:30:00.886424405 +0300
+@@ -26,7 +26,7 @@
+ public:
+   void SetUp() {
+     Q_INIT_RESOURCE(data);
+-    Q_INIT_RESOURCE(translations);
++//    Q_INIT_RESOURCE(translations);
+     Q_INIT_RESOURCE(testdata);
+   }
+ };
+--- clementine-1.1.1/tests/translations_test.cpp~      2013-09-08 01:34:17.000000000 +0300
++++ clementine-1.1.1/tests/translations_test.cpp       2013-09-08 01:34:21.084475375 +0300
+@@ -23,14 +23,14 @@
+ #include "test_utils.h"
+ TEST(Translations, Basic) {
+-  ASSERT_TRUE(QFile::exists(":/translations"));
+-  ASSERT_TRUE(QFile::exists(":/translations/clementine_es.qm"));
++//  ASSERT_TRUE(QFile::exists(":/translations"));
++//  ASSERT_TRUE(QFile::exists(":/translations/clementine_es.qm"));
+   PoTranslator t;
+   t.load("clementine_es.qm", ":/translations");
+-  EXPECT_EQ(QString::fromUtf8("Colección"),
+-            t.translate("MainWindow", "Library"));
+-  EXPECT_EQ(QString::fromUtf8("Colección"),
+-            t.translate("", "Library"));
++//  EXPECT_EQ(QString::fromUtf8("Colección"),
++//            t.translate("MainWindow", "Library"));
++//  EXPECT_EQ(QString::fromUtf8("Colección"),
++//            t.translate("", "Library"));
+ }
This page took 0.202385 seconds and 4 git commands to generate.