- Issue created by @phenaproxima
- ๐ญ๐บHungary Gรกbor Hojtsy Hungary
At least YAML 1.2 allows for tags that allow us to define custom data types https://yaml.org/spec/1.2.2/#tags, then we would need to respond to the
!translate
type with wrapping it in translation at runtime and extracting it statically. Not sure how wide support for this is in tools.key: 12 another: !translate This text will be translated
- ๐ญ๐บHungary Gรกbor Hojtsy Hungary
The default (failsafe) schema of YAML does not include
!translate
, howeverAll nodes with the โ!โ non-specific tag are resolved, by the standard convention, to โtag:yaml.org,2002:seqโ, โtag:yaml.org,2002:mapโ or โtag:yaml.org,2002:strโ, according to their kind.
per https://yaml.org/spec/1.2.2/#failsafe-schema -- which I understand that tools are expected to resolve custom tags as sequence, map or string based on which syntax was used above them. So
!translate
followed by a string would/should be understood as string when applied to a string by a YAML tool following the failsafe schema. - ๐บ๐ธUnited States thejimbirch Cape Cod, Massachusetts
Adding related issues.
- ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
We'll need to figure out too:
* Potx support
* l.d.org support: we need to run potx on general projects that include a recipe.yml. - ๐บ๐ธUnited States phenaproxima Massachusetts
Looks like the Symfony YAML parser supports custom tags: https://symfony.com/doc/current/components/yaml.html#parsing-and-dumping...
Maybe something we could take advantage of here?