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

Autogenerated cards put the card translation into the explanation field #30

Open
deleuzei opened this issue Jan 6, 2022 · 3 comments
Open

Comments

@deleuzei
Copy link

deleuzei commented Jan 6, 2022

As you can see in the screenshot, on Google Translate the box under the translated word features words in both languages.

image

Autogenerating fetchs the entire box, resulting in both translations appearing in the explanatory field.
image

image

YourLanguageExplanation field should be purged of all references to the foreign language, else it is liable that the word you are supposed to translate will appear there.

@Otter-man
Copy link
Contributor

Otter-man commented Jan 6, 2022

@deleuzei hi again!
It seems you created an autogenerated TSV and then generated cards with a type set to vocabulary, that's why you see the entire box without the 'spoilers' hidden.
Instead, you should set type for autogenerated TSV to autogenerate, and set file to your autogenerated TSV-file.
The card will be generated with 'spoilers' hidden until you flip the card, like in this example.. Autogenerated TSV has html tags inserted for identification of different fields, and to hide the parts like synonyms it has to be generated with a specific CSS template.

The config should look something like this (there is no option for header since autogenerated TSVs are assumed to have a header.

    {
        "type": "autogenerate",
        "file": "en_fr_autogenerated.tsv",
        "card_color": "#33AA33",
        "show_tags": true,
        "card_properties": {
            "tags": [
                "french",
                "vocabulary",
                "autogenerated"
            ]
        },
        "pronunciation_in_reverse": false,
        "lang": {
            "original": "en",
            "translation": "fr"
        },
        "one_translation": false,
        "audio": true
    }

@deleuzei
Copy link
Author

deleuzei commented Jan 6, 2022

You're completely right, I've missed the part that you're still supposed to use the autogenerate type, even though you're importing from a .tsv.
@Otter-man There's one problem with using that method though. If using autogenerate type, the JSON audio field doesn't recognize a media_dir subfield. Consequently the audio is downloaded to ./.media. Is there a way around this, beside building in one place and moving the artifacts elsewhere? Have I missed something else in the readme?

@Otter-man
Copy link
Contributor

@deleuzei nope, configs for autogenerate don't support saving media to a non-default folder yet, so the only way currently is to move/delete the default .media folder manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants