Difference between revisions of "Translating gettext"

From Apertium
Jump to navigation Jump to search
(note that you need spellutils, simplify example)
Line 6: Line 6:
   
 
<pre>
 
<pre>
cat libiconv-1.12.sv.po | pospell -n - -f -p apertium -- sv-da -u > libiconv-1.12.da.po
+
$ cat sv.po | pospell -n - -f -p apertium -- sv-da -u > da.po
  +
</pre>
  +
  +
  +
Thus if you put
  +
<pre>
  +
#!/bin/sh
  +
pospell -n - -f -p apertium -- -u "$@"
  +
</pre>
  +
into a file called eg. "apertium-po", and <code>chmod +x apertium-po</code>,
  +
you can do
  +
<pre>
  +
$ cat sv.po | apertium-po sv-da > da.po
 
</pre>
 
</pre>
   

Revision as of 10:54, 20 November 2009

A combination of pospell and Apertium can be used to translate gettext .po files.

pospell is part of the spellutils package, available through apt-get, macports, emerge, urpmi...

Example

$ cat sv.po | pospell -n - -f -p apertium -- sv-da -u > da.po


Thus if you put

#!/bin/sh
pospell -n - -f -p apertium -- -u "$@"

into a file called eg. "apertium-po", and chmod +x apertium-po, you can do

$ cat sv.po | apertium-po sv-da > da.po