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

Add origin language field to configuration #5

Open
anewstheart opened this issue Feb 22, 2022 · 0 comments
Open

Add origin language field to configuration #5

anewstheart opened this issue Feb 22, 2022 · 0 comments

Comments

@anewstheart
Copy link

anewstheart commented Feb 22, 2022

It is useful to separate the origin language from the name of the origin language field.

{"origin language": "Romanian", "destination language": "en", "destination language field":"English"}

{"origin language": "Serbo-Croatian", "origin language field": "TL Word Lemma", "destination language": "en", "destination language field":"NL Definition"}

config = mw.addonManager.getConfig(__name__)
origin_lang = config['origin language']
dest_lang = config['destination language']
dest_lang_field = config['destination language field']

config = mw.addonManager.getConfig(__name__)
origin_lang = config['origin language']
origin_lang_field = config['origin language field']
dest_lang = config['destination language']
dest_lang_field = config['destination language field']

entry = self.note[origin_lang]

entry = self.note[origin_lang_field]

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

1 participant