ctags-lang-i18nrubgem(7)
π NAME π
okay so this is ctags-lang-i18nrubgem from the Universal Ctags manual β it's literally just random notes about tagging input for the I18n Ruby Gem with Universal Ctags. bestie, it's giving "field notes from a niche parser" and we're obsessed π
β¨ 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 lil scrapbook of random notes about tagging input for the I18n Ruby Gem [RUBYI18N]. The tea: I18nRubyGem is a subparser running on the Yaml parser. If a top-level scalar token of a given Yaml source input is a local name [ISOCODES], then I18nRubyGem activates itself. If it's not, I18nRubyGem does nothing. literally nothing. it just sits there π
Check it β here's the input:
"input.yaml"
---
ja:
msg:
error: γ¨γ©γΌ
function: ι’ζ°
and here's what comes out:
"output.tags" with "--options=NONE -o - --fields=+E input.yaml"
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 the options, the parser emits three tag entries for a key: "error", "js.msg.error", and "msg.error" for the key "error". The parser emits "error" at the first line always. periodt β¨
To emit "ja.msg.error", a localeful extra tag, at the fifth line always. And heads up: if you specify --extra=+q or --extra=+{qualified}, ctags emits the same tag twice β a localeful tag, and a qualified tag. Don't want that dupe energy? You can suppress the localeful extra tags., specify --extras-I18nRubyGem=-{localeful}. π
To emit "msg.error", a localeless extra tag, at the fifth line always. The parser creates a localeless extra tag by truncating the first component (e.g. "ja.") from the associated full qualified extra tag (e.g. "ja.msg.error"). localeless extra is enabled by default. If you don't need localeless extra tags, specify --extras-I18nRubyGem=-{localeless}. π«Ά
Also, the parser doesn't make tag entries for top-level and mid-level components like ja and msg by default. If you need them, specify --kinds-I18nRubyGem=+{locale} and/or --kinds-I18nRubyGem=+{keyInMiddle}. π₯
π KNOWN BUGS π
The mechanism activating the I18nRubyGem subparser doesn't work well for YAML source input containing multiple documents. yeah. she struggles. π
π SEE ALSO π
π REFERENCES π
- [RUBYI18N] β Ruby I18n, <https://github.com/ruby-i18n/i18n>
- [ISOCODES] β iso-codes, <https://salsa.debian.org/iso-codes-team/iso-codes>
- Expected feature:
yaml
- Expected feature:
okay that's the whole thing bestie, you're officially fluent in I18nRubyGem tagging π§ this was Universal Ctags version 6.2.1, page ctags-lang-i18nrubgem(7) β go forth and tag, you main character ππ
π¦ where this page comes from
- ubuntu resolute: universal-ctags 6.2.1-1 Β· GPL-2.0-or-later
- ubuntu stonking: universal-ctags 6.2.1-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms