Since 0.8.0 yard has included an i18n subcommand to place all the doc strings into a .pot file. It seems like if we just run this automatically when a user invokes puppet strings that would go a long way to enabling i18n workflows for module documentation.
Since 0.8.0 yard has included an {{i18n}} subcommand to place all the doc strings into a .pot file. It seems like if we just run this automatically when a user invokes {{puppet strings}} that would go a long way to enabling i18n workflows for module documentation.
You can see this in raw action by simply calling the CLI tool from the PuppetStrings.generate method and then running strings on a module. {code} YARD::CLI::I18n.run(search_patterns) {code}
Since 0.8.0 yard has included an {{i18n}} subcommand to place all the doc strings into a .pot file. It seems like if we just run this automatically when a user invokes {{puppet strings}} that would go a long way to enabling i18n workflows for module documentation.
You can see this in raw action by simply calling the CLI tool from the PuppetStrings.generate method and then running strings on a module.
Since 0.8.0 yard has included an {{i18n}} subcommand to place all the doc strings into a .pot file. It seems like if we just run this automatically when a user invokes {{puppet strings}} that would go a long way to enabling i18n workflows for module documentation.
You can see this in raw action by simply calling the CLI tool from the PuppetStrings.generate method and then running strings on a module. {code:ruby} YARD::CLI::I18n.run(search_patterns) {code}
You can see from the attached file, there's a lot of stuff that we won't want in there. It will be confusing to the translator and lots of unnecessary work. A few examples:
A lot of tags get the tag itself extracted into a msgid that looks like the one here: {code} # @param [String] #: ../lib/puppet/type/radius.rb:3 #: ../manifests/install.pp:10 msgid "tag|param|name" msgstr "" {code} First of all, we don't want the param name translated. Second, that's just confusing to look at.
In other cases, we _do_ want part of this msgid. This mostly occurs in examples: {code} # @example #: ../lib/puppet/type/radius.rb:3 msgid "tag|example|Here's an example" msgstr "" {code}
Finally, we don't want to translate code examples, obviously {code} # @example Using the type. #: ../lib/puppet/type/test.rb:3 msgid "test { 'mctesterson':\n" " foo => 'hi',\n" " my_prop => 'bar',\n" "}" msgstr "" {code}