Active Topics

 



Notices


Reply
Thread Tools
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#411
Originally Posted by NightShift79 View Post
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.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2011-04-16 at 11:43.
 
Posts: 435 | Thanked: 769 times | Joined on Apr 2010
#412
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.
 

The Following User Says Thank You to gionni88 For This Useful Post:
NightShift79's Avatar
Posts: 417 | Thanked: 200 times | Joined on Apr 2010 @ Germany
#413
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.





That qmltube is really of the hook!
Attached Files
File Type: zip i18n.zip (15.3 KB, 92 views)
 

The Following 3 Users Say Thank You to NightShift79 For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#414
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.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 
Posts: 739 | Thanked: 114 times | Joined on Sep 2009
#415
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
 
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#416
imo people reporting bugs should state if they are running cssu.
__________________
TMO links: [iSpy] - [Power search] - [Most thanked] - [Cordia - Maemo5 UI on top MeeGo Core] - [CommunitySSU]
 
Posts: 250 | Thanked: 44 times | Joined on Jan 2010
#417
@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's Avatar
Posts: 249 | Thanked: 217 times | Joined on Jan 2011 @ United Kingdom
#418
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?
__________________
My Nokia N900 is my website, still up an running for the Maemo community. My Nokia N900 is upgraded to 21.2011.38-1Tmaemo1.1 ~ CSSU ready ~ Overclocked ~ Speed patched ~ Swappolube ~ was running 7 desktops ~ 270 apps and counting ~ Multi-Boot with Standard Kernel , Kernel Power 2.6.28.10power47 and NITDroid N12 "UMay".

Last edited by MyNokiaN900; 2011-04-16 at 18:25. Reason: Wanted to mention I had original Cutetube installed.
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#419
Originally Posted by romanianusa View Post
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.


Originally Posted by cloudstrife1ph View Post
@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.


Originally Posted by MyNokiaN900 View Post
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.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2011-04-16 at 18:51.
 

The Following 4 Users Say Thank You to marxian For This Useful Post:
Posts: 138 | Thanked: 85 times | Joined on Jun 2010 @ Finland
#420
Originally Posted by marxian View Post
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.
 
Reply

Tags
cutetube, marxian = god, marxian legend, son of a gun, son of douche, son of fail, son of god, youtube


 
Forum Jump


All times are GMT. The time now is 21:24.