postiffm / bibledit-desktop

Desktop version of Bibledit
GNU General Public License v3.0
4 stars 6 forks source link

Updating po file not completed #104

Closed LAfricain closed 5 years ago

LAfricain commented 5 years ago

I would like to update the fr.po file and begun a new one for italian. I run ./getStrings.sh I have this result:

xgettext: lecture impossible de ../templates/gtkbuilder.floatingwindow.xml : XML declaration allowed only at the start of the document

xgettext: lecture impossible de ../templates/gtkbuilder.floatingwindow.xml : XML declaration allowed only at the start of the document

xgettext: lecture impossible de ../templates/gtkbuilder.floatingwindow.xml : XML declaration allowed only at the start of the document

xgettext: attenzione: il file "../templates/gtkbuilder.floatingwindow.xml" ha estensione "xml" sconosciuta: si prova con C
../templates/gtkbuilder.floatingwindow.xml:2: attenzione: costante carattere non terminata
xgettext: attenzione: il file "../templates/stylesheet.xml" ha estensione "xml" sconosciuta: si prova con C

And the test.pot is incomplete all the xml string (the stylesheet strings) are missing but the new strings from the other type of file are OK.

postiffm commented 5 years ago

@LAfricain, I will take a look at this.

postiffm commented 5 years ago

I think this is fixed. See commit 5d48faf

LAfricain commented 5 years ago

I run again ./getString.sh But I can't see the strings of the stylesheet.xml in the test.pot, I have still an error:

xgettext: attenzione: the file "../templates/stylesheet.xml" extension 'xml' is unknown; will try C

If I run only:

xgettext -j ../templates/stylesheet.xml -o test.pot

I have:

xgettext -j ../templates/stylesheet.xml -o test.pot
xgettext: errore durante l'apertura di "test.pot" in lettura: File o directory non esistente

Did you succeed to generate a new pot?

postiffm commented 5 years ago

I did not succeed in generating a new one. I just fixed the errors that showed up when ./getStrings.sh was run. I will check into it again.

postiffm commented 5 years ago

It works fine for me. I think I know what the problem is. To work with the .xml file you have to teach xgettext how to do it. In https://github.com/postiffm/bibledit-desktop/blob/master/po/README, you will see two lines:

sudo cp stylesheet.its /usr/share/gettext/its/
sudo cp stylesheet.loc /usr/share/gettext/its/

Figure out first if the directdory /usr/share/gettext/its exists. It could be in another place that you need to find. Then change into the bibledit-desktop/po directory, then execute the above commands (or their equivalent, depending on what directory you find has the its files in it.

Then the xgettext command should work on stylesheet.xml.

LAfricain commented 5 years ago

Ok well I didn't read well the Readme :( Now it works, I add the two commands in the getString.sh then people will not forget it..

postiffm commented 5 years ago

The reason I don't add those commands to the getStrings.sh script is that they probably have to be changed for different Linux distributions.