Hi, today I've updated my wiki and all the extensions. Everything is wokring so far. But when clicking on translate button for a site, it will only show an empty section. I.e. clicking
Help talk:Extension:Translate
Appearance
translate on the page "Manuals:Test" will lead to ".../index.php?title=Special:Translate&group=page-Manuals%3ATest&action=page&filter=".
Here it only shows "Translate to German" (I'm from Germany). But the editor to translate is missing. Also I can't select any other language to translate to. As far as I can remember I could select any language before.
The above buttons also work, I can view the translation stats. Here all my sites are shown as translated.
What is missing here? Checking the debug log and console did not give me any clue. Please help, thanks!!
It sounds much like a JavaScript problem. Maybe the upgrade coincided with you disabling JavaScript (using NoScript, browser preferences etc.)? Or there is some JavaScript error on the browser console? If your wiki is publicly available, it would make debugging a lot easier if you could share its URL.
Hey,
Is it not possible to translate Sidebar without ULS?
I have a page called "Resources", English version of it works fine, but any translated not,
I believe it's because resources is one of the folders in mediawiki engine, and when that page gets translated, it changes to /wiki/Resources/de
Is there any solution for this, how to fix that in .htaccess? Or renaming the page is the only way?
fixed
I'm managing a MediaWiki site with Polish as the primary language. However, we occasionally receive content in English that needs to be incorporated seamlessly into our site, including adopting Polish page titles/URLs without the "/pl" suffix typically used for translated content. For example, I wish to translate the title "My new page" from English to Polish and use it as the main content, ensuring the URL reflects the Polish version without indicating it's a translation. Our site primarily translates content from English (or Spanish) to Polish, displaying it in Polish by default. I'm looking for advice on how to manually mark these articles for translation and adjust their URLs to blend with our Polish content. Any suggestions on setting this up efficiently would be greatly appreciated.
That's not supported by the Translate extension because general solution is not possible due to naming conflicts. You can create redirects manually.
Hi, Our main page has the following source code: <languages/><translate></translate>{{Main Page}}. So there is nothing to edit or translate (except the title "Main Page") and people should edit or translate the template instead. Is there a possibility to hide the "Translate this page" link, so I can replace it with a link to the Template? Thanks.
I don’t think there’s an officially supported solution for that, but I don’t think it makes sense either. You should decide whether you want the page to be translatable: if yes, the link shouldn’t be hidden; if no, the page shouldn’t be marked for translation. If nothing except for the title is translatable, then there is something that’s translatable: the title.
You have some options:
- (Supported and IMO best solution) Merge the template into the main page
- (Supported) Keep the link for translating the main page, add a link in wikitext to
Special:Translate/page-Template:Main Page
- (Unsupported, I recommend against it) Add the link in wikitext and hide the link for translating the main page itself using the CSS
.mw-pt-translate-header { display: none; }
I just expanded the Setup section of FlaggedRevs, an extension that gave me lots of problems that could have been prevented with proper instructions.
I was taken aback by these <translate>
tags. I did the best I could, but I have no idea if I broke something or did something wrong. Is this really the best way to make MediaWiki multilingual?
You are not the only one, though most people appreciate the value of supporting translations even though the method has shortcomings. We are exploring how to make the process better: https://meta.wikimedia.org/wiki/Research:Translatable_Pages_Research
Thanks. User:Shirayuki has altered my edit and made it compatible with the translation system... I think.
I honestly have no idea how this convoluted system works. I can't make heads or tails of it. For example, what are these <!--T:[number]-->
markers?
They are explained for example in Help:Extension:Translate/Page translation example.
I manage an English wiki with 7,000 pages written in English. To enhance its bilingual nature, I've generated machine translations for all those pages. These translations are stored in text files located in separate subdirectories like "/translations/es" and "/translations/fr".
Right now whenever I import my text files into MediaWiki I use Manual:ImportTextFiles.php/, is there a certain namespace or formatting that I have to use to upload the translations?
Is there a way I can easily import these pages into the Translate Extension?
When we mark a page for translation it always generates the /en language which is the same as the source. Can this be switched off or is it a requirement? If the latter, please indicate this clearly in the documentation. (@Wimjongman)
[22:17] <wimjongman> Does the translate module always need the /en language even if this is the source?
[22:28] <Nemo_bis> wimjongman: only if it's the source
[22:31] <wimjongman> So if english is the source I cannot block the /en generation?
[22:34] <Nemo_bis> wimjongman: with sufficient effort you might be able to break it, but are you sure you understand the consequences?
[22:34] <Nemo_bis> What are you trying to achieve?
[22:36] <wimjongman> Nemo_bis: I just want to understand if this is the intended behavior.
[22:38] <Nemo_bis> wimjongman: yes, it is
[22:39] <Nemo_bis> The subpage is needed so that all language codes are treated equally and so that a version of the page without Translate's markup is always available
[22:39] <Nemo_bis> Without the /en subpage, you would not really be able to make templates translatable, for instance. The subpages are what gets transcluded
[22:42] <wimjongman> Nemo_bis: I understand. Thanks. Another thing is that our translators have found the Special:MyLanguage tag and starting to put that in the source pages. Is that best practice?
[23:16] <Nemo_bis> wimjongman: yes, we currently have no way to redirect links to the correct page without wikitext changes
[22:46] <wimjongman> Nemo_bis: is SpecialMyLanguage needed in combination with $wgTranslatePageTranslationULS?
[23:16] <Nemo_bis> $wgTranslatePageTranslationULS only works for the first click
It is not possible to switch this off with configuration. The existence of such pages is mentioned in Help:Extension:Translate/Page translation administration
Is there a way to stop the source language pages appearing in search results?
We end up with two sets of search results for the page in the source language, one with /en, and one without.
Hello! On the same page, there are 4 times the same sentence. Can I reuse the same translation unit, or do the translators have to translate the same sentence 4 times?
For future reference, someone had the same question 7 years ago, but maybe the devs created some kind of unit variable like <ref> that can be reused in the same page (example : <unit name=1$ />?
Thank you.
This is not currently a supported feature. There are some templates here and/or meta.wikimedia.org that allow referencing other translation units. Don't remember the exact names right now.
On Meta it's m:Template:Tunit. Don't know about any similar templates on MediaWiki.org.
Technically no problem, practically big problem, because in another languege may be identically TU tranlated in other sense, by context. I use templates with combination a contents of the translated pages very much. See for example page 1A and try change language of the interface to 'polski'. It's not finished page for now. It's only example, how can be generated content from translated pages by Template:svitek
I see that the documentation says "It can be used to translate the content pages, the interface of the wiki and even other software products", but I can't find any information on how to set it up for my non-Mediawiki website.
I think it means you can use it to translate other software products, but you still need a dedicated wiki for this. See for example translatewiki.net.
That is correct. It only runs on MediaWiki, but you can translate various things with it.
Oh got it. Maybe I'll have the translatable parts of my website on a wiki just for the Translate extension, and the core of the website would use the MW API to get and insert the translated content into the website.
Edit: Oh, just realized that's what Matěj was referring to.
Could you provide an example link to a Mediawiki instance that is connected to translatewiki.net, which is used for software interface messages? For example, where is the wiki located that maintains all the translations for the software messages of Mediawiki itself?
The wiki that maintains translations for MediaWiki itself is translatewiki.net.
Oh ok, I thought translatewiki.net somehow pulled the messages to translate from another wiki hosted by Wikimedia or Mozilla, or whoever.
There is no other wiki involved, translatewiki.net pulls the English messages and pushes the translations directly from/to Git (e.g. core repo).
Understood. Is there any guide on setting up a git repo and connecting it to translatewiki.net and/or a private wiki with the Translate extension?
See translatewiki:Translating:New project about getting a project on translatewiki.net and Help:Extension:Translate about self-administered Translate extension.
Ok, thank you!