Conversation
- Easier csv export to make back and forth with heloblod easier. - Flag translations we've marked as auto.
struan
left a comment
There was a problem hiding this comment.
When I export and import it seems to introduce a lot of additional msgid "" and equivalent msgstr lines on anything that's a multiline string which I'm not sure is helpful and produces diffs that are hard to follow.
The json path seems to work, the csv side not so much. And modulo the above it seems to work fine.
| translation_type: TranslationType | ||
| original: str | ||
| current_translation: str | ||
| locations: list[str] # List of "filename:line" strings |
There was a problem hiding this comment.
The output sometimes produces an empty array which then fails validation on re-import which doesn't seem ideal
There was a problem hiding this comment.
This only seems to be the case if you are using csv files
|
|
||
|
|
||
| @app.command() | ||
| def import_translations( |
There was a problem hiding this comment.
this could just be import to match export and be less wordy
| "--dry-run", | ||
| "-n", | ||
| help="Show what would be changed without making changes", | ||
| ), |
There was a problem hiding this comment.
my preference is always to make dry run the default and you have to pass a flag to commit things because that way the default doesn't do any harm. Not that it really matters here because it's easy to undo
Quick LLM-assisted export tool to make working with translations a bit easier: