tsmarty2c(1)
β¨ tsmarty2c β¨
okay so bestie, welcome to tsmarty2c(1) β it lives in section 1 of the manual, and its official vibe is "Smarty Gettext Translation String Ripper." Which is a whole mouthful but also kind of iconic? Anyway. Let's get into it. π
πΈ NAME πΈ
tsmarty2c β rips translation strings out of your smarty template files and turns them into gettext calls in C. yes really, that's the whole job, and she does it flawlessly. π
π¦ SYNOPSIS π¦
tsmarty2c <templ-file1-or-dir1> \
[<templ-file2-or-dir2>] \
[... <templ-fileN-or-dirN>]
so you just keep feeding her files or directories, as many as you want, no cap. π
β¨ DESCRIPTION β¨
Okay so here's the tea β β tsmarty2c rips the translation strings straight out of your smarty template files, and converts them into gettext calls in C. It's giving "middle man, but make it useful." π§
The C output it produces? You can use that later with the standard gettext tools β go look at xgettext, that's the one you want. (See the SEE ALSO section, bestie, I got you. π«Ά)
Here's the part that lowkey slays: if one of the parameters you pass is a directory, then all the template files inside it get parsed recursively. She goes deep. She finds everything. Main character energy fr. π
The output also contains comments that point to the location of the file that the string has been ripped from. So you always know where every string came from β traceability, we love to see it. β
And here's a little tip that's actually in the manpage, not me making stuff up: you can use the --add-comments parameter of xgettext to make it include these comments inside the PO file. (This one was suggested by Mike van Lammeren β shoutout to him, king behavior. π)
Quick reminder: this page doesn't list any options or flags for tsmarty2c itself β it's just the positional file/directory arguments. Don't go looking for extras that aren't there, babe. π
π SEE ALSO π
xgettext(1)β go read this one next, it's the sequel. π«
π AUTHOR π
This manual was written for the Debian project (and hey, it may be used by others too β sharing is caring πΈ) by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. Thank you for your service, Mike. π«‘β¨
okay that's the whole page, you ate that. This was Version 1.0, from July 2012 β a vintage, honestly, and she still holds up. periodt. π π¦π
π¦ where this page comes from
- debian bookworm: tsmarty2c 1.7.0-1 Β· LGPL-2.1-only
- debian trixie: tsmarty2c 1.7.0-1 Β· LGPL-2.1-only
- ubuntu jammy: tsmarty2c 1.6.1-2 Β· LGPL-2.1-only
- ubuntu noble: tsmarty2c 1.7.0-1 Β· LGPL-2.1-only
- ubuntu questing: tsmarty2c 1.7.0-1
- ubuntu resolute: tsmarty2c 1.7.0-1build1 Β· LGPL-2.1-only
- ubuntu stonking: tsmarty2c 1.7.0-1build1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms