Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to abbreviate long tech words nicely #abbreviate #tech #i18n #l10n #k8s

How to abbreviate long tech words nicely :trollface:

Just for fun, I do not recommend using this

Ever heard of I18n? Probably. But do you know what it stands for? Internationalization. There's a few other common ones as well

  • l10n localization
  • k8s kubernetes

Okay, so now you too want to use it everywhere, obviously. Here's a script that abbreviates its input. (each word).


#!/usr/bin/env ruby

abbrev_words = do |input|
  left, *mid, right = input.split("")


puts abbrev_words.join(" ")


❯❯❯ abbrev Internationalization

❯❯❯ abbrev localization

❯❯❯ abbrev translation

❯❯❯ abbrev kubernetes

❯❯❯ abbrev Github

Contribed use case example :trollface:

A colleague ran into an issue where we had too long cron syslog ids with Nanobox. Couldn't be more than 15 characters 🙀.

Here's my joke suggestion for how to make it shorter.

❯❯❯ abbrev remind inactive users
r4d i6e u3s

❯❯❯ abbrev delete inactive users
d4e i6e u3s

❯❯❯ abbrev Import arbetsformedlingen ads
I4t a16n a1s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment