maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client (https://talk.maemo.org/showthread.php?t=71826)

marxian 2011-04-16 11:37

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
Quote:

Originally Posted by NightShift79 (Post 989767)
seems like I got the translation working somehow.
What I did was:

adding
Code:

#include <QTranslator>

//#ifdef Q_WS_MAEMO_5
//#include <QtOpenGL/QGLWidget>
//#endif

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    app.setApplicationName("FMRadio");

    //Added translation:
    QTranslator translator;

    translator.load("/opt/usr/share/qmltube/qml/qmltube/i18n/qml_de");
    app.installTranslator(&translator);
   
    QmlApplicationViewer viewer;

That seems to make qmltube use the german translation file.
But it seems not all parts are correctly translated.
I'll check the linguist files again.

Learning is fun :)

I did add a few translations of my own using my trusty German dictionary. ;) Also, there were some strings that were not marked for translation in the earlier release.

I haven't used Qt translations before, so I was unaware (until late last night, when I found a Meego Wiki entry) of having to load the translation in the main.cpp file. According to the documentation on QML internationalisation, the QML runtime should find the .qm files automatically, so it seems that they missed out some vital info. :/

Introduction
The QML runtime automatically loads a translation from the i18n subdirectory of the root QML file, based on the system language. The translations are held in QM files that must be generated from TS files.


It should be fairly easy to make translation optional, but it may require a restart of the application for any changes to take effect.

gionni88 2011-04-16 12:14

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
http://warmi.net/docs/qt_4.6.3/html/tools-i18n.html

This is a nice example of translations with doesn't require code changing to include new translations.

From my experience translated files are not seen if their names are different from appname.LANGUAGECODE.qm .

To automatically change language I code like this:
Code:

#include <QApplication>
#include "mainwindow.h"
#include <QtSystemInfo/QSystemInfo>
#include <QTranslator>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QtMobility::QSystemInfo *systemInfo;
    QTranslator translator;

    if (systemInfo->currentLanguage() == "it")
  {
        translator.load("appname.it", "/opt/appname");
        a.installTranslator(&translator);
    }

    MainWindow w;
    w.show();

    return a.exec();
}

appname.it.qm is the translated file.


QML version of cuteTube rules.

NightShift79 2011-04-16 12:26

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
1 Attachment(s)
I have overworked the translation files. Now almost everything is in proper german ;)

But I noticed some parts that aren't translated. They are not in the .ts file.

http://img833.imageshack.us/img833/8...1041614201.png
http://img231.imageshack.us/img231/4...1041614203.png
http://img855.imageshack.us/img855/9...1041614212.png

That qmltube is really of the hook!

marxian 2011-04-16 12:37

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
Thanks. :) I'll include your amendments in the next release. I was concerned about marking some of the settings-related strings for translation, incase it messed up the database. I'll add them and do some testing to ensure they are safe. There are also some C++ strings that need to be marked.

romanianusa 2011-04-16 17:33

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
Not sure if this happened to everyone but i can't click on comments and related videos to view them? This is the latest update

slender 2011-04-16 17:39

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
imo people reporting bugs should state if they are running cssu.

cloudstrife1ph 2011-04-16 18:13

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
@marxian

are you still continuing the development of the older cutetube or are you moving on now with this one? so i can uninstall the older one...

MyNokiaN900 2011-04-16 18:24

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
I have installed successfully, even updated recently, logged successfully but nothing is working for me. Clicking on any of the icons results in "No Videos" message. I have CSSU, I also have original Cutetube installed. Is that an issue?

marxian 2011-04-16 18:45

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
Quote:

Originally Posted by romanianusa (Post 990021)
Not sure if this happened to everyone but i can't click on comments and related videos to view them? This is the latest update

That is a change that I had to make due to a weird bug that resulted from disabling OpenGL acceleration. You can use a swipe gesture to switch between info, comments and related videos.


Quote:

Originally Posted by cloudstrife1ph (Post 990031)
@marxian

are you still continuing the development of the older cutetube or are you moving on now with this one? so i can uninstall the older one...

The old cuteTube will still be maintained for the time being, but there will not be any new features.


Quote:

Originally Posted by MyNokiaN900 (Post 990039)
I have installed successfully, even updated recently, logged successfully but nothing is working for me. Clicking on any of the icons results in "No Videos" message. I have CSSU, I also have original Cutetube installed. Is that an issue?

Having the old cuteTube installed should not be an issue, but there are some bugs in the Qt libs installed with the latest CSSU update, so there could well be an issue there. Running cuteTube from xterm with

Code:

run-standalone.sh /opt/usr/bin/qmltube
should reveal some clues.

aanckar 2011-04-16 19:56

Re: [ANNOUNCE] cuteTube-QML - A feature-rich YouTube client
 
Quote:

Originally Posted by marxian (Post 990055)
Running cuteTube from xterm with

Code:

run-standalone.sh /opt/usr/bin/qmltube
should reveal some clues.

I had the same "No videos found" problem after the latest CSSU update, but after launching cuteTube with the command you specified once it now works again (the no videos found message is displayed for a second or so then the video lists are loaded) and can be launched normally from the icon.


All times are GMT. The time now is 06:39.

vBulletin® Version 3.8.8