Can someone please explain the process to move a set of translated pages from one wiki to another? There are numbers of templates and translated pages that I wish to bring to wikimaniawiki from meta and the like. The xml import doesn't allow the writing of the Translations: ns. pages, and I cannot tell whether that is a straight permissions issue, or whether it is wanting to see pre-existing files prior to occuring. The export translations function seems to be a one translation in one language at a time process. Help pages don't seem to overtly cover this, or I am completely misunderstanding. Thanks for any direction.
Process for migrating translated pages between wikis?
Source page language differs from the wiki language
Wiki language = English
Suppose there is a page LifeOfCats
Special:MyLangauge works like this:
LifeOfCats = English
LifeOfCats/fr = French
LifeOfCats/ru = Russian
If I create a page in Russian, it should obviously be LifeOfCats/ru
When I translate it into English, I want that the parent page LifeOfCats to be created. But there is no such possibility.
If I create LifeOfCats/ru and assign it the language Russian, then the translation into English produces LifeOfCats/ru/en. It is wrong. The English version must be LifeOfCats - the parent page relative to other languages. Only then will the hierarchy of translations and Special: MyLanguage work correctly
Is there an easy way to create pages with a source language different from the wiki language so that they can be translated?
I solved this problem with "Shaman's Magic Tambourine".
Does it make sense to publish the algorithm here in the discussion?
I'm interested in what that means...
When the source text is created in another language, there is an algorithm that will help translate it into the main language and at the same time maintain the correct page hierarchy, as well as ensure the proper operation of the Special:MyLanguage links.
Just in case still helpful, there are docs on the Special:PageLanguage feature at Manual:Language#Page_content_language - see the subsection "Manually changing page language".
Is it possible to disable the split in units?
I'd like to know if it's possible to disable the auto split in units?
When the page is mark for translation, the system will insert tags like inside the wiki-text.
I'd like to avoid that, so that the entire text inside the <Translate> tag will be translated in one string (Even if there is a hard return inside the <Translate>).
I hope I am clear. Thanks a lot for your help.
Hi. Could you give us a link to the page you're working on, so that we can understand the use-case/problem you're trying to solve?
And/or, paste the content (or similar) into a sandbox? (Feel free to use User:Quiddity (WMF)/sandboxtranslation).
Hi @Quiddity (WMF), thanks for your quick reply.
Unfortunatly, I can't share a link with you since I am working on a local environment.
However, on the sandbox, if you switch to the wikitext edit mode:
You can see that
,... have been inserted inside the wikitext to split all the content inside <translate> and </translate> into translatable strings (Witch is fine).
However, on my wiki, when I switch to the VE edit mode, I see little grey mark that looks like !T:2 in lieu of the
tag (witch is not very convenient for the user).
On the sandbow, however, those little marks don't seems to show up. Is it something that as been solved in a new version of VE maybe?
Another question, is their a way to simply disable the auto split? (so disable the fact that the extension automatically insert
into the wiki-text)
Thanks a lot.
Re: Visual editor - no, I'm afraid that editor does not currently support Extension:Translate (which is an old and complicated extension).
Re: merging all "translatable units" into a single unit - I don't think so, beyond using
<br> at the end of every line. (Which I strongly advise against) -- The extension is designed to make it easy for various people to do "little bits, one at a time" (So if they get bored or busy, halfway through the work, then at least some of the page is translated); therefor, to have "multiple paragraphs all in a single translation unit" isn't possible (as far as I know, and I cannot think of any other hacks/workarounds to make it do that). Sorry, but hope that helps.
Re: Re: merging all "translatable units" into a single unit - I don't think so, beyond using
<br> at the end of every line. (Which I strongly advise against) -- The extension is designed to make it easy for various people to do "little bits, one at a time"
How to insert a fully translated text to the place of the translated text?
Maybe there is a ready-made fully translated text. In addition, texts for different languages may differ in content and may be they are not a direct translation of one into another.
"texts for different languages may differ in content and may be they are not a direct translation of one into another."
This extension is generally intended for direct translations. It is primarily used for keeping multilingual copies of documentation updated.
"How to insert a fully translated text to the place of the translated text?"
Section by section.
Probably, it is time for you to expand the idea of why a CMS exists. Not only to translate texts in it.
Where do you discuss system tasks?
I'm not sure what you mean by "system tasks". We track software issues (bugs and feature requests, etc) in https://phabricator.wikimedia.org/ (documentation at Phabricator). This wiki's purpose is described at Project:About. Some discussion happens here, and some in all the other places listed at Communication. It's a complicated place!
I think that another extension is needed, which only keeps track of whether there are language-versions of text, and by analogy of the <languages /> tag shows a switch of languages.
Links or examples almost always help! They can show other people what you're thinking of, or what you've found that wasn't ideal (and why), or related examples from elsewhere. Your current comments are too short and abstract for me to understand quite what you mean. Please link to or explain the specific use-case(s) that you are thinking of.
The <languages /> tag works only when the text is translated into other languages with the Translate extension.
But in a situation where the text is not translated, but simply there are other corresponding texts in other languages, the <languages /> tag does not work. But it does need to work.
I think it would be helpful to have a tag capable of displaying a language switch for cases where the texts are not "translated section by section".
Ah, I believe Template:Languages works for that use-case, on this wiki.
Multilanguage import and translate
I have a 'practical' question, but i am not sure where to put it - please direct me elsewhere if this is not the correct "talk" page…
I setup a new Wiki (V1.30) on a NAS and I want to import all of a old (V1.81) Wiki - located on a PC.
The 'source language' for the wiki is
'da' (Danish), but I want to add
en' (English) as an option - so I guess that i need to prepare a bit to get that right…
I have some 2-400 Wiki pages of English text… that I want to import and then translate. For that I need to import the pages to say
wiki/n1:whatever/en - but when I translate this, to 'da' ,will that then end up in
\whatever\dk or will it go in
Furthermore - I need to split up these pages into namespaces (like,
n1:, n2:, n3:… say I will have a name space like this: wiki/n1:whatever\en
My general questions are:
- Can I somehow import texts to land in the "correct" place...
When i translate from the /en version, where will this end.. and will the Wiki work with a mix of /da, /en and <source language> pages… what happens if there are the following page combinations at the same time:
wiki/n1:whatever1/en the english page
wiki/n1:whatever1/da page in danish
wiki/n1:whatever1 - standard name for the 'n1:whatever1' page, should also be in Danish
p.s. I did this interface to goggeltranslate at some time in the past. https://www.mediawiki.org/w/index.php?oldid=1351872
I would do it like this:
- Import all English pages into the wiki in a way you want (no language codes in the page names)
- Mark them translatable
- "Translate" them to English by just copying the source text
- Translate the source text page into Danish manually
- Re-mark the source page for translation
- Mark the English translations as non-fuzzy
Naturally! Clever.. :-) - could have thought about that, but would I have.. before it was too late?
Than How do I handle the
'da' language tags - the "source languag" will be Danish, so can I simply translate to a page "without" the page name language code? Over time the wiki would probably contain a mix of
en - but can I do anything to prevent that from happening...
I guess I could leave out the
'da' option all together.. but will that create oher issues?
The system will create /en and /da pages for you. There will be no automatically generated links to /da, because links to that language will point to the page without language code.
Existing translations must be moved
I mean this is one of the main reasons why this extension not get wider used, because there is no function to do this simple time consuming work. Normally there exist already around 20 target subpages e.q. on Commons. So it's not fun to use it. Maybe use Extension:Replace Text.
PS: Beside the fact we can't move any page under i18n/ if the page /i18n exists (so we must delete them first?).
EDIT: That was a very bad idea from me [[phab:T114592]] (<-- I love this flow)
It is not clear whether you mean existing non-Translate translations (for that use Special:PageMigration) or renaming pages (use the move action), but both are supported with some known issues.
Thanks for answer, there is a serious problem on Template:Mozilla Public License/(after moving, which was unnecessary in my opinion too). I edited the /i18n subpage again to refresh the ext.translate (bot), and now any language got overwritten with English (I guess restoring the "bot deletion" was a very bad idea). I really do not feel like re-entering each language manually. An undo of Move or something would be very good!? PS:Maybe a detailed documentation, what is going wrong here, would be good too.
PS: I trying the Special:PageMigration thing, but I got an JS error on the page (nothing happen). I guess it comes from "mediawiki.searchSuggest" (
Cannot read property 'indexOf' of undefined)
I'll look into these errors later when I have time. Perhaps there is easy way to restore the translations.
Requirements for Special:MyLanguage
On a wiki project I'm working on, I've had an issue for a while, where Special:MyLanguage doesn't redirect properly and instead shows me someone else's version of a cached/static article.
E.g. if it's a logged out user, it shows me a static of being logged out and if I stumble upon a registered user's static, then it will display me as if I'm logged in as someone else.
Any ideas how to fix this? Because currently I'm unable to utilize Special:MyLanguage as its intended purpose. It's more of a burden, than of help.
First of all, Special:MyLanguage has been in MediaWiki core for some time. Secondly, it sounds like you have a frontend cache that is not properly configured. I've never seen MediaWiki give out pages intended for some other use.
Do we always need /en
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
Can't import .po files on my setup
I am using Special:ImportTranslations to import .po translations from offline translators.
When I import them, I can "Execute" (see screenshot)
But when I go to my page, the translations are not taken into account.
What do I do wrong ?
@Tuxxic the same thing is happening in my wiki setup. It would be realy nice if you could share your solution to us.
Did you already solved this Problem??? I realy need to now.
Hi @StefanN91, what I did was importing the .po files manually, by using
Translate/script/poimport.php script, mentioned here: https://www.mediawiki.org/wiki/Help:Extension:Translate/Off-line_translation
I know it's not optimal, but it did the job. I am still waiting for help on the special page, too, since I can't access my web server freely ...
Thanks for your help. I'm going to use the poimport.php script and see if I works.
Do you know if someone is working on that problem?
No, I don't, but feel free to open a bug on https://phabricator.wikimedia.org/ :)
Looks like the bug is known and already solved. https://phabricator.wikimedia.org/T151585
I used this patch https://gerrit.wikimedia.org/r/334907 and it realy worked.
Be careful, the last added version https://gerrit.wikimedia.org/r/336786 caused a different bug in my version. Couldn't change translation Language.
Good luck ;)
Aha ! Thanks for help, we get closer to the perfection as patches are put !
Automatically switch to reader's preferred language if it is available.
I want the page to automatically show the translation for the user's selected laguage if the page is available in that language. I see that on the Extension:Translate page, if I switch my language to Spanish, then it automatically loads the Spanish translation of the page, but on my site https://bible.exchange/translate/Test it does not do the same thing.
Is there a setting that I need to change?
Yes there is. It is called $wgTranslatePageTranslationULS.
How can I make <languages /> appear in MediaWiki:Sitenotice?
The idea is to have the languages links appear on all pages.
If you have any alternative suggestions then I'm interested.
Not possible with Translate extension. The sitenotice does not know which translations exist. I am not sure it even knows which page it is displayed on, but if it does, you could make your own template that mimics the look of the language box.