diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-12-31 08:50:09 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2015-01-07 22:42:40 -0500 |
commit | a25c64083c10dc2b2b02fcee06b1e305a379ce90 (patch) | |
tree | d2d8d3fbf9bf37868afaa22a1759e55a8ee86273 /lib/sisu/develop/se_file_op.rb | |
parent | d: po4a, reorganize a bit (diff) |
d: po4a, continue reorganization (translation request dev stopped)
* --po4a run against different language versions of sisu markup
files (representing the same document in different languages)
initializes po4a structure to place those documents under future
po4a management
* includes command line translation request
(use command line program 'trans' to pass request to
translation.google.com, stopped for now)
NOTE in case future development is restarted: to test, remove
code line 'auto_translate?(:skip)' that follows
'def auto_translation(src_txt,markup=:src)'; place identical
english sisu markup files in en/test.sst fr/test.sst (or under
the language code to be tested) and run against en/test.sst
fr/test.sst e.g. '--po4a --trans --glob test.sst'
this send identical text objects to translate.google using
'trans' and populate po file with results for placing future
translation under po4a management, however in initial tests
insufficient cleanly translated paragraphs were returned,
so stopped development for now. (no attempt at initialization
of new non-existent files using --trans-en:es,fr,de format)
* [hub_options, if development of trans is pursued later consider
the possibility of modifying the --trans string options to add
an optional timeout value, &; possibly modifying po4a code so
timeout may occur a fixed number of times before skipping
translation request attempts for the remainder].
Diffstat (limited to 'lib/sisu/develop/se_file_op.rb')
-rw-r--r-- | lib/sisu/develop/se_file_op.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/sisu/develop/se_file_op.rb b/lib/sisu/develop/se_file_op.rb index 1555d119..585a1c12 100644 --- a/lib/sisu/develop/se_file_op.rb +++ b/lib/sisu/develop/se_file_op.rb @@ -468,8 +468,8 @@ module SiSU_File_Op fn=base_filename.pot make_file(path,fn) end - def po - path=output_path.po.dir + def po(lng=@md.opt.lng) + path=output_path.po(lng).dir make_path(path) fn=base_filename.po make_file(path,fn) @@ -1747,17 +1747,18 @@ module SiSU_File_Op end self end - def po + def po(lng=@md.opt.lng) + @lng=lng def dir output_path.base.dir + '/' \ + Gt[:src] + '/' \ + @md.opt.fng + '/po4a/po/' \ - + @md.opt.lng + + @lng end def url output_path.base.url + '/po4a/' \ + @md.fnb + '/po/' \ - + @md.opt.lng + + @lng end self end |