aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/po4a_set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/po4a_set.rb')
-rw-r--r--lib/sisu/v3/po4a_set.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sisu/v3/po4a_set.rb b/lib/sisu/v3/po4a_set.rb
index 1e0f90c4..6335fb8c 100644
--- a/lib/sisu/v3/po4a_set.rb
+++ b/lib/sisu/v3/po4a_set.rb
@@ -56,7 +56,7 @@
** Description: modules shared by flatfile output generators
=end
-module SiSU_po4a_utils
+module SiSU_Po4aUtils
class Wrap
def initialize(md,orig='',trans='',is_desc='',n_char_max=76,n_indent=0,n_hang=nil)
@md,@orig,@trans,@is_desc,@n_char_max,@n_indent=md,orig,trans,is_desc,n_char_max,n_indent
@@ -76,8 +76,8 @@ module SiSU_po4a_utils
out=[]
out[line]=''
@oldword='' #REMOVE @oldword
- pa.gsub!(/<br>/,' <br> ')
- pa.gsub!(/#{Mx[:br_nl]}/,"\n\n")
+ pa=pa.gsub(/<br>/,' <br> ').
+ gsub(/#{Mx[:br_nl]}/,"\n\n")
words=pa.scan(/\n\n|<br>|\S+/m)
while words != ''
word=words.shift
@@ -109,7 +109,7 @@ module SiSU_po4a_utils
x=out.join(spaces_indent).gsub(/\A\n+/m,'').insert(0,spaces_hang)
z=[]
x.split(/\n/).each do |y|
- y.gsub!(/"/,'\"')
+ y=y.gsub(/"/,'\"')
y=%{"#{y}"}
z << y
end
@@ -120,7 +120,7 @@ module SiSU_po4a_utils
trans=(pot.length == 2) ? pot[1] : ''
po_str=<<WOK
#. #{@po4a_identify_type} - #{@is_desc}
-#: en/#{@md.fns}:#{Pot_number.new.num}
+#: en/#{@md.fns}:#{PotNumber.new.num}
msgid ""
#{pot[0]}
msgstr ""
@@ -134,7 +134,7 @@ WOK
pot_array.each do |pa|
z=[]
pa.split(/\n\n/).each do |y|
- y.gsub!(/"/,'\"')
+ y=y.gsub(/"/,'\"')
y=%{"#{y}"}
z << y if not y.empty?
end
@@ -145,7 +145,7 @@ WOK
trans=(pot.length == 2) ? pot[1] : ''
po_str=<<WOK
#. #{@po4a_identify_type} - #{@is_desc}
-#: en/#{@md.fns}:#{Pot_number.new.num}
+#: en/#{@md.fns}:#{PotNumber.new.num}
#, no-wrap
msgid ""
#{pot[0]}
@@ -166,13 +166,13 @@ WOK
if @orig.class==Array
@arr=[]
@orig.each do |line|
- @arr << SiSU_text_utils::Wrap.new(line,@n_char_max,@n_indent,@n_hang).line_wrap
+ @arr << SiSU_TextUtils::Wrap.new(line,@n_char_max,@n_indent,@n_hang).line_wrap
end
end
@arr
end
end
- class Header_scan
+ class HeaderScan
def initialize(md,para)
@md,@p=md,para
end
@@ -276,7 +276,7 @@ WOK
end
end
end
- class Paragraph_number
+ class ParagraphNumber
def initialize(paranum)
@paranum=/(\d+)/m.match(paranum)[1]
end
@@ -284,7 +284,7 @@ WOK
@paranum.gsub(/(\d+)/,'#\1')
end
end
- class Pot_number
+ class PotNumber
@@n=0
def initialize
@@n +=2