Editing Converter .po e .ts a .tmx
From Proxecto Trasno
Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.
The system administrator who locked it offered this explanation: Esta wiki está temporalmente en modo de só lectura
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<center> | <center> | ||
− | Este como está disponible en [[File:flag_es.png]] castellano en el [http://www.galpon.org/wiki/index.php/Convertir_. | + | Este como está disponible en [[File:flag_es.png]] castellano en el [http://www.galpon.org/wiki/index.php/Convertir_.po_a_.tmx ''wiki'' de '''Galpon'''].<br> |
− | This HowTo is available in [[File:flag_en.png]] english in the [[Convert .po | + | This HowTo is available in [[File:flag_en.png]] english in the [[Convert .po to .tmx|''in '''this''' wiki'']]. |
</center> | </center> | ||
− | |||
== Traballo básico == | == Traballo básico == | ||
Line 17: | Line 16: | ||
↓ ↓ ↓ ↓ ↓ | ↓ ↓ ↓ ↓ ↓ | ||
↓ ↓ ↓ ↓ nome que terá o ficheiro «.tmx» resultante | ↓ ↓ ↓ ↓ nome que terá o ficheiro «.tmx» resultante | ||
− | ↓ ↓ ↓ código do idioma final ( | + | ↓ ↓ ↓ código do idioma final (ocmo parámetro da opción -l) |
↓ ↓ opción (obrigatoria) para indicar o idioma final (do .tmx) | ↓ ↓ opción (obrigatoria) para indicar o idioma final (do .tmx) | ||
↓ nome do ficheiro «.po» orixinal | ↓ nome do ficheiro «.po» orixinal | ||
orde de conversión po a(to) tmx | orde de conversión po a(to) tmx | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Converter varios ficheiros .po a un só ficheiro .tmx === | === Converter varios ficheiros .po a un só ficheiro .tmx === | ||
Empregamos como exemplo a obtención dun ficheiro «.tmx» que conteña as traducións do Ubuntu 12.04 Precise | Empregamos como exemplo a obtención dun ficheiro «.tmx» que conteña as traducións do Ubuntu 12.04 Precise | ||
− | :'''1.''' Imos á páxina: | + | :'''1.-''' Imos á páxina: |
::https://translations.launchpad.net/ubuntu/precise/+language-packs | ::https://translations.launchpad.net/ubuntu/precise/+language-packs | ||
− | ::á dereita | + | ::á dereita fixamonos en: |
:::Latest language packs | :::Latest language packs | ||
:::Base pack: '''<font color="#2554C7">2012-05-08 10:57:58 UTC</font>''' | :::Base pack: '''<font color="#2554C7">2012-05-08 10:57:58 UTC</font>''' | ||
− | ::Premendo na data/hora accedemos á descarga | + | ::Premendo na data/hora accedemos á descarga du ficheiro .tar.gz |
− | :'''2.''' Unha vez descargado, | + | :'''2.-''' Unha vez descargado, descomprimimolo e buscamos o «noso paquete de idioma» e accedemos a el |
::<code>cd /rosetta-precise/gl</code> | ::<code>cd /rosetta-precise/gl</code> | ||
− | :'''3.''' A fin de traballar nun cartafol no que non teñamos que andar perdidos entre un feixe de ficheiros, faremos todo o traballo nesta localización desde o terminal. | + | :'''3.-''' A fin de traballar nun cartafol no que non teñamos que andar perdidos entre un feixe de ficheiros, faremos todo o traballo nesta localización desde o terminal. |
− | :'''4.''' O primeiro que imos facer é | + | :'''4.-''' O primeiro que imos facer é construir un ficheiro cun listado de todos os ficheiros «.po» que teñamos |
− | ::<code>find LC_MESSAGES/ | + | ::<code>find LC_MESSAGES/*.po > TodoUbuntu1204.txt</code> |
− | :'''5.''' A seguir construiremos un único ficheiro «.po» | + | :'''5.-''' A seguir construiremos un único ficheiro «.po» |
− | ::<code>msgcat -f | + | ::<code>msgcat -f TodoUbuntu1204.txt -u -o TodoUbuntu1204.po</code> |
− | :'''6.''' E, para rematar, | + | :'''6.-''' E, para rematar, constrimos o ficheiro «.tmx» resultante |
− | ::<code>po2tmx -l gl | + | ::<code>po2tmx -l gl TodoUbuntu1204.po TodoUbuntu1204.tmx</code> |
{{Nota|Nestes pasos anteriores só empregamos as ferramentas «''translate-toolkit''» indicadas no paso anterior}} | {{Nota|Nestes pasos anteriores só empregamos as ferramentas «''translate-toolkit''» indicadas no paso anterior}} | ||
== Operacións complexas == | == Operacións complexas == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | === Automatizando o proceso === |
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh |