[mythtv] [patch] mythvideo japanese translation update and unicode fix

Xavier Hervy maxpower44 at tiscali.fr
Wed May 26 10:39:47 EDT 2004


Hi,
I agree with you this patch should resolve my problem in mythvideo with 
special characters (videobrowser)
but donovan just made invert what you made then ....
Which should  we use ?? :-(

Hirobumi Shimada wrote:

> Hi
> 
> updating mythvideo_ja.ts, and unicode handling fix.
> 
> Thanks, Hiro
> 
> 
> ------------------------------------------------------------------------
> 
> Index: mythvideo/metadata.cpp
> ===================================================================
> RCS file: /var/lib/mythcvs/mythvideo/mythvideo/metadata.cpp,v
> retrieving revision 1.11
> diff -u -r1.11 metadata.cpp
> --- mythvideo/metadata.cpp	2 Mar 2004 17:57:53 -0000	1.11
> +++ mythvideo/metadata.cpp	26 May 2004 13:50:11 -0000
> @@ -173,18 +173,18 @@
>      {
>          query.next();
>  
> -        title = query.value(0).toString();
> -        director = query.value(1).toString();
> -        plot = query.value(2).toString();
> -        rating = query.value(3).toString();
> +        title = QString::fromUtf8(query.value(0).toString());
> +        director = QString::fromUtf8(query.value(1).toString());
> +        plot = QString::fromUtf8(query.value(2).toString());
> +        rating = QString::fromUtf8(query.value(3).toString());
>          year = query.value(4).toInt();
>          userrating = (float)query.value(5).toDouble();
>          length = query.value(6).toInt();
> -        filename = query.value(7).toString();
> +        filename = QString::fromUtf8(query.value(7).toString());
>          showlevel = query.value(8).toInt();
>          id = query.value(9).toUInt();
> -        coverfile = query.value(10).toString();
> -        inetref = query.value(11).toString();
> +        coverfile = QString::fromUtf8(query.value(10).toString());
> +        inetref = QString::fromUtf8(query.value(11).toString());
>          childID = query.value(12).toUInt();
>          browse = query.value(13).toBool();
>          playcommand = query.value(14).toString();
> @@ -211,17 +211,17 @@
>      {
>          query.next();
>  
> -        title = query.value(0).toString();
> -        director = query.value(1).toString();
> -        plot = query.value(2).toString();
> +        title = QString::fromUtf8(query.value(0).toString());
> +        director = QString::fromUtf8(query.value(1).toString());
> +        plot = QString::fromUtf8(query.value(2).toString());
>          rating = query.value(3).toString();
>          year = query.value(4).toInt();
>          userrating = (float)query.value(5).toDouble();
>          length = query.value(6).toInt();
> -        filename = query.value(7).toString();
> +        filename = QString::fromUtf8(query.value(7).toString());
>          showlevel = query.value(8).toInt();
> -        coverfile = query.value(9).toString();
> -        inetref = query.value(10).toString();
> +        coverfile = QString::fromUtf8(query.value(9).toString());
> +        inetref = QString::fromUtf8(query.value(10).toString());
>          childID = query.value(11).toUInt();
>          browse = query.value(12).toBool();
>          playcommand = query.value(13).toString();
> Index: mythvideo/videobrowser.cpp
> ===================================================================
> RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videobrowser.cpp,v
> retrieving revision 1.31
> diff -u -r1.31 videobrowser.cpp
> --- mythvideo/videobrowser.cpp	22 May 2004 19:31:42 -0000	1.31
> +++ mythvideo/videobrowser.cpp	26 May 2004 13:50:11 -0000
> @@ -580,7 +580,7 @@
>         {
>             UITextType *type = (UITextType *)container->GetType("title");
>             if (type)
> -               type->SetText(QString::fromUtf8(title));
> +               type->SetText(title);
>  
>             type = (UITextType *)container->GetType("filename");
>             if (type)
> @@ -588,7 +588,7 @@
>  
>             type = (UITextType *)container->GetType("director");
>             if (type)
> -               type->SetText(QString::fromUtf8(director));
> +               type->SetText(director);
>   
>             type = (UITextType *)container->GetType("year");
>             if (type)
> @@ -611,7 +611,7 @@
>  
>             type = (UITextType *)container->GetType("plot");
>             if (type)
> -               type->SetText(QString::fromUtf8(plot));
> +               type->SetText(plot);
>   
>             type = (UITextType *)container->GetType("userrating");
>             if (type)
> @@ -708,7 +708,7 @@
>      inData += amount;
>       
>      if (inData < 0)
> -        inData = m_list.count() - abs(1 - inData);
> +        inData = m_list.count() - inData;
>      else if(inData >= (int)m_list.count())
>          inData = inData - m_list.count();
>       
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev




More information about the mythtv-dev mailing list