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

Wagtail-localize only syncs to the translated pages, sometimes. #823

Open
bonegenetics opened this issue Sep 3, 2024 · 2 comments
Open

Comments

@bonegenetics
Copy link

bonegenetics commented Sep 3, 2024

Hello,
I’m using Wagtail localize and having an issue getting the translated pages (in French) to sync to changes in the original language (English). It synced once in the beginning, but after that, I am unable to get the synchronization to go into the French page. Is there a reason why the synchronization won’t work after the initial translation? I noticed the “Translate with Dummy translator” button is greyed out in the destination page, and none of the new text I entered in the English page appears in the destination (French) page, after I save the draft and hit the “sync translated pages” button. It seems the target page did not detect the changes in the original language, even after the "sync translated pages" was pressed. Any idea on how to debug this or what’s happening would be greatly appreciated.I’m not sure if this is normal behavior. Below are relevant sections of my settings (base.py) file:

INSTALLED_APPS = [
   "home",
   "search",
   "blog",
   "wagtail_localize",
   "wagtail_localize.locales",
MIDDLEWARE = [
   "django.contrib.sessions.middleware.SessionMiddleware",
   "django.middleware.common.CommonMiddleware",
   "django.middleware.csrf.CsrfViewMiddleware",
   "django.contrib.auth.middleware.AuthenticationMiddleware",
   "django.contrib.messages.middleware.MessageMiddleware",
   "django.middleware.clickjacking.XFrameOptionsMiddleware",
   "django.middleware.security.SecurityMiddleware",
   "django.middleware.locale.LocaleMiddleware",
   "wagtail.contrib.redirects.middleware.RedirectMiddleware",
]
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
USE_I18N = True
# pvwagtail: Enable Wagtail i18n
WAGTAIL_I18N_ENABLED = True
WAGTAIL_CONTENT_LANGUAGES = LANGUAGES = [
   ("en", "English"),
   ("fr", "French"),
]
WAGTAILLOCALIZE_MACHINE_TRANSLATOR = {
   "CLASS": "wagtail_localize.machine_translators.dummy.DummyTranslator",
}

I'm a newbie with Wagtail... using Django 5.0.8, Python 3.11.9, Wagtail 6.2.1, Wagtail localize 1.9.1

@zerolab
Copy link
Collaborator

zerolab commented Oct 9, 2024

@bonegenetics does this happen with all pages? just one? Are you able to replicate this consistently, and if so can you share a screen recording of the whole process (from new page in source language, to when the issue arises)?

Also, the DummyTranslator class is very much for testing purposes so you can remove the setting

@alexboots
Copy link

alexboots commented Nov 15, 2024

after I save the draft and hit the “sync translated pages” button

The sync translation button syncs to the latest published page, not the latest draft page.

So if you publish and then hit sync, the translation will update. I was also confused by this behaviour :) I think it'd be good to sync up to the latest revision instead of the latest published change.

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

3 participants