-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the issue
The problem:
Seems like Weblate depends on the position of comments in .strings files while parsing it
I tried to figure out what is going on and compared "correct" file from hosted.weblate.com and mine
In the already existing files on hosted.weblate.com .strings and its comments have next structure and they're parsed well by Weblate
// comment
"key"="value";
or
/* comment */
"key"="value";
In case of different comment position ( on the same line as key-value string )
"key"="value"; /* comment */
weblate doesn't parse it correctly and I get a mess on the translation page
The Documentation of .strings format doesn't inform where comment string must be, but it refers to c-style comment and they can be placed above and on the same line at the very least
I already tried
- I've read and searched the documentation.
- I've searched for similar filed issues in this repository.
Steps to reproduce the behavior
- Create .string file and its translation file in your repo like
source file
"key1"="source_value1"; /*description1*/
"key2"="source_value2"; /*description2*/
translation file
"key1"="target_value1"; /*description1*/
"key2"="target_value2"; /*description2*/
- Import repo to weblate
- You'll see the problem when you open translations of these strings
Expected behavior
Weblate parses translation .strings files well
Screenshots
No response
Exception traceback
How do you run Weblate?
Docker container
Weblate versions
5.14.3
Weblate deploy checks
Additional context
No response

