Add Translations 2.0 migrate script (#34261)

This commit is contained in:
Paulus Schoutsen
2020-04-15 13:53:52 -07:00
committed by GitHub
parent 9f1bffe3be
commit 72cc656b7e
4 changed files with 72 additions and 6 deletions

View File

@ -1,9 +1,8 @@
"""Find translation keys that are in Lokalise but no longer defined in source."""
import json
from .const import INTEGRATIONS_DIR, PROJECT_ID
from .lokalise import Lokalise
from .util import get_lokalise_token
from .const import INTEGRATIONS_DIR
from .lokalise import get_api
def find_extra(base, translations, path_prefix, missing_keys):
@ -50,7 +49,7 @@ def run():
print("No missing translations!")
return
lokalise = Lokalise(PROJECT_ID, get_lokalise_token())
lokalise = get_api()
to_delete = []