Closed chenpindong closed 3 weeks ago
For monolingual files, matching is expected to happen based on key/context, source is ignored. See 4cdf14489dd66ae4f5c3d6cd3f8babbe2a72e4d2 and https://github.com/WeblateOrg/weblate/issues/1547
Why is CSV format different from other format processing methods?
if "source" in self.store.fieldnames: self.template_store = None
Will this modification create new problems?
Why is CSV format different from other format processing methods?
Because it can have varying fields, all other formats have fixed structure.
if "source" in self.store.fieldnames: self.template_store = None
Will this modification create new problems?
Do you mean removing it? Yes, it will bring back issues described in https://github.com/WeblateOrg/weblate/issues/1547
We may understand it differently, it's not that we want to delete that code.
Let me rephrase the problem:
under these circumstances,
if "source" in self.store.fieldnames and not isinstance( template_store, CSVFormat ): self.template_store = None
I made changes to the original text when uploading, but I still managed to update the translation. However, I hope the translation cannot be found and will not be updated.
In other formats, the translation cannot be found and will not be updated.
May I ask why the CSV format is not consistent with other formats
This issue has been automatically marked as stale because there wasn’t any recent activity.
It will be closed soon if no further action occurs.
Thank you for your contributions!
Other formats have fixed set of fields available. With CSV the fields can change, thats why there is a lot of special casing for CSV. I'm always worried changing the logic here as it can easily break other workflow and we definitely lack a test coverage here (there are too many cases to cover everything).
This issue has been automatically marked as stale because there wasn’t any recent activity.
It will be closed soon if no further action occurs.
Thank you for your contributions!
Describe the issue
Remove template if the file contains source:
if "source" in self.store.fieldnames and not isinstance( template_store, CSVFormat ): self.template_store = None
My problem: When translation base file is xlsx,uploading the CSV file translation, the original text was modified, but it was still found and updated.
Why is it not like this:
if "source" in self.store.fieldnames: self.template_store = None
When I make this modification, the problem is solved.May I ask if it is possible to modify it this way?
I already tried
Steps to reproduce the behavior
1.Project Settings
2.Warehouse files
3.Translation to be uploaded
Expected behavior
No response
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
No response
Weblate deploy checks
No response
Additional context
No response