Help talk:Extension:Translate

From MediaWiki.org
Jump to: navigation, search
Start a new discussion

Contents

Thread titleRepliesLast modified
Update untranslatable content in translated pages307:38, 23 April 2015
Can't mark translations as reviewed116:38, 16 December 2014
[RESOLVED] <languages /> box styling209:48, 7 October 2014
Error Report121:05, 16 August 2014
mapping translated page names122:52, 16 July 2014
Required rights for "Special:PageTranslationDeletePage"311:55, 11 June 2014
mass-mark for translation511:36, 12 April 2014
Can't find outdated text016:57, 25 March 2014
Special page Special:SupportedLanguages php error822:13, 3 March 2014
Link from translation pages to other pages in same page content language021:03, 26 February 2014
Outdated/Fuzzy209:56, 18 February 2014
See Help talk:Extension:Translate/Page translation administration014:46, 24 January 2014
Translate Linktext of a Wikilink transcluded from a template209:27, 12 December 2013
Possibility to chose the language to translate from604:10, 24 May 2013
Mistype with image caption122:08, 8 November 2012
Redirections121:57, 14 September 2012
Admin?201:23, 30 August 2012
Why is it only one way?206:02, 29 August 2012
Already has translations513:13, 16 February 2012

Update untranslatable content in translated pages

Hello, I have translatable and untranslatable content (like weblinks) on a page. When I alter/delete the untranslatable content on the page, it still shows up in the translated pages. Is there a way to update this information? I do not see the link for marking the page anew, tried "runJobs.php" and "refreshLinks.php" with no effect. What could I do?

Example source page:

  • Content – Untranslatable content - Content

Shows in translated page (DE):

  • Inhalt – Untranslatable content – Inhalt

When I now delete "Untranslatable content" in the source page, it still shows up in the translated pages. Source page:

  • Content – Content

Translated page:

  • Inhalt - Untranslatable content - Inhalt
Zabien (talk)22:03, 15 April 2015

Thanks for using Translate. The expected behavior is that the translation pages are updated soon after the source page is marked for translation. If you do not see the link to re-mark for the page, please check that 1) you have the correct permissions on the user account you are using 2) that the source page is mark-up is valid, most importantly the translate tags should be balanced and not nested at any point. Also check Special:PageTranslation whether the page is listed there and whether you find the link to re-mark the page there.

Nikerabbit (talk)06:31, 16 April 2015

Thank you for that hint. At Special:PageTranslation I find those pages under "Broken pages": "Older versions of these pages are marked for translation, but the latest versions cannot be marked for translation." That's news to me!

When I remove a page there with "Remove from translation" and look into the source code, everything seems normal, the tags are there. The "mark for translation link" won't show up, though, so I cannot mark it for translation again. Here is the code from the page after removing from translation (The languages bar is included via template). Why are the pages invalid after only deleting a single non-translatable content line? And how can I make this work?

Zabien (talk)20:13, 22 April 2015

http://tangowiki.org/wiki/Lyrics:Adoraci%C3%B3n was removed from translation and is not listed at all on http://tangowiki.org/wiki/Special:PageTranslation

It's not corrupted, you simply have to edit it (e.g. change a space) so that Translate "sees" it again. Then you can mark for translation, I think.

As for other pages, I'm not sure why an edit like [1] would corrupt the page, but it may be something very simple. Try adding a newline after a closing translate tag or before an opening one and see if it changes something.

Nemo07:38, 23 April 2015
 
 
 

Can't mark translations as reviewed

This is a bit strange. I can translate and modified existing translations, but I can't mark translations as reviewed because it says that my session is closed. But it isn't. Proof ot this is that my translations in the same browser, in the same session, at the same time are saved with my username. I tried closing and opening again my session, but it didn't work. I tried Chromium, Chrome and Iceweasel (Firefox in Debian).

I can't say exactly when this started happennig. Maybe a week or two. Before that, I had no trouble.

Let me know if more information is needed.

Update: I didn't specified the site: it's right here in www.mediawiki.org. I have no trouble in meta (see today log)

Update 2: This also happend to me in translatewiki.net. Could it be the translate extension version?

Update 3: It's already been MediaWiki:Tux-session-expired_shown_when_Reviewing_a_message_44515 reported in translatewiki.net by other users.

Macofe (talk)21:37, 15 December 2014

A backported fix should be deployed here very soon now.

Nikerabbit (talk)16:38, 16 December 2014
 

[RESOLVED] <languages /> box styling

Hello, how can I change the look (and content) of the language box that appears when inserting <languages />? I haven't found anything in documentation about how to access this box and how to style it. It appears and it is working, I'd only like to style it to fit the content. Are there any CSS classes related to it?

Zabien (talk)08:44, 7 October 2014

It does have plenty of CSS classes you can use to provide different styling for it. There is no documentation for it so the best way is to look at the source code of a rendered box.

You might be interested that there are plans to change completely how the box is displayed: https://gerrit.wikimedia.org/r/#/c/149585/

Nikerabbit (talk)09:04, 7 October 2014

This helps, indeed! Thank you! I'll keep track of that!

Zabien (talk)09:47, 7 October 2014
 
 

Error Report

When I try to translate [1],it will report an error when I try to include an "external link" with this: [https:// secure.wikidc.org/wm/schols/ THE_TRANSLATION]. It's that really an error or just because it can't call out the CAPTCHA verification?

ZumarX06:57, 5 February 2012

bugzilla:34182: the workaround is to edit the page directly (right click the link that opens the translation editor and open it in new tab or copy the link address.

Nikerabbit08:53, 5 February 2012
 

mapping translated page names

Hi,

I'd like to know if there is a way (without using ad redirect) to map a traslated page in a page with a translated name. To be more clear, let say I have the Materials page in English. I can translate it in Italian having the Materials/it page. But I'd like to have instead the "Materiali" page (because "Materiali" is the Italian translation of Materials.

I see that Main page is translated in Pagina principale, but I cannot find a way to plain translate the page name mapping it to the translated page.

151.40.214.2322:24, 16 July 2014

Sorry, I don't understand what you mean by "map" and "have" here. The "map" is done by translating the page title in Special:Translate; after that you have a page whose display title is "Materiali".

If you mean that you would like the page to actually reside at the title Materiali, that's not possible because the translations should then be unique across all languages. If you mean that you want to link it, same problem, and you should use Special:MyLanguage anyway.

Nemo22:52, 16 July 2014
 

Required rights for "Special:PageTranslationDeletePage"

Looking through the documentation, it doesn't seem to explain what rights are required to access the page Special:PageTranslationDeletePage. Is it just the translation administrator right (as used locally through WMF wikis) or is it that right in combination with another right? If it is a combination (which I believe that may be), then it would be useful for the error message to say which rights are required (in combination), rather than the right that is missing. I would also note that Special:SpecialPages does seem to note this deletion page, nor can I find ready reference to its actions either. It would be great if those more knowledgeable would be able to remedy this situation. Thanks.

billinghurst sDrewth06:11, 11 June 2014

Works for me on Meta (where I'm translation admin):

You do not have permission to delete this page, for the following reason:
The action you have requested is limited to users in the group: Administrators.

But yes, permissions could be checked earlier. I expanded docs a bit.[1]

And yes, it's one of many unlisted special pages.

Nemo07:50, 11 June 2014

I have specifically mentioned the special page, otherwise it sits mute, and not findable by use of search, which I consider less than desirable.

billinghurst sDrewth11:49, 11 June 2014
 

Submitted bugzilla:66472 for listing the extension page on Special:SpecialPages

billinghurst sDrewth11:55, 11 June 2014
 
 

mass-mark for translation

Can I somehow mark many pages at once for translation?

I tried exporting them to xml, adding translate Tags to the text and importing again. But Translate didn't even notice the translate tags; only after manually editing the page does the "mark for translation" option appear. Is there a a recommended way to do this?

Stm76 (talk)22:26, 10 April 2014

XML import is still the fastest; we have added about 300 translatable pages in Meta-Wiki in that way, in a couple days. The only alternative I know of is being worked on at Extension:Translate/Mass migration tools.

Nemo07:12, 11 April 2014

... meaning that you imported them and then marked them for translation manually? Or was there some other kind of trick involved?

Stm76 (talk)18:34, 11 April 2014

Yes, dummy edited and marked manually. It's four clicks and a keystroke for each page and all of them very repetitive, I estimate 30 seconds per page. :)

Nemo09:24, 12 April 2014
 
 

A bot can be used to null-edit all pages and then to mark them for translation.

Ricordisamoa09:23, 12 April 2014

Last time I tried, null edit was not enough.

Nemo11:36, 12 April 2014
 
 

Can't find outdated text

I was asked to help with translation of Commons:Commons:Senate of Poland. Everything went well except that once everything was translated the polish and french pages claims to be 89% translated instead of 100%. See [1]. It seems like something is 11% outdated but I can not find what and how to fix it. Also there is a problem with categorization. On Commons we never categorize language subtemplates, but this extension seems to do it, see Commons:Category:Wikimedia Polska is there a way to fix it, or is this something I should file a bug report about?

Jarekt (talk)16:57, 25 March 2014

Special page Special:SupportedLanguages php error

Hi

I'm scratching my head on this php error being thrown on Special:SupportedLanguages. The page works fine on my local. Using the same extension configurations setup on production server. MW 1.21.5, latest same language bundle on local and production server.

Warning: array_merge() expects at least 1 parameter, 0 given in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 96

Warning: array_keys() expects parameter 1 to be array, null given in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 96

Warning: Invalid argument supplied for foreach() in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 364

Notice: Undefined variable: keys in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 368

Catchable fatal error: Argument 1 passed to SqlBagOStuff::getMulti() must be of the type array, null given, called in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 368 and defined in /home/server/public_html/includes/objectcache/SqlBagOStuff.php on line 212

A hint at what to look at or for greatly appreciated. Obviously I have something different, but what? Running same exact extensions on both local and production server. Everything else is working great. Thanks!

Hutchy68 (talk)04:45, 26 February 2014

There is condition just before line 96 in the code, so I don't know.

Nikerabbit (talk)07:53, 26 February 2014

Yes, pulling in user information. RC's from looking at the code? User contribs? I wonder if I rebuild the RC table if that would fix it? I did do a rebuildall when I upgraded after I ran update.php. Thoughts? Thanks

Hutchy68 (talk)17:16, 26 February 2014
 

Hi Nikerabbit, still no joy, the page still has a fatal error. I rebuilt RC's, checked the User table, still failing array_merge and array_keys. Debugging log turned on and it shows nothing for this Special Page. Do you have any suggestions on how to debug this? Thanks.

Hutchy68 (talk)02:20, 1 March 2014

In these cases I start adding manual debugging statements in the code until I understand what is going on.

Nikerabbit (talk)08:18, 1 March 2014

Thanks Nikerabbit, on a live site so I don't usually like "live debugging" but did it anyway. Seems as if this statement is the issue.

if ( !defined( 'NS_PORTAL' ) ) {
        $users = $this->fetchTranslatorsAuto();
        } else {
        $users = $this->fetchTranslatorsPortal( $natives );
}

We have NS_PORTAL defined. Funny thing is, I comment out the if statement and use either or to define $users.

        $users = $this->fetchTranslatorsAuto();

or

        $users = $this->fetchTranslatorsPortal( $natives );

The page works, but the heading of languages is doubled at the top.

dansk български español Bahasa Indonesia français English فارسی Nederlands

then

español Bahasa Indonesia فارسی dansk English български français Nederlands

Even though the languages are in a different order, any of them link to the page's anchors for the language headings.

Also, all users are wrapped in a <del> tag so they look like this, username. Not sure why they are doing that either.

Thanks for your help.

Hutchy68 (talk)14:37, 1 March 2014

That makes sense. We were supposed to get rid of the NS_PORTAL strategy, which would fix the error for you as well. The double list of languages can be just a byproduct of the heavy caching of the page with your debugging output.

Nikerabbit (talk)15:40, 1 March 2014
 
 
 
 
 

Link from translation pages to other pages in same page content language

A thread, Thread:Help talk:Extension:Translate/Translation language, was moved from here to Extension talk:Translate. This move was made by Nemo bis (talk | contribs) on 26 February 2014 at 21:03.

Outdated/Fuzzy

Is there a way of manually marking a translation as outdated/Fuzzy. Previously this was done with !!FUZZY!! but this no longer seems to work (at least for my initial test on Commons). Specifically the message should afterwards not be marked as translated which is what Fuzzy now does.

Lokal Profil (talk)18:07, 17 February 2014

!!FUZZY!! does still work as far as I know.

Nikerabbit (talk)18:29, 17 February 2014

You are right. I must have written !!Fuzzy!! by mistake and the progressbars do not detect the tag until after reloading.

Lokal Profil (talk)09:56, 18 February 2014
 
 

There are a few missing things that wuld simplify things in managing translated templates. See Help talk:Extension:Translate/Page translation administration for details.

Note that the "TNT" template has been updated on Meta-Wiki, and is still being worked on to implement the Mediawiki standard fallbacks, still missing for now.

The Lua module also fixes various quirks (the version copied from Meta-Wiki to Commons doesn't have these features (notably it is still producing "Script errors" if the specified template name is still not marked in translation to generate the /en subpage: so as long as the source template is not marked you need to create manually the final "/en" version, used as the last default).

Verdy p (talk)14:41, 24 January 2014

Translate Linktext of a Wikilink transcluded from a template

Consider a template containing something like

[[Main Page|<translate>Go to main page</translate>]]

which becomes

[[Main Page|<translate><!--T:1-->
Go to main page</translate>]]

This looks good on the template page, but as soon as you transclude this template, the <translate> tags get visible on the transcluding page. Is there a way to translate the link text only and still be able to transclude the generated content onto another page?

Patrick87 (talk)18:57, 11 December 2013

As Help:Extension:Translate/Page_translation_administration says, you can't call translatable templates directly, but only their languages subpages. This is usually done with templates like {{TNT}} or m:Template:Translatable template (the latter uses lua). Maybe in a distant future Translate will support this use case natively.

Nemo09:11, 12 December 2013

Ah thanks, totally makes sense.

I skipped the paragraph since I knew how to translate templates using such mechanisms, but i didn't know it was a requirement. Will change the template transclusion then.

Patrick87 (talk)09:27, 12 December 2013
 
 

Possibility to chose the language to translate from

Is there a possibility to choose the language to translate from? If a message is already translated to Spanish for example, why cannot we choose to show this message in the translation feature instead of English, it would allow more contributors to translate and make it easier since those languages are closer.

Amqui (talk)00:39, 29 August 2012

Would also be useful if at the top of any of the languages' pages, we could directly click on Translate instead of only saying "This is a translated page".

Amqui (talk)00:41, 29 August 2012

Bugs and feature requests should go to bugzilla.

Nikerabbit (talk)06:03, 29 August 2012

I have a large number of documents in Italian and German that I'd like to import and then translate to English. How does one go about posting feature requests to bugzilla?

~ Michael Chidester (Contact)01:28, 24 May 2013

The feature request already exists. For reporting things in the future, see How to report a bug. In short, go to bugzilla:, enter a new request, select "MediaWiki extensions->Translate". If it's a feature request (not a bug fix), choose "enhancement".

πr2 (tc)04:10, 24 May 2013
 
 
 

Use the assistant language feature available in your preferences.

Nikerabbit (talk)06:03, 29 August 2012

It should be directly selectionable from the translation feature if the particular message is already translated in other languages, we should have the option of selecting those to make our own translation.

Amqui (talk)07:46, 3 September 2012
 
 

Mistype with image caption

"The translation editor: a message with a tip and and a suggestion from an assistant language"

Please fix it.

Kaganer (talk)16:00, 8 November 2012

Thanks. This is still a wiki, by the way. ;-)

Nemo22:08, 8 November 2012
 

Redirections

I think the extension should create a redirection from the page with the translated title to the page with the English_title/lang_code.

Amqui (talk)00:50, 29 August 2012

There is no way that would work cleanly because translations in different languages can be same.

Nikerabbit (talk)06:04, 29 August 2012

I agree, thanks.

Amqui (talk)07:47, 3 September 2012
 
 

Why does the extension required an admin to mark every edit for translation? Shouldn't that be automatic for confirmed users?

Amqui (talk)00:51, 29 August 2012

The rights are configurable like any other rights. However, the marker has big responsibility to not mess up things or waste translators time.

Nikerabbit (talk)06:08, 29 August 2012

OK thanks

Amqui (talk)01:23, 30 August 2012
 
 

Why is it only one way?

Why the translation only work from English to other languages? How can a speaker of one of the translated languages add a section to the page directly in its language and it marks the English version that need to be translated. The Extension should work in all directions. And we should be able to directly edit all languages' pages.

Amqui (talk)00:32, 29 August 2012

When I try to edit a translated page it says "This page cannot be updated manually. This page is a translation of page Wikimedia Indigenous Languages and the translation can be updated using the translation tool." (on Meta), but a contributor cannot use the translation tool to add "new stuff" or a new section to the page, only to translate sections of the English page.

Amqui (talk)00:37, 29 August 2012

That is a more complex problem. See this presentation at Wikimania about one system that does that.

Nikerabbit (talk)06:02, 29 August 2012
 
 

Already has translations

What would people do if the page to mark for translations already has translations from when the extension wasn't enabled?

Ebe12323:29, 6 February 2012

You have to get them out of the way and manually copy/convert them to the new system.

siebrand00:05, 7 February 2012

Done, but lots of work!

Ebe12300:54, 7 February 2012

Yes, I know... If you have any thoughts on how it could be made easier, don't hold back...

siebrand22:14, 7 February 2012

Just want to note that it's better to not move the translations. If you move them, then they are separate "useless" pages, and if you leave them where the translate feature will be used (FuzzyBot simply overrides it), then the page history is kept and you can still look at past revisions and copy the content from there.

SPQRobin02:06, 9 February 2012

Didn't know that. Thanks for the tip.

siebrand (talk)13:13, 16 February 2012