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

Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines [$15 awarded] #359

Closed
paour opened this issue Aug 29, 2013 · 8 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@paour
Copy link
Contributor

paour commented Aug 29, 2013

When updating a string that contains newlines, Weblate merely uses CR characters rather than the "\n" characters required by Android.

Since Android ignores the CR characters, strings are displayed without newlines in the resulting application.

@nijel
Copy link
Member

nijel commented Aug 30, 2013

What Weblate and translate-toolkit versions are you using?

@paour
Copy link
Contributor Author

paour commented Aug 30, 2013

> manage.py list_versions
 * Weblate weblate-1.6
 * Django 1.4.5
 * Django-registration 0.8
 * Translate Toolkit 1.9.0
 * Whoosh 2.3.2
 * GitPython 0.3.2 RC1
 * Git 1.7.10.4
 * PyCairo 1.8.8
 * Pango (PyGtk) 1.30.0
 * South 0.7.5

@paour
Copy link
Contributor Author

paour commented Aug 30, 2013

Apostrophes (') also need to be escaped in Android string resources (to \'). This is not the case at the moment, and it breaks Android resources.

@nijel
Copy link
Member

nijel commented Sep 10, 2013

Hmm, this sounds strange - these were already fixed and are covered by testsuite (inside translate-toolkit). Have you made manual changes to any of Weblate or translate-toolkit?

@paour
Copy link
Contributor Author

paour commented Sep 10, 2013

I have not made any changes. Would it help if I created an account for you on my server, or if I sent sample files?

@paour
Copy link
Contributor Author

paour commented Oct 2, 2013

I've opened a bounty on this issue, hopefully this will help speed up the resolution (despite the rather small amount, sorry)…

@ghost ghost assigned nijel Oct 7, 2013
@nijel
Copy link
Member

nijel commented Oct 7, 2013

I've tested this with today released 1.7 and I don't see neither of problems:

  • Newlines are stored as \n
  • Apostrophes are escaped as \'

So to me it looks like it was fixed. Please let me know if there is still something broken with 1.7.

@nijel nijel closed this as completed Oct 7, 2013
@paour
Copy link
Contributor Author

paour commented Oct 11, 2013

It does seem to work, thank you!

@nijel nijel changed the title Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines [$15 awarded] Feb 21, 2015
@nijel nijel changed the title Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines [$15 awarded] Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines May 3, 2018
@nijel nijel changed the title Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines Android format: Weblate incorrectly uses CR characters instead of "\n" for newlines [$15 awarded] May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants