Template talk:Autotranslate

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

Uhh[edit]

How does this work? ViperSnake151 (talk) 16:05, 11 December 2008 (UTC)[reply]

I updated the docs a little. Multichill (talk) 21:40, 11 December 2008 (UTC)[reply]

Category[edit]

Is it possible to alter the logic of {{#ifeq:{{NAMESPACE}} | Template | [[Category:Autotranslated templates|{{PAGENAME}}]]}} in a way, so only templates actually bearing the Autotranslate template directly get categorized? Look at Category:Autotranslated templates, there are lots of templates, who inherit the category from transcluded templates. That's not an intended behaviour, I guess... --Slomox (talk) 00:28, 10 January 2009 (UTC)[reply]

I noticed that too. Looks like using this template to automaticly add a category to templates which use this template is not going to work. Multichill (talk) 00:32, 10 January 2009 (UTC)[reply]
Wouldn't {{#ifeq: {{PAGENAME}} | {{{base|}}} | [[Category:Autotranslated templates|{{PAGENAME}}]]}} work? {{PAGENAME}} and {{{base|}}} should be the same only, if it's the actual template. Or am I making an error in my reasoning now? --Slomox (talk) 00:36, 10 January 2009 (UTC)[reply]
Or {{#ifeq: {{NAMESPACE}}:{{PAGENAME}} | Template:{{{base|}}} | [[Category:Autotranslated templates|{{PAGENAME}}]] }} to add extra security. --Slomox (talk) 00:39, 10 January 2009 (UTC)[reply]
Thats a good one! Maybe {{#ifeq: {{FULLPAGENAME}} | Template:{{{base|}}} | [[Category:Autotranslated templates|{{PAGENAME}}]]}} is even better. Had an edit conflict and it looks like you thought of the same. Multichill (talk) 00:41, 10 January 2009 (UTC)[reply]
Should we apply it to the template? --Slomox (talk) 00:59, 10 January 2009 (UTC)[reply]
✓ Done, Multichill (talk) 10:58, 10 January 2009 (UTC)[reply]

Template:Fallback[edit]

I created Template:Fallback. It returns the code of the first language in the fallback range of the user's preferred language for which a localization subpage exists. In other words: it does exactly the same as the code in this template. I put it in a template of its own, so that the logic is also available to pages that do not use autotranslate or do not use it directly. An example is Template:Assessments. For rtl languages we need to set the "direction" CSS code right at the start. So the template needs to know the right code that is used by the autotranslates that occur later in Template:Assessments.

We should use Template:Fallback here too. Any objections? --Slomox (talk) 11:45, 24 January 2009 (UTC)[reply]

And Template:Self needs it too. Self does not use autotranslate cause of the template loop issue. But 'als' for example could fallback to 'de' if we'd used Template:Fallback in Template:Self. --Slomox (talk) 11:49, 24 January 2009 (UTC)[reply]

/layout[edit]

Wouldn't it be easier to leave this formatting in the main template and simply switch out the text? Rocket000 (talk) 03:28, 25 March 2009 (UTC)[reply]

How would you do that? --Slomox (talk) 13:25, 25 March 2009 (UTC)[reply]
Like <template>formatting and images...text: {{template/{{int:Lang}}}} ..more non-translated template stuff...</template> Rocket000 (talk) 05:06, 29 March 2009 (UTC)[reply]
Ok, maybe that wasn't clear enough. See {{Local template category}} where I implemented a similar system. This was before we started using {{#int:}} to auto-translate. This template switches out the text based on the page it's on, but it could just as easily do it based on the users' interface language. It makes adding translations as easy as translating. :-) For example, Template:Local template category/description/en. Rocket000 (talk) 09:19, 4 April 2009 (UTC)[reply]

Keeping red links?[edit]

A fellow pt.wb user suggested on my talk page that we could, if we want to, get rid of the red links that are left after a file is deleted, by using something like

{{#ifexist:File:Title.ext|[[:File:Title.ext]]|File:Title.ext}}

The unlinked name could be still bolded or something to provide a visual help. I'm a bit hesitating, because sometimes the red link is good to follow, to easily check Special:Undelete, etc, but maybe that's just me? What do you think? Patrícia msg 20:17, 2 April 2009 (UTC)[reply]

This has more to do with {{Image source}} than with Autotranslate. Perhaps you better ask there. I personally have no problem with either solution --Slomox (talk) 20:47, 2 April 2009 (UTC)[reply]
You can hide red links completely with class="hidden-redlink", but why would you want to do that? Rocket000 (talk) 12:47, 3 April 2009 (UTC)[reply]

Translation info[edit]

Currently if the user's language is missing, Autotranslate just shows the template in the fallback language. Shouldn't it also show some sort of notice explaining how to translate it (or where to go to find others who can translate it)? It could be made quite easy to use with preload/editintro. --Tgr (talk) 22:12, 19 April 2009 (UTC)[reply]

I don't think that's a good idea. Most users are not interested in adding localisations. The info how to add translations is present on the main template page. --Slomox (talk) 23:24, 19 April 2009 (UTC)[reply]

Preparing for the license migration[edit]

Hello. As this template may be affected by the outcome of discussions here, I would like to invite anyone interested to join in. Kaldari (talk) 20:37, 26 May 2009 (UTC)[reply]

Does this work properly?[edit]

Does this not work properly, or is it just not being used correctly. eg {{autotranslate|1=test.jpg|base=speedywhat}}

generates a message with

Afrikaans | Deutsch | Ελληνικά | English | Español | Français | עברית | हिन्दी | Magyar | Bahasa Indonesia | Italiano | 日本語 | 한국어 | Nederlands | Polski | Português | Suomi | Svenska | +/−

Hello Autotranslate,

the following content you uploaded is not free and therefore has been or will soon be deleted:

test.jpg
.
.
.
Thanks for your contribution, and please do leave me a message if you have further questions.

But if I click on one of the language choices (eg English) on the resulting page, I get:

Afrikaans | Deutsch | Ελληνικά | English | Español | Français | עברית | हिन्दी | Magyar | Bahasa Indonesia | Italiano | 日本語 | 한국어 | Nederlands | Polski | Português | Suomi | Svenska | +/−

Hello Autotranslate,

the following content you uploaded is not free and therefore has been or will soon be deleted:

{{{1}}}
.
.
.
Thanks for your contribution, and please do leave me a message if you have further questions.
NOTE: Please do not use this template directly! This is just for translation. Use {{Speedywhat}} instead!

--Tony Wills (talk) 14:36, 6 July 2009 (UTC)[reply]

That's exactly the expected behaviour. I guess your problem is with the fact that it says "{{{1}}}" instead of "test.jpg"? That's cause Template:Speedywhat/lang links to the main template. It would also be possible to change the links in Template:Speedywhat/lang, so they reload the page with another language. Then the name of the file will show up correctly. But that would also change the interface. --Slomox (talk) 16:19, 6 July 2009 (UTC)[reply]
Of course I have a problem with it not passing on parameters, why would I not expect parameters in the translated version? And the error message on the last line, is an error message suggesting it shouldn't be called in this way :-). --Tony Wills (talk) 21:47, 6 July 2009 (UTC)[reply]
The message on the last line means, that you should never include {{Speedywhat/en}} on any page, but rather write {{Speedywhat}}, so the autotranslate mechanism can take place. In most cases the user will already see the template translated in the language he has specified in the preferences, so normally there is no need to explicitly click the link. If you want it behave different, replace the <!-- xx -->[[Template:Speedywhat/xx|{{#language:xx}}]]&nbsp;| links in Template:Speedywhat/lang with <!-- xx -->[{{fullurl:{{FULLPAGENAME}}|uselang=xx}} {{#language:xx}}]&nbsp;| links. --Slomox (talk) 22:57, 6 July 2009 (UTC)[reply]
I have no need to ever click on other languages, but was rather bemused by the result. Currently the template produces a nice useful output on the users page, but it looks rather bad when it misbehaves because someone chooses to click on another language! And I note that this rough behaviour happens in other similar translated templates. Assuming there is a need for the translation links, it would be nice to actually have this function look as though it was working properly. I am too inexperienced with editing templates to try changing this one. But if someone does have an approach that at least passes on parameters it would be nice :-) --Tony Wills (talk) 14:05, 7 July 2009 (UTC)[reply]

New utility template: {{viewsource}}[edit]

The current practice when creating an autotranslated template is to include a copy of the English language subpage wrapped in <pre> tags on the documentation page, to be used as a, well, template when creating new language subpages. These code samples seem to have an annoying habit of getting out of sync with the actual text of the template as it is updated, as people forget to update the documentation.

To address this problem, I came up with a clever little template named {{Viewsource}}, which can be used to transclude the source of a template directly onto a page. To see it in action, look at the documentation page for the template {{Cc-by-sa-1.0+}} (which I've just created). As an added bonus, it automatically adds some CSS to make any long lines in the source code wrap nicely (in recent browser versions, at least) instead of running off the side of the page.

The only problem is that this arrangement won't support the "|lang={{subst:SUBPAGENAME}}" trick currently used in most of the code examples, so the translator must remember to update the language code manually. Personally, I rather doubt that anyone who can correctly follow the generally rather obscure process of creating a new translation would have any trouble with this, but I suppose it could happen. Even so, I'd consider it a small price to pay for avoiding code duplication.

Anyway, what do you all think? Is the way I've done it good, or should I just stick to hardcoding the sample code on the documentation page? And should this new template be recommended for documentation subpages in general? —Ilmari Karonen (talk) 13:56, 21 July 2009 (UTC)[reply]

Using the template is definitely better than having outdated sourcecode on the documentation pages. It's hard enough to keep the translations up to date, we shouldn't accept anything that leads to translations which are outdated right from the start.
In {{TemplateBox}} I too tried to avoid the outdating problem, but took another approach (see e.g. {{PD-link}}). It creates an input box, that allows to go to the language subtemplate (it automatically fills in the language code of your preferred language in the input field, if that translation doesn't yet exist [if the translation into your preferred language already exists, you will instead find "LANGCODE" in the input field]) and preloads the English version in the edit window after clicking the button (and thus suffers from the same problem of a need to manually change the language code). --Slomox (talk) 19:29, 21 July 2009 (UTC)[reply]
That's a nice trick too, though my head nearly exploded when I tried to read the source code. I suppose the relevant part is this bit from Template:TemplateBox/layout?
<inputbox>
type=create
preload=Template:{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}/en
default=Template:{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}/{{#ifexist: Template:{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}/{{int:Lang}} | LANGCODE | {{int:Lang}} }}
</inputbox>
Ilmari Karonen (talk) 20:27, 21 July 2009 (UTC)[reply]
Yep. --Slomox (talk) 20:49, 21 July 2009 (UTC)[reply]

Subpages[edit]

I just noticed the template has a couple subpages. Do we need those? It looks like they were was grabbed from Mediawiki.org. Rocket000 (talk) 02:35, 6 August 2009 (UTC)[reply]

It seems, they are intended to do something quite similar to Template:Lang links, but they are unused. I guess, we don't need them. --Slomox (talk) 10:49, 6 August 2009 (UTC)[reply]
That documentation isn't too good either. If no Wikipedia in your language exists, do not add pages in that language to MediaWiki.org!. And we don't call our main pages Main Page/fr,Main Page/es,Main Page/ja... Rocket000 (talk) 20:17, 6 August 2009 (UTC)[reply]

named Parameters[edit]

I cannot seem to get this working with templates that use named parameters. --Dschwen (talk) 19:01, 24 September 2009 (UTC)[reply]

You have to pass over the named parameters to numbered parameters (like {{autotranslate|1= {{{namedparam1|}}} }}) and then you have to use the numbered parameters in the layout template. --Slomox (talk) 22:46, 24 September 2009 (UTC)[reply]

Template:Autotranslate doc[edit]

I'm thinking it would be useful to have a template {{Autotranslate doc}}. This would be a template which could be used on an autotranslated template to provide automatic basic documentation, and links to the relevant template subpages for easy editing. So for instance {{Djvu}} would contain <noinclude>{{Autotranslate doc}}</noinclude>. Ideally it would provide {{Documentation}}-style formatting, with maybe an optional parameter to suppress it, for use inside an actual documentation subpage. If I put enough effort in I can probably figure out how to do this, but I don't want to do that if someone else can do it easily, or if it's not thought a good idea. Rd232 (talk) 12:18, 11 June 2011 (UTC)[reply]

{{TemplateBox}} does this with |il8n-method=autotranslate, you know... :) Rd232 (talk) 14:44, 14 April 2012 (UTC)[reply]

Template loop problem[edit]

I found a lot of transcluded documentations of template display red warning words: "Template loop detected: Template:Autotranslate". For example, the transcluded documentation of Template:Edit shows the warning instead of the {{Documentation subpage}} and {{Heavily used template}} it should have shown. I remember they used to be fine without any warning. I suspect this edit caused the problem. Someone plz check it up. --Tomchen1989 (talk) 08:36, 20 September 2011 (UTC)[reply]

I fixed the loop at Template:Edit ( no idea what was the problem). I looked at random sample of about 25 templates using this template and they all seem fine. If there are more examples of the loops please list them one by one. --Jarekt (talk) 12:54, 21 September 2011 (UTC)[reply]
OK, I sort of realize that may very possibly be a problem of {{Documentation}}. I did the same thing as you - simply removed the buggy templates for {{MIT}} and {{Recent}}. Now I revert to the version before I "fixed" it, making them examples during we solve the problem. I'll post another request at Template talk:Documentation. --Tomchen1989 (talk) 14:39, 21 September 2011 (UTC)[reply]

I'm having a template loop problem at User:Alx 91/license and cannot figure it out. I think it might be because the user's license contains an autotranslated license itself (the CC one), but I am not positive. Any ideas? Logan Talk Contributions 04:18, 18 January 2012 (UTC)[reply]

Logan, although I like debugging this kind of issues I see maintenance of licenses like User:Alx 91/license as counterproductive waste of time. We have almost 2 million users and we can not be maintaining their personalized license templates. I also believe that all images should directly include one of the standard licenses instead of the unnecessary several layers of indirections: User:Alx 91/license -> User:Alx 91/license/en -> User:Alx 91/license/layout -> actual license. With a chain like that it is too easy to change an image license without leaving any mark in file history. I think the proper fix would be to add {{self|GFDL|cc-by-sa-2.5}} directly to all the files using User:Alx 91/license and keep User:Alx 91/license as a personal message. --Jarekt (talk) 13:39, 18 January 2012 (UTC)[reply]

Parameter count[edit]

{{Editprotect}} 9 parameters are too restrictive. Please extend it more to perhaps 12 or 15. -- とある白い猫 ちぃ? 14:16, 14 April 2012 (UTC)

That looks easy enough (just edit the main template, no other pages to worry about) - but it's such a fundamental template, I'm not about to do it without someone confirming! :) Rd232 (talk) 14:47, 14 April 2012 (UTC)[reply]
That is fine. Templates code currently is
{{{{{base|}}}/{{Fallback|{{{base|}}}|{{{lang|{{int:Lang}} }}} }}|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}}}{{#ifeq: {{FULLPAGENAME}} | Template:{{{base|}}} | [[Category:Autotranslated templates|{{PAGENAME}}]]}}
It would be something like
{{{{{base|}}}/{{Fallback|{{{base|}}}|{{{lang|{{int:Lang}} }}} }}|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}|10={{{10|}}}|11={{{11|}}}|12={{{12|}}}|13={{{13|}}}|14={{{14|}}}|15={{{15|}}}}}{{#ifeq: {{FULLPAGENAME}} | Template:{{{base|}}} | [[Category:Autotranslated templates|{{PAGENAME}}]]}}
-- とある白い猫 ちぃ? 17:40, 14 April 2012 (UTC)

Will this increase one of the following values? If so, how much and which ones?

Preprocessor node count: 1948/1000000
Post-expand include size: 34818/2048000 bytes
Template argument size: 4423/2048000 bytes
Highest expansion depth: 27/40
Expensive parser function count: 1/500

-- RE rillke questions? 16:37, 23 June 2012 (UTC)[reply]

✓ Done, I added extra parameters so now we have 15. Rillke, What are those numbers? Where did you looked them up? --Jarekt (talk) 20:29, 23 June 2012 (UTC)[reply]
They are delivered in a HTML comment of each page. If they are exceeded the parser stops working and puts out plain (HTML encoded) wikitext. On Multichills talk page it looks like this:
NewPP limit report
Preprocessor node count: 42575/1000000
Post-expand include size: 2047999/2048000 bytes
Template argument size: 397342/2048000 bytes
Highest expansion depth: 15/40
Expensive parser function count: 205/500
-- RE rillke questions? 09:13, 25 June 2012 (UTC)[reply]
Thanks I found it. Even found some explanation at en:Wikipedia:Template_limits. Learn something every day. --Jarekt (talk) 12:47, 25 June 2012 (UTC)[reply]

Does autotranslation only work in Template-namespace?[edit]

After having run out of options (or imagination) in trying to figure out, if I can apply autotranslation to "my own" template User:Heb/PRW-DK, I have deadpanned into a wall. Either I'm doing something wrong (which is certainly a possibility), or the autotranslation function simply only works in the Template-namespace. I have how-ever not found anything definite confirming the latter (looking at source, documentation and usage of this template), so now I'm asking here, before going any further on trying to figure out if I have done something wrong :) Is there anyone who can answer my question? In kind regards, Henrik/heb [T C E] 08:41, 10 October 2012 (UTC)[reply]

I don't know why it would be limited to Template namespace, but I can't say definitively that it isn't. But one solution for your case would be to make it more general (just remove link to your username) and move it to Template namespace and put it in Category:Non-copyright restriction templates. It seems generally useful for Danish personality rights cases after all. And if the autotranslate starts working then, you have your answer... Rd232 (talk) 08:52, 10 October 2012 (UTC)[reply]
It seems to be the case. I have made {{Denmark no consent}} in the same manner, and it appears to work fine... Good to know I suppose :). In kind regards, heb [T C E] 12:40, 10 October 2012 (UTC)[reply]

Bulky[edit]

This template is not compact and is bulky. In my view, just a couple lines with the useful links makes the template more useable, so I can read up on my user talk page and locate the useful links quickly. --Gryllida (talk) 13:05, 16 October 2012 (UTC)[reply]

Removing the blank line at the top[edit]

Hello,

Would it be possible to remove the blank line at the top of the template? Yann (talk) 07:45, 10 November 2012 (UTC)[reply]

I do not see one in the code --Jarekt (talk) 18:23, 10 November 2012 (UTC)[reply]
Are you talking about spaces in mesages like those from Nikbot? -> see User talk:Simleuanfor examples. --Denniss (talk) 21:29, 10 November 2012 (UTC)[reply]

Lua version[edit]

Can I replace this template with the Lua version in {{Autotranslate/sandbox}}. It seems that the new versin is a bit slower, apprently because "ifexist" is not supported in Lua, so it has to be back converted into Wikitext. But that it is not dramatic and should be amply offset by the introduction of other Lua modules. It also checks if there is a "/default" version after the language in the fallback chain, so that we have "de-at" -> "de" -> "default" -> "en". This is because the "autotranslate" function of Module:Fallback uses the same code as langSwitch but if that is a problem, I can restrict the "default" to langSwitch. Imo, the main point of the new module would be to get rid of {{GetFallback}} / {{GetFallback2}} in favour of the single list in Module:Fallbacklist. --Zolo (talk) 10:26, 24 November 2013 (UTC)[reply]

 Support --Jarekt (talk) 21:32, 24 November 2013 (UTC)[reply]
Done, as I will be able to watch Commons today if it needs to be reverted I have tweaked the template a little, and it is now slightly faster that the previous Wiki-markup version. The only layout change I see is that, without parameters {{Speedydelete}} now show "The given reason is: {{{1}}} whiel it used to show: "The given reason is: ". But as far as I can see the current output is what one would expect from {{Speedydelete/en}}, so that seems more like a bugfix than like a bug. --Zolo (talk) 09:16, 25 November 2013 (UTC)[reply]
No, that was actually a bug, should be fixed now (thanks to user:Herzi Pinki). Thoe code has also been streamined and made more efficient (thanks to user:Rillke). --Zolo (talk) 10:07, 25 November 2013 (UTC)[reply]

@Zolo, Jarekt, and Rillke: Lua eliminates the need for passing numbered parameters directly to Module:Fallback: shouldn't it load them automagically with frame:getParent().args? This could also allow templates invoking {{Autotranslate}} with no arguments. --Ricordisamoa 01:49, 10 January 2014 (UTC) @Zolo, Jarekt, and Rillke:  ? --Ricordisamoa 14:56, 14 February 2014 (UTC)[reply]

I know we can use frame:getParent().args to pass parameters without actually listing them. However, I do not like this functionality: It makes code much shorter but less clear. In many cases I do like to see all the parameters that are passed to a Lua function. --Jarekt (talk) 15:17, 14 February 2014 (UTC)[reply]
This is what {{Autolang}} (needs code cleanup) does. -- Rillke(q?) 18:32, 14 February 2014 (UTC)[reply]

Why Russian?[edit]

I cannot understand why few messages on my talk page started to appear in Russian? My user languages are English, Ukrainian. Is that joke to commemorate Euromaidan? Mykola Swarnyk (talk) 16:47, 26 November 2013 (UTC)[reply]

I think what is happening is that per File:MediaWiki fallback chains.svg and Module:Fallbacklist messages that should be in Ukrainian are now first looking for Russian version before fallbacking on English. So if your chosen language is Ukrainian than that is what is going to happen. I guess the assumption is that more Ukrainians will also know Russian than English. --Jarekt (talk) 17:34, 26 November 2013 (UTC)[reply]
Isn't this MediaWiki default? I apologize if this somehow violates your feelings and suggest commenting at bugzilla:11267 and bugzilla:57571 or creating a new bug if uk->ru is completely undesired by the majority of the Ukraine community. Thank you. -- Rillke(q?) 17:46, 26 November 2013 (UTC)[reply]
There is another solution: translate all those messages to Ukrainian, so fallback options are never used. We can help with figuring out where they all are. --Jarekt (talk) 18:07, 26 November 2013 (UTC)[reply]
OK, I am ready to help as much as I can, but wouldn't it be easier to leave already translated messages as they were - ie in Ukrainian, and translate only those which are missing Ukrainian translation? For example, message from «Wiki Loves Monuments 2012» was in Ukrainian and it suddenly turned Russian. It should be reverted technically, not by hand. There is no sense to sit and translate it again and again into Ukrainian. Some other messages are still only in English - fine, lets translate them. I am offended by refusing somebodies work because "all of them are Soviet". That is NOT true. Mykola Swarnyk (talk) 02:02, 27 November 2013 (UTC)[reply]
If it was in Ukrainian and you preferred language setting is Ukrainian than it should have stayed in Ukrainian. Otherwise there is something wrong with our recent changes. I will try to pin point it. "Only in English messages" indicate that they are missing Russian translations. --Jarekt (talk) 03:51, 27 November 2013 (UTC)[reply]
OK I went to your talk page, set language for the page to "uk" and went to Wiki Loves Monuments 2012 article and the text is the same as in {{WLM 2013 thank you/uk}} and there is no Russian version. --Jarekt (talk) 04:08, 27 November 2013 (UTC)[reply]
Thank you Jarek for your attention. On my talk page (as I see it) only 1st (greeting) and last (WLM 13) are in Ukrainian, other 8 talks are in Russian, and one in English. If you have any idea what I have to do, please help. Otherwise maybe I have just to sit back and wait :-) Mykola Swarnyk (talk) 04:41, 27 November 2013 (UTC)[reply]
Most messages in your talk page are {{Image source}}. If you look at the list of languages for at the top of the message, you can see that there is no Ukrainian. So you have to create Template:Image source/uk, on the same model as Template:Image source/en. --Zolo (talk) 08:15, 27 November 2013 (UTC)[reply]

How do you collapse this template by default[edit]

From the documentation I can not figure out how to collapse the languages section of the template table.

Please see this discussion, and these templates:

The feeling by some, myself included, is that the templates can clutter up the top of category pages at times. Collapsing the languages section would help tremendously in lessening the clutter.

A simple "show/hide" link (or expand/collapse) would make those languages available to those who want them. --Timeshifter (talk) 15:22, 15 July 2014 (UTC)[reply]

It took me a while to figure out what do you mean by "collapse the languages section of the template table" and I am still not 100% sure. I think you would like to collapse Template:Categorise/lang, Template:CatDiffuse/lang and similar templates. If that's what you are asking for, than I am still confused, since that languages section does not have anything to do with {{Autotranslate}}, since it is added inside Template:Categorise/layout, Template:CatDiffuse/layout, etc. Few years ago I removed those language links from most most-used templates since as far as I can tell they do not work: if I am logged in and click on them language does not change, if I am not logged in the links work, but I also have handy language choice drop-down menu that also works. I think we should remove the section from the rest of the templates. --Jarekt (talk) 18:07, 15 July 2014 (UTC)[reply]
See mw:Manual:Collapsible elements. Template:Categorise is only a couple of lines long for the actual info. But there are many more lines of language links. I want to collapse those language links. Same for Template:CatDiffuse. I have no idea how the parts are put together. I can not figure out where the actual text of the template is found nowadays. Where is "base"?:
  • {{Autotranslate|base=CatDiffuse}}
  • {{Autotranslate|1={{{1|}}}|base=Categorise}}
As for whether the language links should be removed altogether that is for others to decide. I haven't studied the issue. --Timeshifter (talk) 19:51, 16 July 2014 (UTC)[reply]
I just removed those language links, as I said they do not work for logged in users and not logged in users have other ways of choosing the language. Collapsing is a little problematic since if someone does not understand a word page is saying than he/she will be unlikely to figure out a way to uncollapse the template to spot the name of the language in his/her language. --Jarekt (talk) 20:18, 16 July 2014 (UTC)[reply]
Thanks! I logged out to see what you were talking about. I saw the language menu in the sidebar. Maybe you can remove the language links on all templates. Since you are an admin people are less likely to interfere, since they may believe that you know what you are doing. :)
I see now that I may have started this discussion in the wrong place since it looks like you removed {{categorise/lang}} from the layout subpages in order to remove the language links. See diff. --Timeshifter (talk) 23:28, 16 July 2014 (UTC)[reply]
I am all for removing them from all the templates: I removed them at some point from several dozen most used ones but not all. I will be traveling next week and will probably not get to do it before then. And yes those templates have nothing to do with {{Autotranslate}}, that was why it was hard to figure out what were you asking about. --Jarekt (talk) 03:04, 17 July 2014 (UTC)[reply]
So Template:Autotranslate does translation of templates for logged in users. It still uses the /lang subpages like {{categorise/lang}}, I assume. But now there is no need to transclude that subpage directly into the template as in the past. Category:Language link templates lists those /lang subpages. I assume all those subpages are used by templates such as Template:Autotranslate, but are no longer transcluded as long lists of links to the bottom of templates. --Timeshifter (talk) 18:50, 17 July 2014 (UTC)[reply]
Template:Autotranslate does translation of templates for all users, by picking language subtemplates like {{CatDiffuse/en}} or {{CatDiffuse/de}}. Template:Autotranslate only looks for language subtemplates and does not know anything about /lang or /layout templates. However in the past the language subtemplate like {{CatDiffuse/en}} would call {{CatDiffuse/layout}} which in turn would call {{CatDiffuse/lang}}. There is some unusual treatment of /lang by some javascript (?) that prevents you from following the links for logged in users that click them. --Jarekt (talk) 11:44, 18 July 2014 (UTC)[reply]

(unindent). Thanks for all the info. I just looked for and found a subpage link in the tools section of the template sidebar. Special:PrefixIndex/Template:Categorise pulls up all those language versions. So is there any reason to keep /lang language-link compilation templates, or this category?: Category:Language link templates. --Timeshifter (talk) 17:43, 18 July 2014 (UTC)[reply]

I do not think there is any, but there might be some benefit I do not see. Also removing language links would require carefully altering ~ 1,673 layout templates, waiting for a month or two, verifying that the language templates are not used by any pages and deleting them. --Jarekt (talk) 19:00, 18 July 2014 (UTC)[reply]

Template is not expanded[edit]

Hello all, looking at the bottom of User talk:Armineaghayan there seems something wrong with the template. It is not expanded. Since i do not know the mechanism it is done, i ask someone to fix it. --Arnd (talk) 10:57, 27 April 2016 (UTC)[reply]

The template include size is exceeded. --Steinsplitter (talk) 11:18, 27 April 2016 (UTC)[reply]
Arnd As you can see the page is in Category:Pages where template include size is exceeded. --Jarekt (talk) 13:29, 27 April 2016 (UTC)[reply]
Thanks, ok. --Arnd (talk) 13:35, 27 April 2016 (UTC)[reply]

Are the Translations of the WTF-Public License legal? As far as I know there are no "offical translations". Plus, the license says "Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed." therefore the translations can't be called "WTFPL". Œ̷͠²ð·¨´´̢́̕͘³͏¯̞̗ (talk) 14:24, 11 July 2017 (UTC)[reply]

As far as I can see, the template doesn't have any translations of the licence text itself, but just of the summary in {{WTFPL/en}}. The only part of that summary that comes from the licence is the phrase "do what the fuck you want to", which I think is below the threshold of originality. --bjh21 (talk) 16:14, 19 September 2017 (UTC)[reply]

please warn users to avoid OTRS and use free licenses at their website[edit]

about this:

{{Autotranslate|1=File:Marcin Szczygielski.jpg|base=Copyvionote}}


No organization is able to have productive and fast OTRS queue.

I find that ways to avoid OTRS are more important than Wikimedia contacts.

Accepting CC license at websites can be done as community (everyone sees everything) for most cases.

I see that translations are outdated here :-( d1g 17:58, 16 October 2017 (UTC)

Rewrite[edit]

I did a rewrite of Module:Fallback inspired by this requested by User talk:Sarang and desire to use {{Autotranslate}} in more cases. Please report any issues here. --Jarekt (talk) 15:03, 22 May 2018 (UTC)[reply]

@Jarekt: Maybe passing the template name directly in this template (i.e. {{#invoke:Autotranslate|autotranslate|base={{{base|}}} }}) could prevent the false template loop detections (except for when a translatable template directly or indirectly transcludes itself) and thus eliminate—or at least significantly reduce—the need for the /clone templates. —Tacsipacsi (talk) 11:58, 19 October 2019 (UTC)[reply]
We could try it, but I do not understand why would it help. The difference between {{#invoke:Autotranslate|autotranslate|base={{{base|}}} }} and {{#invoke:Autotranslate|autotranslate}} is only that arguments will come from frame:getParent().args instead of frame.args. The rest of the template will be the same. --Jarekt (talk) 03:40, 20 October 2019 (UTC)[reply]
On the Lua side (parameter processing), it should have no effect. However, I think the problem is that the code responsible for the template loop detection doesn’t understand how Scribunto works, just sees that the wiki code calling the module is the same—this is the only reason I can imagine which could make the Scribunto loop check wrong, while it works perfectly for wikitext-only templates. (It works, doesn’t it?) —Tacsipacsi (talk) 21:14, 20 October 2019 (UTC)[reply]
I tried it in /clone_3, but it didn’t seem to work. Now I have really no idea what’s going on. :( —Tacsipacsi (talk) 16:05, 7 March 2020 (UTC)[reply]

Parameter is lost on language change[edit]

Template:CDC-PHIL has an #if in its code to add an extra text when |id= is informed. {{CDC-PHIL|id=10046}} works fine and displays the English message correctly. But when I change the language to MK or SL, it loses the id. Conversely, {{CDC-PHIL/mk|id=10046}} displays correctly the Macedonian text, but when I select English in the menu list the id part also disappears. Any idea on what may be wrong? —capmo (talk) 04:12, 20 June 2020 (UTC)[reply]

PS: Tested in Opera and Firefox with same results, so it's probably not a browser-related issue.

@Capmo: The ID needs to be passed to the layout template, which has to use {{LayoutTemplateArgs}}, otherwise the language switcher has no idea what the ID was (if it’s present only within the running text, it can’t extract it, only when provided in a machine-readable manner). —Tacsipacsi (talk) 00:37, 22 June 2020 (UTC)[reply]
Thank you for the info! I'll try to fix the template. —capmo (talk) 00:45, 22 June 2020 (UTC)[reply]
@Capmo: This template has already been fixed by me—the above diff links are the steps how I fixed it. —Tacsipacsi (talk) 00:50, 22 June 2020 (UTC)[reply]
Oh, I hadn't noticed the diffs. Thanks for taking the time! I'm having a look at the changes to understand how it all works. —capmo (talk) 01:52, 22 June 2020 (UTC)[reply]

This does not work on my user talk page[edit]

Click my sig and see how it fails on my talk page. Any idea why? --Piotr Konieczny aka Prokonsul Piotrus Talk 08:57, 26 October 2021 (UTC)[reply]

It’s too large, you should archive. See Category:User talk pages where template include size is exceeded at the bottom. By the way, not only {{Autotranslate}} doesn’t work, {{int:Talkpagelinktext}}s in signatures are also red links. —Tacsipacsi (talk) 17:56, 26 October 2021 (UTC)[reply]
That is counterintuitive, you cant expect people who do not know/care to categorize their uploads, to bother archiving their talk page, nor should it be expected that others editors do it for them. Until the Mediawiki software can archive automatically, a fix would be prefered... --Anders (talk) 07:50, 22 September 2023 (UTC)[reply]
The fix is archiving talk pages. These limits are in place to protect sites against (intentional or unintentional) denial-of-service attacks, so they cannot be removed for security reasons. There may (or may not) be room for optimization, but any optimization can only slightly increase the talk page size at which things break, it can’t avoid breakage on huge talk pages. —Tacsipacsi (talk) 09:25, 24 September 2023 (UTC)[reply]