erbook 6.0.1 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/lang/ja.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # ja (Japanese)
2
+ Caution: 注意
3
+ Cautions: 注意
4
+ Chapter: 章
5
+ Contents: 目次
6
+ Equation: 同等化
7
+ Equations: 同等化
8
+ Example: 例
9
+ Examples: 例
10
+ Figure: 図
11
+ Figures: 図
12
+ Generated by %s on %s.: %s.で%sによって発生させる。
13
+ Important: 重要
14
+ Importants: Importants
15
+ Jump to next segment: 次の区分へのジャンプ
16
+ Jump to previous segment: 前の区分へのジャンプ
17
+ Jump to this segment: この区分へのジャンプ
18
+ Note: ノート
19
+ Notes: ノート
20
+ Part: 部分
21
+ Procedure: プロシージャ
22
+ Procedures: プロシージャ
23
+ Reference: 参照
24
+ References: 参照
25
+ Reverse jump to listing: リストへの逆のジャンプ
26
+ Section: セクション
27
+ Table: テーブル
28
+ Tables: テーブル
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: 上で示されているアイコンは版権%sの、%s.の下で配られる%sの部分である。
30
+ Tip: 先端
31
+ Tips: 先端
32
+ Warning: 警告
33
+ Warnings: 警告
data/lang/ko.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # ko (Korean)
2
+ Caution: 주의
3
+ Cautions: 주의
4
+ Chapter: 장
5
+ Contents: 목차
6
+ Equation: 방정식
7
+ Equations: 방정식
8
+ Example: 보기
9
+ Examples: 보기
10
+ Figure: 숫자
11
+ Figures: 숫자
12
+ Generated by %s on %s.: %s.에 %s에 의해 생성하는.
13
+ Important: 중요한
14
+ Importants: Importants
15
+ Jump to next segment: 다음 세그먼트에 점프
16
+ Jump to previous segment: 이전 세그먼트에 점프
17
+ Jump to this segment: 이 세그먼트에 점프
18
+ Note: 주
19
+ Notes: 주
20
+ Part: 부분
21
+ Procedure: 절차
22
+ Procedures: 절차
23
+ Reference: 참고
24
+ References: 참고
25
+ Reverse jump to listing: 명부작성에 반전 점프
26
+ Section: 단면도
27
+ Table: 테이블
28
+ Tables: 테이블
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: 상기 보인 아이콘은 저작권 %s이고 %s.의 밑에 배부되는 %s의 일부분이다.
30
+ Tip: 끝
31
+ Tips: 끝
32
+ Warning: 경고
33
+ Warnings: 경고
data/lang/nl.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # nl (Dutch)
2
+ Caution: Voorzichtigheid
3
+ Cautions: Voorzichtigheid
4
+ Chapter: Hoofdstuk
5
+ Contents: Inhoud
6
+ Equation: Vergelijking
7
+ Equations: Vergelijkingen
8
+ Example: Voorbeeld
9
+ Examples: Voorbeelden
10
+ Figure: Cijfer
11
+ Figures: Cijfers
12
+ Generated by %s on %s.: Geproduceerd door %s op %s.
13
+ Important: Belangrijk
14
+ Importants: Importants
15
+ Jump to next segment: Sprong aan volgende segment
16
+ Jump to previous segment: Sprong aan vorig segment
17
+ Jump to this segment: Sprong aan dit segment
18
+ Note: Nota
19
+ Notes: Nota's
20
+ Part: Deel
21
+ Procedure: Procedure
22
+ Procedures: Procedures
23
+ Reference: Verwijzing
24
+ References: Verwijzingen
25
+ Reverse jump to listing: Omgekeerde sprong aan lijst
26
+ Section: Sectie
27
+ Table: Lijst
28
+ Tables: Lijsten
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: De hierboven getoonde pictogrammen maken deel uit van %s, dat auteursrecht %s is en onder %s. verdeeld.
30
+ Tip: Uiteinde
31
+ Tips: Uiteinden
32
+ Warning: Waarschuwing
33
+ Warnings: Waarschuwingen
data/lang/phrases.yaml ADDED
@@ -0,0 +1,32 @@
1
+ Caution:
2
+ Cautions:
3
+ Chapter:
4
+ Contents:
5
+ Equation:
6
+ Equations:
7
+ Example:
8
+ Examples:
9
+ Figure:
10
+ Figures:
11
+ Generated by %s on %s.:
12
+ Important:
13
+ Importants:
14
+ Jump to next segment:
15
+ Jump to previous segment:
16
+ Jump to this segment:
17
+ Note:
18
+ Notes:
19
+ Part:
20
+ Procedure:
21
+ Procedures:
22
+ Reference:
23
+ References:
24
+ Reverse jump to listing:
25
+ Section:
26
+ Table:
27
+ Tables:
28
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.:
29
+ Tip:
30
+ Tips:
31
+ Warning:
32
+ Warnings:
data/lang/pt.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # pt (Portuguese)
2
+ Caution: Cuidado
3
+ Cautions: Cuidados
4
+ Chapter: Capítulo
5
+ Contents: Índices
6
+ Equation: Equação
7
+ Equations: Equações
8
+ Example: Exemplo
9
+ Examples: Exemplos
10
+ Figure: Figura
11
+ Figures: Figuras
12
+ Generated by %s on %s.: Gerado por %s em %s.
13
+ Important: Importante
14
+ Importants: Importants
15
+ Jump to next segment: Salte para segmentar em seguida
16
+ Jump to previous segment: Salte ao segmento precedente
17
+ Jump to this segment: Salte a este segmento
18
+ Note: Anote
19
+ Notes: Notas
20
+ Part: Parte
21
+ Procedure: Procedimento
22
+ Procedures: Procedimentos
23
+ Reference: Referência
24
+ References: Referências
25
+ Reverse jump to listing: Salto reverso à lista
26
+ Section: Seção
27
+ Table: Tabela
28
+ Tables: Tabelas
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: Os ícones mostrados acima são parte de %s, que é os direitos reservados %s e é distribuído sob %s.
30
+ Tip: Ponta
31
+ Tips: Pontas
32
+ Warning: Aviso
33
+ Warnings: Avisos
data/lang/ru.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # ru (Russian)
2
+ Caution: Предосторежение
3
+ Cautions: Предосторежения
4
+ Chapter: Глава
5
+ Contents: Содержание
6
+ Equation: Уровнение
7
+ Equations: Уровнения
8
+ Example: Пример
9
+ Examples: Примеры
10
+ Figure: Диаграмма
11
+ Figures: Диаграммы
12
+ Generated by %s on %s.: Произведено %s на %s.
13
+ Important: Важно
14
+ Importants: Importants
15
+ Jump to next segment: Поскачите затем для того чтобы поделить на сегменты
16
+ Jump to previous segment: Поскачите к предыдущему этапу
17
+ Jump to this segment: Поскачите к этому этапу
18
+ Note: Заметьте
19
+ Notes: Примечания
20
+ Part: Часть
21
+ Procedure: Процедура
22
+ Procedures: Процедуры
23
+ Reference: Справка
24
+ References: Справки
25
+ Reverse jump to listing: Обратная скачка к перечислению
26
+ Section: Раздел
27
+ Table: Таблица
28
+ Tables: Таблицы
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: Иконы показанные выше часть %s, которое авторское право %s и распределено под %s.
30
+ Tip: Подсказка
31
+ Tips: Подсказки
32
+ Warning: Предупреждение
33
+ Warnings: Предупреждения
data/lang/zh.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # zh (Chinese-simp)
2
+ Caution: 小心
3
+ Cautions: 小心
4
+ Chapter: 章节
5
+ Contents: 内容
6
+ Equation: 等式
7
+ Equations: 等式
8
+ Example: 例子
9
+ Examples: 例子
10
+ Figure: 图
11
+ Figures: 图
12
+ Generated by %s on %s.: 引起由%s在%s。
13
+ Important: 重要
14
+ Importants: Importants
15
+ Jump to next segment: 跳跃其次分割
16
+ Jump to previous segment: 跳跃到早先段
17
+ Jump to this segment: 跳跃到这段
18
+ Note: 注意
19
+ Notes: 笔记
20
+ Part: 部分
21
+ Procedure: 做法
22
+ Procedures: 做法
23
+ Reference: 参考
24
+ References: 参考
25
+ Reverse jump to listing: 对目录的反向跃迁
26
+ Section: 部分
27
+ Table: 表
28
+ Tables: 表
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: 显示的象以上是%s的一部分,是版权%s和被分布在%s.之下。
30
+ Tip: 技巧
31
+ Tips: 技巧
32
+ Warning: 警告
33
+ Warnings: 警告
data/lang/zt.yaml ADDED
@@ -0,0 +1,33 @@
1
+ # zt (Chinese-trad)
2
+ Caution: 小心
3
+ Cautions: 小心
4
+ Chapter: 章節
5
+ Contents: 内容
6
+ Equation: 等式
7
+ Equations: 等式
8
+ Example: 例子
9
+ Examples: 例子
10
+ Figure: 图
11
+ Figures: 图
12
+ Generated by %s on %s.: 引起由%s在%s。
13
+ Important: 重要
14
+ Importants: Importants
15
+ Jump to next segment: 跳躍其次分割
16
+ Jump to previous segment: 跳躍到早先段
17
+ Jump to this segment: 跳躍到這段
18
+ Note: 注意
19
+ Notes: 筆記
20
+ Part: 部分
21
+ Procedure: 做法
22
+ Procedures: 做法
23
+ Reference: 參考
24
+ References: 參考
25
+ Reverse jump to listing: 對目錄的反向躍遷
26
+ Section: 部分
27
+ Table: 表
28
+ Tables: 表
29
+ The icons shown above are part of %s, which is copyright %s and is distributed under %s.: 顯示的像以上是%s的一部分,是版權%s和被分佈在%s.之下。
30
+ Tip: 技巧
31
+ Tips: 技巧
32
+ Warning: 警告
33
+ Warnings: 警告
data/lib/erbook.rb CHANGED
@@ -3,8 +3,8 @@ require 'inochi'
3
3
 
4
4
  Inochi.init :ERBook,
5
5
  :program => 'erbook',
6
- :version => '6.0.1',
7
- :release => '2009-01-19',
6
+ :version => '6.1.0',
7
+ :release => '2009-02-14',
8
8
  :website => 'http://snk.tuxfamily.org/lib/erbook/',
9
9
  :tagline => 'Extensible document processor based on eRuby',
10
10
  :require => {
@@ -64,8 +64,7 @@ module ERBook
64
64
  :@roots => @roots = [], # root nodes of all trees
65
65
  :@nodes => @nodes = [], # all nodes in the forest
66
66
  :@nodes_by_type => @nodes_by_type = Hash.new {|h,k| h[k] = [] },
67
- :@node_stack => [], # stack for all nodes
68
- :@index_stack => [], # stack for nodes having index only
67
+ :@stack => [], # stack for all nodes
69
68
  }.each_pair {|k,v| template.instance_variable_set(k, v) }
70
69
 
71
70
  class << template
@@ -95,7 +94,7 @@ module ERBook
95
94
  end
96
95
 
97
96
  # assign node family
98
- if parent = @node_stack.last
97
+ if parent = @stack.last
99
98
  parent.children << node
100
99
  node.parent = parent
101
100
  node.depth = parent.depth
@@ -103,9 +102,10 @@ module ERBook
103
102
 
104
103
  # calculate latex-style index number for this node
105
104
  if node.defn['index']
106
- parent = @index_stack.last
107
- branches = parent.children.select {|n| n.index }
108
- node.index = [parent.index, branches.length + 1].join('.')
105
+ ancestry = @stack.reverse.find {|n| n.defn['index'] }.index
106
+ branches = node.parent.children.select {|n| n.index }
107
+
108
+ node.index = [ancestry, branches.length + 1].join('.')
109
109
  end
110
110
  else
111
111
  @roots << node
@@ -121,11 +121,9 @@ module ERBook
121
121
 
122
122
  # assign node content
123
123
  if block_given?
124
- @index_stack.push node if node.defn['index']
125
- @node_stack.push node
124
+ @stack.push node
126
125
  content = content_from_block(node, &node_content)
127
- @node_stack.pop
128
- @index_stack.pop if node.defn['index']
126
+ @stack.pop
129
127
 
130
128
  digest = Document.digest(content)
131
129
  self.buffer << digest
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suraj N. Kurapati
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-19 00:00:00 -08:00
12
+ date: 2009-02-14 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -78,6 +78,20 @@ files:
78
78
  - fmt/xhtml.icons/index.yaml
79
79
  - fmt/xhtml.yaml
80
80
  - fmt/text.yaml
81
+ - lang
82
+ - lang/ru.yaml
83
+ - lang/it.yaml
84
+ - lang/ja.yaml
85
+ - lang/pt.yaml
86
+ - lang/zt.yaml
87
+ - lang/zh.yaml
88
+ - lang/ko.yaml
89
+ - lang/el.yaml
90
+ - lang/fr.yaml
91
+ - lang/es.yaml
92
+ - lang/de.yaml
93
+ - lang/nl.yaml
94
+ - lang/phrases.yaml
81
95
  - lib
82
96
  - lib/erbook
83
97
  - lib/erbook/template.rb