File: ctags-lang-i18nrubygem.7.rst

package info (click to toggle)
universal-ctags 6.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,612 kB
  • sloc: ansic: 158,498; sh: 8,621; lisp: 7,742; vhdl: 6,518; cpp: 2,583; perl: 2,578; python: 2,324; javascript: 2,054; cs: 1,193; lex: 1,015; sql: 897; makefile: 787; ruby: 764; php: 755; cobol: 741; f90: 566; ada: 559; asm: 509; yacc: 465; fortran: 412; xml: 405; objc: 289; tcl: 280; java: 173; erlang: 65; pascal: 58; ml: 49; awk: 44; haskell: 42
file content (85 lines) | stat: -rw-r--r-- 3,072 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.. _ctags-lang-i18nrubgem(7):

==============================================================
ctags-lang-i18nrubgem
==============================================================

Random notes about tagging input for I18n Ruby Gem with Universal Ctags

:Version: 6.2.1
:Manual group: Universal Ctags
:Manual section: 7
:Expected feature: yaml

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
-----------
This man page gathers random notes about tagging input for I18n Ruby
Gem [RUBYI18N]_. I18nRubyGem is a subparser running on Yaml parser. If a
top-level scalar token of a given Yaml source input is a local name [ISOCODES]_,
I18nRubyGem activates itself. If not, I18nRubyGem does nothing.

"input.yaml"

.. code-block:: YAML

	---
	ja:
	  msg:
	    error: エラー
	    function: 関数

"output.tags"
with "--options=NONE -o - --fields=+E input.yaml"

.. code-block:: tags

	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.

To emit "ja.msg.error", a ``localeful`` extra tag, at the fifth line
always. If you specify ``--extra=+q`` or ``--extra=+{qualified}``,
ctags emits the same tag twice: a ``localeful`` tag, and a ``qualified`` tag.
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}``.

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 I18nRubyGem subparser doesn't work well for YAML
source input containing multiple documents.

SEE ALSO
--------
:ref:`ctags(1) <ctags(1)>`

REFERENCES
----------
.. [RUBYI18N] Ruby I18n, https://github.com/ruby-i18n/i18n
.. [ISOCODES] iso-codes, https://salsa.debian.org/iso-codes-team/iso-codes