rdoc 4.1.2 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.autotest +3 -1
- data/History.rdoc +70 -3
- data/LEGAL.rdoc +11 -0
- data/Manifest.txt +6 -2
- data/Rakefile +8 -1
- data/lib/rdoc.rb +3 -1
- data/lib/rdoc/context.rb +2 -0
- data/lib/rdoc/encoding.rb +3 -1
- data/lib/rdoc/generator.rb +1 -0
- data/lib/rdoc/generator/darkfish.rb +3 -2
- data/lib/rdoc/generator/json_index.rb +44 -0
- data/lib/rdoc/generator/pot.rb +97 -0
- data/lib/rdoc/generator/template/darkfish/_footer.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +9 -12
- data/lib/rdoc/generator/template/darkfish/{fonts.css → css/fonts.css} +0 -0
- data/lib/rdoc/generator/template/darkfish/{rdoc.css → css/rdoc.css} +11 -1
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +32 -11
- data/lib/rdoc/markdown.kpeg +6 -1
- data/lib/rdoc/markdown.rb +174 -2
- data/lib/rdoc/markup.rb +2 -2
- data/lib/rdoc/markup/attribute_manager.rb +1 -1
- data/lib/rdoc/markup/to_html.rb +5 -4
- data/lib/rdoc/markup/to_label.rb +1 -1
- data/lib/rdoc/method_attr.rb +11 -3
- data/lib/rdoc/options.rb +55 -3
- data/lib/rdoc/parser.rb +1 -1
- data/lib/rdoc/parser/c.rb +5 -6
- data/lib/rdoc/parser/changelog.rb +7 -3
- data/lib/rdoc/parser/ruby.rb +8 -12
- data/lib/rdoc/rd/block_parser.rb +1 -1
- data/lib/rdoc/rd/inline_parser.rb +1 -1
- data/lib/rdoc/rdoc.rb +5 -3
- data/lib/rdoc/ruby_lex.rb +3 -3
- data/lib/rdoc/ruby_token.rb +7 -7
- data/lib/rdoc/single_class.rb +4 -0
- data/lib/rdoc/stats.rb +4 -0
- data/lib/rdoc/stats/normal.rb +22 -11
- data/lib/rdoc/task.rb +1 -1
- data/lib/rdoc/test_case.rb +1 -1
- data/lib/rdoc/text.rb +9 -0
- data/lib/rdoc/token_stream.rb +1 -1
- data/test/test_rdoc_context.rb +2 -0
- data/test/test_rdoc_encoding.rb +23 -0
- data/test/test_rdoc_generator_darkfish.rb +2 -2
- data/test/test_rdoc_generator_json_index.rb +55 -0
- data/test/test_rdoc_generator_markup.rb +1 -1
- data/test/test_rdoc_generator_pot.rb +91 -0
- data/test/test_rdoc_generator_pot_po.rb +51 -0
- data/test/test_rdoc_generator_pot_po_entry.rb +139 -0
- data/test/test_rdoc_i18n_locale.rb +73 -0
- data/test/test_rdoc_i18n_text.rb +123 -0
- data/test/test_rdoc_markup_attribute_manager.rb +6 -0
- data/test/test_rdoc_markup_heading.rb +4 -4
- data/test/test_rdoc_markup_pre_process.rb +1 -1
- data/test/test_rdoc_markup_to_html.rb +46 -26
- data/test/test_rdoc_markup_to_html_snippet.rb +8 -7
- data/test/test_rdoc_markup_to_label.rb +4 -4
- data/test/test_rdoc_method_attr.rb +31 -1
- data/test/test_rdoc_normal_class.rb +4 -4
- data/test/test_rdoc_options.rb +19 -0
- data/test/test_rdoc_parser.rb +16 -1
- data/test/test_rdoc_parser_c.rb +31 -1
- data/test/test_rdoc_parser_changelog.rb +1 -1
- data/test/test_rdoc_parser_markdown.rb +1 -1
- data/test/test_rdoc_parser_rd.rb +1 -1
- data/test/test_rdoc_parser_ruby.rb +22 -25
- data/test/test_rdoc_parser_simple.rb +1 -1
- data/test/test_rdoc_rd_block_parser.rb +3 -1
- data/test/test_rdoc_rdoc.rb +24 -3
- data/test/test_rdoc_ruby_lex.rb +11 -0
- data/test/test_rdoc_rubygems_hook.rb +0 -3
- data/test/test_rdoc_single_class.rb +13 -5
- data/test/test_rdoc_stats.rb +55 -0
- data/test/test_rdoc_task.rb +1 -0
- metadata +18 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8caf92d9ae213ea0a9a9eff7f7433ba487af357f
|
4
|
+
data.tar.gz: 06f1871ad30883d2ce68b5e9392a6988bcce57d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4013603b560a950d86b326be9826294bf10f6bd5d08039f28fe8424b868d25e1a8d5d9abfba424e97e6a3ab37388c7f4f86948c43de1230d66a2189f140cb26d
|
7
|
+
data.tar.gz: 26e8921920c1de21a5fff069274c82f7fb2e8b333e9cfa48762d58313f2b2ed9e4168ba20ae794763566ec4a06a428e37ce762ec2400403c5f6863b1ff644ab4
|
data/.autotest
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'autotest/restart'
|
2
2
|
|
3
|
-
Autotest.add_hook :run_command do |
|
3
|
+
Autotest.add_hook :run_command do |_, cmd|
|
4
4
|
system "#{Gem.ruby} -rubygems #{Gem.bin_path 'rake', 'rake'} generate"
|
5
|
+
cmd.sub! ' -e ', ' -we '
|
6
|
+
cmd.sub! "'minitest'", "'minitest', '~> 4.7'"
|
5
7
|
end
|
6
8
|
|
7
9
|
Autotest.add_hook :initialize do |at|
|
data/History.rdoc
CHANGED
@@ -1,3 +1,72 @@
|
|
1
|
+
=== 4.2.0 / 2014-12-06
|
2
|
+
|
3
|
+
* Major enhancements
|
4
|
+
* RDoc can now produce translation files for use with gettext. See
|
5
|
+
RDoc::Generator::POT for a workflow for creating translations of your
|
6
|
+
documentation. Pull request #254 by Kouhei Sutou.
|
7
|
+
|
8
|
+
* Minor enhancements
|
9
|
+
* RDoc now allows any single-word macro before a C method implementation.
|
10
|
+
Issue #722 by Hanmac.
|
11
|
+
* Now :all is a synonym for :private for RDoc::Options#visibility= to match
|
12
|
+
the --all command line option. Pull request #276 by Zachary Scott.
|
13
|
+
* Running rake for the first time now installs racc. Pull request #285 by
|
14
|
+
Kouhei Sutou.
|
15
|
+
* Added <code>-h</code> flag to also display help. Issue #300 by Ryan Davis
|
16
|
+
* search_index.js is now loaded asynchronously for improved performance.
|
17
|
+
* Allow +X::Y+ as typewriter text. Issue #319, pull request #322 by Jeremy
|
18
|
+
Evans.
|
19
|
+
* Added RDoc::RI::Task for building ri data easily through rake. Pull
|
20
|
+
request #332 by Zachary Scott.
|
21
|
+
* A gzipped search index is generated for servers configured to use
|
22
|
+
precompressed files. Pull request #334 by Zachary Scott.
|
23
|
+
* CSS files now live under /css relative to the document root. Pull request
|
24
|
+
#335 by Zachary Scott.
|
25
|
+
* Improved detection of valid ruby in verbatim sections. Pull request #333
|
26
|
+
by Jeremy Evans.
|
27
|
+
|
28
|
+
* Bug fixes
|
29
|
+
* Fixed HTML labels for cross-browser compatibility. This breaks existing
|
30
|
+
links but enables cross-browser compatibility. Pull request #330 by Jens
|
31
|
+
Wille.
|
32
|
+
* RDoc handles ASCII-incompatible encodings now. An encoding hint may need
|
33
|
+
to be added to the file for RDoc to produce correct output, though.
|
34
|
+
Issue #288 by Manuel Meurer.
|
35
|
+
* Fixed height recalculation issues when headings are hovered. Issue #289
|
36
|
+
by Dietmar H. Büto.
|
37
|
+
* RDoc now ignores its own output directories. Pull Request #306 by
|
38
|
+
Hsing-Hui Hsu, bug #305 by Ryan Davis.
|
39
|
+
* Fixed RDoc::Task no longer uselessly builds documentation when generating
|
40
|
+
non-HTML output. Bug #307 by Christina Thompson, pull request #308 by
|
41
|
+
Hsing-Hui Hsu
|
42
|
+
* Added pointer to font copyright and license information to LEGAL.rdoc.
|
43
|
+
Issue #290 by Christian Hofstaedtler.
|
44
|
+
* Fixed RDoc::Context#<=> for ruby trunk. Issue #284 by Hanmac, pull
|
45
|
+
request #287 by Aaron Patterson
|
46
|
+
* Tests no longer create directories inside test/. Pull request #286 by
|
47
|
+
Kouhei Sutou.
|
48
|
+
* Fixed documentation example in RDoc::Markup. Pull request #292 by Gregory
|
49
|
+
Brown.
|
50
|
+
* Applied typo fix to RDoc::Markup. Pull request #297 by @montanalow
|
51
|
+
* Fixed pretty_print for RDoc::MethodAttr with an alias. Pull request #324
|
52
|
+
by Hsing-Hui Hsu.
|
53
|
+
* Fixed lexing of %w"". Issue #315 by Thierry Lambert, pull request #323 by
|
54
|
+
Jeremy Evans.
|
55
|
+
* RDoc::TokenStream now removes nil tokens. Pull request #318 by Calle
|
56
|
+
Erlandsson.
|
57
|
+
* Fixed footer links to rubyforge and darkfish. Pull request #328 by
|
58
|
+
@blackwinter
|
59
|
+
* Fixed page-top link. Pull request #329 by @blackwinter
|
60
|
+
* Minitest gem activation failures are now ignored during test startup.
|
61
|
+
Issue #313 by Vít Ondruch.
|
62
|
+
* Fixed error when generating documentation from singleton classes. Issue
|
63
|
+
#311 by Vít Ondruch.
|
64
|
+
* Splat and keyword params can now be detected for documentation
|
65
|
+
completeness. Issue #321 Tom Kadwill.
|
66
|
+
* Standalone anchors in markdown documents are no longer escaped. Issue
|
67
|
+
#312 by Scott Thompson.
|
68
|
+
* Fixed RegExp matching stack overflow on Ruby 1.8.7. Issue #327 by sshao.
|
69
|
+
|
1
70
|
=== 4.1.2 / 2014-09-05
|
2
71
|
|
3
72
|
* Bug fixes
|
@@ -43,7 +112,7 @@
|
|
43
112
|
* Moved old DEVELOPERS file to CONTRIBUTING to match github conventions.
|
44
113
|
* TomDoc output now has a "Returns" heading. Issue #234 by Brian Henderson
|
45
114
|
* Metaprogrammed methods can now use the :args: directive in addition to the
|
46
|
-
:call-seq:
|
115
|
+
:call-seq: directive. Issue #236 by Mike Moore.
|
47
116
|
* Sections can be linked to using "@" like labels. If a section and a label
|
48
117
|
have the same name the section will be preferred. Issue #233 by Brian
|
49
118
|
Henderson.
|
@@ -71,8 +140,6 @@
|
|
71
140
|
Bug #214 by Ryan Davis.
|
72
141
|
* Fixed documented? check for classes which indicated incorrect 100%
|
73
142
|
coverage. Bug #211 by Ryan Davis.
|
74
|
-
* RDoc ignores constants discovered in passing in class and method bodies.
|
75
|
-
Bug #209 by Ryan Davis.
|
76
143
|
* An :enddoc: at the top level stops all further parsing. Bug #213 by Ryan
|
77
144
|
Davis.
|
78
145
|
* Improved handling of multiline call-seq. Bug #207 by Erik Hollensbe.
|
data/LEGAL.rdoc
CHANGED
@@ -37,3 +37,14 @@ MarkdownTest::
|
|
37
37
|
|
38
38
|
See http://dev.perl.org/licenses/ for the terms of the Perl license.
|
39
39
|
|
40
|
+
Fonts::
|
41
|
+
Source Code Pro is (c) 2010, 2012 Adobe Systems Incorporated.
|
42
|
+
|
43
|
+
Lato is (c) 2010 Łukasz Dziedzic.
|
44
|
+
|
45
|
+
Both fonts are used under the SIL Open Font License, Version 1.1. The
|
46
|
+
license is available at http://scripts.sil.org/OFL
|
47
|
+
|
48
|
+
See lib/rdoc/generator/template/darkfish/fonts.css for complete copyright
|
49
|
+
and license information, including a copy of the OFL.
|
50
|
+
|
data/Manifest.txt
CHANGED
@@ -37,6 +37,7 @@ lib/rdoc/generator/darkfish.rb
|
|
37
37
|
lib/rdoc/generator/json_index.rb
|
38
38
|
lib/rdoc/generator/markup.rb
|
39
39
|
lib/rdoc/generator/ri.rb
|
40
|
+
lib/rdoc/generator/pot.rb
|
40
41
|
lib/rdoc/generator/template/darkfish/.document
|
41
42
|
lib/rdoc/generator/template/darkfish/_footer.rhtml
|
42
43
|
lib/rdoc/generator/template/darkfish/_head.rhtml
|
@@ -54,7 +55,7 @@ lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml
|
|
54
55
|
lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
|
55
56
|
lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
|
56
57
|
lib/rdoc/generator/template/darkfish/class.rhtml
|
57
|
-
lib/rdoc/generator/template/darkfish/fonts.css
|
58
|
+
lib/rdoc/generator/template/darkfish/css/fonts.css
|
58
59
|
lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf
|
59
60
|
lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf
|
60
61
|
lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf
|
@@ -91,7 +92,7 @@ lib/rdoc/generator/template/darkfish/js/darkfish.js
|
|
91
92
|
lib/rdoc/generator/template/darkfish/js/jquery.js
|
92
93
|
lib/rdoc/generator/template/darkfish/js/search.js
|
93
94
|
lib/rdoc/generator/template/darkfish/page.rhtml
|
94
|
-
lib/rdoc/generator/template/darkfish/rdoc.css
|
95
|
+
lib/rdoc/generator/template/darkfish/css/rdoc.css
|
95
96
|
lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml
|
96
97
|
lib/rdoc/generator/template/darkfish/servlet_root.rhtml
|
97
98
|
lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
|
@@ -234,6 +235,9 @@ test/test_rdoc_generator_darkfish.rb
|
|
234
235
|
test/test_rdoc_generator_json_index.rb
|
235
236
|
test/test_rdoc_generator_markup.rb
|
236
237
|
test/test_rdoc_generator_ri.rb
|
238
|
+
test/test_rdoc_generator_pot.rb
|
239
|
+
test/test_rdoc_generator_pot_po.rb
|
240
|
+
test/test_rdoc_generator_pot_po_entry.rb
|
237
241
|
test/test_rdoc_include.rb
|
238
242
|
test/test_rdoc_markdown.rb
|
239
243
|
test/test_rdoc_markdown_test.rb
|
data/Rakefile
CHANGED
@@ -77,9 +77,16 @@ def rake(*args)
|
|
77
77
|
sh $0, *args
|
78
78
|
end
|
79
79
|
|
80
|
-
|
80
|
+
need_racc = PARSER_FILES.any? do |rb_file|
|
81
|
+
ry_file = rb_file.gsub(/\.rb\z/, ".ry")
|
82
|
+
not File.exist?(rb_file) or
|
83
|
+
(File.exist?(ry_file) and File.mtime(rb_file) < File.mtime(ry_file))
|
84
|
+
end
|
85
|
+
|
86
|
+
if need_racc
|
81
87
|
Rake::Task["default"].prerequisites.clear
|
82
88
|
task :default do
|
89
|
+
rake "check_extra_deps"
|
83
90
|
rake "install_plugins"
|
84
91
|
rake "newb"
|
85
92
|
end
|
data/lib/rdoc.rb
CHANGED
@@ -64,7 +64,7 @@ module RDoc
|
|
64
64
|
##
|
65
65
|
# RDoc version you are using
|
66
66
|
|
67
|
-
VERSION = '4.
|
67
|
+
VERSION = '4.2.0'
|
68
68
|
|
69
69
|
##
|
70
70
|
# Method visibilities
|
@@ -151,6 +151,8 @@ module RDoc
|
|
151
151
|
|
152
152
|
autoload :Comment, 'rdoc/comment'
|
153
153
|
|
154
|
+
autoload :I18n, 'rdoc/i18n'
|
155
|
+
|
154
156
|
# code objects
|
155
157
|
#
|
156
158
|
# We represent the various high-level code constructs that appear in Ruby
|
data/lib/rdoc/context.rb
CHANGED
data/lib/rdoc/encoding.rb
CHANGED
@@ -29,7 +29,9 @@ module RDoc::Encoding
|
|
29
29
|
encoding ||= Encoding.default_external
|
30
30
|
orig_encoding = content.encoding
|
31
31
|
|
32
|
-
if
|
32
|
+
if not orig_encoding.ascii_compatible? then
|
33
|
+
content.encode! encoding
|
34
|
+
elsif utf8 then
|
33
35
|
content.force_encoding Encoding::UTF_8
|
34
36
|
content.encode! encoding
|
35
37
|
else
|
data/lib/rdoc/generator.rb
CHANGED
@@ -62,14 +62,14 @@ class RDoc::Generator::Darkfish
|
|
62
62
|
|
63
63
|
BUILTIN_STYLE_ITEMS = # :nodoc:
|
64
64
|
%w[
|
65
|
-
fonts.css
|
65
|
+
css/fonts.css
|
66
66
|
fonts/Lato-Light.ttf
|
67
67
|
fonts/Lato-LightItalic.ttf
|
68
68
|
fonts/Lato-Regular.ttf
|
69
69
|
fonts/Lato-RegularItalic.ttf
|
70
70
|
fonts/SourceCodePro-Bold.ttf
|
71
71
|
fonts/SourceCodePro-Regular.ttf
|
72
|
-
rdoc.css
|
72
|
+
css/rdoc.css
|
73
73
|
]
|
74
74
|
|
75
75
|
##
|
@@ -246,6 +246,7 @@ class RDoc::Generator::Darkfish
|
|
246
246
|
generate_file_files
|
247
247
|
generate_table_of_contents
|
248
248
|
@json_index.generate
|
249
|
+
@json_index.generate_gzipped
|
249
250
|
|
250
251
|
copy_static
|
251
252
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'zlib'
|
2
3
|
|
3
4
|
##
|
4
5
|
# The JsonIndex generator is designed to complement an HTML generator and
|
@@ -152,6 +153,49 @@ class RDoc::Generator::JsonIndex
|
|
152
153
|
end
|
153
154
|
end
|
154
155
|
|
156
|
+
##
|
157
|
+
# Compress the search_index.js file using gzip
|
158
|
+
|
159
|
+
def generate_gzipped
|
160
|
+
debug_msg "Compressing generated JSON index"
|
161
|
+
out_dir = @base_dir + @options.op_dir
|
162
|
+
|
163
|
+
search_index_file = out_dir + SEARCH_INDEX_FILE
|
164
|
+
outfile = out_dir + "#{search_index_file}.gz"
|
165
|
+
|
166
|
+
debug_msg "Reading the JSON index file from %s" % search_index_file
|
167
|
+
search_index = search_index_file.read
|
168
|
+
|
169
|
+
debug_msg "Writing gzipped search index to %s" % outfile
|
170
|
+
|
171
|
+
Zlib::GzipWriter.open(outfile) do |gz|
|
172
|
+
gz.mtime = File.mtime(search_index_file)
|
173
|
+
gz.orig_name = search_index_file.to_s
|
174
|
+
gz.write search_index
|
175
|
+
gz.close
|
176
|
+
end
|
177
|
+
|
178
|
+
# GZip the rest of the js files
|
179
|
+
Dir.chdir @template_dir do
|
180
|
+
Dir['**/*.js'].each do |source|
|
181
|
+
dest = out_dir + source
|
182
|
+
outfile = out_dir + "#{dest}.gz"
|
183
|
+
|
184
|
+
debug_msg "Reading the original js file from %s" % dest
|
185
|
+
data = dest.read
|
186
|
+
|
187
|
+
debug_msg "Writing gzipped file to %s" % outfile
|
188
|
+
|
189
|
+
Zlib::GzipWriter.open(outfile) do |gz|
|
190
|
+
gz.mtime = File.mtime(dest)
|
191
|
+
gz.orig_name = dest.to_s
|
192
|
+
gz.write data
|
193
|
+
gz.close
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
155
199
|
##
|
156
200
|
# Adds classes and modules to the index
|
157
201
|
|
@@ -0,0 +1,97 @@
|
|
1
|
+
##
|
2
|
+
# Generates a POT file.
|
3
|
+
#
|
4
|
+
# Here is a translator work flow with the generator.
|
5
|
+
#
|
6
|
+
# == Create .pot
|
7
|
+
#
|
8
|
+
# You create .pot file by pot formatter:
|
9
|
+
#
|
10
|
+
# % rdoc --format pot
|
11
|
+
#
|
12
|
+
# It generates doc/rdoc.pot.
|
13
|
+
#
|
14
|
+
# == Create .po
|
15
|
+
#
|
16
|
+
# You create .po file from doc/rdoc.pot. This operation is needed only
|
17
|
+
# the first time. This work flow assumes that you are a translator
|
18
|
+
# for Japanese.
|
19
|
+
#
|
20
|
+
# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit
|
21
|
+
# provided by GNU gettext or rmsginit provided by gettext gem. This
|
22
|
+
# work flow uses gettext gem because it is more portable than GNU
|
23
|
+
# gettext for Rubyists. Gettext gem is implemented by pure Ruby.
|
24
|
+
#
|
25
|
+
# % gem install gettext
|
26
|
+
# % mkdir -p locale/ja
|
27
|
+
# % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja
|
28
|
+
#
|
29
|
+
# Translate messages in .po
|
30
|
+
#
|
31
|
+
# You translate messages in .po by a PO file editor. po-mode.el exists
|
32
|
+
# for Emacs users. There are some GUI tools such as GTranslator.
|
33
|
+
# There are some Web services such as POEditor and Tansifex. You can
|
34
|
+
# edit by your favorite text editor because .po is a text file.
|
35
|
+
# Generate localized documentation
|
36
|
+
#
|
37
|
+
# You can generate localized documentation with locale/ja/rdoc.po:
|
38
|
+
#
|
39
|
+
# % rdoc --locale ja
|
40
|
+
#
|
41
|
+
# You can find documentation in Japanese in doc/. Yay!
|
42
|
+
#
|
43
|
+
# == Update translation
|
44
|
+
#
|
45
|
+
# You need to update translation when your application is added or
|
46
|
+
# modified messages.
|
47
|
+
#
|
48
|
+
# You can update .po by the following command lines:
|
49
|
+
#
|
50
|
+
# % rdoc --format pot
|
51
|
+
# % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot
|
52
|
+
#
|
53
|
+
# You edit locale/ja/rdoc.po to translate new messages.
|
54
|
+
|
55
|
+
class RDoc::Generator::POT
|
56
|
+
|
57
|
+
RDoc::RDoc.add_generator self
|
58
|
+
|
59
|
+
##
|
60
|
+
# Description of this generator
|
61
|
+
|
62
|
+
DESCRIPTION = 'creates .pot file'
|
63
|
+
|
64
|
+
##
|
65
|
+
# Set up a new .pot generator
|
66
|
+
|
67
|
+
def initialize store, options #:not-new:
|
68
|
+
@options = options
|
69
|
+
@store = store
|
70
|
+
end
|
71
|
+
|
72
|
+
##
|
73
|
+
# Writes .pot to disk.
|
74
|
+
|
75
|
+
def generate
|
76
|
+
po = extract_messages
|
77
|
+
pot_path = 'rdoc.pot'
|
78
|
+
File.open(pot_path, "w") do |pot|
|
79
|
+
pot.print(po.to_s)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def class_dir
|
84
|
+
nil
|
85
|
+
end
|
86
|
+
|
87
|
+
private
|
88
|
+
def extract_messages
|
89
|
+
extractor = MessageExtractor.new(@store)
|
90
|
+
extractor.extract
|
91
|
+
end
|
92
|
+
|
93
|
+
autoload :MessageExtractor, 'rdoc/generator/pot/message_extractor'
|
94
|
+
autoload :PO, 'rdoc/generator/pot/po'
|
95
|
+
autoload :POEntry, 'rdoc/generator/pot/po_entry'
|
96
|
+
|
97
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<footer id="validator-badges" role="contentinfo">
|
2
2
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
3
|
-
<p>Generated by <a href="http://
|
4
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-
|
3
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> <%= RDoc::VERSION %>.
|
4
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
5
5
|
</footer>
|
@@ -2,21 +2,18 @@
|
|
2
2
|
|
3
3
|
<title><%= h @title %></title>
|
4
4
|
|
5
|
-
<link href="<%= asset_rel_prefix %>/fonts.css" rel="stylesheet">
|
6
|
-
<link href="<%= asset_rel_prefix %>/rdoc.css" rel="stylesheet">
|
7
|
-
<% if @options.template_stylesheets.flatten.any? then %>
|
8
|
-
<% @options.template_stylesheets.flatten.each do |stylesheet| %>
|
9
|
-
<link href="<%= asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
|
10
|
-
<% end %>
|
11
|
-
<% end %>
|
12
|
-
|
13
5
|
<script type="text/javascript">
|
14
6
|
var rdoc_rel_prefix = "<%= rel_prefix %>/";
|
15
7
|
</script>
|
16
8
|
|
17
9
|
<script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
|
18
|
-
<script src="<%= asset_rel_prefix %>/js/navigation.js"></script>
|
19
|
-
<script src="<%= search_index_rel_prefix %>/js/search_index.js"></script>
|
20
|
-
<script src="<%= asset_rel_prefix %>/js/search.js"></script>
|
21
|
-
<script src="<%= asset_rel_prefix %>/js/searcher.js"></script>
|
22
10
|
<script src="<%= asset_rel_prefix %>/js/darkfish.js"></script>
|
11
|
+
|
12
|
+
<link href="<%= asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
|
13
|
+
<link href="<%= asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
|
14
|
+
<% if @options.template_stylesheets.flatten.any? then %>
|
15
|
+
<% @options.template_stylesheets.flatten.each do |stylesheet| %>
|
16
|
+
<link href="<%= asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
|