New feature for Ruby YAML users: automatic string grouping
By Edouard on April 16, 2010
Last week I introduced a new feature for Gettext users: automatic strings grouping by category.
This feature is now available to Ruby YAML users. Users will have to re-upload their language files as categories are only added during the file import procedure.
(try it yourself on the translation project for Web Translate It)
The categories are based on the flattened keys. Technically speaking, categories are subkeys of depth 1, but only if the key group other keys.
For instance this YAML file:
en:
hello: "Bonjour {{user}}"
greetings:
informal: Salut
formal: Bonjour
will only create one category: greetings
. I made experimentations and this depth gives better result. Using deeper keys give more precise results but then the category list is too long to be any useful.
The next step will be to add this feature to Java .properties files. Thank you for using Web Translate It!