GIT-SH-I18N(1)

πŸ’… GIT-SH-I18N πŸ’…

okay so real talk, bestie β€” this is the git-sh-i18n manual page, aka Git's i18n setup code for shell scripts. say it with me: internationalization, but make it ✨abbreviated✨. i18n = the "i", eighteen letters, "n". iconic naming convention, no notes. πŸŽ€


✨ SYNOPSIS ✨

. "$(git --exec-path)/git-sh-i18n"

that leading . is the whole personality of this page btw. it's a source, not a run. iykyk 🫢


🌸 DESCRIPTION 🌸

okay so first thing's first, and i need you to hear me on this one:

this is not a command the end user would want to run. Ever. like, genuinely ever. do not put this in your shell rc file. do not alias it. do not pass go. 🚫

this documentation is for the people who are studying the Porcelain-ish scripts and/or writing new ones β€” so if that's not you, you can lowkey close the tab, love u, bye πŸ’–

so the git sh-i18n scriptlet is designed to be sourced (that's the . thing, using .) by Git's porcelain programs implemented in shell script. it's a helper, not a star. main character energy is elsewhere.

what it actually gives you:

  • wrappers for the GNU gettext and eval_gettext functions that you can access through the gettext.sh script ✨
  • pass-through fallbacks on systems that don't have GNU gettext β€” so your script doesn't just explode. considerate king behavior πŸ‘‘

πŸ”₯ FUNCTIONS πŸ”₯

⭐ gettext

currently a dummy fall-through function implemented as a wrapper around printf(1). yes, that's it. that's the whole function rn. πŸ™ˆ

will be replaced by a real gettext implementation in a later version β€” so like, watch this space, but don't hold your breath, printf(1) is doing its best πŸ’€

⭐ eval_gettext

also currently a dummy fall-through function, also a wrapper around printf(1) β€” but this one comes with variables expanded by the git-sh-i18n--envsubst(1) helper. fancy!! πŸ¦‹

and yes, same deal: will be replaced by a real gettext implementation in a later version. she's a placeholder with a glow-up scheduled. slay πŸ’…


πŸ‘‘ GIT πŸ‘‘

part of the git(1) suite β€” one of the fam, one of the crew, one of the icons 🌈


ngl if you got this far and you're not writing a porcelain shell script, i love your commitment but bestie why 😭

that's the whole vibe check! this page you just read is from Git 2.56.0, dated 2026-09-27 β€” go forth and source responsibly, mwah πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from