Page 1 of 1

How to work on .ts files ?

Posted: Thu Aug 09, 2018 11:44 am
by zorzi
Hello,

I've contributed a bit on some MX french translations.

Some files are .txt (no problem to work on with text editor), but some others are .ts . How could I open and modify these .ts files ?

Thanks.

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 12:57 pm
by j2mcgreg
.ts files are part of the MPEG2 codec. You can open and work on them with Avidemux (it's in the repos).

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 1:01 pm
by Richard
Hmm.
I don't find it in stock repos nor in the test repo.

Do you have a link?

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 1:59 pm
by mmikeinsantarosa
Richard wrote: Thu Aug 09, 2018 1:01 pm Hmm.
I don't find it in stock repos nor in the test repo.

Do you have a link?
It can be downloaded but we're not allowed to store it in our repos.
It uses some proprietary codecs.

All the download links and ppa's I could find right now are pretty old. So no immediate additional advice from me here.

I could investigate this later in the week and see if I can build something for you.
I've built it before.

- mike

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 2:17 pm
by Old Giza
Since this is in the Translations forum, I think OP is asking about how to translate QT .ts files, not transport streams in mpeg.

(1) There is a QT tool called QT Linguist that deals directly with .ts files. But it is far more complex and does things that we don't require.

(2) You could "download for translation" the file for your language and resource from Transifex, and edit that with a text editor. Simpler, but prone to error.

(3) It will be much easier to simply make your translations directly on Transifex. It is easy to use, and you won't step on other's toes. It sounds as if you already have a Transifex account (unless you are doing these translations just for yourself?) Why not use it.

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 3:20 pm
by zorzi
Many thanks to everyone for answering. Yes I meant translation files.
Old Giza wrote: Thu Aug 09, 2018 2:17 pm Since this is in the Translations forum, I think OP is asking about how to translate QT .ts files, not transport streams in mpeg.

(1) There is a QT tool called QT Linguist that deals directly with .ts files. But it is far more complex and does things that we don't require.

(2) You could "download for translation" the file for your language and resource from Transifex, and edit that with a text editor. Simpler, but prone to error.

(3) It will be much easier to simply make your translations directly on Transifex. It is easy to use, and you won't step on other's toes. It sounds as if you already have a Transifex account (unless you are doing these translations just for yourself?) Why not use it.
Thanks for advice. I used to work with downloading text files but your third suggestion seems the best choice.

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 3:38 pm
by Stevo
Qt ts files are text files, just in a specific format. You can edit them with any text editor if you take care not to mess up the formatting, just like xml files.

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 4:52 pm
by fehlix
Old Giza wrote: Thu Aug 09, 2018 2:17 pm (1) There is a QT tool called QT Linguist that deals directly with .ts files. But it is far more complex and does things that we don't require.
Not sure I understand. I found Qt Linguist is fairly easy to use.
For off-line editing of Qt-translation / language .ts-files it seems to me optimal.
See the attached screen-shot.
Qt_Linguist.png
How to install Qt Linguist:
Qt Linguist is part of the package qttools5-dev-tools. Install it
either from MX Package Installer, Synaptic or the command-line like:

Code: Select all

sudo apt-get install qttools5-dev-tools
As the tool does not come you with a nice desktop-starter within menu.
Find below the „Qt Linguist“ desktop-starter with the proper Mime association for Qt .ts-files:

Code: Select all

[Desktop Entry]
# destop-starter manually created by fehlix
# save as  (home-dir)/.local/share/applications/qtlinguist.desktop
Type=Application
Name=Qt Linguist
GenericName=Qt Linguist tool to translate text
Comment=Translators can use the Qt Linguist tool to translate text in Qt applications.  
Exec=/usr/lib/x86_64-linux-gnu/qt5/bin/linguist %F
Icon=qtLinguist5
Terminal=false
MimeType=text/vnd.trolltech.linguist;
Categories=Qt;Development;IDE;
Icon=QtProject-linguist
Save/copy this file onto the Desktop or better into ~/.local/share/appliactions ( so you have it available within the (Whisker)-Menu,
Copy like this from the command line:

Code: Select all

cp  qtlinguist.desktop ~/.local/share/applications
Qt Linguist shall now be available from the Menu.
Attached a view of Qt Linguist with .ts file for MX Boot Options in French.

Re: How to work on .ts files ?

Posted: Thu Aug 09, 2018 6:43 pm
by Richard
Thanks Fehlix.
That is easier than editing between the tags. :)
Installed qtlinguist, just in case internet dies again.

@mikeinsantarosa, thanks for the offer, but this is solved for now.

And now that internet is live again, Transifex direct is great.

Re: How to work on .ts files ?

Posted: Fri Aug 10, 2018 2:16 am
by zorzi
Thanks for your answers.