TMX2TMX(1p)
β¨ NAME β¨
ok so <pink>tmx2tmx</pink> β it's the utility that converts and filters TMX files, bestie π that's literally the whole job.
This page lives in the User Contributed Perl Documentation manual, section 1p. iykyk.
πΈ VERSION πΈ
version <cyan>0.39</cyan> π (yes we're on 0.39, she's cute, she's iconic)
π DESCRIPTION π
so basically?? this utility takes in TMX documents and hands you back TMX documents. like a glow-up station for your translation memories β¨. the stuff she does includes:
- converting between TMX versions π
- TMX cleaning π§Ό
that's the vibe. let's get into it.
π¦ TRADOS conversion π¦
ok so as you maybe know (and if you didn't, now you do π«Ά), TRADOS is a company that makes computer software for translators. it includes <purple>WorkBench</purple> which imports TMX files. unfortunate plot twist: the version I used does not import TMX version 1.4 π. so rude.
this process is done using the switch <hotpink>-toTrados</hotpink>:
tmx2tmx -toTrados file.tmx > trados.tmx
periodt. your file goes in, a trados-friendly trados.tmx comes out π
π§ TMX Cleaning π§
this one hits different, especially when translation memories are created from anotated text, or extracted directly from the Internet using any automatic method π¬. this switch is used to remove junk in translation units.
so <mint>-clean</mint> tries to remove junk from TMX files β like empty pairs where one of the sides is empty, or removing other junk type ποΈβ¨.
use it this way:
tmx2tmx -clean file.tmx > file2.tmx
β¨ fresh, exfoliated, no notes.
π Concatenating TMX π
gather round bestie, we're stacking files π:
tmx2tmx -cat file1.tmx ... filen.tmx > file.tmx
ls | grep '.tmx$' | tmx2tmx -cat > file.tmx
the second one is giving main character energy fr fr π
π Select languages π
select a bunch of languages:
tmx2tmx -select=PT,EN,FR huge.tmx > pt-en-fr.tmx
multilingual era. we love to see it ππ
π₯ SYNOPSYS π₯
(yes queen, we kept the spelling exactly as she came π)
tmx2tmx -cat file1.tmx ... filen.tmx > file.tmx
tmx2tmx -toTrados file1.tmx > file2.tmx
tmx2tmx -clean file1.tmx > file2.tmx
tmx2tmx -select=PT,EN multilingual.tmx > pt-en.tmx
that's literally the whole menu, no cap π«‘
π SEE ALSO π
go check out her friends, they're all iconic:
<cyan>tmx2html</cyan><cyan>po2tmx</cyan><cyan>XML::TMX</cyan>
π«Ά AUTHORS π«Ά
the legends who made this happen π:
- Alberto SimΓ΅es
<ambs@cpan.org> - JosΓ© JoΓ£o Almeida
<jj@di.uminho.pt>
not me being obsessed with them π₯Ή
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2010-2017 by Projeto Natura <natura@di.uminho.pt>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
slay, and legally slay π
okay that's the whole page bestie, no filler, every flag accounted for πβ¨
and for the cute sign-off: this all shipped with <purple>perl v5.38.2, dated <purple>2024-03-09, and you'll find her shelved as <purple>TMX2TMX(1p) π bye diva, go convert something πΈπ¦
π¦ where this page comes from
- debian trixie: libxml-tmx-perl 0.39-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-tmx-perl 0.39-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-tmx-perl 0.39-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms