aboutsummaryrefslogtreecommitdiffhomepage
path: root/data/doc/sisu/markup-samples
diff options
context:
space:
mode:
Diffstat (limited to 'data/doc/sisu/markup-samples')
-rw-r--r--data/doc/sisu/markup-samples/manual/en/sisu_download.ssi10
-rw-r--r--data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst52
-rw-r--r--data/doc/sisu/markup-samples/manual/en/sisu_markup.sst95
-rw-r--r--data/doc/sisu/markup-samples/manual/languages_source_and_targets2
-rwxr-xr-xdata/doc/sisu/markup-samples/manual/sisu_po4a124
-rw-r--r--data/doc/sisu/markup-samples/manual/sisu_po4a_libs.rb439
-rw-r--r--data/doc/sisu/markup-samples/manual/translation_languages1
7 files changed, 709 insertions, 14 deletions
diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_download.ssi b/data/doc/sisu/markup-samples/manual/en/sisu_download.ssi
index 085229f1..c5f31d2a 100644
--- a/data/doc/sisu/markup-samples/manual/en/sisu_download.ssi
+++ b/data/doc/sisu/markup-samples/manual/en/sisu_download.ssi
@@ -44,13 +44,15 @@ For changelogs see http://www.jus.uio.no/sisu/SiSU/changelog.html
Git repository currently at:
-_* git clone git://git.sisudoc.org/git/code/sisu.git
-
-_* git clone _http://git.sisudoc.org/git/code/sisu.git
+_* git clone git://git.sisudoc.org/git/code/sisu.git --branch upstream
_* http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary
-On using git, see
+To get the most recent source without repo history:
+
+_* git clone --depth 1 git://git.sisudoc.org/git/code/sisu.git --branch upstream
+
+On using git, see:
!_ Git documentation:
{~^ Git User's Manual }http://www.kernel.org/pub/software/scm/git/docs/user-manual.html, {~^ Everyday GIT With 20 Commands Or So }http://www.kernel.org/pub/software/scm/git/docs/everyday.html, {~^ A tutorial introduction to git }http://www.kernel.org/pub/software/scm/git/docs/v1.4.4.4/tutorial.html, {~^ A tutorial introduction to git: part two }http://www.kernel.org/pub/software/scm/git/docs/v1.4.4.4/tutorial-2.html
diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst b/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst
index 08c9ba02..97fdbd28 100644
--- a/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst
+++ b/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst
@@ -19,26 +19,46 @@
:A~? SiSU Installation notes
-1~source_tarball Source tarball
+1~source_tree Source tree
2~ run off source package directory tree (without installing)
={ SiSU program:run off source package directory tree;SiSU:run off source package directory tree }
-1. Download the latest source
+Download & unpack the latest source tarball
-2. Unpack the source
+or
+
+Git clone the latest source, to clone the latest source without the repo history:
+
+``` code
+git clone --depth 1 git://git.sisudoc.org/git/code/sisu.git --branch upstream
+```
Provided you have Ruby, SiSU can be run without installation straight from the source package directory tree. Run ruby against the full path to bin/sisu (in the unzipped source package directory tree)
Note however, that additional external package dependencies, such as texlive (for pdfs), sqlite3 or postgresql (for search) should you desire to use them are not taken care of for you.
-2~ Gem install (with rake)
+2~ Gem install
={ SiSU program:gem;SiSU:ruby gem }
Gem install, you need to:
(i) create the gemspec; (ii) build the gem (from the gemspec); (iii) install the gem
+3~ Gem install with qi (quick install) script
+
+(This requires that ruby-thor is installed).
+
+qi (quick install) can go through the steps required to install the gem:
+
+_1 qi gem --create --build --install --stable
+
+or
+
+_1 qi gem --create --build --install --unstable
+
+3~ Gem install with rake
+
Provided you have ruby & rake, this can be done with the single command:
_1 rake gem_create_build_install # (to build and install sisu v5 & sisu v6, alias gemcbi)
@@ -52,6 +72,16 @@ _1 rake gem_create_build_install_unstable # (to build and install sisu v6, alias
for individual steps (create, build, install) see rake options, rake -T
to specify sisu version for sisu installed via gem
+For a list of alternative actions you may type:
+
+_1 rake help
+
+_1 rake -T
+
+Rake: http://rake.rubyforge.org/ http://rubyforge.org/frs/?group_id=50
+
+3~ misc Gem
+
gem search sisu
_1 sisu _${sisu_stable}_ --version
@@ -62,15 +92,19 @@ to uninstall sisu installed via gem
_1 sudo gem uninstall --verbose sisu
-For a list of alternative actions you may type:
+2~ direct installation with qi (quick install) script
-_1 rake help
+(This requires that ruby-thor is installed).
-_1 rake -T
+Root will be requested as required:
-Rake: http://rake.rubyforge.org/ http://rubyforge.org/frs/?group_id=50
+_1 qi setup --bin --lib --conf --data --share --man
+
+or
+
+_1 qi setup --all
-Rant: http://make.rubyforge.org/ http://rubyforge.org/frs/?group_id=615
+You may wish to do a dryrun to see where files would be installed without copying them, to do so add the flag --dryrun
2~ installation with setup.rb
={ SiSU program:setup.rb;SiSU:setup.rb }
diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
index 3a8ae570..43c161d1 100644
--- a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
+++ b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
@@ -1335,6 +1335,101 @@ code{
}code
+2~ Bibliography / References
+={ SiSU markup:references|bibliography|citations;references;book index }
+
+There are three ways to prepare a bibliography using sisu: (i) manually preparing and marking up as regular text in sisu a list of references; (ii) (tagging citations for inclusion) using a restricted form for citations and marking them up to identify them as such (which sisu then parses and attempts to build a bibliography from), or; (iii) preparing a bibliography, using metadata tags for author: title: year: and the like, including an id: and shortname: the id can be inserted in footnotes in place of the citation, and it will be substituted there by the short title for the work.
+
+For the heading/section sequence: endnotes, bibliography then book index to occur, the name biblio or bibliography must be given to the bibliography section, like so:
+
+code{
+
+1~biblio Bibliography
+
+}code
+
+3~ a markup tagged metadata bibliography section
+
+Here instead of writing your full citations directly in footnotes, each time you have new material to cite, you add it to your bibliography section (if it has not been added yet) providing the information you need against an available list of tags. At the time of writing, for articles: au|author; ti|title; lng|language; jo|journal; vo|volume; edr|editor; yr|year; pst|publisher_state; url; note; sn|shortname; id; and \\ for books: au|author; ti|title; st|subtitle; lng|language; pb|publisher; edn|edition; yr|year; pst|publisher_state; url; note; sn|shortname; id.
+
+The required tags are au: ti: and year: ~{for which you may alternatively use the full form author: title: and year: }~ an short quick example might be as follows:
+
+code{
+
+1~biblio Bibliography
+
+au: von Hippel, E.
+ti: Perspective: User Toolkits for Innovation
+lng: (language)
+jo: Journal of Product Innovation Management
+vo: 18
+edr: (editor)
+yr: 2001
+note:
+sn: Hippel, /{User Toolkits}/ (2001)
+id: vHippel_2001
+% form:
+
+au: Benkler, Yochai
+ti: The Wealth of Networks
+st: How Social Production Transforms Markets and Freedom
+lng: (language)
+pb: Harvard University Press
+edn: (edition)
+yr: 2006
+pst: U.S.
+url: http://cyber.law.harvard.edu/wealth_of_networks/Main_Page
+note:
+sn: Benkler, /{Wealth of Networks}/ (2006)
+id: Benkler2006
+
+au: Quixote, Don; Panza, Sancho
+ti: Taming Windmills, Keeping True
+jo: Imaginary Journal
+yr: 1605
+url: https://en.wikipedia.org/wiki/Don_Quixote
+note: made up to provide an example of author markup for an article with two authors
+sn: Quixote and Panza, /{Taming Windmills}/ (1605)
+id: quixote1605
+
+}code
+
+Note that the section name biblio (or bibliography) is required for the bibliography to be recognized as such, parsed correctly, and placed after the auto-generated endnote section.
+
+Using this method, work goes into preparing the bibliography, which will be automatically sorted by surname and presented, under the References or Bibliography section using the format for books:
+
+_1 number, author (firstname & initials, surname), fulltitle, publisher, year, url (if any)
+
+and for articles:
+
+_1 number, author (firstname & initials, surname), title, journal, volume, year, url (if any)
+
+The metadata tags may include shortname and id, if provided, every time the given id is found within the text it will be replaced by the given short title of the work (it is for this reason the short title has sisu markup to italicize the title), it should work with any page numbers to be added, the short title should be one that can easily be used to look up the full description in the bibliography.
+
+code{
+
+The following footnote~{ quixote1605, pp 1000 - 1001, also Benkler2006 p 1. }~
+
+}code
+
+would be presented as:
+
+Quixote and Panza, /{Taming Windmills}/ (1605), pp 1000 - 1001 also, Benkler, /{Wealth of Networks}/, (2006) p 1 or rather~{ Quixote and Panza, /{Taming Windmills}/ (1605), pp 1000 - 1001 also, Benkler, /{Wealth of Networks}/ (2006), p 1 }~
+
+3~ Tagging citations for inclusion in the Bibliography
+
+Here whenever you make a citation that you wish be included in the bibliography, you tag the citation as such using special delimiters (which are subsequently removed from the final text produced by sisu)
+
+Here you would write something like the following, either in regular text or a footnote
+
+code{
+
+See .: Quixote, Don; Panza, Sancho /{Taming Windmills, Keeping True}/ (1605) :.
+
+}code
+
+SiSU will parse for a number of patterns within the delimiters to try make out the authors, title, date etc. and from that create a Bibliography. This is more limited than the previously described method of preparing a tagged bibliography, and using an id within text to identify the work, which also lends itself to greater consistency.
+
2~ Book index
={ SiSU markup:book index;book index }
diff --git a/data/doc/sisu/markup-samples/manual/languages_source_and_targets b/data/doc/sisu/markup-samples/manual/languages_source_and_targets
new file mode 100644
index 00000000..a195adec
--- /dev/null
+++ b/data/doc/sisu/markup-samples/manual/languages_source_and_targets
@@ -0,0 +1,2 @@
+source: en
+target: de fr es ja ru zh
diff --git a/data/doc/sisu/markup-samples/manual/sisu_po4a b/data/doc/sisu/markup-samples/manual/sisu_po4a
new file mode 100755
index 00000000..fb79cde7
--- /dev/null
+++ b/data/doc/sisu/markup-samples/manual/sisu_po4a
@@ -0,0 +1,124 @@
+#!/usr/bin/env ruby
+=begin
+
+** Description:
+
+** Homepage: <http://www.jus.uio.no/sisu/SiSU>
+ <http://search.sisudoc.org>
+** Download: <http://www.jus.uio.no/sisu/download>
+
+** Copyright: (C) 2007 - 2015 Ralph Amissah
+
+** License:
+
+** Ralph Amissah <ralph@amissah.com>
+ Ralph Amissah <ralph.amissah@gmail.com>
+
+=end
+#% manual settings, edit/update as required (note current default settings are obtained from sisu version yml file)
+begin
+ require 'thor'
+rescue LoadError
+ puts 'thor (package ruby-thor) not found'
+end
+#begin
+# require './setup/sisu_version' # ./setup/sisu_version.rb
+# include SiSUversion
+#rescue LoadError
+# puts 'this does not appear to be a SiSU development directory'
+# exit
+#end
+require_relative 'sisu_po4a_libs' # sisu_po4a_libs.rb
+require 'find'
+require 'fileutils'
+ include FileUtils
+require 'pathname'
+require 'rbconfig.rb'
+#require 'yaml'
+module SiSUconf
+ class LanguageCodes
+ def language_list
+ def codes
+ %w[am bg bn br ca cs cy da de el en eo es et eu fi fr ga gl he hi hr hy ia is it ja ko la lo lt lv ml mr nl nn no oc pl pt pt_BR ro ru sa se sk sl sq sr sv ta te th tk tr uk ur us vi zh]
+ end
+ def regex
+ codes.join('|')
+ end
+ self
+ end
+ end
+ class Configure < Thor
+ $SiSU_Language_Codes=LanguageCodes.new
+ @@source=@@targets=nil
+ include SiSU_Po4a_Actions
+ class_option :verbose, :type => :boolean
+# rake help clean default distclean make manpage readme rebuild
+ desc 'po4a',
+ 'place SiSU translations under po4a management' \
+ + 'assist with having sisu markup files managed by po4a' \
+ + 'create configuration files, and language directories and' \
+ + 'populate them with po4a pot & po files for translation and' \
+ + 'from those (as translated) create translated sisu markup' \
+ + '.ssm .sst & .ssi files in corresponding language sub-directories' \
+ + '*WARNING* creates, destroys, overrwrites directories not managed by po4a'
+ options \
+ :help => :boolean,
+ :clean => :boolean,
+ #:default => :boolean,
+ :distclean => :boolean,
+ :make => :boolean,
+ :lang_source => :string,
+ :lang_targets => :array,
+ :manpage => :boolean,
+ :readme => :boolean,
+ :rebuild => :boolean
+ def po4a
+ @@source=source=if options[:lang_source] \
+ and not options[:lang_source].empty?
+ options[:lang_source]
+ else nil
+ end
+ @@targets=targets=if options[:lang_targets]
+ options[:lang_targets]
+ else nil
+ end
+ language.translation_languages_selected(targets)
+ language.source_language_selected(source)
+ if options[:help]
+ notice.project_help
+ end
+ if options[:clean]
+ notice.default(:clean)
+ project.clean
+ end
+ #if options[:default]
+ # notice.project_help
+ #end
+ if options[:distclean]
+ notice.default(:distclean)
+ project.distclean
+ end
+ if options[:make]
+ notice.default(:make)
+ project.make
+ end
+ if options[:manpage]
+ generate.manpage
+ end
+ if options[:readme]
+ generate.readme
+ end
+ if options[:rebuild]
+ notice.default(:rebuild)
+ project.distclean
+ project.make
+ end
+ end
+ end
+end
+begin
+ $called_as,$argv=$0,$*
+ SiSUconf::Configure.start(ARGV)
+rescue
+end
+__END__
diff --git a/data/doc/sisu/markup-samples/manual/sisu_po4a_libs.rb b/data/doc/sisu/markup-samples/manual/sisu_po4a_libs.rb
new file mode 100644
index 00000000..47a0b065
--- /dev/null
+++ b/data/doc/sisu/markup-samples/manual/sisu_po4a_libs.rb
@@ -0,0 +1,439 @@
+module SiSU_Po4a_Actions
+ @@source=@@targets=nil
+ def project_details
+ def name
+ 'SiSU translations under po4a management'
+ end
+ def name_warning
+ <<-WOK
+#{name}
+
+WARNING all sisu markup files (.ssm, .sst, .ssi) in languages other than #{language.source_language_selected}
+are managed by po4a, through translations of the source language to other languages.
+
+#{language.info_on_selection}
+ WOK
+ end
+ def setup_project
+ "Setup file for placing #{name}"
+ end
+ self
+ end
+ def query
+ def selections_available_(selections=:strict)
+ short_options=(selections == :strict) ? '' : '; [ynqx]'
+ %{'yes', 'no', 'quit' or 'exit'#{short_options}}
+ end
+ def selection_options
+ def response_strict(resp)
+ case resp
+ when /^(?:yes)$/ then true
+ when /^(?:no)$/ then false
+ when /^(?:quit|exit)$/ then exit
+ else
+ puts %{response was: #{resp}}
+ puts %{[please type to select: #{selections_available_(:strict)}]}
+ answer?('',:strict)
+ end
+ end
+ def response_short(resp)
+ case resp
+ when /^(?:y|yes)$/ then true
+ when /^(?:n|no)$/ then false
+ when /^(?:[qx]|quit|exit)$/ then exit
+ else
+ puts %{response was: #{resp}}
+ puts %{[please type to select: #{selections_available_(:short)}]}
+ answer?('',:short)
+ end
+ end
+ self
+ end
+ def answer?(ask,selections=:strict)
+ resp='redo'
+ print ask + %{PROCEED? [#{selections_available_(selections)}]: }
+ resp=File.new('/dev/tty').gets.strip
+ (selections==:strict) \
+ ? selection_options.response_strict(resp)
+ : selection_options.response_short(resp)
+ end
+ self
+ end
+ def notice
+ def warn_and_proceed?
+ '*WARNING* this software module creates, destroys, overwrites directories' + "\n" \
+ + '*WARNING*: Use this Software at your own risk!'
+ end
+ def default(selection=nil)
+ selections=:strict #selections=:short
+ ans=if selection
+ case selection
+ when selection.is_a?(String)
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "#{selection} #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ when :make
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ selected (or configured) languages to be used
+ source language: #{language.source_language_available_str}
+ target languages: #{language.translation_languages_available.inspect}
+
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will create sub-directories for the
+ selected (or configured) target languages:
+ #{language.translation_languages_available.inspect}
+ & the po4a configuration file: #{filename.po4a_cfg}
+ in the current directory:
+ #{Dir.pwd}
+ It will populate the sub-directories with translation files created from
+ the pot and po files found under the corresponding language
+ sub-directories, (under #{dir.pot}/ & #{dir.po}/).
+ (OVERWRITING any existing translated .ssm .sst .ssi files
+ in language subdirectories that are not under po4a management).
+
+ You should backup the current directory:
+ #{Dir.pwd}
+
+#{warn_and_proceed?}
+ WOK
+ when :clean
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+#{warn_and_proceed?}
+ WOK
+ when :distclean
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will remove the sub-directories (if they exist):
+ #{language.possible_translations.inspect}
+
+ #{language.translation_languages_available.inspect}
+ & file: #{filename.po4a_cfg}
+ in the current directory:
+ #{Dir.pwd}
+ Note: these sub-directories & the config file #{filename.po4a_cfg}
+ should be auto-generated from pot and po files if this project translation
+ is under po4a management.
+ This query is to give you the chance to make sure you know what you are doing.
+#{warn_and_proceed?}
+ WOK
+ when :rebuild
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will destroy/clobber and then create again the
+ sub-directories:
+ #{language.translation_languages_available.inspect}
+ populating them with translation files created from the pot and po files
+ found under the corresponding language sub-directories in (#{dir.pot}/
+ & #{dir.po}/).
+ It will also generate the file: #{filename.po4a_cfg}
+ These actions will be taken in the current directory:
+ #{Dir.pwd}
+ This query is to give you the chance to make sure you know what you are doing.
+#{warn_and_proceed?}
+ WOK
+ else
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "#{selection} #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ end
+ else
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "install and to setup #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ end
+ exit unless query.answer?(ans)
+ end
+ def project_help
+ puts <<-WOK
+#{project_details.name}
+#{project_details.setup_project}
+
+This setup file is primarily to assist with having sisu markup files under po4a
+translation management. It assumes that the source language files are placed
+under the sub-directory identifying the source language set, which is currently
+#{language.source_language_selected}
+The files there are used to make the source translation file in the directory #{dir.pot}/
+Which is then used to create files for translation under the directory #{dir.po}/
+in sub-directories bearing the translation languages ISO code.
+
+The current language translation selection is: #{translation_languages_selected_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+
+sisu available language list: #{sisu_languages_available_str}
+
+ WOK
+ end
+ self
+ end
+ def generate
+ def readme
+ system(%{ruby ../../../../../bin/sisu6 --txt -v --no-manifest --dump='../../../../../..' en/README.ssm})
+ end
+ def manpage
+ system(%{ruby ../../../../../bin/sisu6 --manpage -v --no-manifest --dump='../../../../../../man/man1' en/sisu.ssm})
+ end
+ self
+ end
+ def filename
+ def languages_src_tgt
+ #'translation_languages'
+ 'languages_source_and_targets'
+ end
+ def po4a_cfg
+ 'po4a.cfg'
+ end
+ self
+ end
+ def dir
+ def pwd
+ Dir.pwd
+ end
+ def po4a_
+ 'po4a/' # ''
+ end
+ def pot
+ po4a_ + 'pot'
+ end
+ def po
+ po4a_ + 'po'
+ end
+ self
+ end
+ def dir_mk(dir)
+ FileUtils::mkdir_p(dir) unless FileTest.directory?(dir)
+ end
+ def po4a_flags
+ def debug
+ '-d -v'
+ end
+ def normal
+ ''
+ end
+ def quiet
+ '-q'
+ end
+ self
+ end
+ def languages_from_file
+ def language_source
+ if @@source.is_a?(String) \
+ and @@source =~ /w{2,4}/
+ else languages_extract_from_file
+ end
+ @@source
+ end
+ def language_targets
+ if @@targets.is_a?(Array) \
+ and @@targets.length > 0
+ else languages_extract_from_file
+ end
+ @@targets
+ end
+ def languages_extract_from_file
+ if (@@source.is_a?(String) \
+ and @@source =~/\w{2,4}/) \
+ and (@@targets.is_a?(Array) \
+ and @@targets.length > 0)
+ else
+ if FileTest.file?(filename.languages_src_tgt)
+ puts 'file: "' + filename.languages_src_tgt + '" found and used (unless overridden)'
+ langs=IO.read(filename.languages_src_tgt, mode: 'r:utf-8').scan(/source:\s+\w+|target:\s+\w.+/)
+ langs.each do |sel|
+ case sel
+ when /source:/
+ source=sel.split(/source:\s*|\s+/).join
+ source=(source =~/\w{2,4}/) ? source : nil
+ @@source=unless @@source.is_a?(String) \
+ and @@source =~/\w{2,4}/
+ source
+ else @@source
+ end
+ when /target:/
+ @@targets=unless @@targets.is_a?(Array)
+ sel.split(/targets?:\s*|\s+/) - ['']
+ else @@targets
+ end
+ end
+ end
+ else puts 'no po target languages found' ; exit
+ end
+ end
+ end
+ self
+ end
+ def language
+ def source_language_selected(src=nil)
+ @@source=if not @@source.nil? \
+ and @@source.is_a?(String) \
+ and @@source =~/\w{2,4}/
+ @@source
+ elsif (src \
+ && src.is_a?(String) \
+ && src.length > 1)
+ src
+ else
+ src=languages_from_file.language_source
+ end
+ end
+ def translation_languages_selected(targets=nil) #translation_languages
+ @@targets=if not @@targets.nil? \
+ and @@targets.is_a?(Array) \
+ and @@targets.length > 0
+ @@targets
+ elsif (targets \
+ && targets.is_a?(Array) \
+ && targets.length > 0)
+ targets
+ else
+ targets=languages_from_file.language_targets
+ end
+ end
+ def source_language_available
+ [source_language_selected] & sisu_languages_available
+ end
+ def translation_languages_available
+ translation_languages_selected & sisu_languages_available
+ end
+ def info_on_selection
+ if translation_languages_selected != translation_languages_available
+ <<-WOK
+WARNING: language selections mismatch
+
+The current language translation selection appears to be: #{translation_languages_selected_str}
+Of which the following are valid (available) selections: #{translation_languages_available_str}
+
+sisu available language list: #{sisu_languages_available_str}
+
+the following will be used: #{translation_languages_available_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+ WOK
+ else
+ <<-WOK
+The current language translation selection is: #{translation_languages_selected_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+
+sisu available language list: #{sisu_languages_available_str}
+ WOK
+ end
+ end
+ def sisu_languages_available
+ $SiSU_Language_Codes.language_list.codes
+ end
+ def possible_translations
+ sisu_languages_available - [source_language_selected]
+ end
+ def translation_languages_selected_str
+ language.translation_languages_selected.join(' ')
+ end
+ def source_language_available_str
+ source_language_available.join
+ end
+ def translation_languages_available_str
+ language.translation_languages_available.join(' ')
+ end
+ def sisu_languages_available_str
+ language.sisu_languages_available.join(' ')
+ end
+ def posible_translations_str
+ language.posible_translations.join(' ')
+ end
+ self
+ end
+ def files_src
+ def ssm
+ Dir.glob("#{language.source_language_selected}/*.ssm").sort
+ end
+ def sst
+ Dir.glob("#{language.source_language_selected}/*.sst").sort
+ end
+ def ssi
+ Dir.glob("#{language.source_language_selected}/*.ssi").sort
+ end
+ def all
+ Dir.glob("#{language.source_language_selected}/*{.ssm,.sst,.ssi}").sort
+ end
+ self
+ end
+ def po4a_cfg_file
+ File.open("#{Dir.pwd}/#{filename.po4a_cfg}",'w')
+ end
+ def po4a_create
+ def configure #po4a_cfg
+ po4a_cfg_arr=[]
+ po4a_cfg_arr << "[po4a_langs] #{language.translation_languages_available_str}"
+ po4a_cfg_arr << "[po4a_paths] #{dir.pot}/$master.pot $lang:#{dir.po}/$lang/$master.po"
+ files_src.ssm.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ files_src.sst.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ files_src.ssi.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ file=po4a_cfg_file
+ po4a_cfg_arr.each do |txt|
+ puts txt
+ file << txt << "\n"
+ end
+ file.close
+ cmd='po4a --keep 0 ' \
+ + po4a_flags.normal + ' ' \
+ + filename.po4a_cfg
+ #cmd='po4a --keep 0 --no-backups --package-name ' \
+ #+ 'sisu-manual' + ' ' \
+ #+ po4a_flags.normal + ' ' \
+ #+ filename.po4a_cfg
+ system(cmd); puts cmd
+ end
+ self
+ end
+ def project
+ def make
+ dir_mk(dir.pot)
+ language.translation_languages_available.each do |lang_dir|
+ dir_lang="#{Dir.pwd}/#{dir.po}/#{lang_dir}"
+ dir_mk(dir_lang)
+ end
+ po4a_create.configure
+ end
+ def clean
+ #rm -f po/*/*.po~
+ #rm -rf ../build
+ FileUtils.rm_f Dir.glob("./#{dir.po}/*/*.po~")
+ end
+ def distclean
+ #rm -f po4a.cfg
+ #rm -rf $(LANGUAGES)
+ FileUtils::rm_f(filename.po4a_cfg)
+ FileUtils::rm_r(language.possible_translations,:force => true)
+ #FileUtils::rm_r(language.translation_languages_available,:force => true)
+ end
+ self
+ end
+end
+__END__
diff --git a/data/doc/sisu/markup-samples/manual/translation_languages b/data/doc/sisu/markup-samples/manual/translation_languages
deleted file mode 100644
index d84a94e8..00000000
--- a/data/doc/sisu/markup-samples/manual/translation_languages
+++ /dev/null
@@ -1 +0,0 @@
-de fr es ja ru zh