Bug 1182880 - Unwanted insertion of escape character when pulling utf8properties from Zanata
Summary: Unwanted insertion of escape character when pulling utf8properties from Zanata
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Damian Jansen
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-16 06:07 UTC by Ankit Patel
Modified: 2015-07-28 23:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-28 23:09:30 UTC
Embargoed:


Attachments (Terms of Use)
A screenshot of Mozilla dashboard reporting error about Escape Character (87.03 KB, image/png)
2015-01-16 06:07 UTC, Ankit Patel
no flags Details

Description Ankit Patel 2015-01-16 06:07:56 UTC
Created attachment 980749 [details]
A screenshot of Mozilla dashboard reporting error about Escape Character

Description of problem:
I have been using Zanata to manage Gujarati translations of certain Mozilla projects. Mozilla projects uses dtd and properties formats to manage their translations. I have blogged my experience here in this blog post if someone is interested in reading other relevant details: http://www.ankit644.com/?p=351

When I push translations in the utf8properties file format things seems well and I could easily translate things using Zanata online interface. But the problem starts when I pull those translations back using zanata cli (or maven cli). Certain special characters like "!", "#", etc comes back with escape character (that's backslash). Which causes an issue with Mozilla's translation. Mozilla's dashboard reports those entries as Errors/Warnings. Screenshot attached.

Version-Release number of selected component (if applicable):
n/a

How reproducible:
Everytime

Steps to Reproduce:
1. Push utf8properties files to Zanata
2. Translate some stuff to your language
3. Pull translations and check for entries that contains special characters (e.g. !, #, etc)

Actual results:
Escape character (backslash - that's "\") is appended before the special characters

Expected results:
Escape character shouldn't be appended.

Additional info:
https://l10n.mozilla.org/dashboard/compare?run=459505

Comment 1 Sean Flanigan 2015-01-16 06:59:20 UTC
Ankit, do you know where we could find some documentation describing Mozilla's Properties format and exactly how it differs from Java Properties?  

I have only been able to find https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/Property_Files but it is pretty informal.

Some of the questions I hope to answer: 

1. Can '!' be used for comments?
2. How are ':' and '=' treated?  Can they be part of keys?
3. Can spaces be used to separate key and value, and can they be escaped (other than \u0020)?
4. Are Unicode escapes (like \u0020) the only supported escapes?
5. What were they thinking?  Just kidding!

Comment 2 Ankit Patel 2015-01-16 07:02:00 UTC
*my assumption* that only Unicode escapes are supported. don't have answers of other questions.

Comment 3 Zanata Migrator 2015-07-28 23:09:30 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-40


Note You need to log in before you can comment on or make changes to this bug.