project-navigation
Personal tools

Author Topic: funny bug in update_po_from_wiki.sh  (Read 2353 times)

papabob

  • Guest
funny bug in update_po_from_wiki.sh
« on: November 21, 2006, 04:17:15 pm »
I don't know if it is really a bug, or simply I don't know how to run it, but when I exectue the SVN version with any of the po files (in a freebsd 6.1), the resulting updated_*.po doesn't have any "r" in it. Yes, all "r" character are missing. eg:

Code: [Select]
msgid ""
"msgst ""
"
"Poject-Id-Vesion: UFO Alien Invasion\n"
"Repot-Msgid-Bugs-To: ufoai-develope@lists.soucefoge.net\n"
"POT-Ceation-Date: 2006-11-12 19:02+0100\n"
"PO-Revision-Date: 2006-11-06 09:14+0100\n"
"Last-Tanslato: Matin Gehady <matin.gehady@gmail.com>\n"
"Language-Team: \n"
"MIME-Vesion: 1.0\n"
"Content-Type: text/plain; chaset=UTF-8\n"
"Content-Tansfe-Encoding: 8bit\n"
"X-Poedit-SouceChaset: utf-8\n"
"
"
#: ../base/ufos/amo.ufo:3
msgid "nomal"
"msgst "Nomal"

"
#: ../base/ufos/amo.ufo:4
msgid "blast"
"msgst "Blast"


and so on. What do you think?[/code]

Offline kracken

  • Squad Leader
  • ****
  • Posts: 159
    • View Profile
funny bug in update_po_from_wiki.sh
« Reply #1 on: November 21, 2006, 09:21:23 pm »
Waou, that's weird bug ! :(

Maybe it's because I convert the .po file from dos  unix by removing all \r... (but it doesn't suppress the "r" on my computer...).

You should try to replace the line 396 :
Code: [Select]

sed $BEGIN','$END's/^\"\(.*\)\"$/\1/g;s/\r//g' $language.po |



by this one : (just delete the last sed command)
Code: [Select]

sed $BEGIN','$END's/^\"\(.*\)\"$/\1/g' $language.po |


If it still doesn't work, please set the 'debug' variable to 1 at the begining of the script, run the script, and send me the resulting log file. (Or even better, join the IRC so that we can talk about it)

Offline kracken

  • Squad Leader
  • ****
  • Posts: 159
    • View Profile
funny bug in update_po_from_wiki.sh
« Reply #2 on: November 21, 2006, 11:52:11 pm »
I added your es_ES.po to svn / trunk, and I updated it from what you've put in the wiki.

I also updated update_po_from_wiki.sh, so now the sed line you should try to change is at line 402. (But I didn't change this line, it's still the same).

papabob

  • Guest
funny bug in update_po_from_wiki.sh
« Reply #3 on: November 22, 2006, 03:53:08 pm »
Little better (now it really try to update the po), but every entry reports errors like this:

Code: [Select]
Found short msgid :  25mm HIT Grenades
awk: illegal field $(), name "loc"
 input record number 1, file List_of_msgid
 source line number 10
./update_po_from_wiki.sh: line 88: [: -gt: unary operator expected
   didn't find any associated translation
.....


and the updated_*.po has 0 bytes. The log file doesn't show anything strange. Maybe the linux's sed has different syntax than the freebsd one?