Open marvinruder opened 1 year ago
I don't think Weblate should update non-matching strings just based on key/context – the translation is then for the different string. Weblate only looks at the actual file and doesn't make assumptions about translators doing something more than translating strings in the file. Therefore, the behavior in 6 is correct.
The behavior in 8 is more questionable, as the file still has the source field, but it was wiped.
Still, the main confusion is coming from the fact that you are translating a bilingual CSV file (as the file contains both source and target) and Weblate behaves according to that.
I would love to use a monolingual CSV file (this documentation states that CSV supports that), but how can I do that? In my understanding, that would be a file that does not contain source
information, so a file like the one I described in step 7, or alternatively the same file just without the source
column header. I tried that and received the same error as in step 8.
I added step 9 and 10 to the issue to reflect that specific behavior as well.
Okay, it doesn't work as expected in the translate-toolkit – it requires the source column to be present while parsing the CSV file. If it's not there, it assumes the first row is not a header, but first translation and uses hard-coded column names, what obviously can't work well.
The issue you've reported needs to be addressed in the translate-toolkit. Please file the issue there, and include links to any relevant specifications about the formats (if applicable).
Describe the issue
GIVEN
en_US
as the source languageen_US.json
as the monolingual base language file with base file edit enableden_US
andfr
en_US
, but not infr
WHEN
source
,target
andcontext
, wheresource
column either does not exist at all, contains empty strings or a string that is outdated, i.e., the currenten_US
translation is different from the string provided for the same keytarget
column contains thefr
translations to be imported, andcontext
column contains the keysTHEN
not found
report after uploading the CSV file inAdd as translation
modeI already tried
Steps to reproduce the behavior
en_US
:fr
, which should look like this:en_US
string to something else, e.g. "New Translation", using another upload or the GUIfr
string fails:fr
string fails:fr
string fails:Expected behavior
Since we are working with a monolingual base language file, whose functionality is described in the documentation using the words
I expect the import to succeed in both step 6 and 8 since the correct key was specified in both files, and the content of the
source
column should not matter (thesource
column should not even be required).For a monolingual setup as described here, I expect that the key is used for identifying a string rather than its translation in the base language. That’s the whole point in using a monolingual format.
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
Weblate deploy checks
Additional context
This problem occurred in our project’s workflow in which
en_US
translation for themen_US
base language, and sent to language experts to (foren_US
) improve and update the preliminary translations or (for all other languages) to provide translations for those stringsen_US
expert and import themsource
, leading to the describednot found
import failure