Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-20 Thread Scott Kostyshak
On Tue, Feb 20, 2018 at 08:12:26PM +, Uwe Stöhr wrote:
> Am 20.02.2018 um 19:27 schrieb Scott Kostyshak:
> 
> > Uwe, will you have time to fix this issue soon?
> 
> it should be fixed now, please test.

Thanks! Works well now. It runs without error, and no changes to
layouttranslations are made (to check that everything is updated). So
looks good to me.

Thanks for your help with the translations.

Scott


signature.asc
Description: PGP signature


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-20 Thread Uwe Stöhr

Am 20.02.2018 um 19:27 schrieb Scott Kostyshak:


Uwe, will you have time to fix this issue soon?


it should be fixed now, please test.

regards Uwe


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-20 Thread Uwe Stöhr
> After deleting the offending character I see new changes in el & uk, 
which went uncommitted.


I installed now the polib python extension and tried to generate 
layouttranslations. After removing the BOM I get this error:


File "C:\Program Files (x86)\Python36-32\lib\encodings\cp1252.py", line 
19, in encode

return codecs.charmap_encode(input,self.errors,encoding_table)[0]
  UnicodeEncodeError: 'charmap' codec can't encode character '\ufeff' 
in position 0: character maps to 


so without the BOM CP-1252 is detected instead of Unicode.

Nevertheless I was able to fix it but don't know how. Please test if it 
is now fixed for you as well.


I also fixed now ar.po.

thanks and regards
Uwe


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-20 Thread Uwe Stöhr

Am 20.02.2018 um 00:06 schrieb Uwe Stöhr:

is encoded in UTF-8 with BOM. So maybe the first character you see is 
the BOM:


I first realized it thanks to your report. I found out that this is the 
default setting of my text editor when saving as UTF-8. For me on 
Windows the BOM is a good ideas because other programs get the 
information that the text/file is UTF-8 and not CP-1252-encoded.


However, if the BOM makes problems, please tell me that I know and 
remove it from layouttranslations.


-

It seems that my replies to the lyx-devel list are no longer 
transferred. Moreover I can also not see Pavel's initial post there.

(Maybe there is just an issue with my news server settings or firewall.)

thanks and regards
Uwe


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-20 Thread Scott Kostyshak
On Tue, Feb 20, 2018 at 04:38:03AM +, Scott Kostyshak wrote:
> On Mon, Feb 19, 2018 at 11:18:57PM +, Pavel Sanda wrote:
> 
> >  $ make ../lib/layouttranslations
> > LC_ALL=C ; export LC_ALL ; /usr/bin/python ./lyx_pot.py -b .. -o 
> > ../lib/layouttranslations -t layouttranslations ../lib/layouts/*.layout 
> > ../lib/layouts/*.inc ../lib/layouts/*.module ../lib/citeengines/*.citeengine
> > Error: Unable to handle line:
> > Traceback (most recent call last):
> >   File "./lyx_pot.py", line 687, in 
> > layouts_l10n(input_files, output, base, True)
> >   File "./lyx_pot.py", line 161, in layouts_l10n
> > print(line)
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in 
> > position 0: ordinal not in range(128)
> > make: *** [Makefile:785: ../lib/layouttranslations] Error 1
> 
> I see the same error.

Uwe, will you have time to fix this issue soon?

Thanks,

Scott


signature.asc
Description: PGP signature


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-19 Thread Scott Kostyshak
On Mon, Feb 19, 2018 at 11:18:57PM +, Pavel Sanda wrote:

>  $ make ../lib/layouttranslations
> LC_ALL=C ; export LC_ALL ; /usr/bin/python ./lyx_pot.py -b .. -o 
> ../lib/layouttranslations -t layouttranslations ../lib/layouts/*.layout 
> ../lib/layouts/*.inc ../lib/layouts/*.module ../lib/citeengines/*.citeengine
> Error: Unable to handle line:
> Traceback (most recent call last):
>   File "./lyx_pot.py", line 687, in 
> layouts_l10n(input_files, output, base, True)
>   File "./lyx_pot.py", line 161, in layouts_l10n
> print(line)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in 
> position 0: ordinal not in range(128)
> make: *** [Makefile:785: ../lib/layouttranslations] Error 1

I see the same error.

Scott


signature.asc
Description: PGP signature


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-19 Thread Pavel Sanda
Uwe Stöhr wrote:
> In this case I cannot see a problem. The file I committed is correct. It is 
> encoded in UTF-8 with BOM. So maybe the first character you see is the BOM:
> https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
>
> I tested that the layouttranslations works with LyX before I committed.

Ok, you likely made a mistake :)

 $ make ../lib/layouttranslations
LC_ALL=C ; export LC_ALL ; /usr/bin/python ./lyx_pot.py -b .. -o 
../lib/layouttranslations -t layouttranslations ../lib/layouts/*.layout 
../lib/layouts/*.inc ../lib/layouts/*.module ../lib/citeengines/*.citeengine
Error: Unable to handle line:
Traceback (most recent call last):
  File "./lyx_pot.py", line 687, in 
layouts_l10n(input_files, output, base, True)
  File "./lyx_pot.py", line 161, in layouts_l10n
print(line)
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 
0: ordinal not in range(128)
make: *** [Makefile:785: ../lib/layouttranslations] Error 1

After deleting the offending character I see new changes in el & uk, which went 
uncommitted.

Pavel


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-19 Thread Uwe Stöhr

Am 20.02.2018 um 00:00 schrieb Pavel Sanda:


Uwe, you are likely committing some crap, look at the first character on the 
first line.


Hi Pavel,

I don't like this sound. I don't commit crap, maybe I made a mistake.
In this case I cannot see a problem. The file I committed is correct. It 
is encoded in UTF-8 with BOM. So maybe the first character you see is 
the BOM:

https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8

I tested that the layouttranslations works with LyX before I committed.

regards Uwe


Re: [LyX/2.3.x] layouttranslations and uk.po: corrections from Yuri

2018-02-19 Thread Pavel Sanda
Uwe StĂśhr wrote:
> commit 9ca8dae41d60708635d1d90e11652d19648f6f62
> Author: Uwe Stöhr 
> Date:   Mon Feb 19 23:07:01 2018 +0100
> 
> layouttranslations and uk.po: corrections from Yuri
> ---
>  lib/layouttranslations |   26 
>  po/uk.po   |   49 +++
>  2 files changed, 37 insertions(+), 38 deletions(-)
> 
> diff --git a/lib/layouttranslations b/lib/layouttranslations
> index f96320f..48b015f 100644
> --- a/lib/layouttranslations
> +++ b/lib/layouttranslations
> @@ -1,4 +1,4 @@
> -# This file has been automatically generated by po/lyx_pot.py.
> +???# This file has been automatically generated by po/lyx_pot.py.
>  # PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to 
> regenerate
>  # this file from the translations, run `make ../lib/layouttranslations' in 
> po.
>  # Python polib library is needed for building the output file.

Uwe, you are likely committing some crap, look at the first character on the 
first line.

Pavel