Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to convert a properties file #182

Closed
transl8bzimport opened this issue Feb 1, 2006 · 6 comments
Closed

Failed to convert a properties file #182

transl8bzimport opened this issue Feb 1, 2006 · 6 comments

Comments

@transl8bzimport
Copy link

Version: 0.8rc6

Originally posted by Oscar Manuel Gómez Senovilla:

A properties file has been converted wrong. I expect to attach later.

@transl8bzimport
Copy link
Author

Originally posted by Oscar Manuel Gómez Senovilla:

Created [attachment 42](http://bugs.locamotion.org/attachment.cgi?id=42)

File described in comment 1

This file, when converted to po with moz2po, results in a zero size file. Other
properties files seem ok

@dwaynebailey
Copy link
Member

Do you have the associated english .properties file. We need that to convert to PO.

Do you get any errors during convertsion?
—errorlevel=traceback

@davidfraser
Copy link

The error was as follows:
/mnt/zuza/translate.org.za/translate.sourceforge.net/src/translate/misc/quote.py:257
elif s >= len(source):
E raise ValueError(“\ at end of string”)

> ```
> ValueError: \ at end of string
> ```

The line causing it was:
EnterLinkText=Introduzca el texto a mostrar para el enlace:

I’ve added a test in storage/test_properties.py

@davidfraser
Copy link

This is fixed with the commit to properties.py to allow escapes at the end of
the string.
Oscar, can you verify?

@transl8bzimport
Copy link
Author

Originally posted by Oscar Manuel Gómez Senovilla:

I get this with the new file:
moz2po: warning: Error processing: input
l10n/es-ES/editor/ui/chrome/composer/editor.properties, output
po/es-ES/editor/ui/chrome/composer/editor.properties.po, template
l10n/en-US/editor/ui/chrome/composer/editor.properties: \ at end of string

Maybe it’s the same, but still having trouble

@dwaynebailey
Copy link
Member

Tested this on the supplied file with templates from Mozilla 1.5:

moz2po -t editor-template.properties -i editor.properties -o editor.properties.po

Creates a valid PO file with items correctly merged. \ at end of line is now
escaped:

#: EnterLinkText
msgid “Enter text to display for the link:”
msgstr “Introduzca el texto a mostrar para el enlace\:”

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants