From e117b7eb157d7e3cf27c89abeff14daad69c64e7 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Tue, 23 Feb 2010 18:33:09 +0000 Subject: [PATCH] i18n support --- src/about.cpp | 4 +- src/clementine_el.qm | Bin 0 -> 337 bytes src/clementine_el.ts | 724 +++++++++++++++++++++++++++++++++ src/clementine_es.qm | Bin 0 -> 9435 bytes src/clementine_es.ts | 737 ++++++++++++++++++++++++++++++++++ src/clementine_ru.qm | Bin 0 -> 337 bytes src/clementine_ru.ts | 724 +++++++++++++++++++++++++++++++++ src/edittagdialog.cpp | 10 +- src/fileviewlist.cpp | 6 +- src/lastfmconfig.cpp | 2 +- src/lastfmservice.cpp | 99 ++--- src/lastfmservice.h | 1 - src/library.cpp | 6 +- src/libraryconfig.cpp | 2 +- src/libraryview.cpp | 4 +- src/main.cpp | 13 + src/mainwindow.cpp | 28 +- src/multiloadingindicator.cpp | 28 +- src/multiloadingindicator.h | 15 +- src/osd.cpp | 6 +- src/playlist.cpp | 26 +- src/playlistheader.cpp | 6 +- src/radiomodel.cpp | 4 +- src/radiomodel.h | 5 +- src/radioplaylistitem.cpp | 3 +- src/radioservice.h | 5 +- src/somafmservice.cpp | 16 +- src/somafmservice.h | 2 - src/src.pro | 20 +- src/translations.qrc | 7 + 30 files changed, 2365 insertions(+), 138 deletions(-) create mode 100644 src/clementine_el.qm create mode 100644 src/clementine_el.ts create mode 100644 src/clementine_es.qm create mode 100644 src/clementine_es.ts create mode 100644 src/clementine_ru.qm create mode 100644 src/clementine_ru.ts create mode 100644 src/translations.qrc diff --git a/src/about.cpp b/src/about.cpp index 868f6708a..914255869 100644 --- a/src/about.cpp +++ b/src/about.cpp @@ -8,7 +8,7 @@ About::About(QWidget *parent) { ui_.setupUi(this); - setWindowTitle("About " + QCoreApplication::applicationName()); + setWindowTitle(tr("About %1").arg(QCoreApplication::applicationName())); ui_.title->setText(QCoreApplication::applicationName()); - ui_.version->setText("Version " + QCoreApplication::applicationVersion()); + ui_.version->setText(tr("Version %1").arg(QCoreApplication::applicationVersion())); } diff --git a/src/clementine_el.qm b/src/clementine_el.qm new file mode 100644 index 0000000000000000000000000000000000000000..6bd22c41dfd987e516ede9d5e79a545715d2ad8c GIT binary patch literal 337 rcmcE7ks@*G{hX<16=n7(EZlq7i2(>QL4-a71EUecbP#hC5FY{nJdg@w literal 0 HcmV?d00001 diff --git a/src/clementine_el.ts b/src/clementine_el.ts new file mode 100644 index 000000000..fb354b8a2 --- /dev/null +++ b/src/clementine_el.ts @@ -0,0 +1,724 @@ + + + About + + #line { + color: lightgrey; +} + +#title { + font-weight: bold; + font-size: 16px; +} + +#version { + font-style: italic; + font-size: 10px; +} + + + + + Title + + + + Version + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://code.google.com/p/clementine-player/"><span style=" text-decoration: underline; color:#0057ae;">http://code.google.com/p/clementine-player/</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Authors:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">David Sansome &lt;<a href="mailto:me@davidsansome.com"><span style=" text-decoration: underline; color:#0057ae;">me@davidsansome.com</span></a>&gt;</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Thanks to:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Mark Kretschmann &lt;<a href="mailto:markey@web.de"><span style=" text-decoration: underline; color:#0057ae;">markey@web.de</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Max Howell &lt;<a href="mailto:max.howell@methylblue.com"><span style=" text-decoration: underline; color:#0057ae;">max.howell@methylblue.com</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">... and all the Amarok contributors</p></body></html> + + + + About %1 + + + + Version %1 + + + + + EditTagDialog + + Edit track information + + + + Title + + + + Album + + + + Artist + + + + Genre + + + + Track + + + + Year + + + + Comment + + + + QLineEdit { +background-color: transparent; +} + + + + [click to edit] + + + + + FileView + + Form + + + + ... + + + + + FileViewList + + Add to playlist + + + + Copy to library... + + + + Move to library... + + + + + LastFMConfig + + Enter your Last.fm details below: + + + + Last.fm username + + + + Last.fm password + + + + Scrobble tracks that I listen to + + + + Note that you must be a <span style=" font-weight:600;">paid subscriber</span> to listen to Last.fm radio from within Clementine. + + + + Authenticating... + + + + Authentication failed + + + + Your Last.fm credentials were incorrect + + + + + LastFMConfigDialog + + Last,fm + + + + + LastFMService + + Add to playlist + + + + Remove + + + + Play artist radio... + + + + Play tag radio... + + + + Configure Last.fm... + + + + My Recommendations + + + + My Radio Station + + + + My Loved Tracks + + + + My Neighbourhood + + + + Artist radio + + + + Tag radio + + + + Friends + + + + Neighbours + + + + %1's Radio Station + + + + %1's Loved Tracks + + + + %1's Neighborhood + + + + %1's Recommended Radio + + + + %1's Neighbour Radio + + + + %1's Library + + + + Similar Artists to %1 + + + + Tag Radio: %1 + + + + Invalid service + + + + Invalid method + + + + Authentication failed + + + + Invalid format + + + + Invalid parameters + + + + Invalid resource specified + + + + Operation failed + + + + Invalid session key + + + + Invalid API key + + + + Service offline + + + + This stream is for paid subscribers only + + + + Last.fm is currently busy, please try again in a few minutes + + + + Not enough content + + + + Not enough members + + + + Not enough fans + + + + Not enough neighbours + + + + Malformed response + + + + Unknown error + + + + + LastFMStationDialog + + Play Artist or Tag + + + + Enter an <b>artist</b> or <b>tag</b> to start listening to Last.fm radio. + + + + Artist + + + + Tag + + + + + Library + + Various Artists + + + + Unknown + + + + + LibraryConfig + + These folders will be scanned for music to make up your library + + + + Add new folder... + + + + Remove folder + + + + Add directory... + + + + + LibraryConfigDialog + + Music Library + + + + + LibraryView + + Your library is empty! + + + + Click here to add some music + + + + + MainWindow + + Clementine + + + + Library + + + + Radio + + + + Files + + + + Music + + + + Playlist + + + + Settings + + + + Help + + + + Previous track + + + + Play + + + + Stop + + + + Next track + + + + &Quit + + + + Ctrl+Q + + + + Stop after this track + + + + Entire collection + + + + Added today + + + + Added this week + + + + Added within three months + + + + Added this year + + + + Added this month + + + + Love + + + + Ban + + + + Clear playlist + + + + Edit track information... + + + + Configure Clementine... + + + + About Clementine... + + + + Shuffle playlist + + + + Configure library... + + + + Pause + + + + + MultiLoadingIndicator + + Form + + + + Loading audio engine + + + + Updating library + + + + Getting channels + + + + Loading stream + + + + Loading Last.fm radio + + + + + OSD + + Paused + + + + Playlist finished + + + + Volume %1% + + + + + Playlist + + Title + + + + Artist + + + + Album + + + + Length + + + + Track + + + + Disc + + + + Year + + + + Genre + + + + BPM + + + + Bit rate + + + + Sample rate + + + + File name + + + + File size + + + + + PlaylistHeader + + Hide... + + + + Show section + + + + Hide %1 + + + + + RadioPlaylistItem + + Radio service couldn't be loaded :-( + + + + + SettingsDialog + + Settings + + + + Playback + + + + Notifications + + + + Music Library + + + + Last.fm + + + + Fadeout + + + + No fadeout + + + + Fadeout duration + + + + ms + + + + Clementine can show a message when the track changes. + + + + Don't show notifications + + + + Show a native desktop notification + + + + Show a popup from the system tray + + + + Popup duration + + + + seconds + + + + + SomaFMService + + Add to playlist + + + + Open somafm.com in browser + + + + Refresh channels + + + + + TrackSlider + + Form + + + + 0:00:00 + + + + diff --git a/src/clementine_es.qm b/src/clementine_es.qm new file mode 100644 index 0000000000000000000000000000000000000000..5b2bb2682165d2327103902ac7ea4199b2fb327e GIT binary patch literal 9435 zcmeHNeQaDu5ubDX+~j;dH>nAZ^YxmPgf{piv^DffkBZk@UU0V z-MjNWo0otd4P-JQ9XpT=rmdgqCUe|7b$pYQwLv#)OzDH{^mxJ~qL za~Pmnr1LPKEz&yQI z3Ba8WJm|p38?JEZI%?{lMvae=PE`Ys#iGPXb2E zrgMaoWe-lh1^7_e@f%+SJX!Wi&zpd6m3{Dy(;~~K7xlif7Vw9Qo(qG&<$o)`_D@fV ze0*v7eLwmE;9dtFb>PYJ6AuQ^{%dRFk)HvcvwFYtWs%xl73-d81)QpAx(DsG<GE zs%ZV|O(HASRUCf#0N}QYzyAdMu1GF<-%h4*FknMb-4FKLR#Xojke;Fi~}359V2O zJiPSyV!+qK%eJ2tS-UKJ*K6&7H;1Ply#w$_bzRl{fR9$cc>Zm`e^&o_1^VqTCGhpt zMX-=^8J4U?vkUOGLK^r%!{)FyY=F&;N~s(ZZgzQs_La1443( zyeTQ5Wh4zcz2n-v7-NV(Y|(_ZDJX3+0pc-6)lJ_W%zt4CJ5x4yX0SxCIR|bDMSQ^kKGV9 zhGr}?!h=JiTmAyMMsJ(`0~5jgxYO0@5b=@AIZ?U+-Q>njZ+k;7je4}+b? zPr@8Vp{c0a3H0xnbP{j?Jt-9^Mv)M~l+KuJgD`O{FKsA?xoJr@7IPHP_`@(&jy@8m zmynR{jL4#GzmDifdsL@Lqc@3XQt=E0>cyBov_#>844q_P>6o<0)!=(480nU~Abtl1 zcH+4Uc4y=L4%v#QFQDI+by6>l`1Hv2c;{0)Fx!hp+yEbM(!LJ44I?;e2<+#;PDI|8ZkbL zkKt%UJ_U;OQ5##R4Jqk2#H|O;2zcqoa|Au~ShkJ>M)7tt+U`-A8g;?VoRq5(G(5@r zz-f#K;X0&QwQ1{X>~#*`oMJ>>vRCmE&gsXa~LiT=hQORJvnv8sh+b#rNIrZ+7lxm~L%^#Cuz700kNNI8F##a3+uA6v(?q{F0rp z%*povIGD-N#l)k9>t(csLs;=n>^oe)BtG+7|3g^up@Pv{boa`kjdwBL3V1EQ^m`WN zoDZj$?ZvyldApHjBVi%DN%O3N%#21?-g+2i59(@r*#X`enL;x+FW#QqJ{uV_7kHh_QTZW#PIC61>S6WuyEjLZyo z1ZG7Bkp5)mdzOxz>8LHqXu7#VX32Hzb((M_QC?sf0BsGeehEgV)OFA|k+(5Js5vs6 z(R&w(uq6vJyp>UB{5EOMNkE7f9>1?-cx$cHPm>!CP!ZSjBl2Qs?jM8T$@hsLQluQ`rmQm|amHTBXS*w^0w`NB) zo7>*CCl}2n(kVAFJ=+K?-w}dvOhYDRlkBos1<@JyAyr6+@iLT#aX$+-Nl~-Z2CEN( zn*_^#Jh`GX6-A1?v_~x#T68KV$kVV9u7T~RYWM*w46MlLfCgylUC^b{X(%am=`o$D z*htMlmT;VzN(?5?TtUW~s;}9R=*vVi6Wh|MfkZyf&*G0#@-w}B=kfyn7=D;AO3Q?n zjCAxGFCmRis$~!&Bp|=$D=pTP97J=4H612qP_Jo6B`i7-F;J%wfazj-B)!kGZ3Y|? z;2pTI)wH?EXO6ho6D>WKe$JRWqLy#sDgB$pnc^LbzDVEX%;b&S^OWcLD?^l1FaVD6 zpB-qS5ov66TC+}{kDJ17Sdmk0UWtLM5}DK(tlMIdPP^#h<_^piAO|c`uy&{2*JyW9 zq`}k(60l?@?ldWFvBan7*OeFm&n-4;BD_Dd?n9%9vYKSE9;kzwN(LEU@&-{+lz?Fc z!4^Z$nc&`BRHHCDFN`*`IIYFnqt4ypGq>3;z1ht>iBbId)p}AxaH^HrFQ*g9ZSTAKgSP9f3 zs8I0(_$N%M1HxGt&MLd2iBwM_6-$qc#gg&dLp+qQ+^O^!q*#1pnOVoK(j(4nhZ$C( z6|G4PGQtHbxB}z3R(4y%Gtdct?vR0R|}+?zMw8 zyMn?sbVf7qPBr-x6nc14qbbrPy;B<(#sr=GDaqpR0hE02JWd2|*k_5Iq!_svkT|Ic z_2k{8W+?-IY@m~vILwu%mKa{J(OditLZA`b+-veJ81wx90zN~Q__QtcY4e(D^>Mw| zFzZvjPtRtbw&EuIo}}pS^F?pPFJCNv&A;u;KRFLoMF$y?s^Xt6NXVQU%{fP|D#CV7 zk+Q51$30q_GQEWN#B;esYB1}x2MZ$2ReonuS-d@wjNh4vkIUlQlhKJ}0zWYN57fiE A0{{R3 literal 0 HcmV?d00001 diff --git a/src/clementine_es.ts b/src/clementine_es.ts new file mode 100644 index 000000000..a541c60e7 --- /dev/null +++ b/src/clementine_es.ts @@ -0,0 +1,737 @@ + +UTF-8 + + About + + Title + Título + + + Version + Versión + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://code.google.com/p/clementine-player/"><span style=" text-decoration: underline; color:#0057ae;">http://code.google.com/p/clementine-player/</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Authors:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">David Sansome &lt;<a href="mailto:me@davidsansome.com"><span style=" text-decoration: underline; color:#0057ae;">me@davidsansome.com</span></a>&gt;</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Thanks to:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Mark Kretschmann &lt;<a href="mailto:markey@web.de"><span style=" text-decoration: underline; color:#0057ae;">markey@web.de</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Max Howell &lt;<a href="mailto:max.howell@methylblue.com"><span style=" text-decoration: underline; color:#0057ae;">max.howell@methylblue.com</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">... and all the Amarok contributors</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://code.google.com/p/clementine-player/"><span style=" text-decoration: underline; color:#0057ae;">http://code.google.com/p/clementine-player/</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Autores:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">David Sansome &lt;<a href="mailto:me@davidsansome.com"><span style=" text-decoration: underline; color:#0057ae;">me@davidsansome.com</span></a>&gt;</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Gracias a:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Mark Kretschmann &lt;<a href="mailto:markey@web.de"><span style=" text-decoration: underline; color:#0057ae;">markey@web.de</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Max Howell &lt;<a href="mailto:max.howell@methylblue.com"><span style=" text-decoration: underline; color:#0057ae;">max.howell@methylblue.com</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">... y todos los que contribuyeron con Amarok</p></body></html> + + + #line { + color: lightgrey; +} + +#title { + font-weight: bold; + font-size: 16px; +} + +#version { + font-style: italic; + font-size: 10px; +} + + + + + About %1 + + + + Version %1 + + + + + EditTagDialog + + Edit track information + Editar información de la pista + + + Title + Título + + + Album + Álbum + + + Artist + Artista + + + Genre + Género + + + Track + Pista + + + Year + Año + + + Comment + Comentario + + + QLineEdit { +background-color: transparent; +} + + + + [click to edit] + + + + + FileView + + Form + Form + + + ... + ... + + + + FileViewList + + Add to playlist + + + + Copy to library... + + + + Move to library... + + + + + LastFMConfig + + Enter your Last.fm details below: + Ingrese su información de Last.fm debajo: + + + Last.fm username + Usuario + + + Last.fm password + Contraseña + + + Scrobble tracks that I listen to + Enviar las pistas que reproduzco + + + Note that you must be a <span style=" font-weight:600;">paid subscriber</span> to listen to Last.fm radio from within Clementine. + Recuerda que tienes que tener una <span style=" font-weight:600;">suscripcion paga</span> para escuchar la radio de Last.fm desde Clementine. + + + Authenticating... + Autenticando... + + + Authentication failed + + + + Your Last.fm credentials were incorrect + + + + + LastFMConfigDialog + + Last,fm + Last.fm + + + + LastFMService + + Add to playlist + + + + Remove + + + + Play artist radio... + + + + Play tag radio... + + + + Configure Last.fm... + + + + My Recommendations + + + + My Radio Station + + + + My Loved Tracks + + + + My Neighbourhood + + + + Artist radio + + + + Tag radio + + + + Friends + + + + Neighbours + + + + %1's Radio Station + + + + %1's Loved Tracks + + + + %1's Neighborhood + + + + %1's Recommended Radio + + + + %1's Neighbour Radio + + + + %1's Library + + + + Similar Artists to %1 + + + + Tag Radio: %1 + + + + Invalid service + + + + Invalid method + + + + Authentication failed + + + + Invalid format + + + + Invalid parameters + + + + Invalid resource specified + + + + Operation failed + + + + Invalid session key + + + + Invalid API key + + + + Service offline + + + + This stream is for paid subscribers only + + + + Last.fm is currently busy, please try again in a few minutes + + + + Not enough content + + + + Not enough members + + + + Not enough fans + + + + Not enough neighbours + + + + Malformed response + + + + Unknown error + + + + + LastFMStationDialog + + Play Artist or Tag + Reproducir Artista o Género + + + Enter an <b>artist</b> or <b>tag</b> to start listening to Last.fm radio. + Ingrese un <b>artista</b> o <b>género</b> para escuchar la radio de Last.fm. + + + Artist + Artista + + + Tag + Género + + + + Library + + Various Artists + + + + Unknown + + + + + LibraryConfig + + These folders will be scanned for music to make up your library + Estas carpetas seran analizadas en busca de medios para crear su colección + + + Add new folder... + Añadir nueva carpeta... + + + Remove folder + Remover carpeta + + + Add directory... + + + + + LibraryConfigDialog + + Music Library + Colección de Música + + + + LibraryView + + Your library is empty! + + + + Click here to add some music + + + + + MainWindow + + Clementine + Clementine + + + Library + Colección + + + Radio + Radio + + + Files + Archivos + + + Music + Música + + + Playlist + Lista de reproducción + + + Settings + Preferencias + + + Help + Ayuda + + + Previous track + Pista Anterior + + + Play + Reproducir + + + Stop + Detener + + + Next track + Pista siguiente + + + &Quit + &Salir + + + Ctrl+Q + Ctrl+Q + + + Stop after this track + Detener reproducción al finalizar la pista + + + Entire collection + Colección completa + + + Added today + Añadido hoy + + + Added this week + Añadido la última semana + + + Added within three months + Añadido los últimos tres meses + + + Added this year + Añadido el último año + + + Added this month + Añadido el último mes + + + Love + Agregar a Favoritos + + + Ban + Quitar de Favoritos + + + Clear playlist + Limpiar lista de reproducción + + + Edit track information... + Editar información de la pista... + + + Configure Clementine... + Configurar Clementine... + + + About Clementine... + Sobre Clementine... + + + Shuffle playlist + Barajar lista de reproducción + + + Configure library... + + + + Pause + + + + + MultiLoadingIndicator + + Form + + + + Loading audio engine + + + + Updating library + + + + Getting channels + + + + Loading stream + + + + Loading Last.fm radio + + + + + OSD + + Paused + + + + Playlist finished + + + + Volume %1% + + + + + Playlist + + Title + Título + + + Artist + Artista + + + Album + Álbum + + + Length + + + + Track + Pista + + + Disc + + + + Year + Año + + + Genre + Género + + + BPM + + + + Bit rate + + + + Sample rate + + + + File name + + + + File size + + + + + PlaylistHeader + + Hide... + + + + Show section + + + + Hide %1 + + + + + RadioPlaylistItem + + Radio service couldn't be loaded :-( + + + + + SettingsDialog + + Settings + Preferencias + + + Playback + Reproducción + + + Notifications + Notificaciones + + + Music Library + Colección + + + Last.fm + Last.fm + + + Fadeout + Fundido + + + No fadeout + Sin fundido + + + Fadeout duration + Duración del fundido + + + ms + ms + + + Clementine can show a message when the track changes. + Clementine puede mostrar un mensaje cuando la pista cambia. + + + Don't show notifications + No mostrar notificaciones + + + Show a native desktop notification + Mostrar la notificacion propia del escritorio + + + Show a popup from the system tray + Mostrar la notificación en la bandeja de sistema + + + Popup duration + Duracion de la notificación + + + seconds + segundos + + + + SomaFMService + + Add to playlist + + + + Open somafm.com in browser + + + + Refresh channels + + + + + TrackSlider + + Form + + + + 0:00:00 + + + + diff --git a/src/clementine_ru.qm b/src/clementine_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..6bd22c41dfd987e516ede9d5e79a545715d2ad8c GIT binary patch literal 337 rcmcE7ks@*G{hX<16=n7(EZlq7i2(>QL4-a71EUecbP#hC5FY{nJdg@w literal 0 HcmV?d00001 diff --git a/src/clementine_ru.ts b/src/clementine_ru.ts new file mode 100644 index 000000000..fb354b8a2 --- /dev/null +++ b/src/clementine_ru.ts @@ -0,0 +1,724 @@ + + + About + + #line { + color: lightgrey; +} + +#title { + font-weight: bold; + font-size: 16px; +} + +#version { + font-style: italic; + font-size: 10px; +} + + + + + Title + + + + Version + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://code.google.com/p/clementine-player/"><span style=" text-decoration: underline; color:#0057ae;">http://code.google.com/p/clementine-player/</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Authors:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">David Sansome &lt;<a href="mailto:me@davidsansome.com"><span style=" text-decoration: underline; color:#0057ae;">me@davidsansome.com</span></a>&gt;</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Thanks to:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Mark Kretschmann &lt;<a href="mailto:markey@web.de"><span style=" text-decoration: underline; color:#0057ae;">markey@web.de</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Max Howell &lt;<a href="mailto:max.howell@methylblue.com"><span style=" text-decoration: underline; color:#0057ae;">max.howell@methylblue.com</span></a>&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">... and all the Amarok contributors</p></body></html> + + + + About %1 + + + + Version %1 + + + + + EditTagDialog + + Edit track information + + + + Title + + + + Album + + + + Artist + + + + Genre + + + + Track + + + + Year + + + + Comment + + + + QLineEdit { +background-color: transparent; +} + + + + [click to edit] + + + + + FileView + + Form + + + + ... + + + + + FileViewList + + Add to playlist + + + + Copy to library... + + + + Move to library... + + + + + LastFMConfig + + Enter your Last.fm details below: + + + + Last.fm username + + + + Last.fm password + + + + Scrobble tracks that I listen to + + + + Note that you must be a <span style=" font-weight:600;">paid subscriber</span> to listen to Last.fm radio from within Clementine. + + + + Authenticating... + + + + Authentication failed + + + + Your Last.fm credentials were incorrect + + + + + LastFMConfigDialog + + Last,fm + + + + + LastFMService + + Add to playlist + + + + Remove + + + + Play artist radio... + + + + Play tag radio... + + + + Configure Last.fm... + + + + My Recommendations + + + + My Radio Station + + + + My Loved Tracks + + + + My Neighbourhood + + + + Artist radio + + + + Tag radio + + + + Friends + + + + Neighbours + + + + %1's Radio Station + + + + %1's Loved Tracks + + + + %1's Neighborhood + + + + %1's Recommended Radio + + + + %1's Neighbour Radio + + + + %1's Library + + + + Similar Artists to %1 + + + + Tag Radio: %1 + + + + Invalid service + + + + Invalid method + + + + Authentication failed + + + + Invalid format + + + + Invalid parameters + + + + Invalid resource specified + + + + Operation failed + + + + Invalid session key + + + + Invalid API key + + + + Service offline + + + + This stream is for paid subscribers only + + + + Last.fm is currently busy, please try again in a few minutes + + + + Not enough content + + + + Not enough members + + + + Not enough fans + + + + Not enough neighbours + + + + Malformed response + + + + Unknown error + + + + + LastFMStationDialog + + Play Artist or Tag + + + + Enter an <b>artist</b> or <b>tag</b> to start listening to Last.fm radio. + + + + Artist + + + + Tag + + + + + Library + + Various Artists + + + + Unknown + + + + + LibraryConfig + + These folders will be scanned for music to make up your library + + + + Add new folder... + + + + Remove folder + + + + Add directory... + + + + + LibraryConfigDialog + + Music Library + + + + + LibraryView + + Your library is empty! + + + + Click here to add some music + + + + + MainWindow + + Clementine + + + + Library + + + + Radio + + + + Files + + + + Music + + + + Playlist + + + + Settings + + + + Help + + + + Previous track + + + + Play + + + + Stop + + + + Next track + + + + &Quit + + + + Ctrl+Q + + + + Stop after this track + + + + Entire collection + + + + Added today + + + + Added this week + + + + Added within three months + + + + Added this year + + + + Added this month + + + + Love + + + + Ban + + + + Clear playlist + + + + Edit track information... + + + + Configure Clementine... + + + + About Clementine... + + + + Shuffle playlist + + + + Configure library... + + + + Pause + + + + + MultiLoadingIndicator + + Form + + + + Loading audio engine + + + + Updating library + + + + Getting channels + + + + Loading stream + + + + Loading Last.fm radio + + + + + OSD + + Paused + + + + Playlist finished + + + + Volume %1% + + + + + Playlist + + Title + + + + Artist + + + + Album + + + + Length + + + + Track + + + + Disc + + + + Year + + + + Genre + + + + BPM + + + + Bit rate + + + + Sample rate + + + + File name + + + + File size + + + + + PlaylistHeader + + Hide... + + + + Show section + + + + Hide %1 + + + + + RadioPlaylistItem + + Radio service couldn't be loaded :-( + + + + + SettingsDialog + + Settings + + + + Playback + + + + Notifications + + + + Music Library + + + + Last.fm + + + + Fadeout + + + + No fadeout + + + + Fadeout duration + + + + ms + + + + Clementine can show a message when the track changes. + + + + Don't show notifications + + + + Show a native desktop notification + + + + Show a popup from the system tray + + + + Popup duration + + + + seconds + + + + + SomaFMService + + Add to playlist + + + + Open somafm.com in browser + + + + Refresh channels + + + + + TrackSlider + + Form + + + + 0:00:00 + + + + diff --git a/src/edittagdialog.cpp b/src/edittagdialog.cpp index 97f77af22..f6efcbd80 100644 --- a/src/edittagdialog.cpp +++ b/src/edittagdialog.cpp @@ -8,10 +8,10 @@ EditTagDialog::EditTagDialog(QWidget* parent) { ui_.setupUi(this); - static const char* kHintText = "[click to edit]"; - ui_.album->SetHint(kHintText); - ui_.artist->SetHint(kHintText); - ui_.genre->SetHint(kHintText); + QString hint_text(tr("[click to edit]")); + ui_.album->SetHint(hint_text); + ui_.artist->SetHint(hint_text); + ui_.genre->SetHint(hint_text); } bool EditTagDialog::SetSongs(const SongList &s) { @@ -70,7 +70,7 @@ bool EditTagDialog::SetSongs(const SongList &s) { ui_.genre->setText(genre); ui_.year->setValue(year); - ui_.filename->setText("Editing " + QString::number(songs.count()) + " tracks"); + ui_.filename->setText(tr("Editing %n tracks", "", songs.count())); } return true; diff --git a/src/fileviewlist.cpp b/src/fileviewlist.cpp index a2dda7f9b..54aefa3b4 100644 --- a/src/fileviewlist.cpp +++ b/src/fileviewlist.cpp @@ -9,12 +9,12 @@ FileViewList::FileViewList(QWidget* parent) : QListView(parent), menu_(new QMenu(this)) { - menu_->addAction(QIcon(":media-playback-start.png"), "Add to playlist", + menu_->addAction(QIcon(":media-playback-start.png"), tr("Add to playlist"), this, SLOT(AddToPlaylistSlot())); menu_->addSeparator(); - menu_->addAction(QIcon(":copy.png"), "Copy to library...", + menu_->addAction(QIcon(":copy.png"), tr("Copy to library..."), this, SLOT(CopyToLibrarySlot())); - menu_->addAction(QIcon(":move.png"),"Move to library...", + menu_->addAction(QIcon(":move.png"), tr("Move to library..."), this, SLOT(MoveToLibrarySlot())); } diff --git a/src/lastfmconfig.cpp b/src/lastfmconfig.cpp index 45fe3a314..6071d84dc 100644 --- a/src/lastfmconfig.cpp +++ b/src/lastfmconfig.cpp @@ -37,7 +37,7 @@ void LastFMConfig::AuthenticationComplete(bool success) { ui_.username->setText(lastfm::ws::Username); ui_.password->clear(); } else { - QMessageBox::warning(this, "Authentication failed", "Your Last.fm credentials were incorrect"); + QMessageBox::warning(this, tr("Authentication failed"), tr("Your Last.fm credentials were incorrect")); } emit ValidationComplete(success); diff --git a/src/lastfmservice.cpp b/src/lastfmservice.cpp index 92f030b2c..8971de013 100644 --- a/src/lastfmservice.cpp +++ b/src/lastfmservice.cpp @@ -14,7 +14,6 @@ const char* LastFMService::kServiceName = "Last.fm"; const char* LastFMService::kSettingsGroup = "Last.fm"; -const char* LastFMService::kLoadingText = "Loading Last.fm radio"; const char* LastFMService::kAudioscrobblerClientId = "tng"; const char* LastFMService::kApiKey = "75d20fb472be99275392aefa2760ea09"; const char* LastFMService::kSecret = "d3072b60ae626be12be69448f5c46e70"; @@ -38,13 +37,17 @@ LastFMService::LastFMService(QObject* parent) ReloadSettings(); - play_action_ = context_menu_->addAction(QIcon(":media-playback-start.png"), "Add to playlist", this, SLOT(AddToPlaylist())); - remove_action_ = context_menu_->addAction(QIcon(":list-remove.png"), "Remove", this, SLOT(Remove())); + play_action_ = context_menu_->addAction( + QIcon(":media-playback-start.png"), tr("Add to playlist"), this, SLOT(AddToPlaylist())); + remove_action_ = context_menu_->addAction( + QIcon(":list-remove.png"), tr("Remove"), this, SLOT(Remove())); context_menu_->addSeparator(); - add_artist_action_ = context_menu_->addAction(QIcon(":last.fm/icon_radio.png"), "Play artist radio...", this, SLOT(AddArtistRadio())); - add_tag_action_ = context_menu_->addAction(QIcon(":last.fm/icon_tag.png"), "Play tag radio...", this, SLOT(AddTagRadio())); - context_menu_->addAction(QIcon(":configure.png"), "Configure Last.fm...", - this, SLOT(ShowConfig())); + add_artist_action_ = context_menu_->addAction( + QIcon(":last.fm/icon_radio.png"), tr("Play artist radio..."), this, SLOT(AddArtistRadio())); + add_tag_action_ = context_menu_->addAction( + QIcon(":last.fm/icon_tag.png"), tr("Play tag radio..."), this, SLOT(AddTagRadio())); + context_menu_->addAction( + QIcon(":configure.png"), tr("Configure Last.fm..."), this, SLOT(ShowConfig())); remove_action_->setEnabled(false); add_artist_action_->setEnabled(false); @@ -89,27 +92,27 @@ void LastFMService::LazyPopulate(RadioItem *item) { switch (item->type) { case RadioItem::Type_Service: // Normal radio types - CreateStationItem(Type_MyRecommendations, "My Recommendations", ":last.fm/recommended_radio.png", item); - CreateStationItem(Type_MyRadio, "My Radio Station", ":last.fm/personal_radio.png", item); - CreateStationItem(Type_MyLoved, "My Loved Tracks", ":last.fm/loved_radio.png", item); - CreateStationItem(Type_MyNeighbourhood, "My Neighbourhood", ":last.fm/neighbour_radio.png", item); + CreateStationItem(Type_MyRecommendations, tr("My Recommendations"), ":last.fm/recommended_radio.png", item); + CreateStationItem(Type_MyRadio, tr("My Radio Station"), ":last.fm/personal_radio.png", item); + CreateStationItem(Type_MyLoved, tr("My Loved Tracks"), ":last.fm/loved_radio.png", item); + CreateStationItem(Type_MyNeighbourhood, tr("My Neighbourhood"), ":last.fm/neighbour_radio.png", item); // Types that have children - artist_list_ = new RadioItem(this, Type_ArtistRadio, "Artist radio", item); + artist_list_ = new RadioItem(this, Type_ArtistRadio, tr("Artist radio"), item); artist_list_->icon = QIcon(":last.fm/icon_radio.png"); artist_list_->lazy_loaded = true; - tag_list_ = new RadioItem(this, Type_TagRadio, "Tag radio", item); + tag_list_ = new RadioItem(this, Type_TagRadio, tr("Tag radio"), item); tag_list_->icon = QIcon(":last.fm/icon_tag.png"); tag_list_->lazy_loaded = true; RestoreList("artists", Type_Artist, QIcon(":last.fm/icon_radio.png"), artist_list_); RestoreList("tags", Type_Tag, QIcon(":last.fm/icon_tag.png"), tag_list_); - friends_list_ = new RadioItem(this, Type_MyFriends, "Friends", item); + friends_list_ = new RadioItem(this, Type_MyFriends, tr("Friends"), item); friends_list_->icon = QIcon(":last.fm/my_friends.png"); - neighbours_list_ = new RadioItem(this, Type_MyNeighbours, "Neighbours", item); + neighbours_list_ = new RadioItem(this, Type_MyNeighbours, tr("Neighbours"), item); neighbours_list_->icon = QIcon(":last.fm/my_neighbours.png"); if (!IsAuthenticated()) @@ -129,11 +132,11 @@ void LastFMService::LazyPopulate(RadioItem *item) { case Type_OtherUser: CreateStationItem(Type_OtherUserRadio, item->key, ":last.fm/recommended_radio.png", item) - ->display_text = item->key + "'s Radio Station"; + ->display_text = tr("%1's Radio Station").arg(item->key); CreateStationItem(Type_OtherUserLoved, item->key, ":last.fm/loved_radio.png", item) - ->display_text = item->key + "'s Loved Tracks"; + ->display_text = tr("%1's Loved Tracks").arg(item->key); CreateStationItem(Type_OtherUserNeighbourhood, item->key, ":last.fm/neighbour_radio.png", item) - ->display_text = item->key + "'s Neighbourhood"; + ->display_text = tr("%1's Neighborhood").arg(item->key); break; default: @@ -232,16 +235,16 @@ QString LastFMService::TitleForItem(const RadioItem* item) const { const QString me(lastfm::ws::Username); switch (item->type) { - case Type_MyRecommendations: return me + "'s Recommended Radio"; - case Type_MyLoved: return me + "'s Loved Tracks"; - case Type_MyNeighbourhood: return me + "'s Neighbour Radio"; - case Type_MyRadio: return me + "'s Library"; + case Type_MyRecommendations: return tr("%1's Recommended Radio").arg(me); + case Type_MyLoved: return tr("%1's Loved Tracks").arg(me); + case Type_MyNeighbourhood: return tr("%1's Neighbour Radio").arg(me); + case Type_MyRadio: return tr("%1's Library").arg(me); case Type_OtherUser: - case Type_OtherUserRadio: return item->key + "'s Library"; - case Type_OtherUserLoved: return item->key + "'s Loved Tracks"; - case Type_OtherUserNeighbourhood: return item->key + "'s Neighbour Radio"; - case Type_Artist: return "Similar artists to " + item->key; - case Type_Tag: return "Tag radio: " + item->key; + case Type_OtherUserRadio: return tr("%1's Library").arg(item->key); + case Type_OtherUserLoved: return tr("%1's Loved Tracks").arg(item->key); + case Type_OtherUserNeighbourhood: return tr("%1's Neighbour Radio").arg(item->key); + case Type_Artist: return tr("Similar Artists to %1").arg(item->key); + case Type_Tag: return tr("Tag Radio: %1").arg(item->key); } return QString(); } @@ -252,7 +255,7 @@ void LastFMService::StartLoading(const QUrl& url) { if (!IsAuthenticated()) return; - emit TaskStarted(kLoadingText); + emit TaskStarted(MultiLoadingIndicator::LoadingLastFM); delete tuner_; @@ -284,7 +287,7 @@ void LastFMService::TunerError(lastfm::ws::Error error) { if (!initial_tune_) return; - emit TaskFinished(kLoadingText); + emit TaskFinished(MultiLoadingIndicator::LoadingLastFM); if (error == lastfm::ws::NotEnoughContent) { emit StreamFinished(); @@ -296,36 +299,36 @@ void LastFMService::TunerError(lastfm::ws::Error error) { QString LastFMService::ErrorString(lastfm::ws::Error error) const { switch (error) { - case lastfm::ws::InvalidService: return "Invalid service"; - case lastfm::ws::InvalidMethod: return "Invalid method"; - case lastfm::ws::AuthenticationFailed: return "Authentication failed"; - case lastfm::ws::InvalidFormat: return "Invalid format"; - case lastfm::ws::InvalidParameters: return "Invalid parameters"; - case lastfm::ws::InvalidResourceSpecified: return "Invalid resource specified"; - case lastfm::ws::OperationFailed: return "Operation failed"; - case lastfm::ws::InvalidSessionKey: return "Invalid session key"; - case lastfm::ws::InvalidApiKey: return "Invalid API key"; - case lastfm::ws::ServiceOffline: return "Service offline"; - case lastfm::ws::SubscribersOnly: return "This stream is for paid subscribers only"; + case lastfm::ws::InvalidService: return tr("Invalid service"); + case lastfm::ws::InvalidMethod: return tr("Invalid method"); + case lastfm::ws::AuthenticationFailed: return tr("Authentication failed"); + case lastfm::ws::InvalidFormat: return tr("Invalid format"); + case lastfm::ws::InvalidParameters: return tr("Invalid parameters"); + case lastfm::ws::InvalidResourceSpecified: return tr("Invalid resource specified"); + case lastfm::ws::OperationFailed: return tr("Operation failed"); + case lastfm::ws::InvalidSessionKey: return tr("Invalid session key"); + case lastfm::ws::InvalidApiKey: return tr("Invalid API key"); + case lastfm::ws::ServiceOffline: return tr("Service offline"); + case lastfm::ws::SubscribersOnly: return tr("This stream is for paid subscribers only"); - case lastfm::ws::TryAgainLater: return "Last.fm is currently busy, please try again in a few minutes"; + case lastfm::ws::TryAgainLater: return tr("Last.fm is currently busy, please try again in a few minutes"); - case lastfm::ws::NotEnoughContent: return "Not enough content"; - case lastfm::ws::NotEnoughMembers: return "Not enough members"; - case lastfm::ws::NotEnoughFans: return "Not enough fans"; - case lastfm::ws::NotEnoughNeighbours: return "Not enough neighbours"; + case lastfm::ws::NotEnoughContent: return tr("Not enough content"); + case lastfm::ws::NotEnoughMembers: return tr("Not enough members"); + case lastfm::ws::NotEnoughFans: return tr("Not enough fans"); + case lastfm::ws::NotEnoughNeighbours: return tr("Not enough neighbours"); - case lastfm::ws::MalformedResponse: return "Malformed response"; + case lastfm::ws::MalformedResponse: return tr("Malformed response"); case lastfm::ws::UnknownError: default: - return "Unknown error"; + return tr("Unknown error"); } } void LastFMService::TunerTrackAvailable() { if (initial_tune_) { - emit TaskFinished(kLoadingText); + emit TaskFinished(MultiLoadingIndicator::LoadingLastFM); LoadNext(last_url_); initial_tune_ = false; diff --git a/src/lastfmservice.h b/src/lastfmservice.h index f1c9c60e3..6fd9ae872 100644 --- a/src/lastfmservice.h +++ b/src/lastfmservice.h @@ -21,7 +21,6 @@ class LastFMService : public RadioService { static const char* kServiceName; static const char* kSettingsGroup; - static const char* kLoadingText; static const char* kAudioscrobblerClientId; static const char* kApiKey; static const char* kSecret; diff --git a/src/library.cpp b/src/library.cpp index 0f60b9afd..37036a48c 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -118,7 +118,7 @@ LibraryItem* Library::CreateCompilationArtistNode(bool signal) { beginInsertRows(ItemToIndex(parent), parent->children.count(), parent->children.count()); compilation_artist_node_ = - new LibraryItem(LibraryItem::Type_CompilationArtist, "Various Artists", parent); + new LibraryItem(LibraryItem::Type_CompilationArtist, tr("Various Artists"), parent); compilation_artist_node_->sort_text = " various"; if (signal) @@ -382,7 +382,7 @@ void Library::Reset() { QString Library::PrettyArtist(QString artist) const { if (artist.isEmpty()) { - artist = "Unknown"; + artist = tr("Unknown"); } return artist; @@ -400,7 +400,7 @@ QString Library::SortTextForArtist(QString artist) const { QString Library::PrettyAlbum(QString album) const { if (album.isEmpty()) { - album = "Unknown"; + album = tr("Unknown"); } return album; diff --git a/src/libraryconfig.cpp b/src/libraryconfig.cpp index 0f3f87aa6..eaec47222 100644 --- a/src/libraryconfig.cpp +++ b/src/libraryconfig.cpp @@ -37,7 +37,7 @@ void LibraryConfig::Add() { settings.beginGroup(kSettingsGroup); QString path(settings.value("last_path", QDir::homePath()).toString()); - path = QFileDialog::getExistingDirectory(this, "Add directory...", path); + path = QFileDialog::getExistingDirectory(this, tr("Add directory..."), path); if (!path.isNull()) { model_->AddDirectory(path); diff --git a/src/libraryview.cpp b/src/libraryview.cpp index 61139d54f..c8b3787a3 100644 --- a/src/libraryview.cpp +++ b/src/libraryview.cpp @@ -106,13 +106,13 @@ void LibraryView::paintEvent(QPaintEvent* event) { QFontMetrics metrics(bold_font); QRect title_rect(0, image_rect.bottom() + 20, rect.width(), metrics.height()); - p.drawText(title_rect, Qt::AlignHCenter, "Your library is empty!"); + p.drawText(title_rect, Qt::AlignHCenter, tr("Your library is empty!")); // Draw the other text p.setFont(QFont()); QRect text_rect(0, title_rect.bottom() + 5, rect.width(), metrics.height()); - p.drawText(text_rect, Qt::AlignHCenter, "Click here to add some music"); + p.drawText(text_rect, Qt::AlignHCenter, tr("Click here to add some music")); } } diff --git a/src/main.cpp b/src/main.cpp index 38efe0fc1..6858b33fc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,6 +10,8 @@ #include #include +#include +#include int main(int argc, char *argv[]) { QCoreApplication::setApplicationName("Clementine"); @@ -29,6 +31,17 @@ int main(int argc, char *argv[]) { // Couldn't send the message so start anyway } + // Translations + QTranslator qt_translator; + qt_translator.load("qt_" + QLocale::system().name(), + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + a.installTranslator(&qt_translator); + + QTranslator clementine_translator; + clementine_translator.load("clementine_" + QLocale::system().name(), ":/translations"); + a.installTranslator(&clementine_translator); + + // Window MainWindow w; a.setActivationWindow(&w); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index eccd55f4c..f6c0a9bfe 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -63,7 +63,7 @@ MainWindow::MainWindow(QWidget *parent) connect(track_position_timer_, SIGNAL(timeout()), SLOT(UpdateTrackPosition())); // Start initialising the player - multi_loading_indicator_->TaskStarted("Loading audio engine"); + multi_loading_indicator_->TaskStarted(MultiLoadingIndicator::LoadingAudioEngine); player_->Init(); // Models @@ -187,21 +187,21 @@ MainWindow::MainWindow(QWidget *parent) QMenu* library_menu = new QMenu(this); library_menu->addActions(filter_age_group->actions()); library_menu->addSeparator(); - library_menu->addAction("Configure library...", library_config_dialog_, SLOT(show())); + library_menu->addAction(tr("Configure library..."), library_config_dialog_, SLOT(show())); ui_.library_options->setMenu(library_menu); // Playlist menu - playlist_play_pause_ = playlist_menu_->addAction("Play", this, SLOT(PlaylistPlay())); + playlist_play_pause_ = playlist_menu_->addAction(tr("Play"), this, SLOT(PlaylistPlay())); playlist_menu_->addAction(ui_.action_stop); - playlist_stop_after_ = playlist_menu_->addAction(QIcon(":media-playback-stop.png"), "Stop after this track", this, SLOT(PlaylistStopAfter())); + playlist_stop_after_ = playlist_menu_->addAction(QIcon(":media-playback-stop.png"), tr("Stop after this track"), this, SLOT(PlaylistStopAfter())); playlist_menu_->addAction(ui_.action_edit_track); playlist_menu_->addSeparator(); playlist_menu_->addAction(ui_.action_clear_playlist); playlist_menu_->addAction(ui_.action_shuffle); // Radio connections - connect(radio_model_, SIGNAL(TaskStarted(QString)), multi_loading_indicator_, SLOT(TaskStarted(QString))); - connect(radio_model_, SIGNAL(TaskFinished(QString)), multi_loading_indicator_, SLOT(TaskFinished(QString))); + connect(radio_model_, SIGNAL(TaskStarted(MultiLoadingIndicator::TaskType)), multi_loading_indicator_, SLOT(TaskStarted(MultiLoadingIndicator::TaskType))); + connect(radio_model_, SIGNAL(TaskFinished(MultiLoadingIndicator::TaskType)), multi_loading_indicator_, SLOT(TaskFinished(MultiLoadingIndicator::TaskType))); connect(radio_model_, SIGNAL(StreamError(QString)), SLOT(ReportError(QString))); connect(radio_model_, SIGNAL(StreamFinished()), player_, SLOT(NextItem())); connect(radio_model_, SIGNAL(StreamReady(QUrl,QUrl)), player_, SLOT(StreamReady(QUrl,QUrl))); @@ -296,7 +296,7 @@ void MainWindow::MediaStopped() { ui_.action_stop->setEnabled(false); ui_.action_stop_after_this_track->setEnabled(false); ui_.action_play_pause->setIcon(QIcon(":media-playback-start.png")); - ui_.action_play_pause->setText("Play"); + ui_.action_play_pause->setText(tr("Play")); ui_.action_play_pause->setEnabled(true); @@ -312,7 +312,7 @@ void MainWindow::MediaPaused() { ui_.action_stop->setEnabled(true); ui_.action_stop_after_this_track->setEnabled(true); ui_.action_play_pause->setIcon(QIcon(":media-playback-start.png")); - ui_.action_play_pause->setText("Play"); + ui_.action_play_pause->setText(tr("Play")); ui_.action_play_pause->setEnabled(true); @@ -323,7 +323,7 @@ void MainWindow::MediaPlaying() { ui_.action_stop->setEnabled(true); ui_.action_stop_after_this_track->setEnabled(true); ui_.action_play_pause->setIcon(QIcon(":media-playback-pause.png")); - ui_.action_play_pause->setText("Pause"); + ui_.action_play_pause->setText(tr("Pause")); ui_.action_play_pause->setEnabled( ! (player_->GetCurrentItemOptions() & PlaylistItem::PauseDisabled)); @@ -478,10 +478,10 @@ void MainWindow::PlaylistRightClick(const QPoint& global_pos, const QModelIndex& playlist_menu_index_ = index; if (playlist_->current_index() == index.row() && player_->GetState() == Engine::Playing) { - playlist_play_pause_->setText("Pause"); + playlist_play_pause_->setText(tr("Pause")); playlist_play_pause_->setIcon(QIcon(":media-playback-pause.png")); } else { - playlist_play_pause_->setText("Play"); + playlist_play_pause_->setText(tr("Play")); playlist_play_pause_->setIcon(QIcon(":media-playback-start.png")); } @@ -547,13 +547,13 @@ void MainWindow::EditTracks() { } void MainWindow::LibraryScanStarted() { - multi_loading_indicator_->TaskStarted("Updating library"); + multi_loading_indicator_->TaskStarted(MultiLoadingIndicator::UpdatingLibrary); } void MainWindow::LibraryScanFinished() { - multi_loading_indicator_->TaskFinished("Updating library"); + multi_loading_indicator_->TaskFinished(MultiLoadingIndicator::UpdatingLibrary); } void MainWindow::PlayerInitFinished() { - multi_loading_indicator_->TaskFinished("Loading audio engine"); + multi_loading_indicator_->TaskFinished(MultiLoadingIndicator::LoadingAudioEngine); } diff --git a/src/multiloadingindicator.cpp b/src/multiloadingindicator.cpp index 238b20f96..b23a12dbf 100644 --- a/src/multiloadingindicator.cpp +++ b/src/multiloadingindicator.cpp @@ -6,18 +6,18 @@ MultiLoadingIndicator::MultiLoadingIndicator(QWidget *parent) ui_.setupUi(this); } -void MultiLoadingIndicator::TaskStarted(const QString &name) { - if (tasks_.contains(name)) +void MultiLoadingIndicator::TaskStarted(TaskType type) { + if (tasks_.contains(type)) return; - tasks_ << name; + tasks_ << type; UpdateText(); show(); } -void MultiLoadingIndicator::TaskFinished(const QString &name) { - tasks_.removeAll(name); +void MultiLoadingIndicator::TaskFinished(TaskType type) { + tasks_.removeAll(type); UpdateText(); if (tasks_.count() == 0) @@ -26,10 +26,8 @@ void MultiLoadingIndicator::TaskFinished(const QString &name) { void MultiLoadingIndicator::UpdateText() { QStringList strings; - foreach (QString task, tasks_) { - if (task.isEmpty()) - continue; - + foreach (TaskType type, tasks_) { + QString task(TaskTypeToString(type)); task[0] = task[0].toLower(); strings << task; } @@ -41,3 +39,15 @@ void MultiLoadingIndicator::UpdateText() { ui_.text->setText(text + "..."); } + +QString MultiLoadingIndicator::TaskTypeToString(TaskType type) { + switch (type) { + case LoadingAudioEngine: return tr("Loading audio engine"); + case UpdatingLibrary: return tr("Updating library"); + case GettingChannels: return tr("Getting channels"); + case LoadingStream: return tr("Loading stream"); + case LoadingLastFM: return tr("Loading Last.fm radio"); + + default: return QString::null; + } +} diff --git a/src/multiloadingindicator.h b/src/multiloadingindicator.h index 6b6069fd3..21f0ccfd8 100644 --- a/src/multiloadingindicator.h +++ b/src/multiloadingindicator.h @@ -11,17 +11,26 @@ class MultiLoadingIndicator : public QWidget { public: MultiLoadingIndicator(QWidget* parent = 0); + enum TaskType { + LoadingAudioEngine, + UpdatingLibrary, + GettingChannels, + LoadingStream, + LoadingLastFM, + }; + public slots: - void TaskStarted(const QString& name); - void TaskFinished(const QString& name); + void TaskStarted(MultiLoadingIndicator::TaskType type); + void TaskFinished(MultiLoadingIndicator::TaskType type); private: void UpdateText(); + static QString TaskTypeToString(TaskType type); private: Ui::MultiLoadingIndicator ui_; - QStringList tasks_; + QList tasks_; }; #endif // MULTILOADINGINDICATOR_H diff --git a/src/osd.cpp b/src/osd.cpp index a7e5593e3..7fd6a6773 100644 --- a/src/osd.cpp +++ b/src/osd.cpp @@ -43,15 +43,15 @@ void OSD::SongChanged(const Song &song) { } void OSD::Paused() { - ShowMessage(QCoreApplication::applicationName(), "Paused"); + ShowMessage(QCoreApplication::applicationName(), tr("Paused")); } void OSD::Stopped() { - ShowMessage(QCoreApplication::applicationName(), "Playlist finished"); + ShowMessage(QCoreApplication::applicationName(), tr("Playlist finished")); } void OSD::VolumeChanged(int value) { - ShowMessage(QCoreApplication::applicationName(), QString("Volume %1%").arg(value)); + ShowMessage(QCoreApplication::applicationName(), tr("Volume %1%").arg(value)); } void OSD::ShowMessage(const QString& summary, diff --git a/src/playlist.cpp b/src/playlist.cpp index 62fe1c3f8..7d0dd7ded 100644 --- a/src/playlist.cpp +++ b/src/playlist.cpp @@ -36,20 +36,20 @@ QVariant Playlist::headerData(int section, Qt::Orientation, int role) const { return QVariant(); switch (section) { - case Column_Title: return "Title"; - case Column_Artist: return "Artist"; - case Column_Album: return "Album"; - case Column_Length: return "Length"; - case Column_Track: return "Track"; - case Column_Disc: return "Disc"; - case Column_Year: return "Year"; - case Column_Genre: return "Genre"; + case Column_Title: return tr("Title"); + case Column_Artist: return tr("Artist"); + case Column_Album: return tr("Album"); + case Column_Length: return tr("Length"); + case Column_Track: return tr("Track"); + case Column_Disc: return tr("Disc"); + case Column_Year: return tr("Year"); + case Column_Genre: return tr("Genre"); - case Column_BPM: return "BPM"; - case Column_Bitrate: return "Bit rate"; - case Column_Samplerate: return "Sample rate"; - case Column_Filename: return "File name"; - case Column_Filesize: return "File size"; + case Column_BPM: return tr("BPM"); + case Column_Bitrate: return tr("Bit rate"); + case Column_Samplerate: return tr("Sample rate"); + case Column_Filename: return tr("File name"); + case Column_Filesize: return tr("File size"); } return QVariant(); diff --git a/src/playlistheader.cpp b/src/playlistheader.cpp index 9a3b43015..bd87da2dd 100644 --- a/src/playlistheader.cpp +++ b/src/playlistheader.cpp @@ -11,8 +11,8 @@ PlaylistHeader::PlaylistHeader(Qt::Orientation orientation, QWidget* parent) show_menu_(new QMenu(this)), show_mapper_(new QSignalMapper(this)) { - hide_action_ = menu_->addAction("Hide...", this, SLOT(HideCurrent())); - QAction* show_action = menu_->addAction("Show section"); + hide_action_ = menu_->addAction(tr("Hide..."), this, SLOT(HideCurrent())); + QAction* show_action = menu_->addAction(tr("Show section")); show_action->setMenu(show_menu_); connect(show_mapper_, SIGNAL(mapped(int)), SLOT(ToggleVisible(int))); @@ -28,7 +28,7 @@ void PlaylistHeader::contextMenuEvent(QContextMenuEvent* e) { hide_action_->setVisible(true); QString title(model()->headerData(menu_section_, Qt::Horizontal).toString()); - hide_action_->setText("Hide " + title); + hide_action_->setText(tr("Hide %1").arg(title)); } show_menu_->clear(); diff --git a/src/radiomodel.cpp b/src/radiomodel.cpp index 14d4af9e8..dae650cb4 100644 --- a/src/radiomodel.cpp +++ b/src/radiomodel.cpp @@ -24,8 +24,8 @@ void RadioModel::AddService(RadioService *service) { sServices[service->name()] = service; service->CreateRootItem(root_); - connect(service, SIGNAL(TaskStarted(QString)), SIGNAL(TaskStarted(QString))); - connect(service, SIGNAL(TaskFinished(QString)), SIGNAL(TaskFinished(QString))); + connect(service, SIGNAL(TaskStarted(MultiLoadingIndicator::TaskType)), SIGNAL(TaskStarted(MultiLoadingIndicator::TaskType))); + connect(service, SIGNAL(TaskFinished(MultiLoadingIndicator::TaskType)), SIGNAL(TaskFinished(MultiLoadingIndicator::TaskType))); connect(service, SIGNAL(StreamReady(QUrl,QUrl)), SIGNAL(StreamReady(QUrl,QUrl))); connect(service, SIGNAL(StreamFinished()), SIGNAL(StreamFinished())); connect(service, SIGNAL(StreamError(QString)), SIGNAL(StreamError(QString))); diff --git a/src/radiomodel.h b/src/radiomodel.h index 2962a5b06..9373f60a1 100644 --- a/src/radiomodel.h +++ b/src/radiomodel.h @@ -3,6 +3,7 @@ #include "radioitem.h" #include "simpletreemodel.h" +#include "multiloadingindicator.h" class RadioService; class LastFMService; @@ -36,8 +37,8 @@ class RadioModel : public SimpleTreeModel { void ReloadSettings(); signals: - void TaskStarted(const QString&); - void TaskFinished(const QString&); + void TaskStarted(MultiLoadingIndicator::TaskType); + void TaskFinished(MultiLoadingIndicator::TaskType); void StreamReady(const QUrl& original_url, const QUrl& media_url); void StreamFinished(); void StreamError(const QString& message); diff --git a/src/radioplaylistitem.cpp b/src/radioplaylistitem.cpp index 60c241e22..d1cb6b2a2 100644 --- a/src/radioplaylistitem.cpp +++ b/src/radioplaylistitem.cpp @@ -3,6 +3,7 @@ #include "radiomodel.h" #include +#include RadioPlaylistItem::RadioPlaylistItem() : service_(NULL) @@ -37,7 +38,7 @@ void RadioPlaylistItem::Restore(const QSettings& settings) { void RadioPlaylistItem::InitMetadata() { if (!service_) - metadata_.set_title("Radio service couldn't be loaded :-("); + metadata_.set_title(QApplication::translate("RadioPlaylistItem", "Radio service couldn't be loaded :-(")); else if (!title_.isEmpty()) metadata_.set_title(title_); else diff --git a/src/radioservice.h b/src/radioservice.h index f64ecd0d0..2025c759c 100644 --- a/src/radioservice.h +++ b/src/radioservice.h @@ -6,6 +6,7 @@ #include #include "radioitem.h" +#include "multiloadingindicator.h" class Song; @@ -37,8 +38,8 @@ class RadioService : public QObject { virtual void ReloadSettings() {} signals: - void TaskStarted(const QString& name); - void TaskFinished(const QString& name); + void TaskStarted(MultiLoadingIndicator::TaskType); + void TaskFinished(MultiLoadingIndicator::TaskType); void StreamReady(const QUrl& original_url, const QUrl& media_url); void StreamFinished(); diff --git a/src/somafmservice.cpp b/src/somafmservice.cpp index 6bce13a4a..8147da2c4 100644 --- a/src/somafmservice.cpp +++ b/src/somafmservice.cpp @@ -12,8 +12,6 @@ #include const char* SomaFMService::kServiceName = "SomaFM"; -const char* SomaFMService::kLoadingChannelsText = "Getting channels"; -const char* SomaFMService::kLoadingStreamText = "Loading stream"; const char* SomaFMService::kChannelListUrl = "http://somafm.com/channels.xml"; const char* SomaFMService::kHomepage = "http://somafm.com"; @@ -23,10 +21,10 @@ SomaFMService::SomaFMService(QObject* parent) context_menu_(new QMenu), network_(new QNetworkAccessManager(this)) { - context_menu_->addAction(QIcon(":media-playback-start.png"), "Add to playlist", this, SLOT(AddToPlaylist())); + context_menu_->addAction(QIcon(":media-playback-start.png"), tr("Add to playlist"), this, SLOT(AddToPlaylist())); context_menu_->addSeparator(); - context_menu_->addAction(QIcon(":web.png"), "Open somafm.com in browser", this, SLOT(Homepage())); - context_menu_->addAction(QIcon(":refresh.png"), "Refresh channels", this, SLOT(RefreshChannels())); + context_menu_->addAction(QIcon(":web.png"), tr("Open somafm.com in browser"), this, SLOT(Homepage())); + context_menu_->addAction(QIcon(":refresh.png"), tr("Refresh channels"), this, SLOT(RefreshChannels())); } SomaFMService::~SomaFMService() { @@ -66,12 +64,12 @@ void SomaFMService::StartLoading(const QUrl& url) { QNetworkReply* reply = network_->get(request); connect(reply, SIGNAL(finished()), SLOT(LoadPlaylistFinished())); - emit TaskStarted(kLoadingStreamText); + emit TaskStarted(MultiLoadingIndicator::LoadingStream); } void SomaFMService::LoadPlaylistFinished() { QNetworkReply* reply = qobject_cast(sender()); - emit TaskFinished(kLoadingStreamText); + emit TaskFinished(MultiLoadingIndicator::LoadingStream); if (reply->error() != QNetworkReply::NoError) { // TODO: Error handling @@ -99,12 +97,12 @@ void SomaFMService::RefreshChannels() { QNetworkReply* reply = network_->get(request); connect(reply, SIGNAL(finished()), SLOT(RefreshChannelsFinished())); - emit TaskStarted(kLoadingChannelsText); + emit TaskStarted(MultiLoadingIndicator::GettingChannels); } void SomaFMService::RefreshChannelsFinished() { QNetworkReply* reply = qobject_cast(sender()); - emit TaskFinished(kLoadingChannelsText); + emit TaskFinished(MultiLoadingIndicator::GettingChannels); if (reply->error() != QNetworkReply::NoError) { // TODO: Error handling diff --git a/src/somafmservice.h b/src/somafmservice.h index b5388f019..129d22ee8 100644 --- a/src/somafmservice.h +++ b/src/somafmservice.h @@ -20,8 +20,6 @@ class SomaFMService : public RadioService { }; static const char* kServiceName; - static const char* kLoadingChannelsText; - static const char* kLoadingStreamText; static const char* kChannelListUrl; static const char* kHomepage; diff --git a/src/src.pro b/src/src.pro index 88b37b669..af60d94d2 100644 --- a/src/src.pro +++ b/src/src.pro @@ -116,18 +116,22 @@ FORMS += mainwindow.ui \ libraryconfigdialog.ui \ lastfmconfigdialog.ui \ about.ui -RESOURCES += ../data/data.qrc +RESOURCES += ../data/data.qrc \ + translations.qrc OTHER_FILES += ../data/schema.sql \ ../data/mainwindow.css RC_FILE += ../dist/windres.rc +TRANSLATIONS = clementine_ru.ts \ + clementine_es.ts \ + clementine_el.ts # Xine on unix, phonon on windows -win32|fedora-win32-cross { +win32|fedora-win32-cross { QT += phonon SOURCES += phononengine.cpp HEADERS += phononengine.h } -!win32:!fedora-win32-cross { +!win32:!fedora-win32-cross { SOURCES += xine-engine.cpp \ xine-scope.c HEADERS += xine-engine.h \ @@ -161,11 +165,9 @@ win32|fedora-win32-cross:LIBS += -ltag \ -lpthreadGC2 # OSD -unix:!macx:!fedora-win32-cross { - nolibnotify { - SOURCES += osd_win.cpp - } - !nolibnotify { +unix:!macx:!fedora-win32-cross { + nolibnotify:SOURCES += osd_win.cpp + !nolibnotify { SOURCES += osd_x11.cpp QMAKE_CXXFLAGS += $$system(pkg-config --cflags libnotify) LIBS += $$system(pkg-config --libs libnotify) @@ -201,8 +203,8 @@ win32|fedora-win32-cross:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile # Hide the console on windows win32|fedora-win32-cross:LIBS += -Wl,-subsystem,windows -#CONFIG += console +# CONFIG += console # Installs target.path = $${install_prefix}/bin/ desktop.path = dummy diff --git a/src/translations.qrc b/src/translations.qrc new file mode 100644 index 000000000..4ddbedf4d --- /dev/null +++ b/src/translations.qrc @@ -0,0 +1,7 @@ + + + clementine_el.qm + clementine_es.qm + clementine_ru.qm + +