CTAGS-LANG-I18NRUBGEM(7)

πŸ“¦
version 6.2.1 Β· 5 versions
, in alpine 3.24, fedora 43, fedora 44

🌸 NAME 🌸

okay so bestie, welcome to the CTAGS-LANG-I18NRUBGEM(7) page of the Universal Ctags manual πŸ’– and this one is literally just ctags-lang-i18nrubgem β€” a lil collection of random notes about tagging input for I18n Ruby Gem with Universal Ctags. no cap, that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

ctags ... --extras=+s --languages=+I18nRubyGem ...
ctags ... --extras=+s --language-force=I18nRubyGem ...
ctags ... --extras=+s --map-I18nRubyGem=+.yaml ...
ctags ... --extras=+s --map-I18nRubyGem=+.yml ...

πŸŽ€ DESCRIPTION πŸŽ€

So this man page is a grab bag of random notes about tagging input for I18n Ruby Gem [RUBYI18N]. 🫢

Here's the tea: I18nRubyGem is a subparser that runs on top of the Yaml parser. The way it works is so main character β€” if a top-level scalar token of whatever Yaml source input you throw at it is a local name [ISOCODES], then I18nRubyGem activates itself. ✨ And if it's not? Then I18nRubyGem does absolutely nothing. literally just vibes and no output. πŸ’€

πŸ“ input.yaml

---
ja:
  msg:
    error: エラー
    function: ι–’ζ•°

🌈 output.tags

run with --options=NONE -o - --fields=+E input.yaml and you get:

error   input.yaml      /^    error: エラー$/;"    k       keyInMiddle:ja.msg      extras:subparser
function        input.yaml      /^    function: ι–’ζ•°$/;"  k       keyInMiddle:ja.msg      extras:subparser
ja.msg.error    input.yaml      /^    error: エラー$/;"    k       keyInMiddle:ja.msg      extras:subparser,localeful
ja.msg.function input.yaml      /^    function: ι–’ζ•°$/;"  k       keyInMiddle:ja.msg      extras:subparser,localeful
msg.error       input.yaml      /^    error: エラー$/;"    k       locale:ja       extras:subparser,localeless
msg.function    input.yaml      /^    function: ι–’ζ•°$/;"  k       locale:ja       extras:subparser,localeless

With those options, the parser emits three tag entries for a key: error, js.msg.error, and msg.error β€” all of them for the key error. πŸ‘‘ And the parser emits error at the first line always. periodt.

To emit ja.msg.error β€” a localeful extra tag β€” that happens at the fifth line always. 🧚 If you specify --extra=+q or --extra=+{qualified}, ctags emits the same tag twice: once as a localeful tag, and once as a qualified tag. And if you wanna suppress those localeful extra tags, just specify --extras-I18nRubyGem=-{localeful}. πŸ’…

To emit msg.error β€” a localeless extra tag β€” that's also at the fifth line always. The parser makes a localeless extra tag by truncating the first component (like ja.) off the associated full qualified extra tag (like ja.msg.error). πŸŽ€ localeless extra is enabled by default, so if you don't need those localeless extra tags, specify --extras-I18nRubyGem=-{localeless}.

And ngl, the parser does not make tag entries for top-level and mid-level components like ja and msg by default. πŸ™ˆ If you do need them, specify --kinds-I18nRubyGem=+{locale} and/or --kinds-I18nRubyGem=+{keyInMiddle}. slay.


πŸ’€ KNOWN BUGS πŸ’€

not me having to report this but 😭 the mechanism that activates the I18nRubyGem subparser doesn't work well for YAML source input containing multiple documents. so like, be aware, bestie.

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ“š REFERENCES πŸ“š

Expected feature: yaml ⭐


kisses and ctags, bestie 🫢 this was the CTAGS-LANG-I18NRUBGEM(7) page from Universal Ctags, version 6.2.1. stay tagged, stay iconic πŸ‘‘πŸ’–

πŸ“¦ where this page comes from