WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.59k stars 1.02k forks source link

Weblate built in translation memory don't work anymore #2158

Closed agaida closed 6 years ago

agaida commented 6 years ago

Steps to reproduce

  1. No clue

Actual behaviour

Services like Amagama, MyMemory, Glospe work fine - never get it to work with 3.0.1 - the Weblate built in don't work anymore,

Expected behaviour

I want my local machine translations back (important for having consistent translations) :) - and of course keep the external things running.

Server configuration and status

list_versions

 * Weblate 3.1.1
 * Python 3.5.3
 * Django 2.1
 * six 1.11.0
 * social-auth-core 1.7.0
 * social-auth-app-django 2.1.0
 * django-appconf 1.0.2
 * translate-toolkit 2.3.0
 * Whoosh 2.7.4
 * defusedxml 0.5.0
 * Git 2.11.0
 * Pillow 5.2.0
 * python-dateutil 2.7.3
 * lxml 4.2.4
 * django-crispy-forms 1.7.2
 * django_compressor 2.2
 * djangorestframework 3.8.2
 * user-agents 1.1.0
 * jellyfish 0.6.1
 * pytz 2018.5
 * pyuca 1.2
 * PyYAML 3.13
 * Mercurial 4.0
 * hub 2.4.0-10-g98f153f
 * Database backends: django.db.backends.postgresql_psycopg2
 * Cache backends: default:MemcachedCache, avatar:FileBasedCache
 * Platform: Linux 4.15.0-29-generic (x86_64)

and check --deploy

System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems. 

^^ should not be related.

It might be that it is related to my upgrade from 3.0.1 to 3.1.1 - which also means an upgrade of the whole virtual environment from python2.7 to pyhton3.5 - it's highly likely that i forget something.

nijel commented 6 years ago

What is your setting for MT_SERVICES? Note that this has been changed in the 3.0 release, so you might be still using old setting.

agaida commented 6 years ago
# List of machine translations
MT_SERVICES = (
     'weblate.machinery.weblatetm.WeblateTranslation',
     'weblate.memory.machine.WeblateMemory',
#     'weblate.machinery.apertium.ApertiumAPYTranslation',
#     'weblate.machinery.deepl.DeepLTranslation',
     'weblate.machinery.glosbe.GlosbeTranslation',
#     'weblate.machinery.google.GoogleTranslation',
#     'weblate.machinery.microsoft.MicrosoftCognitiveTranslation',
     'weblate.machinery.mymemory.MyMemoryTranslation',
     'weblate.machinery.tmserver.AmagamaTranslation',
#     'weblate.machinery.tmserver.TMServerTranslation',
#     'weblate.machinery.yandex.YandexTranslation',
#     'weblate.machinery.weblatetm.WeblateTranslation',
#     'weblate.machinery.saptranslationhub.SAPTranslationHub',
)

# Machine translation API keys

# URL of the Apertium APy server
MT_APERTIUM_APY = None

# DeepL API key
MT_DEEPL_KEY = None

# Microsoft Cognitive Services Translator API, register at
# https://portal.azure.com/
MT_MICROSOFT_COGNITIVE_KEY = None

# MyMemory identification email, see
# https://mymemory.translated.net/doc/spec.php
MT_MYMEMORY_EMAIL = 'weblate@lxqt.org'

# Optional MyMemory credentials to access private translation memory
MT_MYMEMORY_USER = None
MT_MYMEMORY_KEY = None

# Google API key for Google Translate API
MT_GOOGLE_KEY = None

# API key for Yandex Translate API
MT_YANDEX_KEY = None

# tmserver URL
MT_TMSERVER = 'https://amagama-live.translatehouse.org/'

# SAP Translation Hub
MT_SAP_BASE_URL = None
MT_SAP_SANDBOX_APIKEY = None
MT_SAP_USERNAME = None
MT_SAP_PASSWORD = None
MT_SAP_USE_MT = True

# Weblate limits
WEBLATE_LIMIT = 45

nijel commented 6 years ago

That looks correct. Maybe the index got into bad shape, can you try rebuilding it using: ./manage.py rebuild_index --all --clean?

agaida commented 6 years ago

Seems to work, you are my hero of the day :dark_sunglasses: