From 5438b19ba1db3e34a1789ea56a034fbf446e2ca8 Mon Sep 17 00:00:00 2001 From: CRIMX Date: Wed, 3 Jun 2020 11:27:33 +0800 Subject: [PATCH] Remove localization for field names (#178) Remove localization for field names as it creates agnostic output. --- plugin/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugin/__init__.py b/plugin/__init__.py index 7ea0527..98b979d 100644 --- a/plugin/__init__.py +++ b/plugin/__init__.py @@ -30,7 +30,6 @@ from PyQt5.QtWidgets import QMessageBox import anki import anki.exporting -import anki.lang import anki.storage import aqt from anki.exporting import AnkiPackageExporter @@ -660,11 +659,11 @@ class AnkiConnect: mm = collection.models # Generate new Note - m = mm.new(anki.lang._(modelName)) + m = mm.new(modelName) # Create fields and add them to Note for field in inOrderFields: - fm = mm.newField(anki.lang._(field)) + fm = mm.newField(field) mm.addField(m, fm) # Add shared css to model if exists. Use default otherwise @@ -678,7 +677,7 @@ class AnkiConnect: if 'Name' in card: cardName = card['Name'] - t = mm.newTemplate(anki.lang._(cardName)) + t = mm.newTemplate(cardName) cardCount += 1 t['qfmt'] = card['Front'] t['afmt'] = card['Back']