Commons:Translators' noticeboard/Archive/2024

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Autotranslate Lua module fails on template's copy

I want to copy the popular {{Welcome}} template, so I create {{Welcome-LL}} by copy-paste of the various base page.

Original Copy
{{Welcome}} {{Welcome-LL}}
{{Welcome/doc}} {{Welcome-LL/doc}}
{{Welcome/layout}} {{Welcome-LL/layout}}
{{Welcome/i18n/lang}} {{Welcome-LL/i18n/lang}} (edited)
{{Welcome/i18n}} {{Welcome-LL/i18n}} (edited)
{{Welcome/i18n/en}} [EDIT:](Fuzzybot generated) {{Welcome-LL/i18n/en}} (not copied to keep the place clean for FuzzyBot)

I get the error message below, can someone help ?

Code Result
{{Welcome-LL}} Lua error in Module:Autotranslate at line 67: No fallback page found for autotranslate (base=Template:Welcome-LL/i18n, lang=en).

[EDIT] I don't see where to declare the fall back `en` since {{Welcome/i18n/en}} is Fuzzybot generated, likely from /i18n which seems the actual source.

Another avenue would be : this template is too recent, just few 2 hours, so the autotranslation is not active and requires a translation admin to activate it ? (not sure it works this way)

Yug (talk) 15:31, 8 February 2024 (UTC)

Checking this out. Yug (talk) 16:21, 8 February 2024 (UTC)
Oh, not copied because seems to be Fuzzybot generated, it also contains duplication of the {templatename}/i18n page, which seems the actual source. Yug (talk) 16:23, 8 February 2024 (UTC)
According to Commons:Preparing a page for translation, it is needed to "Mark the page for translation (you must be translation admin for doing so)". Maybe it's that. Yug (talk) 17:34, 8 February 2024 (UTC)
@Yug: This simply meant that {{Welcome-LL/i18n}} was to be marked for translation. I have done it and the issue is fixed now. Do let me know if there is any other issue you need help with. Best regards, ─ Aafī (talk) 18:08, 8 February 2024 (UTC)
It works for translations. But translations if they are done actually duplicate messages of the initial template. Should not propagate this -LL file for translations now. -- Christian 🇫🇷 FR (talk) 18:35, 8 February 2024 (UTC)
I was unaware of this. Thank you.
This section was archived on a request by: ─ Aafī (talk) 18:12, 8 February 2024 (UTC)

Migrating Autotranslated templates to the Translate Extension

Years ago I have created a few templates with category descriptions applicable to a whole family of categories all following a common naming scheme, for example {{Category description/Nature by administrative division}} or {{Category description/Flora by administrative division and month}}. For this I used {{Autotranslate}} in the “old” form, with manually written language subpages and a /template subpage. Now I have two questions:

  1. Is it actually intended that such templates should use the Translate Extension?
  2. If yes, what's the best workflow for migrating them? I tried with {{Category description/Nature by administrative division}}: I merged the /template content into the /en subpage, which I afterwards moved to /i18n, then I moved the existing /de subpage to /i18n/de, and while I wait for the /i18n page to be marked for translation, I keep the /en and /de subpages as redirects so the existing main page still works with the old system. As soon as the page is marked for translation, I change the base parameter in the main page by appending /i18n and speedydelete the redirects. Correct?

Thank you -- Reinhard Müller (talk) 14:18, 13 March 2024 (UTC)

@Reinhard Müller:
  1. I think so.
  2. I usually do the same, except that I don’t bother marking the redirects for deletion (and that I don’t wait for the page to be marked for translation, as I’m a translation admin). However, this is not to say that they shouldn’t be deleted, maybe I’m just too lazy. 🙂 Also, depending on the complexity of the layout template, I usually keep it separate, although maybe I should always merge it. There’s only one thing that’s actually wrong in your workflow: you shouldn’t keep /en redirecting to /i18n because the <translate> tags aren’t processed when they appear through transclusion (try transcluding Template:Usertalkback/i18n directly, rather than using {{Autotranslate}}). To fix this, the /i18n/en subpage should be created manually and the /en subpage should be redirected there. (Or, after creating the /i18n/en subpage, just change the |base= parameter immediately rather than waiting for the page to be marked for translation.)
Tacsipacsi (talk) 11:38, 15 March 2024 (UTC)
@Tacsipacsi: Thank you very much for your help in this and your explanations! I think I'm ready to move on with the other templates, now. --Reinhard Müller (talk) 11:45, 15 March 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Reinhard Müller (talk) 11:46, 15 March 2024 (UTC)

Update translation for Template:Feist-collection-CC/i18n

Template:Feist-collection-CC/i18n needs a translation update. The string CC-BY-SA had to be more precise, and I amended it. Couldn’t this anyway changed into a variable? And/or couldn’t the translation string originally for {{Cc-by-sa-4.0}} be used which is {{int:wm-license-cc-by-sa-4.0-text}}? Speravir00:53, 26 March 2024 (UTC)

Update: The second part is not necessary, because the dedicated template is anyway added for files. Therefore I’ve striked out this sentence. — Speravir01:00, 26 March 2024 (UTC)
✓ DoneAafī (talk) 06:18, 26 March 2024 (UTC)
This section was archived on a request by: Speravir 00:30, 27 March 2024 (UTC)

Translation update, again

Please, mark these pages for translation:

But in both cases the string with the category tag should in my opinion be put into a variable. — Speravir00:06, 28 March 2024 (UTC)

✓ Done by Minorax and me. Phương Linh (talk) 12:07, 31 March 2024 (UTC)
Then thank you both, Minorax and Phương Linh! — Speravir18:25, 31 March 2024 (UTC)
This section was archived on a request by: --Speravir 18:25, 31 March 2024 (UTC)